Compare commits

..
73 Commits
Author SHA1 Message Date
yiling c302c162a0 Release v0.5.2 2026-10-13 21:03:51 +08:00
Yiling-J 432be04a96 Update CHANGELOG to remove fixed and changed entries
Removed fixed and changed entries related to 3D visual markup and settings adjustments.
2026-10-13 20:18:03 +08:00
yiling 6c95d14fb3 fix(webui): reverse 3D sprite scrubbing and remove container volumes from turntable doc 2026-10-13 16:49:42 +08:00
Yiling-J 3263580e89 fix(webui): clear markup annotations when rotating 3d model (#474) 2026-10-13 15:21:12 +08:00
yiling f3da916905 fix(asset): remove unbundled GLTF format from supported 3D models 2026-10-13 11:38:25 +08:00
Yiling-J fe8d404a44 feat(agent): support 3D degree comments, markup annotations, and config3d in read_asset (#473)
* 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
2026-10-13 00:03:21 +08:00
Yiling-J 0f9d213b1d docs: update 3D asset and Gotenberg integration guides (#472) 2026-10-12 16:55:20 +08:00
Yiling-J f952318b34 feat(team): add integrations settings with turntable and gotenberg (#471)
* feat(team): add integrations settings with turntable and gotenberg

* fix(upload): pass teamId to gotenberg availability check during upload preflight
2026-10-12 15:38:15 +08:00
Yiling-J 43a2eced75 feat(transcode): add 3D asset support and turntable viewer (#454)
* 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
2026-10-11 21:32:28 +08:00
Christopher BuzickyandBristopher e894457275 fix(transcode): apply EXIF orientation to non-RAW image transcodes and reported size (#461)
* 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>
2026-10-10 15:41:49 +08:00
4b1b64fe2b feat(kanban): link related assets to their file or folder (#453)
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>
2026-10-07 20:14:36 +08:00
yiling f8beb195dd Release v0.5.1 2026-10-06 22:29:50 +08:00
yiling a97996cb59 docs(changelog): note clickable notification cards 2026-10-06 22:18:18 +08:00
jorgeandYiling-J f870ca9b49 feat(asset): link to assets on notification cards. (#451)
* feat(asset): link to assets on notification cards.

* Update packages/webui/components/notification-card.tsx

Co-authored-by: Yiling-J <njjyl723@gmail.com>

---------

Co-authored-by: Yiling-J <njjyl723@gmail.com>
2026-10-06 22:14:11 +08:00
Yiling-J 2e5ff281a8 feat(transcode): add hardware decoding support for nvenc, qsv, and rkmpp (#452)
* feat(transcode): add hardware decoding support for nvenc, qsv, and rkmpp

* refactor(transcode): eliminate redundant hardware decode gating and dead condition
2026-10-06 17:35:14 +08:00
yiling de8decf113 fix(ci): prevent tagging main on PR workflow_dispatch docker builds 2026-10-06 11:49:49 +08:00
Cameron HarrisandClaude Opus 5.5 dd57fb9ed2 feat(transcode): decode and scale on the GPU for hardware transcodes (VA-API) (#449)
* 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>
2026-10-05 12:00:01 +08:00
Yiling-J 9a640632aa ci(release): allow manual Docker image build from external PR (#450) 2026-10-05 09:48:48 +08:00
yiling e61641d7ec fix(workflow): increase activity startToCloseTimeout to 120 minutes 2026-10-04 10:22:31 +08:00
Yiling-J 7ca8ba8b2a fix(transcode): resolve RAW transcoding hang in Docker deployments (#447) 2026-10-03 12:45:12 +08:00
Yiling-J 8805d5799a feat(transcode): add dcraw_emu fallback for RAW image preview generation (#446) 2026-10-03 11:03:31 +08:00
yiling 013c4a8156 Release v0.5.0 2026-10-02 20:28:37 +08:00
Yiling-J 20b5ebeefd fix(asset): mark asset as failed and display failure state in webui when transcoding fails (#445)
* 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
2026-10-02 20:09:32 +08:00
Yiling-J daa20aed20 fix(webui): add video loading state and poster placeholder (#444)
* fix(webui): add video loading state and poster placeholder

* fix(webui): prevent buffer progress events from canceling stall indicator
2026-10-02 16:19:49 +08:00
Yiling-J 3564d4d164 fix(transcode): avoid selecting attached picture streams for video transcoding (#443)
* 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
2026-10-02 13:51:17 +08:00
Yiling-J 206763e966 feat(auth): add demo user login button and update demo description (#442)
* feat(auth): add demo user login button and update description

* feat(auth): move demo hint below button and add discord link
2026-10-01 22:04:15 +08:00
Yiling-J 4e4da595a6 feat(settings): redesign video transcoding settings into dedicated cards and rename team AI settings (#441)
* 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
2026-10-01 21:19:25 +08:00
Yiling-J a21a0c9655 fix(settings): prevent deselecting last ladder and coalesce rapid toggles (#440) 2026-10-01 16:35:47 +08:00
Yiling-J fc7282581f fix(share): prevent unwatermarked HLS playback on public shares before transcode completion (#439) 2026-10-01 15:41:45 +08:00
Yiling-J e007054f47 feat(transcode): add multi-resolution strategy with configurable ladders and fallback (#438)
* feat(transcode): add multi-resolution strategy with configurable ladders and fallback

* feat(settings): show toast on settings update and add manual verification plan to PR template

* fix(webui): preserve video resolution and fix 480p label in download dropdowns

* fix(webui): display standard short-side resolution for vertical videos in seekbar

* fix(webui): fix portrait transcode resolution labeling and serialize settings toggles
2026-10-01 13:27:50 +08:00
Yiling-J a84da8678e feat(webui): switch from video.js to hls.js and native video player (#437)
* feat(webui): switch from video.js to hls.js and native video player

* fix(webui): prevent stale seek hijacking and guard native HLS compare mode
2026-09-30 20:23:44 +08:00
Yiling-J 123a8cb5f4 feat(transcode): add HLS live streaming support (#436)
* feat(transcode): add HLS live streaming support

* fix(hls): resolve version stacks for public HLS and add workflow E2E test
2026-09-30 16:31:40 +08:00
Yiling-J 5fe22ac52c feat(transcode): add initial camera RAW image support (#435)
- Add centralized RAW file extension set and detection helper for 23 common camera RAW formats
- Update getProxyType and EXTENSION_MIME_TYPES to route RAW formats into the image pipeline
- Add exiftool-vendored runtime dependency and mark as external in build-npm script
- Implement embedded JPEG extraction to temporary file with priority JpgFromRaw2 -> JpgFromRaw -> PreviewImage
- Read and apply EXIF orientation from RAW container to prevent rotation/mirroring issues
- Integrate into TranscodeService.getImageInfo and transcodeImage with proper temporary file cleanup
- Add hasUsablePreview guard in transcodeImageWorkflow to gracefully handle RAW files without embedded previews
- Add unit, service, workflow, and E2E tests for RAW processing
2026-09-29 21:09:27 +08:00
Yiling-J 11d21444cf fix(trash): prevent empty trash dialog from closing before API call completes (#434)
AlertDialogAction from Radix UI auto-closes the dialog on click.
Added e.preventDefault() so the dialog stays open and shows the
'Deleting...' loading state until the operation finishes.

Fixes both desktop and mobile file browsers.
2026-09-29 10:40:13 +08:00
yiling f2b0415580 Release v0.4.9 2026-09-28 20:17:50 +08:00
Yiling-J c9d0b476cd feat(transcode): fallback to software encoding when hardware transcode fails (#433) 2026-09-28 16:45:28 +08:00
yiling bf5ac566b6 refactor(notification): simplify email wording and remove redundant team references 2026-09-28 13:37:16 +08:00
Yiling-J af8f24aa95 docs(settings): add email notifications documentation to team settings (#432)
* docs(settings): add email notification documentation to team settings

* fix(notification): use correct webui route URLs for project and asset links in emails
2026-09-28 11:27:59 +08:00
Yiling-J d98f486c9d feat(notification): add email notification infrastructure, smtp configuration, and periodic background delivery job (#431)
* feat(notification): add email notification support and dedicated workflow

* feat(webui): add team email notification settings and test email dialog

* refactor(webui): remove redundant card header from email notification settings

* fix(notification): prevent sending notification emails to AI agents

* feat(notification): display project, avatar, upload time and resolve mention names in notification emails

* refactor(notification): remove uploadDebounceSeconds and naive workflow sleep

* refactor(notification): remove temporal notification workflow and keep email infrastructure

* fix(team): prevent leaking email notification settings and credentials in team settings

* feat(notification): add periodic background job for batched email notification delivery

* fix(notification): embed avatars and thumbnails as inline cid attachments
2026-09-28 09:58:59 +08:00
Yiling-J 94ea4c917a feat(transcode): add VA-API hardware acceleration support (#430)
* feat(transcode): add VA-API hardware acceleration support

* fix(docker): switch to jellyfin-ffmpeg 8.1.2-5 for VA-API support

* fix(transcode): probe hardware encoder usability to skip uninitialized drivers

* ci(release): add workflow_dispatch trigger with custom tag input

* fix(transcode): use 256x256 frame dimension for encoder usability probe

* feat(docker): add hwaccel transcoding compose presets matching immich

* docs: add hardware transcoding documentation and quickstart references

* feat(transcode): prioritize h264_vaapi before h264_qsv on Linux

* fix(docker): extend device permission loop to rkmpp and wsl accelerator nodes
2026-09-26 20:55:57 +08:00
Yiling-J 941bf0fd1b feat(transcode): smart poster frame selection and decoupled generation (#428)
* feat(transcode): smart poster frame selection and decoupled generation

* fix(transcode): detect MPEG-TS extension from URL pathname for signed remote sources
2026-09-25 16:37:16 +08:00
Yiling-J 59742dde78 feat(transcode): optimize video sprite generation with seek pool and compositing (#427)
* feat(transcode): optimize video sprite generation with seek pool and compositing

* fix(transcode): handle abort signal during and after sharp compositing
2026-09-25 15:06:15 +08:00
yiling 29cd5d807c test(scripts): find release by version in changelog integration test 2026-09-24 20:34:53 +08:00
yiling f6e27095a5 Release v0.4.8 2026-09-24 20:26:23 +08:00
Yiling-J 55637bc9a8 feat(transcode): optimize video proxy quality and fix videotoolbox first-frame blocking (#426)
- Fix first-frame macroblocking on VideoToolbox hardware acceleration by avoiding -maxrate/-bufsize which triggers Apple's DataRateLimits initial rate controller starvation, applying target -b:v instead.
- Optimize software encoding (libx264) quality by adjusting CRF from 26 to 23.
- Disable B-frames (-bf 0) for libx264 proxies to ensure zero-latency frame stepping (JKL) and scrubbing, matching Frame.io review proxy standards.
- Update unit tests to verify the new encoder configurations and bitrate calculation logic.
2026-09-24 17:16:02 +08:00
Yiling-J 0d6671c3e1 fix(webui): show play button and darken tint only before initial playback (#425)
* fix(webui): remove paused play button overlay and darken cover from video players

* fix(webui): show play button and darken tint only before initial playback
2026-09-24 15:19:46 +08:00
Yiling-J c3375ee935 feat(transcode): add HDR video proxy support and playback (#424)
* feat(transcode): add HDR output proxy support

* fix(transcode): auto-detect MoltenVK Vulkan ICD on macOS for libplacebo filters

* fix(transcode): split filter in generateSprite to ensure poster uses tone-mapped stream

* docs(changelog): update docs/changelog.mdx and ignore in prettier

* fix(transcode): respect video rotation metadata to preserve display aspect ratio

* fix(webui): render native video with hardware EDR acceleration instead of 2D canvas

* fix(webui): show HDR label on mobile video control bar

* fix(share): preserve hdr flag on watermarked video transcodes

* fix(webui): differentiate HDR download options in video player

* fix(transcode): handle Dolby Vision Profile 5 via standard HDR pipeline without libplacebo

* fix(transcode): prepend setparams filter to prevent zscale colorspace path error for DV P5

* refactor(transcode): simplify HDR proxies to always produce HDR without SDR setting
2026-09-24 14:32:47 +08:00
Yiling-J f579947770 feat(docs): add changelog section to mintlify documentation (#422) 2026-09-22 21:02:27 +08:00
Yiling-J 53c9485f10 fix(core): only manage PID files in daemon mode (#421) 2026-09-22 20:31:38 +08:00
Yiling-J 75bf9b3b88 fix(docker): stop publishing postgres port in compose files (#420)
The bundled PostgreSQL service published port 5432 on the host, which caused
docker compose up to fail when that port was already in use. A failed start
leaves the container without a network endpoint, so subsequent runs reuse the
broken container and the app cannot reach the database (Prisma P1001).

The app only needs the database inside the compose network, so the host port
mapping is unnecessary. Remove it from all local and temporal compose files.
2026-09-20 11:46:13 +08:00
yiling 657cd761bc Release v0.4.7 2026-09-19 16:01:20 +08:00
Yiling-J de634a5dc5 feat(asset): show poster and hover preview while video is transcoding (#419)
* feat(asset): show poster and hover preview while video is transcoding

Generate and persist the sprite (and its poster) before the proxy
transcodes run, so the poster/sprite are available in the file list
while the asset is still processing.

Render the preview in the file card behind a translucent processing
overlay instead of a blank skeleton, and replace hardcoded status text
with existing i18n keys.

* feat(asset): pulse the cover and show Preparing/Uploading labels while processing

Drop the processing text overlay on the file card preview in favour of a
subtle pulsing opacity on the cover, and show "Uploading..."/"Preparing..."
in the creator row so the real author and date only appear once the asset
is ready.

* feat(asset): use a hollow ring for the preparing placeholder

Match the geometry of the upload progress ring (empty inside, no
percentage) and hide the duration badge while processing, so the
upload-to-processing transition reads as one continuous animation.

* style(asset): shrink-only preparing ring in muted grey at fixed opacity

Animate only the ring size (1 -> 0.8 -> 1) and hold a constant 0.6
opacity, using a muted grey stroke instead of primary.
2026-09-19 15:25:41 +08:00
Yiling-J 09b65a1eb6 feat(asset): Recently Deleted previews, retention countdown, and version stack delete/restore (#418)
* feat(asset): improve Recently Deleted previews and retention indicators

- Include soft-deleted children when building folder previews for the
  Recently Deleted view, and resolve deleted version stacks to their
  latest version so a trashed folder shows what was inside it.
- Add a "days left" badge (clock + Nd) to file and folder cards in the
  Recently Deleted view, placed to the left of the comments badge.
- Fix an issue where deleting or restoring a version stack from the file
  list did nothing because the WebUI dropped version_stack items before
  calling the API.
- Share the 30-day trash retention window through TRASH_RETENTION_DAYS.

* test(asset): use typed MediaInfo in recently-deleted preview tests

Replace the explicit any cast with a fully typed MediaInfo object so the new tests comply with the no-explicit-any policy.
2026-09-19 11:36:14 +08:00
Yiling-J b52b2ce7d8 fix(transcode): preserve trashed status during background jobs and handle permanent purge (#416)
* fix(transcode): preserve trashed status during background jobs and handle permanent purge

* fix(workflow): clear heartbeat and add info logs on task cancellation

* fix(transcode): terminate media processes and guard task activities on cancellation

- Pass AbortSignal to ffmpeg and pdftoppm child processes in transcodeService to terminate processes on task cancellation
- Add local task AbortController context and cancellation guards in executeActivity to prevent subsequent workflow activities
- Forward taskId and cancellation signals in transcode, screenshot, and PDF activities
- Use updateMany instead of update in task activities to eliminate Prisma P2025 errors on purged task records

* fix(workflow): allow cleanup activities in finally blocks during task cancellation

Remove blanket cancellation check in executeActivity so that workflows can execute cleanup and failure handling activities in catch and finally blocks upon cancellation, while relying on AbortSignal in active activities to abort execution.

* docs(changelog): improve user friendliness of changelog entries and formatting example

* docs(agents): update changelog guidelines to emphasize end-user friendly descriptions

* fix(transcode): handle queued cancellation and delete races in media workflow
2026-09-19 10:40:49 +08:00
Yiling-J 145aa6bfb4 fix(webui,core): center breadcrumb menu on chevron and fix proxy download filename (#417) 2026-09-18 23:14:54 +08:00
Yiling-J a91d8c4521 feat(settings): add FFmpeg threads setting for media processing (#415)
* feat(settings): add FFmpeg threads setting for media processing

* style(settings): add bottom padding to media processing page
2026-09-18 13:30:33 +08:00
Yiling-J 3a509537fd feat(changelog): add CHANGELOG.md, release extraction script, and developer guidelines (#414)
* feat(changelog): add CHANGELOG.md, release extraction script, and developer guidelines

* docs(agents): simplify changelog guidelines for brevity
2026-09-18 11:57:25 +08:00
yiling 76ffb51bb2 Release v0.4.6 2026-09-17 21:58:10 +08:00
Yiling-J ca94e51424 fix(api): enforce SHUMAI_DEMO_MODE for API token and CLI requests (#413) 2026-09-17 21:47:07 +08:00
Yiling-J d8621a53b6 docs: add NLE export and Premiere Pro UXP plugin documentation (#412)
* docs: add NLE export and Premiere Pro UXP plugin documentation

* docs: mark Premiere Pro UXP plugin as experimental
2026-09-17 21:32:41 +08:00
Yiling-J e2f741eda6 feat(settings): add team appearance setting to hide agent features (#411)
* feat(settings): add team appearance setting to hide agent features

Add an Appearance subpage under Team Settings allowing team owners to toggle appearance.hideAgent for the team. Return appearance.hideAgent in the user-metadata API, and conditionally hide the AGENTS.md button, agent chatbot sidebar, and chatbot trigger button in the WebUI.

* refactor(settings): add strongly typed TeamSettingsResponse to remove explicit any

Introduce TeamSettingsResponse and TeamAppearanceSettings in @shumai/dtos, type TeamService.getSettings and updateSettings, and eliminate the explicit any cast in AppearanceSettings.tsx.
2026-09-17 18:31:43 +08:00
Yiling-J 7af3647913 fix(premiere-uxp): scope sequence links by server endpoint and surface sync errors (#409)
* fix(premiere-uxp): scope sequence links by server endpoint and surface sync errors

- Add optional endpoint property to LinkedSequenceAsset to record originating server
- Implement normalizeEndpoint and isSameEndpoint helpers in utils/url
- Skip polling foreign sequence links in autoSyncService when connected to a different server
- Display informative Server: <host> badge and disable manual sync with tooltip for foreign links in SequencesView
- Guard comment fallback in removeSequenceLink and link matching in FileListView by endpoint
- Throw on non-200 responses in fetchAssetComments and display error toast on failed manual sync
- Add comprehensive unit tests covering endpoint normalization, foreign link skipping, and error toast handling
- Rebuild and package shumai-premiere.ccx

* fix(premiere-uxp): filter out foreign endpoint sequence links from sequences tab

- Filter all sequence links in SequencesView to only display links matching the current server endpoint
- Filter existing sequence links in LinkSequenceDialog by endpoint so foreign sequences appear as ready to link on the current server
- Ensure onLinkCountChange in FileListView and SequencesView only counts sequences linked to the active server
- Add 'Browse Assets to Link' action button to the SequencesView unified empty state
- Update SequencesView tests to verify foreign links are completely hidden and link counts are scoped
- Rebuild and package shumai-premiere.ccx

* fix(premiere-uxp): show file creation time on cards and remove sequence icon in link dialog

* fix(premiere-uxp): remove browse button in sequences empty state
2026-09-17 16:37:11 +08:00
Yiling-J 12f99797d2 fix(premiere-uxp): preserve remote cloud storage presigned URLs in asset resolution (#408)
- Stop rewriting absolute URLs in resolveAssetUrl to prevent overwriting cloud storage hosts (e.g. Cloudflare R2, S3) with the plugin endpoint
- Prepend endpoint to relative paths only (e.g. /files/..., /api/...)
- Resolve download URLs through resolveAssetUrl before fetch in importAssetIntoPremiere
- Update unit tests to ensure absolute URLs remain intact and relative download paths resolve correctly
- Rebuild and package shumai-premiere.ccx
2026-09-17 16:37:11 +08:00
Yiling-J 1796de8eda feat(premiere-uxp): introduce Adobe Premiere Pro UXP plugin for Shumai (#407)
* feat(premiere-uxp): use native Bun bundler and build script instead of Vite

* feat(premiere-uxp): switch FileListView to use Search API consistent with WebUI

* feat(premiere-uxp): add on-demand jpeg preview conversion for uxp compatibility

* feat(premiere-uxp): integrate spectrum web components (swc)

* fix(premiere-uxp): align swc packages with 0.37.0 and fix auth layout

* feat(premiere-uxp): use horizontal 2-column card view for projects and files

* style(premiere-uxp): enlarge file preview by 20% and add row padding

* fix(premiere-uxp): prevent card squishing and overflow with large item counts

* fix(premiere-uxp): change host in manifest to single object

* docs(premiere-uxp): add AGENTS.md with SWC preferences and UXP layout rules

* feat(premiere-uxp): integrate spectrum web components across plugin views

* fix(premiere-uxp): remove breadcrumb icons and use slash separator

* feat(premiere-uxp): add collapsible folder and file sections with infinite scroll

* feat(premiere-uxp): update file card layout with right column info and clean preview

* fix(premiere-uxp): use raw text for file card details and fix black icons

* style(premiere-uxp): use contain object-fit and black background for file card preview

* fix(premiere-uxp): refine header logo, sticky title bars, circular badges, and controls

* fix(premiere-uxp): replace stroke icons with spectrum workflow icons

* fix(premiere-uxp): switch icon buttons to swc sp-button with icon-only and slot=icon

* fix(premiere-uxp): vertically center endpoint text in header

* feat(premiere-uxp): add asset and proxy import support into Premiere Pro

- Implement context menu on file cards with left-click, right-click, and more action button triggers
- Support raw file import for non-video assets and video assets
- Support video proxy submenu listing ready transcode resolutions
- Add UXP native file picker save dialog and binary download orchestration
- Call Premiere Pro project.importFiles API to import downloaded assets into active project
- Add non-blocking toast notification banner for progress and status reporting
- Add unit tests for premiere host service and import orchestration

* fix(premiere-uxp): anchor import menu directly to file card using sp-action-menu

- Replace custom fixed-position ContextMenu with native SWC sp-action-menu
- Anchor menu directly to the triggered file card rather than the top-left window corner
- Support programmatic opening on file card click/contextmenu via imperative handle
- Support video submenu with Original and ready proxy options inside sp-action-menu
- Lazy load video proxies on menu open or hover
- Clean up obsolete fixed-position styles and unused backdrop overlays

* fix(premiere-uxp): align SWC packages to 0.37.0 and guard custom element registry

- Downgrade action-menu and menu SWC packages to 0.37.0 to match the rest of the workspace
- Eliminate duplicate icons-ui and sp-icon-chevron100 customElements.define calls
- Add polyfill guard to customElements.define to prevent duplicate registration errors during UXP reload

* fix(premiere-uxp): polyfill window.matchMedia for Adobe UXP

- Add window.matchMedia polyfill in polyfills.ts
- Satisfies SWC MatchMediaController used by ActionMenu and PickerBase in UXP
- Prevents TypeError when opening files page

* feat(premiere-uxp): replace context menu with card download action and video import dialog

* fix(premiere-uxp): resolve download url before save, pass null targetBin, and center download icon

* fix(premiere-uxp): resolve raw download url via download-url endpoint with fallback

* feat(premiere-uxp): use native folder picker and auto-increment conflict suffixes

* feat(premiere-uxp): add sequence linking, comment-marker sync, and navigation tabs

- Add sequence-to-asset linking with persistent project metadata storage

- Support one-way comment-to-marker timeline synchronization

- Add two-tab navigation (Sequences and Browse) using Spectrum buttons

- Add LinkSequenceDialog, SequencesView, and autoSyncService background engine

- Enforce Spectrum Workflow Icons and UXP layout rules

* feat(premiere-uxp): refine UI layouts, card interactions, and search box activation

* fix(premiere-uxp): set compact fixed width for file list search box

* fix(premiere-uxp): ensure search box click activation across full width in UXP

* fix(premiere-uxp): revert search box hacks and restore simple default sp-search layout

* feat(premiere-uxp): sync non-timestamped comments as markers at time 0

* feat(premiere-uxp): change link icon to unlink when asset is linked in file card

* fix(premiere-uxp): sync linked sequences between host project and browse view

* feat(premiere-uxp): remove synced markers on sequence unlink matching Frame.io

* fix(premiere-uxp): ensure reliable marker GUID capture, normalization, and fallback on unlink

* fix(premiere-uxp): use official Shumai logo for plugin manifest icons

* fix(premiere-uxp): use official PNG icons for manifest and plugin entrypoints

* refactor(premiere-uxp): use single 114x114 icon for plugin and panel

* feat(premiere-uxp): show file version in file list page file card

* build(premiere-uxp): check in built ccx package and update packaging configuration

* fix(premiere-uxp): address code review findings for media conversion, marker sync, and link scoping

- Reset hasJpegCover on project cover update and hasJpegPreview on asset media transcode
- Only advance synced comment metadata after confirmed marker transaction
- Normalize GUID keys and lookups in AutoSyncService map
- Restrict cached sequence link lookups to project-specific keys and prevent cross-project leakage on empty sequences
- Update built CCX distribution package
2026-09-17 11:51:03 +08:00
Yiling-J a6b7ac4383 Update project description in README.md 2026-09-16 10:22:13 +08:00
Yiling-J ca575803cb Update README with AI features and agent system details 2026-09-15 12:01:43 +08:00
Yiling-J def42cd000 feat(comment): add emoji reaction support for comments (#405)
* feat(comment): add emoji reaction support for comments

* fix(webui): adjust emoji picker trigger icon size to match mark-done icon

* fix(webui): prevent search icon and placeholder overlap in emoji picker

* fix(webui): use normal text color for reaction count

* feat(db): limit comment reaction code column to VarChar(32)
2026-09-14 15:01:36 +08:00
yiling ede52e5009 Release v0.4.5 2026-09-13 21:50:44 +08:00
Yiling-J ddbf897b27 feat(agent): use deterministic storage keys for preset avatars (#404) 2026-09-13 21:40:34 +08:00
Yiling-J 7d56b5bf90 feat(webui): show comments count badge in file card preview area (#403)
* feat(webui): show comments count badge in file card preview area

* perf(db): add index on asset_comments asset_id
2026-09-13 21:12:21 +08:00
Yiling-J 87e88396d1 feat(webui): add space key quick preview for files and folders (#402)
* feat(webui): add space key quick preview for files and folders

Allow users in file list views to press the Space key to quick preview the most recently selected item.

- Add FilePreviewDialog supporting both folder previews (icon, name, count) and real file previews (reusing FileViewer with viewer area and control bar).
- Constrain dialog to max 1920x1080 or 70vw/70vh.
- Support dismissing via close button, clicking outside, or pressing Space again (intercepted in capture phase).
- Enable across project file lists, share links, and public share views.

* feat(webui): auto play video in quick preview dialog

- Pass autoPlay prop from FilePreviewDialog through FileViewer to VideoViewer
- Configure videojs with autoplay: 'any' and handle policy rejection with muted autoplay fallback
- Add test coverage for autoPlay prop forwarding in FilePreviewDialog

* fix(webui): resolve video quick preview initialization and autoplay pause bugs

* fix(webui): support folder symlinks and password-protected shares in quick preview
2026-09-13 18:51:06 +08:00
Yiling-J c5b57ca862 feat(webui): add NLE comments export and migrate export API to POST (#401) 2026-09-13 16:29:58 +08:00
Yiling-J 3420d848cb feat(core): export comments to FCP, Premiere, Media Composer, and Resolve (#400)
* feat(core): export comments to FCP, Premiere, Media Composer, and Resolve

Add backend support to export video comments matching Frame.io export capabilities:
- DaVinci Resolve (.edl): CMX 3600 EDL with ResolveColorPurple markers and reply threading
- Avid Media Composer (.xml): OMFI StreamItems XML with TC1 / V1 track allocation and sequential frame positioning
- Adobe Premiere Pro (.xml): FCP7 XML sequence with dual marker placement on sequence and generatoritem
- Final Cut Pro 10.4.0+ (.fiojson): Flattened JSON schema with frame, timestamp, and annotation serialization

Includes DTO schema validation, AssetService export method, API route (GET /files/:fileId/comments/export), SMPTE drop-frame timecode calculations, unit tests, golden master tests, service integration tests, and API endpoint tests.

* test(core): move comments export test fixtures to test directory

* fix(core): escape asset name in Premiere XML, align Resolve FCM, and support CJK

- Escape XML special characters in <name> tag for Premiere Pro XML sequence
- Harmonize Resolve EDL FCM header and emitted timecodes using getEffectiveDropFrame
- Use RFC 5987 / RFC 6266 buildContentDisposition for CJK filenames in download headers
- Add test coverage for CJK filenames, comments, and author names across all 4 NLE formats

* fix(core): implement timezone-aware comment exports and sanitize resolve edl
2026-09-13 14:48:41 +08:00
361 changed files with 54862 additions and 1887 deletions
+26 -2
View File
@@ -68,18 +68,42 @@ jobs:
- name: Build NPM packages
run: bun run build-npm
- name: Generate release notes
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
CHANGELOG_NOTES=$(bun run scripts/extract-changelog.ts "${{ env.RELEASE_TAG }}" 2>/dev/null || true)
PR_NOTES=$(gh api "repos/${{ github.repository }}/releases/generate-notes" -f tag_name="${{ env.RELEASE_TAG }}" --jq .body 2>/dev/null || true)
{
if [ -n "$CHANGELOG_NOTES" ]; then
echo "$CHANGELOG_NOTES"
echo ""
echo "---"
echo ""
fi
if [ -n "$PR_NOTES" ]; then
echo "$PR_NOTES"
fi
} > /tmp/release-notes.md
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ ! -s /tmp/release-notes.md ]; then
NOTES_FLAG="--generate-notes"
else
NOTES_FLAG="--notes-file /tmp/release-notes.md"
fi
if gh release view "${{ env.RELEASE_TAG }}" >/dev/null 2>&1; then
gh release edit "${{ env.RELEASE_TAG }}" \
--title "${{ env.RELEASE_TAG }}" \
--generate-notes
$NOTES_FLAG
else
gh release create "${{ env.RELEASE_TAG }}" \
--title "${{ env.RELEASE_TAG }}" \
--generate-notes
$NOTES_FLAG
fi
- name: Upgrade npm for trusted publishing
+18 -1
View File
@@ -4,6 +4,16 @@ on:
push:
branches: ['main']
tags: ['v*']
workflow_dispatch:
inputs:
tag:
description: 'Docker image tag (e.g. feature-vaapi)'
required: false
type: string
pr:
description: 'Pull request number (e.g. 449)'
required: false
type: string
jobs:
build-and-push:
@@ -14,7 +24,10 @@ jobs:
steps:
- name: Checkout repository
id: checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.pr && format('refs/pull/{0}/head', inputs.pr) || github.ref }}
# Set up Docker Buildx
- name: Set up Docker Buildx
@@ -45,7 +58,11 @@ jobs:
crpi-000nkafzu6xvpwsc.cn-hongkong.personal.cr.aliyuncs.com/shumai-one/shumai
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
type=ref,event=branch,enable=${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && !inputs.pr && !inputs.tag) }}
type=raw,value=pr-${{ inputs.pr }},enable=${{ github.event_name == 'workflow_dispatch' && inputs.pr != '' && inputs.tag == '' }}
type=raw,value=${{ inputs.tag }},enable=${{ github.event_name == 'workflow_dispatch' && inputs.tag != '' }}
labels: |
org.opencontainers.image.revision=${{ steps.checkout.outputs.commit }}
# Build and push Docker image
- name: Build and push Docker image
+2
View File
@@ -2,6 +2,8 @@ node_modules
.bun
dist
out
*.ccx
!apps/premiere-uxp/shumai-premiere.ccx
.DS_Store
*.log
.env
+2 -1
View File
@@ -7,4 +7,5 @@ packages/core/src/generated
src/ui/components/ui
packages/webui/paraglide
*.md
**/*.md
**/*.md
docs/changelog.mdx
+24 -3
View File
@@ -14,9 +14,10 @@ Complete the task on that branch.
After finishing the work and verifying that all checks pass:
1. Stage and commit your changes.
2. Push the branch to `origin`.
3. Open a pull request using the GitHub CLI.
1. Update `CHANGELOG.md` under `## [Unreleased]` for user-facing changes (see [Changelog Guidelines](#changelog-guidelines)).
2. Stage and commit your changes.
3. Push the branch to `origin`.
4. Open a pull request using the GitHub CLI.
```bash
git add .
@@ -61,6 +62,19 @@ https://www.conventionalcommits.org/en/v1.0.0/#summary
---
## Changelog Guidelines
We maintain `CHANGELOG.md` following [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
Before opening a pull request, add an entry under `## [Unreleased]` for any user-facing changes:
- **End-User Friendly**: Make entries easy to understand for end users. For new features, explain what they actually do in plain language without heavy technical jargon. For bug fixes, describe what the bug was in a friendly, relatable way rather than focusing on internal code mechanics, file paths, or private symbols.
- **Formatting**: `- **<scope>**: <Description>` (e.g. `- **asset**: Fix an issue where moving a video to trash while it was still transcoding could cause it to lose its trashed status`).
- **No PR Numbers**: Do not include PR numbers or links; the release pipeline automatically appends the detailed PR list.
- **Internal Changes**: Routine refactors, test additions, or internal chores without external behavior changes may omit changelog updates.
---
## Pull Request Template
```md
@@ -78,6 +92,13 @@ Briefly describe what this PR changes and why.
- Describe the checks or tests you ran.
- Include relevant outputs if applicable.
## Manual Verification Plan
- Provide concise instructions for manually verifying this change.
- Assume familiarity with the project and existing development workflow.
- Skip boilerplate steps (e.g. starting the app, logging in, opening common pages) unless they are part of the change.
- Focus on what needs to be verified, including scenarios, edge cases, and expected results.
## Notes
Add any additional context, caveats, or follow-up work.
+799
View File
@@ -0,0 +1,799 @@
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## [Unreleased]
### Added
### Fixed
### Changed
## [0.5.2] - 2026-10-13
### Added
* **3d asset**: Add support for 3D model files (.glb, .gltf, .obj, .fbx, .stl, .dae, .usd, .usda, .usdc, .usdz) with automated turntable video rendering, hover sprite scrubbing, and an interactive 3D turntable viewer featuring 360° ruler scrubbing and degree-based markup comments
* **kanban**: Related assets on a task are now clickable, taking you directly to that file or folder in its project
* **settings**: Add an Integrations section to Team Settings with dedicated configuration for Gotenberg Document Converter, supporting connection testing and environment variable override protection
### Fixed
* **transcode**: Fix an issue where portrait photos from cameras and phones appeared sideways in thumbnails, previews, watermarked share links and annotated snapshots, and were listed with their width and height swapped
### Changed
## [0.5.1] - 2026-10-06
### Added
* **notification**: Notification cards are now clickable, taking you directly to the relevant file
* **transcode**: Add hardware decoding and GPU scaling support for NVIDIA NVENC, Intel QuickSync Video (QSV), Rockchip (RKMPP), and VA-API (Intel and AMD GPUs), significantly speeding up video proxy and HLS rendition generation across supported platforms. Set `SHUMAI_HW_DECODE=false` to turn hardware decoding off
* **transcode**: Add `dcraw_emu` fallback to generate WebP previews for camera RAW files without embedded JPEG previews
### Fixed
### Changed
## [0.5.0] - 2026-10-02
### Added
* **transcode**: Add configurable target resolution ladders (480p, 720p, 1080p, 1440p, 2160p) for MP4 Multi Resolutions transcoding in team settings, with unified resolution matching and lowest-resolution fallback for both MP4 and HLS
* **transcode**: Add HLS live streaming with fMP4/CMAF adaptive bitrate ladders (480p, 720p, 1080p, 1440p, 2160p), configurable in Transcode Settings, with automatic quality switching, manual resolution selection in the video viewer, seamless rendition switching, and full watermarking support for shared links
* **transcode**: Add basic camera RAW image support for popular camera formats (including Sony ARW, Canon CR2/CR3, Nikon NEF, Adobe DNG, Fujifilm RAF, and Panasonic RW2), extracting high-quality embedded JPEG previews and automatically applying camera orientation for fast thumbnail and proxy generation
### Fixed
- **asset**: Fix an issue where media files remained stuck in a perpetual "Preparing..." state when transcoding failed, by displaying a clear failed status and error details in the file list and file viewer
* **transcode**: Fix an issue where videos or audio-only files containing attached cover art or picture streams could cause transcoding to fail during poster generation or select a single static image instead of the video
* **webui**: Fix inconsistent video resolution labels across download menus, mobile file headers, and the video player by correctly deriving resolutions from the video's short side, including portrait videos and 480p videos
* **trash**: Fix an issue where the "Empty Trash" confirmation dialog would close immediately instead of showing a loading state while files were being permanently deleted
### Changed
* **settings**: Redesign team Video Transcoding settings with dedicated cards for Transcode Policy, Hardware Acceleration, and FFmpeg Threads, clearly explaining MP4 and HLS playback vs download behavior and storage implications
* **settings**: Rename AI Settings group to Team AI Settings in settings navigation
## [0.4.9] - 2026-09-28
### Added
- **notification**: You can now receive notifications via email, with batched digest emails and configurable team-level SMTP settings
- **transcode**: Add VA-API hardware acceleration support for Linux hosts and Docker environments with Intel and AMD GPUs, featuring automatic DRI render node discovery, variable bitrate control, and structured transcoding observability logs
- **transcode**: Add automatic fallback to software transcoding (libx264) when hardware-accelerated video encoding encounters GPU resolution constraints or runtime driver errors
- **docker**: Add modular hardware-accelerated transcoding presets matching Immich's compose configuration via `hwaccel.transcoding.yaml` with support for NVENC, QuickSync, RKMPP, and VA-API
### Fixed
### Changed
- **transcode**: Improve video poster selection using intelligent scene detection and color variance filtering to automatically skip black frames, fade-ins, and blank intros in favor of representative video content
- **transcode**: Optimize video sprite generation for large and long videos using a concurrent fast-seek pool and image compositing, avoiding full-video decoding while preserving instant single-pass generation for short clips
## [0.4.8] - 2026-09-24
### Added
- **transcode**: Add HDR video proxy support: HDR videos automatically generate HDR video proxies and preview videos preserving HDR color characteristics, tone-mapped SDR thumbnails and posters, and automatic HDR player playback on supported displays with hardware EDR acceleration
- **docs**: Add a Changelog section to the documentation site so users can explore release notes and updates directly in Mintlify
### Fixed
- **webui**: Only show the center play button and darkened tint on initial video open before playback starts; once played, pausing or scrubbing back to start keeps the video canvas clean and unobstructed for review
- **transcode**: Fix an issue where videos with orientation or rotation metadata (such as smartphone vertical videos) were incorrectly displayed with stretched aspect ratios in the video player
- **cli**: Only manage and check PID files in daemon mode, preventing stale PID files, crash-loop conflicts, or spurious process checks during normal foreground and Docker execution
### Changed
- **transcode**: Improve video proxy visual quality and disable B-frames for smoother frame-by-frame seeking and scrubbing
## [0.4.7] - 2026-09-19
### Added
- **changelog**: Introduce Keep a Changelog support, historical release summaries, and automated release notes extraction
- **release**: Automatically populate GitHub release bodies from CHANGELOG.md and promote unreleased notes during version bumps
- **settings**: Add FFmpeg threads slider to team media processing settings
- **asset**: Show previews of a folder's contents and a "days left" countdown for each item in Recently Deleted
- **asset**: Show the poster and hover preview for a video in the file list while it is still transcoding, with a gently pulsing cover (or an animated waiting circle before the poster is ready), "Uploading..."/"Preparing..." labels, and the duration hidden until it is ready
### Fixed
- **asset**: Fix an issue where moving a video to trash while it was still transcoding could cause it to lose its trashed status
- **transcode**: Immediately stop background video processing and transcoding when a file is permanently deleted from the trash
- **asset**: Fix proxy download filename using original file extension instead of proxy extension
- **asset**: Fix an issue where deleting or restoring a version stack from the file list did nothing
- **webui**: Center breadcrumb file action popup menu on the chevron icon
## [0.4.6] - 2026-09-17
### Added
- **comment**: Add emoji reaction support for comments ([#405](https://github.com/shumaiOne/shumai/pull/405))
- **premiere-uxp**: Introduce Adobe Premiere Pro UXP plugin for Shumai ([#407](https://github.com/shumaiOne/shumai/pull/407))
- **settings**: Add team appearance setting to hide agent features ([#411](https://github.com/shumaiOne/shumai/pull/411))
### Fixed
- **premiere-uxp**: Preserve remote cloud storage presigned URLs in asset resolution ([#408](https://github.com/shumaiOne/shumai/pull/408))
- **premiere-uxp**: Scope sequence links by server endpoint and surface sync errors ([#409](https://github.com/shumaiOne/shumai/pull/409))
- **api**: Enforce SHUMAI_DEMO_MODE for API token and CLI requests ([#413](https://github.com/shumaiOne/shumai/pull/413))
### Documentation
- Add NLE export and Premiere Pro UXP plugin documentation ([#412](https://github.com/shumaiOne/shumai/pull/412))
## [0.4.5] - 2026-09-13
### Added
- **core**: Export comments to FCP, Premiere, Media Composer, and Resolve ([#400](https://github.com/shumaiOne/shumai/pull/400))
- **webui**: Add NLE comments export and migrate export API to POST ([#401](https://github.com/shumaiOne/shumai/pull/401))
- **webui**: Add space key quick preview for files and folders ([#402](https://github.com/shumaiOne/shumai/pull/402))
- **webui**: Show comments count badge in file card preview area ([#403](https://github.com/shumaiOne/shumai/pull/403))
- **agent**: Use deterministic storage keys for preset avatars ([#404](https://github.com/shumaiOne/shumai/pull/404))
## [0.4.4] - 2026-09-09
### Added
- **upload**: S3 multipart upload with offline resume and wake lock ([#391](https://github.com/shumaiOne/shumai/pull/391))
- **transcode**: Optimize video operations using ffmpeg http range requests ([#393](https://github.com/shumaiOne/shumai/pull/393))
- **agent**: Enable read_asset tool for autofill agent ([#396](https://github.com/shumaiOne/shumai/pull/396))
- **sandbox**: Abstract SandboxService and hot-reload allowed domains ([#398](https://github.com/shumaiOne/shumai/pull/398))
### Fixed
- **s3**: Stream downloadToFile and putObject to prevent OOM on large files ([#392](https://github.com/shumaiOne/shumai/pull/392))
- **agent**: Pass agent thinkingLevel to session name generation ([#395](https://github.com/shumaiOne/shumai/pull/395))
- **agent**: Restrict pageCount and duration recommendations to matching media types ([#397](https://github.com/shumaiOne/shumai/pull/397))
- **transcode**: Co-locate screenshots and derived artifacts in asset storage directory ([#399](https://github.com/shumaiOne/shumai/pull/399))
## [0.4.3] - 2026-09-06
### Added
- **asset**: Record and display agent provenance on assets and audit logs ([#380](https://github.com/shumaiOne/shumai/pull/380))
- **agent**: Store preset avatars as real files in s3 storage ([#381](https://github.com/shumaiOne/shumai/pull/381))
- **agent**: Add built-in image and video generation tools and settings ([#382](https://github.com/shumaiOne/shumai/pull/382))
- **media-generation**: Add gemini-omni-1.1-flash video model and redesign settings UI ([#383](https://github.com/shumaiOne/shumai/pull/383))
- **settings**: Redesign image/video settings to provider dialog with model toggles ([#385](https://github.com/shumaiOne/shumai/pull/385))
- **agent**: Add asset management tools and CLI commands ([#387](https://github.com/shumaiOne/shumai/pull/387))
- **cli**: Control asset deletion via SHUMAI_ALLOW_DELETE env var ([#388](https://github.com/shumaiOne/shumai/pull/388))
### Fixed
- **webui**: Clamp file card creation info to 2 lines and show tooltip on hover ([#390](https://github.com/shumaiOne/shumai/pull/390))
### Documentation
- **agents**: Add documentation for image and video generation settings ([#389](https://github.com/shumaiOne/shumai/pull/389))
### Maintenance
- **deps**: Upgrade bun to 1.4.2 and update packages ([#384](https://github.com/shumaiOne/shumai/pull/384))
- **i18n**: Update paraglide-js to 2.25.0 and stop checking in generated code ([#386](https://github.com/shumaiOne/shumai/pull/386))
## [0.4.2] - 2026-09-03
### Added
- **chat**: Support markups, attachments, and timestamps in agent 1-to-1 chat ([#368](https://github.com/shumaiOne/shumai/pull/368))
- **agent**: Move thread metadata to structured context XML ([#373](https://github.com/shumaiOne/shumai/pull/373))
- **agent**: Improve timestamp precision and proxy selection for video screenshots ([#374](https://github.com/shumaiOne/shumai/pull/374))
- **agent**: Support dynamic annotationId resolution across chat and comments ([#375](https://github.com/shumaiOne/shumai/pull/375))
- **agent**: Consolidate media tools into read_asset and add S3 key support to download_asset ([#376](https://github.com/shumaiOne/shumai/pull/376))
- **provider**: Optimize provider and model configuration management ([#377](https://github.com/shumaiOne/shumai/pull/377))
- **provider**: Add provider and model sync feature with vendored generator ([#378](https://github.com/shumaiOne/shumai/pull/378))
### Fixed
- **agent**: Set empty details in asset tool results to avoid data duplication ([#370](https://github.com/shumaiOne/shumai/pull/370))
- **webui**: Strip styles and preserve multiline text on paste in chat input ([#371](https://github.com/shumaiOne/shumai/pull/371))
- **agent**: Hide main comment sessions in dashboard sessions list ([#372](https://github.com/shumaiOne/shumai/pull/372))
### Changed
- **webui**: Use semantic system colors in notification settings ([#379](https://github.com/shumaiOne/shumai/pull/379))
## [0.4.1] - 2026-08-30
### Added
- **webui**: Add manage versions option to file card context menu ([#364](https://github.com/shumaiOne/shumai/pull/364))
- **agent**: Refactor message context into unified shumai_message ([#365](https://github.com/shumaiOne/shumai/pull/365))
- **webui**: Redesign comment attachment display into compact rows ([#366](https://github.com/shumaiOne/shumai/pull/366))
### Fixed
- **asset,webui**: Disallow dropping version stacks onto files and version stacks ([#363](https://github.com/shumaiOne/shumai/pull/363))
- **webui**: Prevent empty folder flash during initial loading ([#367](https://github.com/shumaiOne/shumai/pull/367))
### Changed
- **agent**: Remove executeAgentToolWorkflow and invoke core services directly ([#362](https://github.com/shumaiOne/shumai/pull/362))
## [0.4.0] - 2026-08-28
### Added
- **transcode**: Add hardware-accelerated video transcoding support ([#352](https://github.com/shumaiOne/shumai/pull/352))
- **webui**: Truncate long file names with 100ms hover tooltip ([#355](https://github.com/shumaiOne/shumai/pull/355))
- **webui**: Add simplified mobile-friendly layout for file and share lists ([#356](https://github.com/shumaiOne/shumai/pull/356))
- **webui**: Add mobile friendly file detail and public share view ([#359](https://github.com/shumaiOne/shumai/pull/359))
### Fixed
- **transcode**: Apply team hardware acceleration and source bitrate capping to watermark transcoding ([#353](https://github.com/shumaiOne/shumai/pull/353))
- **share**: Hide and soft-delete symlinks when target assets are trashed ([#354](https://github.com/shumaiOne/shumai/pull/354))
- **webui**: Fix breadcrumb file dropdown trigger stretching and alignment ([#360](https://github.com/shumaiOne/shumai/pull/360))
- **webui**: Align mobile comment cards and thread vertical indicator ([#361](https://github.com/shumaiOne/shumai/pull/361))
### Documentation
- Add SECURITY.md with a private disclosure path ([#357](https://github.com/shumaiOne/shumai/pull/357))
## [0.3.11] - 2026-08-25
### Added
- **auth**: Add admin password reset CLI command and reset password web UI ([#347](https://github.com/shumaiOne/shumai/pull/347))
- **project**: Add recent viewed files section to project folder tree ([#348](https://github.com/shumaiOne/shumai/pull/348))
### Fixed
- **webui**: Prevent left carousel remounting and scroll jump on file selection ([#351](https://github.com/shumaiOne/shumai/pull/351))
## [0.3.10] - 2026-08-23
### Added
- **agentic kanban**: Phase 1 not-agentic kanban board ([#330](https://github.com/shumaiOne/shumai/pull/330))
- **kanban**: Resolve latest version for linked version stack assets and update demo login text ([#342](https://github.com/shumaiOne/shumai/pull/342))
- **kanban**: Update task status permissions, reporter defaults, and participant access ([#345](https://github.com/shumaiOne/shumai/pull/345))
### Fixed
- **kanban**: Use true thumbnail and poster for task asset previews ([#343](https://github.com/shumaiOne/shumai/pull/343))
- **webui**: Sidebar selection styling, kanban active state, pointer cursors, and owner dashboard ([#344](https://github.com/shumaiOne/shumai/pull/344))
- **kanban**: Improve drag-drop to column bottom, remove empty drop line, and fix timeline alignment ([#346](https://github.com/shumaiOne/shumai/pull/346))
## [0.3.9] - 2026-08-18
### Added
- **agent**: Add permission controls for chat agents ([#313](https://github.com/shumaiOne/shumai/pull/313))
- **authz**: Enforce project-aware roles for agent/skill/mcp permissions ([#314](https://github.com/shumaiOne/shumai/pull/314))
- **webui**: Use project members for asset comment mentions ([#315](https://github.com/shumaiOne/shumai/pull/315))
- **quota**: Add 2-level database-backed resource quota system ([#318](https://github.com/shumaiOne/shumai/pull/318))
- **settings**: Reorganize settings into personal, team, and AI sections ([#324](https://github.com/shumaiOne/shumai/pull/324))
- **quota**: Move usage monitoring to team dashboard ([#327](https://github.com/shumaiOne/shumai/pull/327))
### Fixed
- **webui**: Preserve selected chatbot agent preference on reload ([#323](https://github.com/shumaiOne/shumai/pull/323))
- **quota**: Exclude agents from quota rules and usage records ([#325](https://github.com/shumaiOne/shumai/pull/325))
### Documentation
- **team-settings**: Add resource quotas documentation and update readme features ([#326](https://github.com/shumaiOne/shumai/pull/326))
## [0.3.8] - 2026-08-15
### Added
- **webui**: Replace legacy markdown editor with new lexical wysiwyg editor ([#308](https://github.com/shumaiOne/shumai/pull/308))
- **agent**: Add nested agents.md support across backend and webui ([#309](https://github.com/shumaiOne/shumai/pull/309))
- **webui**: Improve AGENTS.md editor placeholder and read-only notice ([#310](https://github.com/shumaiOne/shumai/pull/310))
- **version-stack**: Add manage versions dialog and version removal ([#311](https://github.com/shumaiOne/shumai/pull/311))
### Fixed
- **core**: Rename latest version child record on version stack rename ([#312](https://github.com/shumaiOne/shumai/pull/312))
## [0.3.7] - 2026-08-14
### Added
- **metadata**: Replace aiAutofill boolean with autofillSource enum ([#302](https://github.com/shumaiOne/shumai/pull/302))
- **agent**: Type-safe CREATION_CONTEXT metadata on create_file/create_version ([#303](https://github.com/shumaiOne/shumai/pull/303))
- **sandbox**: Default Network Sandbox to off and add settings toggle switch ([#304](https://github.com/shumaiOne/shumai/pull/304))
- **webui**: Redesign select metadata fields and improve long text field widget ([#305](https://github.com/shumaiOne/shumai/pull/305))
- **agent**: Support dynamic newOption in select and selectMulti metadata fields ([#306](https://github.com/shumaiOne/shumai/pull/306))
### Fixed
- **webui**: Fix select field height and multi-select overflow/interaction issues ([#307](https://github.com/shumaiOne/shumai/pull/307))
## [0.3.6] - 2026-08-12
### Added
- **mcp**: Add MCP server support with proxy tool and OAuth flow ([#289](https://github.com/shumaiOne/shumai/pull/289))
- **mcp**: Support tool-level directTools array and 3-state UI configuration ([#297](https://github.com/shumaiOne/shumai/pull/297))
- **webui**: Direct canvas PDF rendering with selectable text ([#299](https://github.com/shumaiOne/shumai/pull/299))
### Fixed
- **agent**: Prevent agents from accessing disabled skills ([#292](https://github.com/shumaiOne/shumai/pull/292))
- **agent**: Resolve version stack name and size in list_assets ([#296](https://github.com/shumaiOne/shumai/pull/296))
- **webui**: Content-only pinch-zoom and two-finger pan in media viewers ([#298](https://github.com/shumaiOne/shumai/pull/298))
- **i18n**: Update Chinese translation for dashboard to 仪表板 ([#301](https://github.com/shumaiOne/shumai/pull/301))
### Documentation
- **mcp**: Add MCP support documentation to README and docs ([#300](https://github.com/shumaiOne/shumai/pull/300))
## [0.3.5] - 2026-08-09
### Added
- **transcode**: Add Gotenberg support for Office, HTML, CSV, and Markdown PDF proxies ([#283](https://github.com/shumaiOne/shumai/pull/283))
### Fixed
- **webui**: Resolve upload card freeze for unsupported files ([#284](https://github.com/shumaiOne/shumai/pull/284))
- **webui**: Exclude file extension when selecting file name during inline rename ([#285](https://github.com/shumaiOne/shumai/pull/285))
- Use renamed asset name in download Content-Disposition ([#286](https://github.com/shumaiOne/shumai/pull/286))
- **webui**: Batch download no longer flashes a tab per file ([#287](https://github.com/shumaiOne/shumai/pull/287))
- **webui**: Enable rename and delete actions in file detail top bar breadcrumb ([#288](https://github.com/shumaiOne/shumai/pull/288))
## [0.3.4] - 2026-08-08
### Added
- **sharelink**: Add sharelink watermark support ([#270](https://github.com/shumaiOne/shumai/pull/270))
- **webui**: Remove original-file display fallbacks, use proxies only ([#273](https://github.com/shumaiOne/shumai/pull/273))
- **share**: Add allow download config to share links ([#275](https://github.com/shumaiOne/shumai/pull/275))
- **transcode**: Update preview thumbnail resolution to 300p with max length constraint ([#281](https://github.com/shumaiOne/shumai/pull/281))
### Fixed
- **share**: Resolve symlink asset downloads in public share pages ([#274](https://github.com/shumaiOne/shumai/pull/274))
- **webui**: Persist project sorting and prevent full page flash ([#276](https://github.com/shumaiOne/shumai/pull/276))
### Documentation
- **share-links**: Document allow download and lazy watermark settings ([#278](https://github.com/shumaiOne/shumai/pull/278))
- **agent**: Clarify create_file/create_version context param guidance ([#282](https://github.com/shumaiOne/shumai/pull/282))
### Maintenance
- **e2e**: Watermarked download-disabled share link coverage (image + video) ([#277](https://github.com/shumaiOne/shumai/pull/277))
- **e2e**: Stabilize watermark share spec on Firefox ([#279](https://github.com/shumaiOne/shumai/pull/279))
- Split e2e scripts into app and webui targets ([#280](https://github.com/shumaiOne/shumai/pull/280))
## [0.3.3] - 2026-08-05
### Added
- **agent**: Enable LLM API call retries in AgentHarness ([#250](https://github.com/shumaiOne/shumai/pull/250))
- **audit**: Add audit log support for APIs and WebUI dashboard ([#251](https://github.com/shumaiOne/shumai/pull/251))
- **webui**: Persist agent preference in localStorage ([#254](https://github.com/shumaiOne/shumai/pull/254))
- **e2e**: Add file domain comment and draw tests ([#260](https://github.com/shumaiOne/shumai/pull/260))
- **agent**: Restrict bash access for non-owner users ([#262](https://github.com/shumaiOne/shumai/pull/262))
- **agent**: Allow create_file tool to create files directly from content ([#263](https://github.com/shumaiOne/shumai/pull/263))
- **agent**: Propagate autofill context from chat to autofill workflow ([#264](https://github.com/shumaiOne/shumai/pull/264))
- **webui**: Render select options in field creation mode and pick random option color ([#265](https://github.com/shumaiOne/shumai/pull/265))
- **project**: Include team-scoped members in project member list and add 3-section dialog layout ([#267](https://github.com/shumaiOne/shumai/pull/267))
- **webui**: Disable role dropdown for project-scoped members in team view ([#269](https://github.com/shumaiOne/shumai/pull/269))
### Fixed
- **webui**: Mention popup avatars, keyboard auto-scroll, and non-sticky section headers ([#256](https://github.com/shumaiOne/shumai/pull/256))
- **webui**: Persist field order on drag and drop ([#266](https://github.com/shumaiOne/shumai/pull/266))
### Changed
- **agent**: Load models directly from database without pi fallback ([#253](https://github.com/shumaiOne/shumai/pull/253))
- **core**: Replace generated provider files with pi-ai dynamic methods ([#255](https://github.com/shumaiOne/shumai/pull/255))
### Maintenance
- **core**: Add missing tests for methods introduced in 97069042 ([#252](https://github.com/shumaiOne/shumai/pull/252))
- **e2e**: Add domain-based auth and project web app e2e tests ([#257](https://github.com/shumaiOne/shumai/pull/257))
- **e2e**: Add file, share, and collection web app e2e tests ([#258](https://github.com/shumaiOne/shumai/pull/258))
- **e2e**: Add project-level invite and file-move e2e tests ([#259](https://github.com/shumaiOne/shumai/pull/259))
- **e2e**: Add search in file list and save-search-as-collection cases ([#261](https://github.com/shumaiOne/shumai/pull/261))
- **e2e**: Add member permission change tests ([#268](https://github.com/shumaiOne/shumai/pull/268))
## [0.3.2] - 2026-07-30
### Added
- **agent**: Add output truncation and streaming limits to sandboxed bash tool ([#248](https://github.com/shumaiOne/shumai/pull/248))
### Fixed
- **agent**: Download original document asset instead of pdf proxy ([#247](https://github.com/shumaiOne/shumai/pull/247))
- **webui**: Persist chatbot sidebar input text across route navigation ([#249](https://github.com/shumaiOne/shumai/pull/249))
## [0.3.1] - 2026-07-30
### Added
- **transcode**: Trigger ai metadata autofill post transcode ([#234](https://github.com/shumaiOne/shumai/pull/234))
- **dashboard**: Add agent sessions view for team owners ([#237](https://github.com/shumaiOne/shumai/pull/237))
- **db**: Preserve agent sessions on asset deletion by setting onDelete to SetNull ([#240](https://github.com/shumaiOne/shumai/pull/240))
- **agent**: Add download_asset tool and prompt instructions ([#242](https://github.com/shumaiOne/shumai/pull/242))
- **db**: Update Asset.sizeByte and AiUsage token fields to BigInt ([#244](https://github.com/shumaiOne/shumai/pull/244))
### Fixed
- **agent**: Include select option labels and field name in autofill schema ([#235](https://github.com/shumaiOne/shumai/pull/235))
- **agent**: Scope agent comment sessions to thread sessions anchored at root comments ([#239](https://github.com/shumaiOne/shumai/pull/239))
- **agent**: Disable tools for session naming and make naming non-blocking ([#241](https://github.com/shumaiOne/shumai/pull/241))
- **webui**: Update file size formatting to SI decimal standard ([#245](https://github.com/shumaiOne/shumai/pull/245))
- **s3**: Enforce property syntax in S3Service interface and fix ReadableStream handling in S3StorageService ([#246](https://github.com/shumaiOne/shumai/pull/246))
## [0.3.0] - 2026-07-28
### Added
- **file-browser**: Add copy name and path option to context menu ([#225](https://github.com/shumaiOne/shumai/pull/225))
- **agent**: Inject user name and role into chat context ([#226](https://github.com/shumaiOne/shumai/pull/226))
- **agent**: Refactor database session storage to normalized DAG entries and lazy thread sync ([#229](https://github.com/shumaiOne/shumai/pull/229))
- **agent**: Support ENABLE_WEAKER_NESTED_SANDBOX environment variable ([#233](https://github.com/shumaiOne/shumai/pull/233))
### Fixed
- **agent**: Ensure atomic appendEntry and persist leaf entries in DatabaseSessionStorage ([#224](https://github.com/shumaiOne/shumai/pull/224))
- Sharp version mismatch bug ([#230](https://github.com/shumaiOne/shumai/pull/230))
- **agent**: Resolve S3 MIME type detection and prompt parameter in image analysis ([#232](https://github.com/shumaiOne/shumai/pull/232))
### Changed
- **agent**: Remove implicit agent mention trigger in comment threads ([#227](https://github.com/shumaiOne/shumai/pull/227))
### Maintenance
- **workflow**: Add docker compose deployment verification job ([#231](https://github.com/shumaiOne/shumai/pull/231))
## [0.2.3] - 2026-07-25
### Fixed
- **webui**: Show right sidebar by default on file detail page ([#219](https://github.com/shumaiOne/shumai/pull/219))
- **webui**: Refresh file list and detail when agent executes asset creation tools ([#220](https://github.com/shumaiOne/shumai/pull/220))
- **webui**: Fix space key drag overlay and shift range selection for version stacks ([#221](https://github.com/shumaiOne/shumai/pull/221))
- **transcode**: Handle timestamp rounding tolerance for screenshot annotations ([#223](https://github.com/shumaiOne/shumai/pull/223))
### Changed
- **e2e**: Split transcode workflow E2E tests into per-workflow test files ([#222](https://github.com/shumaiOne/shumai/pull/222))
## [0.2.2] - 2026-07-23
### Added
- **webui**: Integrate AI usage API into dashboard page ([#216](https://github.com/shumaiOne/shumai/pull/216))
- **ai-usage**: Add team and member token usage tracking and APIs ([#215](https://github.com/shumaiOne/shumai/pull/215))
- **transcode**: Add PSD support via ImageMagick and enforce sRGB conversion ([#217](https://github.com/shumaiOne/shumai/pull/217))
### Fixed
- **search**: Fix buildSqlCondition date range, numeric metadata, and string parsing bugs ([#213](https://github.com/shumaiOne/shumai/pull/213))
- **webui**: Prevent horizontal overflow in search dialog result rows ([#214](https://github.com/shumaiOne/shumai/pull/214))
- **webui**: Invalidate upload tasks query when upload task starts and completes ([#218](https://github.com/shumaiOne/shumai/pull/218))
## [0.2.1] - 2026-07-22
### Added
- **skill**: Add team owner skill permission control ([#209](https://github.com/shumaiOne/shumai/pull/209))
### Fixed
- **agent**: Handle non-builtin models in getModelFromDb and upgrade pi-ai ([#211](https://github.com/shumaiOne/shumai/pull/211))
- **provider**: Preserve model ids on provider update ([#212](https://github.com/shumaiOne/shumai/pull/212))
### Changed
- **core**: Split generated providers into per-provider files ([#210](https://github.com/shumaiOne/shumai/pull/210))
## [0.2.0] - 2026-07-21
### Added
- **transcode**: Add PDF preview, sprite generation, and annotation support ([#193](https://github.com/shumaiOne/shumai/pull/193))
- **web**: Register pdf.worker route in production ([#195](https://github.com/shumaiOne/shumai/pull/195))
- **agent**: Add read_pdf_pages tool and PDF page context support ([#196](https://github.com/shumaiOne/shumai/pull/196))
- **transcode**: Split monolithic transcodeMedia into focused workflows ([#197](https://github.com/shumaiOne/shumai/pull/197))
- **transcode**: Add PDF proxy support for TXT and CSV files ([#199](https://github.com/shumaiOne/shumai/pull/199))
- **asset**: Replace mediaType/mimeType logic with proxyType ([#200](https://github.com/shumaiOne/shumai/pull/200))
- **docker**: Install fonts-noto-cjk in runner stage ([#202](https://github.com/shumaiOne/shumai/pull/202))
- **transcode**: Add markdown file to pdf proxy support ([#203](https://github.com/shumaiOne/shumai/pull/203))
- **chat**: Track context asset changes and update agent context ([#204](https://github.com/shumaiOne/shumai/pull/204))
- **agent**: Refactor media tools to static injection with mandatory assetId and authz ([#208](https://github.com/shumaiOne/shumai/pull/208))
### Fixed
- **transcode**: Mark pdfkit as external and extract for docker runtime ([#201](https://github.com/shumaiOne/shumai/pull/201))
- **agent**: Include skill id in formatSkillsForPrompt ([#205](https://github.com/shumaiOne/shumai/pull/205))
- **asset**: Exclude soft-deleted children from latestChildren preview ([#206](https://github.com/shumaiOne/shumai/pull/206))
- **agent**: Pass latest version asset from version stack to prompt builder ([#207](https://github.com/shumaiOne/shumai/pull/207))
## [0.1.10] - 2026-07-16
### Added
- **workflow-e2e**: Add E2E tests for agentAutofillMedia workflow ([#188](https://github.com/shumaiOne/shumai/pull/188))
- **comments**: Support comment deletion and video player shortcuts ([#191](https://github.com/shumaiOne/shumai/pull/191))
- **agent**: Support disabling specific tools for agents ([#192](https://github.com/shumaiOne/shumai/pull/192))
### Maintenance
- **e2e**: Add E2E workflow tests for remaining agent and transcode services ([#189](https://github.com/shumaiOne/shumai/pull/189))
## [0.1.9] - 2026-07-14
### Added
- **e2e**: Set up fullstack app-level e2e test framework and signup test case ([#184](https://github.com/shumaiOne/shumai/pull/184))
- **chat**: Chatbot UI ([#185](https://github.com/shumaiOne/shumai/pull/185))
- **agent**: Support aborting agent execution ([#186](https://github.com/shumaiOne/shumai/pull/186))
### Changed
- **api/chat**: Remove direct Prisma query from API layer ([#187](https://github.com/shumaiOne/shumai/pull/187))
## [0.1.8] - 2026-07-10
### Added
- **chatbot**: Implement type-safe Chat APIs with compaction support ([#180](https://github.com/shumaiOne/shumai/pull/180))
### Fixed
- **webui**: Enable build splitting and code-split all page routes ([#183](https://github.com/shumaiOne/shumai/pull/183))
### Documentation
- **readme**: Clarify displayed file size represents original file size ([#182](https://github.com/shumaiOne/shumai/pull/182))
## [0.1.7] - 2026-07-06
### Added
- **audio**: Support frame-accurate audio playback, comments, and AI safeguards ([#175](https://github.com/shumaiOne/shumai/pull/175))
- **i18n**: Localize members dialog, notifications, uploads, user menus, dates, and players ([#178](https://github.com/shumaiOne/shumai/pull/178))
- **comments**: Allow marking comments as complete or incomplete ([#179](https://github.com/shumaiOne/shumai/pull/179))
### Fixed
- **upload**: Resolve empty and generic MIME types in confirmFileUpload ([#176](https://github.com/shumaiOne/shumai/pull/176))
### Changed
- **webui**: Modularize file viewer components into registry-driven architecture ([#174](https://github.com/shumaiOne/shumai/pull/174))
### Documentation
- Improve documentation and examples for S3 compatible storage ([#177](https://github.com/shumaiOne/shumai/pull/177))
## [0.1.6] - 2026-07-04
### Added
- **file-browser**: Show video duration on file card preview ([#170](https://github.com/shumaiOne/shumai/pull/170))
- **webui**: Compare versions view for version stacks ([#171](https://github.com/shumaiOne/shumai/pull/171))
### Fixed
- **webui**: Resolve conditional hooks and setState-in-render errors ([#167](https://github.com/shumaiOne/shumai/pull/167))
- **webui**: Resolve video player total frames mismatch ([#172](https://github.com/shumaiOne/shumai/pull/172))
- **version-stack**: Resolve correct latest version ID of version stack ([#173](https://github.com/shumaiOne/shumai/pull/173))
### Maintenance
- **webui**: Video player e2e framework + Safari playhead fix ([#166](https://github.com/shumaiOne/shumai/pull/166))
- **webui**: Add frame-accurate comment seek roundtrip e2e ([#168](https://github.com/shumaiOne/shumai/pull/168))
- **webui**: Verify video player restarts playback after end ([#169](https://github.com/shumaiOne/shumai/pull/169))
## [0.1.5] - 2026-07-02
### Changed
- **storage**: Use original filenames for stored files ([#165](https://github.com/shumaiOne/shumai/pull/165))
### Maintenance
- **release**: Add Aliyun ACR push to release workflow ([#164](https://github.com/shumaiOne/shumai/pull/164))
## [0.1.4] - 2026-07-01
### Added
- **transcode**: Change video poster resolution to 480p ([#161](https://github.com/shumaiOne/shumai/pull/161))
- **auth**: Allow setting user locale on signup ([#163](https://github.com/shumaiOne/shumai/pull/163))
### Fixed
- **webui**: Preserve video ended state by skipping playhead snap on ended ([#162](https://github.com/shumaiOne/shumai/pull/162))
## [0.1.3] - 2026-06-30
### Added
- **webui**: Add i18n support using paraglide-js ([#156](https://github.com/shumaiOne/shumai/pull/156))
- **video**: Add frame-accurate video player, SMPTE timecodes, and format switcher ([#157](https://github.com/shumaiOne/shumai/pull/157))
### Fixed
- **webui**: Align video timeline duration and formatting with frameio ([#158](https://github.com/shumaiOne/shumai/pull/158))
- **webui**: Fix missing left sidebar for nested folders ([#159](https://github.com/shumaiOne/shumai/pull/159))
- **api**: Fix update team settings and make request schema type-safe ([#160](https://github.com/shumaiOne/shumai/pull/160))
## [0.1.2] - 2026-06-25
### Changed
- **s3**: Remove automatic port appending to AWS_ENDPOINT_URL_S3 ([#155](https://github.com/shumaiOne/shumai/pull/155))
## [0.1.1] - 2026-06-23
### Added
- **docker**: Add root entrypoint with privilege dropping for data volumes ([#151](https://github.com/shumaiOne/shumai/pull/151))
## [0.1.0] - 2026-06-22
### Added
- **share**: Secure share info API and fix wrong password feedback ([#150](https://github.com/shumaiOne/shumai/pull/150))
### Fixed
- **webui**: Truncate long folder, collection, and share link names in sidebar ([#149](https://github.com/shumaiOne/shumai/pull/149))
## [0.0.11] - 2026-06-22
### Added
- **cli**: Add shumai-cli and token authentication ([#144](https://github.com/shumaiOne/shumai/pull/144))
- **settings**: Use singular headers and remove collapse/counters for single agent types ([#145](https://github.com/shumaiOne/shumai/pull/145))
- **folders**: Auto expand folder tree in left sidebar on navigation ([#146](https://github.com/shumaiOne/shumai/pull/146))
- **metadata**: Add single user and multiple user custom fields ([#147](https://github.com/shumaiOne/shumai/pull/147))
### Maintenance
- **cli**: Rename npm package to @shumai-one/shumai-cli ([#148](https://github.com/shumaiOne/shumai/pull/148))
## [0.0.10] - 2026-06-21
### Changed
- **web**: Dynamically register production HTML bundle routes ([#142](https://github.com/shumaiOne/shumai/pull/142))
### Documentation
- **readme**: Polish structure, correct grammar, and add dependencies table ([#143](https://github.com/shumaiOne/shumai/pull/143))
## [0.0.9] - 2026-06-20
### Added
- **webui**: Show app version in avatar menu ([#139](https://github.com/shumaiOne/shumai/pull/139))
- **cli**: Add background daemonization and subcommands ([#141](https://github.com/shumaiOne/shumai/pull/141))
### Maintenance
- **release**: Add smoke tests to local release stage ([#140](https://github.com/shumaiOne/shumai/pull/140))
## [0.0.8] - 2026-06-19
### Added
- **api**: Implement read-only mode for reviewers ([#122](https://github.com/shumaiOne/shumai/pull/122))
- **server**: Allow customizing server port via SHUMAI_SERVER_PORT ([#124](https://github.com/shumaiOne/shumai/pull/124))
- **embedding**: Defer embedding workflow, use transcoded assets, and execute chunks in separate activities ([#125](https://github.com/shumaiOne/shumai/pull/125))
- **webui**: Add external drag-and-drop file and folder upload support ([#126](https://github.com/shumaiOne/shumai/pull/126))
- **agent**: Implement overlapping video chunks for semantic search ([#127](https://github.com/shumaiOne/shumai/pull/127))
- **webui**: Support jumping to video timestamp from search results ([#128](https://github.com/shumaiOne/shumai/pull/128))
- **auth**: Add demo mode support ([#131](https://github.com/shumaiOne/shumai/pull/131))
- **auth**: Refine demo mode support ([#132](https://github.com/shumaiOne/shumai/pull/132))
- **webui**: Default right sidebar to collapsed for new users ([#133](https://github.com/shumaiOne/shumai/pull/133))
- **webui**: Use Shadcn Switch in toggle field and Rating component in search filter panel ([#137](https://github.com/shumaiOne/shumai/pull/137))
- **upload**: Track byte-level progress with XMLHttpRequest ([#138](https://github.com/shumaiOne/shumai/pull/138))
### Fixed
- **transcode**: Handle high-precision FPS using rational fractions ([#123](https://github.com/shumaiOne/shumai/pull/123))
- **db**: Automatically update project updatedAt on asset modification ([#129](https://github.com/shumaiOne/shumai/pull/129))
- **webui**: Use system colors for fields and improve search filter select options ([#130](https://github.com/shumaiOne/shumai/pull/130))
- **search**: Fix hasAny and hasNone operators on metadata filter ([#134](https://github.com/shumaiOne/shumai/pull/134))
- **webui**: Resolve folder tree sync, search dialog reset, and sidebar actions issues ([#136](https://github.com/shumaiOne/shumai/pull/136))
### Changed
- **webui**: Fix search dialog layout height, scroll areas, and restrict filter toggle click ([#135](https://github.com/shumaiOne/shumai/pull/135))
## [0.0.7] - 2026-06-17
### Added
- **workflow**: Configure transcode and agent concurrency via environment variables ([#116](https://github.com/shumaiOne/shumai/pull/116))
- **webui**: Replace hardcoded colors with system tokens ([#119](https://github.com/shumaiOne/shumai/pull/119))
- **webui**: Replace native overflow with shadcn ScrollArea in settings ([#120](https://github.com/shumaiOne/shumai/pull/120))
- **api**: Use enum for API protocol in provider config ([#121](https://github.com/shumaiOne/shumai/pull/121))
### Fixed
- **webui**: Reload video player and reset state when switching assets ([#114](https://github.com/shumaiOne/shumai/pull/114))
### Changed
- **transcode**: Relocate TranscodeService to core and flatten API package ([#115](https://github.com/shumaiOne/shumai/pull/115))
### Documentation
- Improve and restructure shumai documentation ([#118](https://github.com/shumaiOne/shumai/pull/118))
## [0.0.6] - 2026-06-15
### Added
- **sandbox**: Add pending domains support for network sandbox ([#109](https://github.com/shumaiOne/shumai/pull/109))
- **webui**: Always show right sidebar and implement left vertical carousel ([#111](https://github.com/shumaiOne/shumai/pull/111))
### Fixed
- **build**: Propagate termination signals to active child process in wrappers ([#102](https://github.com/shumaiOne/shumai/pull/102))
- **transcode**: Make deterministic transcode activity failures non-retryable in Temporal ([#104](https://github.com/shumaiOne/shumai/pull/104))
- **player**: Implement seekbar dragging and match hover highlight color ([#108](https://github.com/shumaiOne/shumai/pull/108))
- **webui**: Avoid refetching all pages on file/folder reorder ([#112](https://github.com/shumaiOne/shumai/pull/112))
- **webui**: Force video-player mime type to video/mp4 ([#113](https://github.com/shumaiOne/shumai/pull/113))
### Changed
- **webui**: Use system color design tokens in video player components ([#106](https://github.com/shumaiOne/shumai/pull/106))
- **webui**: Use requestAnimationFrame for smooth video progress bar updates ([#107](https://github.com/shumaiOne/shumai/pull/107))
- **webui**: Fetch agents in mention input list dynamically ([#110](https://github.com/shumaiOne/shumai/pull/110))
### Documentation
- **readme**: Add comprehensive README.md ([#103](https://github.com/shumaiOne/shumai/pull/103))
- **readme**: Improve remote deployment and temporal execution instructions ([#105](https://github.com/shumaiOne/shumai/pull/105))
## [0.0.5] - 2026-06-13
### Added
- **npm**: Auto deploy database migrations on package start ([#101](https://github.com/shumaiOne/shumai/pull/101))
## [0.0.4] - 2026-06-12
### Fixed
- **cli/docker**: Resolve global CLI external dependencies and fix Docker 404 error ([#100](https://github.com/shumaiOne/shumai/pull/100))
## [0.0.3] - 2026-06-12
### Fixed
- **cli**: Resolve platform binary path resolution under nested node_modules ([#99](https://github.com/shumaiOne/shumai/pull/99))
## [0.0.2] - 2026-06-12
### Fixed
- **npm**: Add repository metadata to package.json for provenance verification ([#98](https://github.com/shumaiOne/shumai/pull/98))
### Maintenance
- Add release-npm.yaml workflow ([#97](https://github.com/shumaiOne/shumai/pull/97))
## [0.0.1] - 2026-06-12
### Added
- Initial release of Shumai
+18 -7
View File
@@ -30,11 +30,7 @@ RUN bun run scripts/extract-runtime-deps.ts
# Stage 2: Runner
FROM oven/bun:1.4.2 AS runner
# Install ffmpeg/ffprobe
COPY --from=mwader/static-ffmpeg:8.1 /ffmpeg /usr/local/bin/
COPY --from=mwader/static-ffmpeg:8.1 /ffprobe /usr/local/bin/
# Install system dependencies for sandbox runtime and agent
# Install system dependencies and Jellyfin-FFmpeg (with VA-API support)
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
make \
@@ -56,11 +52,26 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
poppler-utils \
imagemagick \
fonts-noto-cjk \
libraw-bin \
libimage-exiftool-perl \
&& . /etc/os-release \
&& TARGETARCH=$(dpkg --print-architecture) \
&& FFMPEG_VERSION="8.1.2-5" \
&& curl -fsSL -o /tmp/jellyfin-ffmpeg.deb "https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v${FFMPEG_VERSION}/jellyfin-ffmpeg8_${FFMPEG_VERSION}-${VERSION_CODENAME}_${TARGETARCH}.deb" \
&& apt-get install -y --no-install-recommends /tmp/jellyfin-ffmpeg.deb \
&& rm -f /tmp/jellyfin-ffmpeg.deb \
&& ldconfig /usr/lib/jellyfin-ffmpeg/lib \
&& ln -sf /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/local/bin/ffmpeg \
&& ln -sf /usr/lib/jellyfin-ffmpeg/ffprobe /usr/local/bin/ffprobe \
&& ln -sf /usr/lib/jellyfin-ffmpeg/ffmpeg /usr/bin/ffmpeg \
&& ln -sf /usr/lib/jellyfin-ffmpeg/ffprobe /usr/bin/ffprobe \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Set up working directory and make it owned by the bun user
RUN mkdir -p /app/data && chown -R bun:bun /app
# Set up working directory and make it owned by the bun user, ensure video/render group access
RUN usermod -a -G video,render bun 2>/dev/null || true \
&& mkdir -p /app/data \
&& chown -R bun:bun /app
# Switch to the non-root bun user
USER bun
+14 -5
View File
@@ -5,7 +5,7 @@
<h1 align="center">Shumai</h1>
<p align="center">
<strong>An open-source platform for all your creative work.</strong>
<strong>The best open-source Frame.io alternative for all your creative work.</strong>
</p>
<p align="center">
@@ -33,10 +33,14 @@ Shumai is an open-source Frame.io alternative built for creative teams to collab
* **Custom Asset Metadata**: Define dynamic metadata fields tailored to your production pipeline.
* **Share Link Watermarking**: Protect shared media with customizable text and image watermarks, and save watermark as reusable templates.
* **Wide File Format Support**: Preview common creative file formats, including images (with PSD support), videos, audio, and documents, while allowing any file type to be uploaded and stored.
* **3D Asset Turntable Previews**: Generate interactive 3D model turntable previews and videos for formats like GLB, FBX, OBJ, STL, USD, and DAE using [turntable-renderer](https://docs.shumai.one/using-shumai/3d-asset-support).
* **Office & Document PDF Proxying via Gotenberg**: Convert Word, PowerPoint, Excel, Markdown, HTML, and CSV documents to high-quality PDF proxies for in-browser previewing using [Gotenberg](https://docs.shumai.one/using-shumai/gotenberg).
* **NLE Export & Premiere Pro Plugin (Experimental)**: Export timestamped review comments to your favorite non-linear editor (Premiere Pro XML, DaVinci Resolve EDL, Final Cut Pro, Avid Media Composer) or use the experimental Premiere Pro UXP plugin to import media assets and auto-sync comments directly to sequence timeline markers. See [documentation](https://docs.shumai.one/using-shumai/nle-and-premiere).
But Shumai goes beyond being a Frame.io alternative. With modern models like GPT-Image-2 and Seedance 2.5, AI can already handle a surprising amount of creative work. That means you can create or update videos and images from a simple prompt without having to jump back into Photoshop, Premiere or Houdini. That is why Shumai includes a powerful agent system:
> **AI is optional.** You can use Shumai as a traditional Frame.io alternative and completely ignore the AI features if they aren't useful for your team.
* **Agent as a Team Member**: Mention a context-aware AI agent with `@mentions` directly in asset comments, just like a real teammate.
* **Agent as a One-to-One Assistant**: Chat privately with the agent and ask it to help with tasks.
* **Custom Skills & Tools**: Extend the agent by registering custom scripts, tools, and automation skills.
@@ -83,6 +87,9 @@ Docker Compose is the fastest way to get Shumai running. You do not need to clon
```bash
curl -o docker-compose.yaml https://raw.githubusercontent.com/shumaiOne/shumai/main/docker-compose/local/docker-compose.yaml
```
> [!NOTE]
> By default, the standard `docker-compose.yaml` uses CPU software transcoding. If your server has a GPU (NVIDIA NVENC, Intel QuickSync, AMD/Intel VA-API, or Rockchip RKMPP) and you want to enable GPU hardware acceleration, check the [Hardware Transcoding Guide](https://docs.shumai.one/configuration/hardware-transcoding).
3. Configure environment variables (optional):
* `SHUMAI_SERVER_PORT` controls the port the Shumai server listens on. The default is `3000`.
@@ -156,23 +163,24 @@ Shumai requires the following system packages on Linux:
- **`ffmpeg`** – Used for media transcoding and metadata extraction.
- **`poppler`** (`poppler-utils`) – Used for PDF page image extraction and PDF sprite preview generation (`pdftoppm`).
- **`imagemagick`** – Used for PSD format transcoding and color profile conversion to sRGB.
- **`dcraw_emu`** (`libraw` / `libraw-bin`) – Used for camera RAW format image decoding and preview generation.
- **`bubblewrap`**, **`socat`**, and **`ripgrep`** – Required by the AI agent sandbox (`anthropic-experimental/sandbox-runtime`) for process isolation, networking, and workspace search.
Install all required packages with one command:
> Ubuntu/Debian
```bash
sudo apt install -y ffmpeg poppler-utils imagemagick bubblewrap socat ripgrep
sudo apt install -y ffmpeg poppler-utils imagemagick bubblewrap socat ripgrep libraw-bin
```
> Fedora
```bash
sudo dnf install -y ffmpeg poppler-utils ImageMagick bubblewrap socat ripgrep
sudo dnf install -y ffmpeg poppler-utils ImageMagick bubblewrap socat ripgrep LibRaw
```
> Arch Linux
```bash
sudo pacman -S --noconfirm ffmpeg poppler imagemagick bubblewrap socat ripgrep
sudo pacman -S --noconfirm ffmpeg poppler imagemagick bubblewrap socat ripgrep libraw
```
> [!NOTE]
@@ -195,12 +203,13 @@ Shumai requires:
- **`ffmpeg`** – Used for media transcoding and metadata extraction.
- **`poppler`** – Used for PDF page image extraction and PDF sprite preview generation (`pdftoppm`).
- **`imagemagick`** – Used for PSD format transcoding and color profile conversion to sRGB.
- **`dcraw_emu`** (`libraw`) – Used for camera RAW format image decoding and preview generation.
- **`ripgrep`** – Required by the AI agent sandbox (`anthropic-experimental/sandbox-runtime`).
Install the required packages with Homebrew:
```bash
brew install ffmpeg poppler imagemagick ripgrep
brew install ffmpeg poppler imagemagick ripgrep libraw
```
---
+12 -6
View File
@@ -33,7 +33,9 @@ Shumai 是一个开源的 Frame.io 替代方案,专为创意团队打造,让
* **自定义素材元数据**:可以按你的制作流程,自由定义动态元数据字段。
* **分享链接水印**:通过可自定义的文字和图片水印保护共享媒体,并将水印配置保存为模板以便重复使用。
* **丰富的文件格式支持**:支持预览常见创意文件格式,包括图片(支持 PSD)、视频、音频和文档,同时可上传和存储任意类型的文件。
* **基于转盘渲染服务的 3D 资产预览**:通过集成 [turntable-renderer](https://docs.shumai.one/using-shumai/3d-asset-support) 支持为 GLB、FBX、OBJ、STL、USD 和 DAE 等 3D 模型生成高质量的交互式转盘预览与视频。
* **基于 Gotenberg 的文档 PDF 转码代理**:通过集成 [Gotenberg](https://docs.shumai.one/using-shumai/gotenberg) 支持将 Word、PowerPoint、Excel、Markdown、HTML 和 CSV 文档高质量转换为 PDF 代理文件进行在线预览。
* **非编剪辑导出与 Premiere 插件(实验性)**:支持将时间戳审阅评论导出至常用非编软件(Premiere Pro XML、DaVinci Resolve EDL、Final Cut Pro、Avid Media Composer),或使用实验性的 Premiere Pro 原生 UXP 插件导入媒体素材并将评论自动同步为时间轴标记。详见[相关文档](https://docs.shumai.one/using-shumai/nle-and-premiere)。
但 Shumai 不仅仅只满足于 Frame.io 的开源替代。随着 GPT-Image-2、Seedance 2.5 这类强大模型的问世,AI已经生成产品级的图片/视频。很多时候,你只要给一句提示词,就能直接生成或修改图片和视频,而不用再打开 Photoshop、Premiere 或者 Houdini。也正因为这样,Shumai 才把 AI Agent 做成了核心能力:
@@ -100,9 +102,11 @@ https://gh-proxy.com/https://raw.githubusercontent.com/shumaiOne/shumai/main/REA
2. 下载 `docker-compose.yaml` 配置文件:
```bash
curl -o docker-compose.yaml https://raw.githubusercontent.com/shumaiOne/shumai/main/docker-compose/local/docker-compose-aliyun.yaml
```
> [!NOTE]
> 默认的 Docker Compose 配置使用基于 CPU 的软件转码。如果您的服务器配备了支持的显卡(NVIDIA NVENC、Intel QuickSync、AMD/Intel VA-API 或 Rockchip RKMPP)并需要开启 GPU 硬件加速转码,请参考 [硬件加速转码配置文档](https://docs.shumai.one/configuration/hardware-transcoding)。
3. 配置环境变量(可选):
* `SHUMAI_SERVER_PORT` 用于控制 Shumai 服务监听的端口,默认值为 `3000`。
@@ -184,23 +188,24 @@ mkdir shumai && cd shumai
- **`ffmpeg`** —— 用于媒体转码和元数据提取。
- **`poppler`** (`poppler-utils`) —— 用于 PDF 页面图像提取和 PDF 雪碧图预览生成 (`pdftoppm`)。
- **`imagemagick`** —— 用于 PSD 格式图像转码和 sRGB 色彩空间转换。
- **`dcraw_emu`** (`libraw` / `libraw-bin`) —— 用于相机 RAW 格式图像解码和预览图生成。
- **`bubblewrap`**、**`socat`** 和 **`ripgrep`** —— AI Agent 沙箱(`anthropic-experimental/sandbox-runtime`)所需,用于进程隔离、网络通信和工作区搜索。
可以使用以下命令一次性安装所有依赖:
> Ubuntu/Debian
```bash
sudo apt install -y ffmpeg poppler-utils imagemagick bubblewrap socat ripgrep
sudo apt install -y ffmpeg poppler-utils imagemagick bubblewrap socat ripgrep libraw-bin
```
> Fedora
```bash
sudo dnf install -y ffmpeg poppler-utils ImageMagick bubblewrap socat ripgrep
sudo dnf install -y ffmpeg poppler-utils ImageMagick bubblewrap socat ripgrep LibRaw
```
> Arch Linux
```bash
sudo pacman -S --noconfirm ffmpeg poppler imagemagick bubblewrap socat ripgrep
sudo pacman -S --noconfirm ffmpeg poppler imagemagick bubblewrap socat ripgrep libraw
```
> [!NOTE]
@@ -212,7 +217,7 @@ sudo pacman -S --noconfirm ffmpeg poppler imagemagick bubblewrap socat ripgrep
> sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
> ```
>
> 或者,配置 AppArmor Profile,为相关可执行文件授予所需的 `userns` 权限。
> 或者,配置 AppArmor Profile,为相关可执行文件授予所需的 `userns`权限。
---
@@ -223,12 +228,13 @@ sudo pacman -S --noconfirm ffmpeg poppler imagemagick bubblewrap socat ripgrep
- **`ffmpeg`** —— 用于媒体转码和元数据提取。
- **`poppler`** —— 用于 PDF 页面图像提取和 PDF 雪碧图预览生成 (`pdftoppm`)。
- **`imagemagick`** —— 用于 PSD 格式图像转码和 sRGB 色彩空间转换。
- **`dcraw_emu`** (`libraw`) —— 用于相机 RAW 格式图像解码和预览图生成。
- **`ripgrep`** —— AI Agent 沙箱(`anthropic-experimental/sandbox-runtime`)所需。
使用 Homebrew 安装所需依赖:
```bash
brew install ffmpeg poppler imagemagick ripgrep
brew install ffmpeg poppler imagemagick ripgrep libraw
```
---
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@shumai/agent-app",
"version": "0.4.4",
"version": "0.5.2",
"private": true,
"type": "module",
"bin": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@shumai/cli",
"version": "0.4.4",
"version": "0.5.2",
"private": true,
"type": "module",
"bin": {
+41
View File
@@ -0,0 +1,41 @@
# Premiere UXP Plugin Guidelines
## Component Library (Spectrum Web Components / SWC)
- **Always prefer SWC components if possible**: Use Spectrum Web Component React wrappers (`@swc-react/*`) and `@swc-uxp-wrappers/*` for UI elements (Button, ActionButton, Textfield, Card, Divider, ProgressCircle, StatusLight, Badge, Search, FieldLabel, HelpText, IllustratedMessage, ActionGroup, etc.) rather than hand-crafting custom HTML/CSS elements.
- **SWC Support**: `public/manifest.json` has `"featureFlags": { "enableSWCSupport": true }`.
- **Package Versions**: Keep SWC packages aligned at version `0.37.0` (matching Adobe UXP compatibility).
- **Bundler Aliases**: `build.ts` uses `swcAliasPlugin` with `aliases` from `@swc-uxp-wrappers/utils` to resolve internal SWC imports for Bun.
## Icons
- **Always use Spectrum Workflow Icons (`@spectrum-web-components/icons-workflow`)**: Never use external icon libraries like `lucide-react`.
- **Registration**: All workflow icons used must be imported and registered in `src/index.tsx` (e.g. `import '@spectrum-web-components/icons-workflow/icons/sp-icon-movie-camera.js'`). Note: Ensure the icon exists in `@spectrum-web-components/icons-workflow/icons/` (Spectrum 1 compatible) rather than only `icons-s2/` (which falls back to an empty circular DefaultIcon under Spectrum 1).
- **Typing**: Add custom element declarations to `src/declarations.d.ts` under both `declare namespace React.JSX` and `declare global.JSX.IntrinsicElements` with `SpIconCustomElementProps`.
## Adobe UXP Layout Engine Rules (Critical CSS Gotchas)
Adobe UXP's layout engine (Yoga-based) does **not** support several standard modern CSS features:
1. **No CSS Grid**:
- `display: grid` and `grid-template-columns` are **unsupported / invalid**.
- Always use Flexbox (`display: flex; flex-direction: row | column;`).
2. **No `aspect-ratio`**:
- `aspect-ratio` is invalid in UXP and collapses containers to `0px` height.
- Always specify explicit `width` and `height` on preview / thumbnail containers.
3. **No `box-sizing: border-box`**:
- `box-sizing` is not supported (UXP elements are natively border-box). Specifying it logs invalid property warnings.
4. **No `gap` in Flexbox**:
- `gap` is invalid in Premiere UXP flexbox. Items will render with 0px spacing.
- Use `margin-bottom` or `margin-right` on child items for spacing.
5. **Always Set `flex-shrink: 0` on List Items**:
- Flex children default to `flex-shrink: 1`. When rendering lists with many items (>10 items), flexbox squishes the items down to slivers instead of scrolling.
- Always add `flex-shrink: 0` and an explicit `min-height` to list row cards (`.project-row-card`, `.file-row-card`, `.item-row`, etc.).
6. **Scroll Containers**:
- Scrollable flex children (like `.view-content`) must have `min-height: 0` and `overflow-y: auto` to allow children to overflow and scroll vertically.
## Build and Packaging Commands
- **Build**: `bun run --filter @shumai/premiere-uxp build`
- **Watch mode**: `bun run --filter @shumai/premiere-uxp dev`
- **Package CCX**: `bun run --filter @shumai/premiere-uxp package` (outputs `apps/premiere-uxp/shumai-premiere.ccx`)
+109
View File
@@ -0,0 +1,109 @@
#!/usr/bin/env bun
import { cp, rm, mkdir } from 'node:fs/promises'
import { existsSync, watch } from 'node:fs'
import { $ } from 'bun'
import { aliases } from '@swc-uxp-wrappers/utils'
import type { BunPlugin } from 'bun'
const swcAliasPlugin: BunPlugin = {
name: 'swc-uxp-aliases',
setup(build) {
for (const [key, target] of Object.entries(aliases)) {
const escaped = key.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
const filter = new RegExp(`^${escaped}(/.*)?$`)
build.onResolve({ filter }, (args) => {
const subpath = args.path.slice(key.length)
const targetPath = target + subpath
try {
return { path: import.meta.resolveSync(targetPath) }
} catch {
return undefined
}
})
}
},
}
const isWatch = process.argv.includes('--watch')
const isPackage = process.argv.includes('--package')
async function build(): Promise<boolean> {
const start = performance.now()
try {
if (!existsSync('dist')) {
await mkdir('dist', { recursive: true })
}
// 1. Copy public assets (manifest, index.html, styles, icons)
await cp('public', 'dist', { recursive: true })
// 2. Bundle with Bun.build
const result = await Bun.build({
entrypoints: ['./src/index.tsx'],
outdir: './dist',
naming: 'index.js',
target: 'browser',
format: 'cjs',
sourcemap: 'external',
minify: false,
plugins: [swcAliasPlugin],
external: ['os', 'premierepro', 'uxp'],
define: {
'process.env.NODE_ENV': JSON.stringify('production'),
},
})
if (!result.success) {
console.error('❌ Build failed:')
for (const log of result.logs) {
console.error(log)
}
return false
}
const elapsed = (performance.now() - start).toFixed(1)
console.log(`✅ Build completed in ${elapsed}ms`)
// 3. Package .ccx if requested
if (isPackage) {
console.log('📦 Packaging shumai-premiere.ccx...')
if (existsSync('shumai-premiere.ccx')) {
await rm('shumai-premiere.ccx')
}
await $`cd dist && zip -r ../shumai-premiere.ccx . -x '*.map' -x '.DS_Store' -x '__MACOSX*'`
console.log('✅ Package created.')
}
return true
} catch (err) {
console.error('❌ Build error:', err)
return false
}
}
// Clean and run initial build
if (existsSync('dist')) {
await rm('dist', { recursive: true, force: true })
}
const success = await build()
if (!success && !isWatch) {
process.exit(1)
}
// Watch mode
if (isWatch) {
console.log('👀 Watching src/ and public/ for changes...')
let building = false
const triggerRebuild = async (dir: string) => {
if (building) return
building = true
setTimeout(async () => {
console.log(`\n🔄 Change detected in ${dir}, rebuilding...`)
await build()
building = false
}, 50)
}
watch('./src', { recursive: true }, () => triggerRebuild('src'))
watch('./public', { recursive: true }, () => triggerRebuild('public'))
}
+62
View File
@@ -0,0 +1,62 @@
{
"name": "@shumai/premiere-uxp",
"version": "0.5.2",
"private": true,
"type": "commonjs",
"scripts": {
"build": "bun run ./build.ts",
"dev": "bun run ./build.ts --watch",
"package": "bun run ./build.ts --package",
"clean": "rm -rf dist"
},
"dependencies": {
"@shumai/api": "workspace:*",
"@shumai/dtos": "workspace:*",
"@spectrum-web-components/action-menu": "0.37.0",
"@spectrum-web-components/badge": "0.37.0",
"@spectrum-web-components/icon": "1.12.2",
"@spectrum-web-components/icons-workflow": "1.12.2",
"@spectrum-web-components/menu": "0.37.0",
"@spectrum-web-components/progress-circle": "0.37.0",
"@spectrum-web-components/status-light": "0.37.0",
"@spectrum-web-components/theme": "0.37.0",
"@swc-react/action-button": "0.37.0",
"@swc-react/action-group": "0.37.0",
"@swc-react/action-menu": "0.37.0",
"@swc-react/badge": "0.37.0",
"@swc-react/button": "0.37.0",
"@swc-react/card": "0.37.0",
"@swc-react/divider": "0.37.0",
"@swc-react/field-label": "0.37.0",
"@swc-react/help-text": "0.37.0",
"@swc-react/illustrated-message": "0.37.0",
"@swc-react/menu": "0.37.0",
"@swc-react/progress-circle": "0.37.0",
"@swc-react/search": "0.37.0",
"@swc-react/status-light": "0.37.0",
"@swc-react/textfield": "0.37.0",
"@swc-react/theme": "0.37.0",
"@swc-uxp-wrappers/action-button": "2.0.0",
"@swc-uxp-wrappers/action-group": "2.0.0",
"@swc-uxp-wrappers/button": "2.0.0",
"@swc-uxp-wrappers/card": "2.0.0",
"@swc-uxp-wrappers/divider": "2.0.0",
"@swc-uxp-wrappers/field-label": "2.0.0",
"@swc-uxp-wrappers/help-text": "2.0.0",
"@swc-uxp-wrappers/illustrated-message": "2.0.0",
"@swc-uxp-wrappers/menu": "2.0.0",
"@swc-uxp-wrappers/overlay": "2.0.0",
"@swc-uxp-wrappers/popover": "2.0.0",
"@swc-uxp-wrappers/search": "2.0.0",
"@swc-uxp-wrappers/textfield": "2.0.0",
"@swc-uxp-wrappers/utils": "2.0.1",
"hono": "4.13.5",
"react": "19.2.8",
"react-dom": "19.2.8"
},
"devDependencies": {
"@adobe/premierepro": "26.3.0",
"@types/react": "19.2.18",
"@types/react-dom": "19.2.7"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

+13
View File
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Shumai</title>
<link rel="stylesheet" href="./styles.css" />
<script defer src="./index.js"></script>
</head>
<body>
<div id="root"></div>
</body>
</html>
+61
View File
@@ -0,0 +1,61 @@
{
"id": "com.shumai.premiere",
"name": "Shumai",
"shortname": "shumai",
"version": "0.1.0",
"main": "index.html",
"host": {
"app": "premierepro",
"minVersion": "25.1.0"
},
"manifestVersion": 5,
"featureFlags": {
"enableSWCSupport": true
},
"requiredPermissions": {
"network": {
"domains": "all"
},
"localFileSystem": "request",
"clipboard": "readAndWrite"
},
"entrypoints": [
{
"id": "shumaiPanel",
"type": "panel",
"minimumSize": {
"width": 320,
"height": 480
},
"maximumSize": {
"width": 2000,
"height": 2000
},
"preferredDockedSize": {
"width": 400,
"height": 720
},
"preferredFloatingSize": {
"width": 460,
"height": 780
},
"label": {
"default": "Shumai"
},
"icons": [
{
"width": 114,
"height": 114,
"path": "icons/icon.png"
}
]
}
],
"icons": [
{
"width": 114,
"height": 114,
"path": "icons/icon.png"
}
]
}
File diff suppressed because it is too large Load Diff
Binary file not shown.
+123
View File
@@ -0,0 +1,123 @@
import React, { useEffect, useState } from 'react'
import { Header } from './components/Header'
import { NavigationTabs, type MainTab } from './components/NavigationTabs'
import { AuthView } from './views/AuthView'
import { ProjectsView, ProjectSummary } from './views/ProjectsView'
import { FileListView } from './views/FileListView'
import { SequencesView } from './views/SequencesView'
import { getStoredCredentials, clearStoredCredentials } from './services/storage'
import { getAllSequenceLinksFromCache } from './services/linkStorage'
import { resetClient } from './api/client'
import { autoSyncService } from './services/autoSyncService'
import { ProgressCircle } from '@swc-react/progress-circle'
type AppView = 'auth' | 'projects' | 'files'
export const App: React.FC = () => {
const [view, setView] = useState<AppView>('auth')
const [mainTab, setMainTab] = useState<MainTab>('browse')
const [linkedCount, setLinkedCount] = useState<number>(0)
const [endpoint, setEndpoint] = useState<string>('')
const [apiKey, setApiKey] = useState<string>('')
const [selectedProject, setSelectedProject] = useState<ProjectSummary | null>(null)
const [initialLoading, setInitialLoading] = useState(true)
useEffect(() => {
const creds = getStoredCredentials()
if (creds && creds.endpoint && creds.apiKey) {
setEndpoint(creds.endpoint)
setApiKey(creds.apiKey)
setView('projects')
autoSyncService.start(creds.endpoint, creds.apiKey)
const cached = getAllSequenceLinksFromCache()
setLinkedCount(cached.length)
} else {
setView('auth')
}
setInitialLoading(false)
return () => {
autoSyncService.stop()
}
}, [])
const handleConnectSuccess = (newEndpoint: string, newApiKey: string) => {
setEndpoint(newEndpoint)
setApiKey(newApiKey)
setView('projects')
autoSyncService.start(newEndpoint, newApiKey)
}
const handleDisconnect = () => {
autoSyncService.stop()
clearStoredCredentials()
resetClient()
setEndpoint('')
setApiKey('')
setSelectedProject(null)
setView('auth')
setMainTab('browse')
}
const handleSelectProject = (project: ProjectSummary) => {
setSelectedProject(project)
setView('files')
setMainTab('browse')
}
const handleBackToProjects = () => {
setSelectedProject(null)
setView('projects')
setMainTab('browse')
}
if (initialLoading) {
return (
<div className="app-container">
<Header />
<div className="view-content" style={{ justifyContent: 'center', alignItems: 'center' }}>
<ProgressCircle indeterminate size="l" label="Loading Shumai..." />
</div>
</div>
)
}
return (
<div className="app-container">
<Header
endpoint={view !== 'auth' ? endpoint : undefined}
onDisconnect={view !== 'auth' ? handleDisconnect : undefined}
/>
{view !== 'auth' && (
<NavigationTabs activeTab={mainTab} onTabChange={setMainTab} linkedCount={linkedCount} />
)}
{view === 'auth' && (
<AuthView
initialEndpoint={endpoint || 'http://localhost:3000'}
initialApiKey={apiKey}
onConnectSuccess={handleConnectSuccess}
/>
)}
{view !== 'auth' && mainTab === 'sequences' && (
<SequencesView endpoint={endpoint} apiKey={apiKey} onLinkCountChange={setLinkedCount} />
)}
{view !== 'auth' && mainTab === 'browse' && view === 'projects' && (
<ProjectsView endpoint={endpoint} apiKey={apiKey} onSelectProject={handleSelectProject} />
)}
{view !== 'auth' && mainTab === 'browse' && view === 'files' && selectedProject && (
<FileListView
endpoint={endpoint}
apiKey={apiKey}
project={selectedProject}
onBackToProjects={handleBackToProjects}
onLinkCountChange={setLinkedCount}
/>
)}
</div>
)
}
+31
View File
@@ -0,0 +1,31 @@
import { hc } from 'hono/client'
import type { AppType } from '@shumai/api'
export type ShumaiClient = ReturnType<typeof hc<AppType>>
let currentClient: ShumaiClient | null = null
let currentKey = ''
export function getShumaiClient(endpoint: string, apiKey: string): ShumaiClient {
const normalizedEndpoint = endpoint.trim().replace(/\/+$/, '')
const cacheKey = `${normalizedEndpoint}::${apiKey}`
if (currentClient && currentKey === cacheKey) {
return currentClient
}
currentClient = hc<AppType>(normalizedEndpoint, {
headers: {
Authorization: `Bearer ${apiKey}`,
'x-api-key': apiKey,
},
})
currentKey = cacheKey
return currentClient
}
export function resetClient(): void {
currentClient = null
currentKey = ''
}
@@ -0,0 +1,61 @@
import React from 'react'
import { Divider } from '@swc-react/divider'
export interface BreadcrumbCrumb {
id: string
name: string
}
interface BreadcrumbProps {
projectName?: string
crumbs: BreadcrumbCrumb[]
onNavigateToProjects: () => void
onNavigateToCrumb: (index: number) => void
}
export const Breadcrumb: React.FC<BreadcrumbProps> = ({
projectName,
crumbs,
onNavigateToProjects,
onNavigateToCrumb,
}) => {
return (
<>
<nav className="breadcrumb-bar" aria-label="Folder Path">
<span className="breadcrumb-item" onClick={onNavigateToProjects} title="Back to Projects">
Projects
</span>
{projectName && (
<>
<span className="breadcrumb-separator">/</span>
<span
className={`breadcrumb-item ${crumbs.length === 0 ? 'active' : ''}`}
onClick={() => onNavigateToCrumb(-1)}
title={projectName}
>
{projectName}
</span>
</>
)}
{crumbs.map((crumb, idx) => {
const isLast = idx === crumbs.length - 1
return (
<React.Fragment key={crumb.id}>
<span className="breadcrumb-separator">/</span>
<span
className={`breadcrumb-item ${isLast ? 'active' : ''}`}
onClick={() => (!isLast ? onNavigateToCrumb(idx) : undefined)}
title={crumb.name}
>
{crumb.name}
</span>
</React.Fragment>
)
})}
</nav>
<Divider size="s" />
</>
)
}
@@ -0,0 +1,409 @@
// @vitest-environment happy-dom
import React from 'react'
import { describe, it, expect, vi, afterEach } from 'vitest'
import { render, screen, fireEvent, cleanup } from '@testing-library/react'
import {
getFileTypeCategory,
getAssetVersionLabel,
FileItem,
FileCardItem,
type AssetSummary,
} from './FileItem'
// Configure React 19 act environment for happy-dom
;(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true
describe('getFileTypeCategory', () => {
it('identifies folder type', () => {
const asset: AssetSummary = {
id: 'f1',
name: 'My Folder',
type: 'folder',
}
expect(getFileTypeCategory(asset)).toBe('folder')
})
it('identifies video by mimeType', () => {
const asset: AssetSummary = {
id: 'v1',
name: 'clip.dat',
type: 'file',
mimeType: 'video/mp4',
}
expect(getFileTypeCategory(asset)).toBe('video')
})
it('identifies video by extension', () => {
const extensions = ['mp4', 'mov', 'avi', 'mkv', 'm4v', 'webm']
for (const ext of extensions) {
const asset: AssetSummary = {
id: `v-${ext}`,
name: `sample.${ext}`,
type: 'file',
}
expect(getFileTypeCategory(asset)).toBe('video')
}
})
it('identifies audio by mimeType or extension', () => {
const asset1: AssetSummary = {
id: 'a1',
name: 'audio.raw',
type: 'file',
mimeType: 'audio/wav',
}
const asset2: AssetSummary = {
id: 'a2',
name: 'track.mp3',
type: 'file',
}
expect(getFileTypeCategory(asset1)).toBe('audio')
expect(getFileTypeCategory(asset2)).toBe('audio')
})
it('identifies image by mimeType or extension', () => {
const asset1: AssetSummary = {
id: 'i1',
name: 'photo.bin',
type: 'file',
mimeType: 'image/png',
}
const asset2: AssetSummary = {
id: 'i2',
name: 'art.jpg',
type: 'file',
}
expect(getFileTypeCategory(asset1)).toBe('image')
expect(getFileTypeCategory(asset2)).toBe('image')
})
it('falls back to generic file', () => {
const asset: AssetSummary = {
id: 'doc1',
name: 'notes.pdf',
type: 'file',
mimeType: 'application/pdf',
}
expect(getFileTypeCategory(asset)).toBe('file')
})
})
describe('FileItem and FileCardItem UI Components', () => {
afterEach(() => {
cleanup()
vi.clearAllMocks()
})
const mockOnClick = vi.fn()
const mockOnImportRaw = vi.fn()
const mockOnSelectVideoForImport = vi.fn()
const folderAsset: AssetSummary = {
id: 'folder-1',
name: 'Raw Footage',
type: 'folder',
fileCount: 5,
}
const imageAsset: AssetSummary = {
id: 'img-1',
name: 'logo.png',
type: 'file',
mimeType: 'image/png',
sizeByte: 2048,
}
const videoAsset: AssetSummary = {
id: 'vid-1',
name: 'interview.mp4',
type: 'file',
mimeType: 'video/mp4',
sizeByte: 50 * 1024 * 1024,
}
it('FileItem navigates into folder on click without download button', () => {
render(
<FileItem
asset={folderAsset}
onClick={mockOnClick}
onImportRaw={mockOnImportRaw}
onSelectVideoForImport={mockOnSelectVideoForImport}
/>,
)
expect(screen.getByText('Raw Footage')).toBeTruthy()
expect(screen.queryByTitle('Import into Premiere Pro')).toBeNull()
fireEvent.click(screen.getByText('Raw Footage'))
expect(mockOnClick).toHaveBeenCalled()
expect(mockOnImportRaw).not.toHaveBeenCalled()
})
it('FileCardItem calls onImportRaw when download button is clicked for non-video, but clicking card does not', () => {
render(
<FileCardItem
asset={imageAsset}
onClick={mockOnClick}
onImportRaw={mockOnImportRaw}
onSelectVideoForImport={mockOnSelectVideoForImport}
/>,
)
expect(screen.getByText('logo.png')).toBeTruthy()
// Clicking the file title / card text should NOT trigger import
fireEvent.click(screen.getByText('logo.png'))
expect(mockOnImportRaw).not.toHaveBeenCalled()
const downloadBtn = screen.getByTitle('Import into Premiere Pro')
expect(downloadBtn).toBeTruthy()
fireEvent.click(downloadBtn)
expect(mockOnImportRaw).toHaveBeenCalledWith(imageAsset)
})
it('FileCardItem calls onSelectVideoForImport when download button is clicked for video', () => {
render(
<FileCardItem
asset={videoAsset}
onClick={mockOnClick}
onImportRaw={mockOnImportRaw}
onSelectVideoForImport={mockOnSelectVideoForImport}
/>,
)
expect(screen.getByText('interview.mp4')).toBeTruthy()
const downloadBtn = screen.getByTitle('Import into Premiere Pro')
fireEvent.click(downloadBtn)
expect(mockOnSelectVideoForImport).toHaveBeenCalledWith(videoAsset)
expect(mockOnImportRaw).not.toHaveBeenCalled()
})
it('FileCardItem renders sp-icon-link when isLinked is false, and triggers onLinkSequence on click', () => {
const mockOnLinkSequence = vi.fn()
const { container } = render(
<FileCardItem
asset={videoAsset}
onClick={mockOnClick}
onLinkSequence={mockOnLinkSequence}
isLinked={false}
/>,
)
const linkIcon = container.querySelector('sp-icon-link')
const unlinkIcon = container.querySelector('sp-icon-unlink')
expect(linkIcon).toBeTruthy()
expect(unlinkIcon).toBeNull()
const linkBtn = screen.getByTitle('Link to Sequence')
expect(linkBtn).toBeTruthy()
fireEvent.click(linkBtn)
expect(mockOnLinkSequence).toHaveBeenCalledWith(videoAsset)
})
it('FileCardItem renders sp-icon-unlink when isLinked is true, and triggers onUnlinkSequence on click', () => {
const mockOnLinkSequence = vi.fn()
const mockOnUnlinkSequence = vi.fn()
const { container } = render(
<FileCardItem
asset={videoAsset}
onClick={mockOnClick}
onLinkSequence={mockOnLinkSequence}
onUnlinkSequence={mockOnUnlinkSequence}
isLinked={true}
linkedSequenceName="Cut_v1"
/>,
)
const linkIcon = container.querySelector('sp-icon-link')
const unlinkIcon = container.querySelector('sp-icon-unlink')
expect(linkIcon).toBeNull()
expect(unlinkIcon).toBeTruthy()
const unlinkBtn = screen.getByTitle('Unlink from Cut_v1')
expect(unlinkBtn).toBeTruthy()
fireEvent.click(unlinkBtn)
expect(mockOnUnlinkSequence).toHaveBeenCalledWith(videoAsset)
expect(mockOnLinkSequence).not.toHaveBeenCalled()
})
it('FileItem renders sp-icon-unlink when isLinked is true', () => {
const mockOnLinkSequence = vi.fn()
const mockOnUnlinkSequence = vi.fn()
const { container } = render(
<FileItem
asset={videoAsset}
onClick={mockOnClick}
onLinkSequence={mockOnLinkSequence}
onUnlinkSequence={mockOnUnlinkSequence}
isLinked={true}
linkedSequenceName="Cut_v1"
/>,
)
const linkIcon = container.querySelector('sp-icon-link')
const unlinkIcon = container.querySelector('sp-icon-unlink')
expect(linkIcon).toBeNull()
expect(unlinkIcon).toBeTruthy()
const unlinkBtn = screen.getByTitle('Unlink from Cut_v1')
expect(unlinkBtn).toBeTruthy()
fireEvent.click(unlinkBtn)
expect(mockOnUnlinkSequence).toHaveBeenCalledWith(videoAsset)
})
it('FileCardItem renders version in details when asset has versionStack', () => {
const versionedAsset: AssetSummary = {
id: 'vid-v2',
name: 'interview_cut.mp4',
type: 'file',
mimeType: 'video/mp4',
sizeByte: 20 * 1024 * 1024,
versionStack: {
id: 'stack-1',
versions: [
{ version: 2, current: true, id: 'vid-v2', name: 'interview_cut.mp4' },
{ version: 1, current: false, id: 'vid-v1', name: 'interview_cut_v1.mp4' },
],
},
}
render(<FileCardItem asset={versionedAsset} onClick={mockOnClick} />)
expect(screen.getByText('v2')).toBeTruthy()
})
it('FileCardItem does not render version when asset has no versionStack', () => {
render(<FileCardItem asset={videoAsset} onClick={mockOnClick} />)
expect(screen.queryByText(/^v\d+$/)).toBeNull()
})
it('FileItem renders version in subtext when asset has versionStack', () => {
const versionedAsset: AssetSummary = {
id: 'vid-v2',
name: 'interview_cut.mp4',
type: 'file',
mimeType: 'video/mp4',
sizeByte: 20 * 1024 * 1024,
versionStack: {
id: 'stack-1',
versions: [
{ version: 2, current: true, id: 'vid-v2', name: 'interview_cut.mp4' },
{ version: 1, current: false, id: 'vid-v1', name: 'interview_cut_v1.mp4' },
],
},
}
render(<FileItem asset={versionedAsset} onClick={mockOnClick} />)
expect(screen.getByText(/v2 •/)).toBeTruthy()
})
it('FileCardItem renders createdAt time when provided', () => {
const assetWithDates: AssetSummary = {
id: 'date-1',
name: 'render.mp4',
type: 'file',
createdAt: new Date(Date.now() - 3600 * 1000).toISOString(),
updatedAt: new Date(Date.now() - 60 * 1000).toISOString(),
}
render(<FileCardItem asset={assetWithDates} onClick={mockOnClick} />)
expect(screen.getByText('1h ago')).toBeTruthy()
expect(screen.queryByText('1m ago')).toBeNull()
})
it('FileCardItem falls back to updatedAt if createdAt is absent', () => {
const assetWithUpdatedOnly: AssetSummary = {
id: 'date-2',
name: 'render2.mp4',
type: 'file',
updatedAt: new Date(Date.now() - 60 * 1000).toISOString(),
}
render(<FileCardItem asset={assetWithUpdatedOnly} onClick={mockOnClick} />)
expect(screen.getByText('1m ago')).toBeTruthy()
})
it('FileItem renders createdAt time in subtext when provided', () => {
const assetWithDates: AssetSummary = {
id: 'date-3',
name: 'render3.mp4',
type: 'file',
createdAt: new Date(Date.now() - 3600 * 1000).toISOString(),
updatedAt: new Date(Date.now() - 60 * 1000).toISOString(),
}
render(<FileItem asset={assetWithDates} onClick={mockOnClick} />)
expect(screen.getByText(/1h ago/)).toBeTruthy()
expect(screen.queryByText(/1m ago/)).toBeNull()
})
})
describe('getAssetVersionLabel', () => {
it('returns null for folder asset', () => {
const folder: AssetSummary = {
id: 'f1',
name: 'Footage',
type: 'folder',
}
expect(getAssetVersionLabel(folder)).toBeNull()
})
it('returns null for standalone file without versionStack', () => {
const file: AssetSummary = {
id: 'file1',
name: 'clip.mp4',
type: 'file',
}
expect(getAssetVersionLabel(file)).toBeNull()
})
it('returns null when versionStack has empty versions array', () => {
const file: AssetSummary = {
id: 'file1',
name: 'clip.mp4',
type: 'file',
versionStack: {
id: 'stack-1',
versions: [],
},
}
expect(getAssetVersionLabel(file)).toBeNull()
})
it('returns formatted version matching asset id', () => {
const file: AssetSummary = {
id: 'ver-1',
name: 'cut.mov',
type: 'file',
versionStack: {
id: 'stack-1',
versions: [
{ version: 3, current: false, id: 'ver-3' },
{ version: 2, current: false, id: 'ver-2' },
{ version: 1, current: false, id: 'ver-1' },
],
},
}
expect(getAssetVersionLabel(file)).toBe('v1')
})
it('returns current version when asset id is stack id or does not match', () => {
const file: AssetSummary = {
id: 'stack-1',
name: 'cut.mov',
type: 'version_stack',
versionStack: {
id: 'stack-1',
versions: [
{ version: 3, current: true, id: 'ver-3' },
{ version: 2, current: false, id: 'ver-2' },
{ version: 1, current: false, id: 'ver-1' },
],
},
}
expect(getAssetVersionLabel(file)).toBe('v3')
})
})
@@ -0,0 +1,503 @@
import React, { useState } from 'react'
import { formatDateAgo } from '../utils/date'
import { formatBytes, formatDuration } from '../utils/format'
import { resolveAssetUrl } from '../utils/url'
export { formatBytes, formatDuration }
export interface AssetSummary {
id: string
name: string
type: string
size?: number | null
sizeByte?: number | null
mimeType?: string | null
updatedAt?: string | Date
createdAt?: string | Date
commentsCount?: number
fileCount?: number
creator?: {
id: string
name: string
image?: string | null
} | null
agent?: {
id: string
name: string
} | null
preview?: {
thumbnailUrl?: string
duration?: number
pageCount?: number
proxyType?: string | null
} | null
media?: {
original?: {
key?: string
filesizeInBytes?: number
codec?: string
} | null
metadata?: {
duration?: number
}
videoTranscodes?: Array<{
id: string
url: string
key: string
width: number
height: number
size: number
}>
} | null
versionStack?: {
id: string
versions: Array<{
version: number
current: boolean
id: string
name?: string | null
createdAt?: string | null
previewUrl?: string | null
}>
} | null
}
export interface FileItemProps {
asset: AssetSummary
endpoint?: string
apiKey?: string
onClick: (e: React.MouseEvent) => void
onImportRaw?: (asset: AssetSummary) => void
onSelectVideoForImport?: (asset: AssetSummary) => void
onLinkSequence?: (asset: AssetSummary) => void
onUnlinkSequence?: (asset: AssetSummary) => void
isLinked?: boolean
linkedSequenceName?: string
}
export function getFileTypeCategory(
asset: AssetSummary,
): 'folder' | 'video' | 'audio' | 'image' | 'file' {
if (asset.type === 'folder') return 'folder'
const name = asset.name.toLowerCase()
const mime = asset.mimeType?.toLowerCase() || ''
if (mime.startsWith('video/') || /\.(mp4|mov|avi|mkv|m4v|webm)$/.test(name)) {
return 'video'
}
if (mime.startsWith('audio/') || /\.(mp3|wav|aac|flac|m4a|ogg)$/.test(name)) {
return 'audio'
}
if (mime.startsWith('image/') || /\.(png|jpg|jpeg|gif|webp|svg|bmp)$/.test(name)) {
return 'image'
}
return 'file'
}
export function getAssetVersionLabel(asset: AssetSummary): string | null {
if (asset.versionStack?.versions && asset.versionStack.versions.length > 0) {
const matched = asset.versionStack.versions.find((v) => v.id === asset.id)
if (matched?.version != null) {
return `v${matched.version}`
}
const current = asset.versionStack.versions.find((v) => v.current)
if (current?.version != null) {
return `v${current.version}`
}
const first = asset.versionStack.versions[0]
if (first?.version != null) {
return `v${first.version}`
}
return `v${asset.versionStack.versions.length}`
}
return null
}
/** List View Row Item */
export const FileItem: React.FC<FileItemProps> = ({
asset,
endpoint = '',
onClick,
onImportRaw,
onSelectVideoForImport,
onLinkSequence,
onUnlinkSequence,
isLinked = false,
linkedSequenceName,
}) => {
const [imgError, setImgError] = useState(false)
const category = getFileTypeCategory(asset)
const isFolder = category === 'folder'
const versionLabel = getAssetVersionLabel(asset)
const effectiveSize = asset.sizeByte ?? asset.size
const timeText = formatDateAgo(asset.createdAt || asset.updatedAt)
const thumbUrl = resolveAssetUrl(asset.preview?.thumbnailUrl, endpoint)
const iconFallback = (
<div className={`item-icon ${category}`}>
{category === 'folder' && (
<sp-icon-folder size="s" style={{ color: '#fbbf24' }}></sp-icon-folder>
)}
{category === 'video' && (
<sp-icon-filmstrip size="s" style={{ color: '#60a5fa' }}></sp-icon-filmstrip>
)}
{category === 'audio' && (
<sp-icon-audio size="s" style={{ color: '#a78bfa' }}></sp-icon-audio>
)}
{category === 'image' && (
<sp-icon-image size="s" style={{ color: '#f472b6' }}></sp-icon-image>
)}
{category === 'file' && (
<sp-icon-document size="s" style={{ color: '#999999' }}></sp-icon-document>
)}
</div>
)
const handleImportAction = () => {
if (isFolder) return
if (category === 'video' && onSelectVideoForImport) {
onSelectVideoForImport(asset)
} else if (onImportRaw) {
onImportRaw(asset)
}
}
const handleRowClick = (e: React.MouseEvent) => {
if (isFolder) {
onClick(e)
} else {
e.stopPropagation()
handleImportAction()
}
}
return (
<div
className="item-row"
onClick={handleRowClick}
role="button"
tabIndex={0}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault()
handleRowClick(e as unknown as React.MouseEvent)
}
}}
>
<div className="item-left">
{thumbUrl && !isFolder && !imgError ? (
<div className="item-thumb-wrapper">
<img
src={thumbUrl}
alt={asset.name}
className="item-thumb-img"
onLoad={() => console.log('[UXP Image OK]', thumbUrl)}
onError={() => {
console.error('[UXP Image Failed]', thumbUrl)
setImgError(true)
}}
/>
</div>
) : (
iconFallback
)}
<div className="item-meta">
<span className="item-name" title={asset.name}>
{asset.name}
</span>
<span className="item-subtext">
{versionLabel ? `${versionLabel} • ` : ''}
{isFolder ? 'Folder' : formatBytes(effectiveSize)}
{timeText ? ` • ${timeText}` : ''}
</span>
</div>
</div>
<div className="item-right">
{asset.commentsCount != null && asset.commentsCount > 0 && (
<span className="item-comments-count" title={`${asset.commentsCount} comments`}>
{asset.commentsCount} {asset.commentsCount === 1 ? 'comment' : 'comments'}
</span>
)}
{isFolder ? (
<sp-icon-chevron-right size="xs"></sp-icon-chevron-right>
) : (
<div style={{ display: 'flex', alignItems: 'center' }}>
{(onLinkSequence || onUnlinkSequence) &&
(category === 'video' || category === 'audio') && (
<sp-action-button
quiet
size="xs"
icon-only
label={
isLinked
? onUnlinkSequence
? `Unlink from ${linkedSequenceName || 'Sequence'}`
: `Linked to ${linkedSequenceName || 'Sequence'}`
: 'Link to Sequence'
}
title={
isLinked
? onUnlinkSequence
? `Unlink from ${linkedSequenceName || 'Sequence'}`
: `Linked to ${linkedSequenceName || 'Sequence'}`
: 'Link to Sequence'
}
className="item-row-link-btn"
style={{ marginRight: 4 }}
onClick={(e: React.MouseEvent) => {
e.stopPropagation()
if (isLinked && onUnlinkSequence) {
onUnlinkSequence(asset)
} else if (onLinkSequence) {
onLinkSequence(asset)
}
}}
>
{isLinked ? (
<sp-icon-unlink
size="s"
slot="icon"
style={{ color: '#f87171' }}
></sp-icon-unlink>
) : (
<sp-icon-link size="s" slot="icon"></sp-icon-link>
)}
</sp-action-button>
)}
{(onImportRaw || onSelectVideoForImport) && (
<sp-action-button
quiet
size="xs"
icon-only
label="Import into Premiere Pro"
title="Import into Premiere Pro"
className="item-row-import-btn"
onClick={(e: React.MouseEvent) => {
e.stopPropagation()
handleImportAction()
}}
>
<sp-icon-download size="s" slot="icon"></sp-icon-download>
</sp-action-button>
)}
</div>
)}
</div>
</div>
)
}
/** Card View Row Item (2 Columns: Left Preview, Right Info as Raw Text) */
export const FileCardItem: React.FC<FileItemProps> = ({
asset,
endpoint = '',
onClick,
onImportRaw,
onSelectVideoForImport,
onLinkSequence,
onUnlinkSequence,
isLinked = false,
linkedSequenceName,
}) => {
const [imgError, setImgError] = useState(false)
const category = getFileTypeCategory(asset)
const isFolder = category === 'folder'
const effectiveSize = asset.sizeByte ?? asset.size
const timeText = formatDateAgo(asset.createdAt || asset.updatedAt)
const thumbUrl = resolveAssetUrl(asset.preview?.thumbnailUrl, endpoint)
const duration = asset.preview?.duration ?? asset.media?.metadata?.duration
const durationText = formatDuration(duration)
const creatorName = asset.creator?.name || asset.agent?.name
const cardFallback = (
<div className={`file-row-placeholder ${category}`}>
{category === 'folder' && (
<sp-icon-folder size="l" style={{ color: '#fbbf24' }}></sp-icon-folder>
)}
{category === 'video' && (
<sp-icon-filmstrip size="l" style={{ color: '#60a5fa' }}></sp-icon-filmstrip>
)}
{category === 'audio' && (
<sp-icon-audio size="l" style={{ color: '#a78bfa' }}></sp-icon-audio>
)}
{category === 'image' && (
<sp-icon-image size="l" style={{ color: '#f472b6' }}></sp-icon-image>
)}
{category === 'file' && (
<sp-icon-document size="l" style={{ color: '#999999' }}></sp-icon-document>
)}
</div>
)
const handleImportAction = () => {
if (isFolder) return
if (category === 'video' && onSelectVideoForImport) {
onSelectVideoForImport(asset)
} else if (onImportRaw) {
onImportRaw(asset)
}
}
const handleCardClick = (e: React.MouseEvent) => {
if (isFolder) {
onClick(e)
}
}
// Assemble raw text details for Line 3 (Version • Duration • Size/Type • Comments)
const details: string[] = []
const versionLabel = getAssetVersionLabel(asset)
if (versionLabel) {
details.push(versionLabel)
}
if (durationText) {
details.push(durationText)
}
if (isFolder) {
details.push(asset.fileCount != null ? `${asset.fileCount} items` : 'Folder')
} else if (effectiveSize != null) {
details.push(formatBytes(effectiveSize))
}
if (asset.commentsCount != null && asset.commentsCount > 0) {
details.push(`${asset.commentsCount} ${asset.commentsCount === 1 ? 'comment' : 'comments'}`)
}
if (isLinked) {
details.push(`Linked: ${linkedSequenceName || 'Sequence'}`)
}
return (
<div
className={`file-row-card ${isFolder ? 'is-folder' : 'is-file'}`}
onClick={isFolder ? handleCardClick : undefined}
role={isFolder ? 'button' : undefined}
tabIndex={isFolder ? 0 : undefined}
title={isFolder ? asset.name : undefined}
onKeyDown={
isFolder
? (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault()
handleCardClick(e as unknown as React.MouseEvent)
}
}
: undefined
}
>
{/* Left Column: Preview Only (NO LABELS, NO BADGES) */}
<div className="file-row-preview">
{thumbUrl && !isFolder && !imgError ? (
<img
src={thumbUrl}
alt={asset.name}
className="file-row-img"
onError={() => setImgError(true)}
/>
) : (
cardFallback
)}
</div>
{/* Right Column: Title, Creator & Date, Duration / Size / Comments as Raw Text */}
<div className="file-row-content">
<div className="file-row-header">
<span className="file-row-title" title={isFolder ? asset.name : undefined}>
{asset.name}
</span>
</div>
{(creatorName || timeText) && (
<div className="file-row-meta">
{creatorName && <span className="file-row-creator">{creatorName}</span>}
{creatorName && timeText && <span className="file-row-meta-dot">•</span>}
{timeText && <span className="file-row-time">{timeText}</span>}
</div>
)}
{details.length > 0 && (
<div className="file-row-subtext file-row-details">
{details.map((item, idx) => (
<React.Fragment key={idx}>
{idx > 0 && <span className="file-row-meta-dot">•</span>}
<span
className={`file-row-detail-item${item === versionLabel ? ' file-row-version' : ''}`}
>
{item}
</span>
</React.Fragment>
))}
</div>
)}
</div>
{/* Far Right Action Column (Centered Vertically across the card) */}
<div className="file-row-actions" style={{ display: 'flex', alignItems: 'center' }}>
{isFolder ? (
<sp-icon-chevron-right size="xs" className="file-row-chevron"></sp-icon-chevron-right>
) : (
<>
{(onLinkSequence || onUnlinkSequence) &&
(category === 'video' || category === 'audio') && (
<sp-action-button
quiet
size="xs"
icon-only
label={
isLinked
? onUnlinkSequence
? `Unlink from ${linkedSequenceName || 'Sequence'}`
: `Linked to ${linkedSequenceName || 'Sequence'}`
: 'Link to Sequence'
}
title={
isLinked
? onUnlinkSequence
? `Unlink from ${linkedSequenceName || 'Sequence'}`
: `Linked to ${linkedSequenceName || 'Sequence'}`
: 'Link to Sequence'
}
className="file-row-link-btn"
style={{ marginRight: 4 }}
onClick={(e: React.MouseEvent) => {
e.stopPropagation()
if (isLinked && onUnlinkSequence) {
onUnlinkSequence(asset)
} else if (onLinkSequence) {
onLinkSequence(asset)
}
}}
>
{isLinked ? (
<sp-icon-unlink
size="s"
slot="icon"
style={{ color: '#f87171' }}
></sp-icon-unlink>
) : (
<sp-icon-link size="s" slot="icon"></sp-icon-link>
)}
</sp-action-button>
)}
{(onImportRaw || onSelectVideoForImport) && (
<sp-action-button
quiet
size="xs"
icon-only
label="Import into Premiere Pro"
title="Import into Premiere Pro"
className="file-row-import-btn"
onClick={(e: React.MouseEvent) => {
e.stopPropagation()
handleImportAction()
}}
>
<sp-icon-download size="s" slot="icon"></sp-icon-download>
</sp-action-button>
)}
</>
)}
</div>
</div>
)
}
@@ -0,0 +1,59 @@
import React from 'react'
import { Divider } from '@swc-react/divider'
import { ShumaiLogo } from './icons'
interface HeaderProps {
endpoint?: string
onDisconnect?: () => void
}
export const Header: React.FC<HeaderProps> = ({ endpoint, onDisconnect }) => {
let displayHost = ''
if (endpoint) {
try {
const url = new URL(endpoint)
displayHost = url.host
} catch {
displayHost = endpoint
}
}
return (
<>
<header className="app-header">
<div className="logo-group">
<div className="logo-icon">
<ShumaiLogo width={18} height={18} />
</div>
<span className="app-title">Shumai</span>
</div>
{endpoint && onDisconnect && (
<div className="actions-group">
<div
className="header-status"
title={`Connected to ${endpoint}`}
role="status"
aria-label={`Connected to ${displayHost}`}
>
<span className="status-dot positive" />
<span className="status-text">{displayHost}</span>
</div>
<sp-button
quiet
variant="secondary"
size="s"
label="Disconnect / Change Server"
icon-only
onClick={onDisconnect}
title="Disconnect / Change Server"
>
<sp-icon-log-out slot="icon" size="s"></sp-icon-log-out>
</sp-button>
</div>
)}
</header>
<Divider size="s" />
</>
)
}
@@ -0,0 +1,162 @@
// @vitest-environment happy-dom
import React, { act } from 'react'
import { describe, it, expect, vi, afterEach } from 'vitest'
import { render, screen, fireEvent, cleanup } from '@testing-library/react'
import { ImportVideoDialog } from './ImportVideoDialog'
import type { AssetSummary } from './FileItem'
import * as importService from '../services/import'
// Configure React 19 act environment for happy-dom
;(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true
describe('ImportVideoDialog Component', () => {
const mockOnClose = vi.fn()
const mockOnImportRaw = vi.fn()
const mockOnImportProxy = vi.fn()
const videoAsset: AssetSummary = {
id: 'asset-vid-1',
name: 'interview_clip.mp4',
type: 'file',
mimeType: 'video/mp4',
sizeByte: 1024 * 1024 * 45,
preview: {
duration: 154,
},
}
afterEach(() => {
cleanup()
vi.clearAllMocks()
})
it('renders nothing when closed or asset is null', () => {
const { container } = render(
<ImportVideoDialog
asset={videoAsset}
endpoint="https://api.shumai.test"
apiKey="test-key"
isOpen={false}
onClose={mockOnClose}
onImportRaw={mockOnImportRaw}
onImportProxy={mockOnImportProxy}
/>,
)
expect(container.firstChild).toBeNull()
const { container: containerNull } = render(
<ImportVideoDialog
asset={null}
endpoint="https://api.shumai.test"
apiKey="test-key"
isOpen={true}
onClose={mockOnClose}
onImportRaw={mockOnImportRaw}
onImportProxy={mockOnImportProxy}
/>,
)
expect(containerNull.firstChild).toBeNull()
})
it('renders video info and selects original file by default', async () => {
vi.spyOn(importService, 'fetchVideoProxies').mockResolvedValue([])
await act(async () => {
render(
<ImportVideoDialog
asset={videoAsset}
endpoint="https://api.shumai.test"
apiKey="test-key"
isOpen={true}
onClose={mockOnClose}
onImportRaw={mockOnImportRaw}
onImportProxy={mockOnImportProxy}
/>,
)
})
expect(screen.getByText('Import Video')).toBeTruthy()
expect(screen.getByText('interview_clip.mp4')).toBeTruthy()
expect(screen.getByText('Original File')).toBeTruthy()
expect(screen.getByText('No proxy transcodes available for this video.')).toBeTruthy()
// Click Import button
const importBtn = screen.getByText('Import')
fireEvent.click(importBtn)
expect(mockOnImportRaw).toHaveBeenCalledWith(videoAsset)
expect(mockOnClose).toHaveBeenCalled()
})
it('fetches and allows selecting a proxy transcode', async () => {
vi.spyOn(importService, 'fetchVideoProxies').mockResolvedValue([
{
id: 'proxy-1',
label: '1080p (MP4)',
resolution: '1080p',
url: 'https://cdn.shumai.test/1080p.mp4',
key: 'proxies/1080p.mp4',
width: 1920,
height: 1080,
size: 1024 * 1024 * 12,
},
])
await act(async () => {
render(
<ImportVideoDialog
asset={videoAsset}
endpoint="https://api.shumai.test"
apiKey="test-key"
isOpen={true}
onClose={mockOnClose}
onImportRaw={mockOnImportRaw}
onImportProxy={mockOnImportProxy}
/>,
)
})
expect(screen.getByText('1080p (MP4)')).toBeTruthy()
// Select the proxy card
const proxyCard = screen.getByText('1080p (MP4)')
fireEvent.click(proxyCard)
// Click Import button
const importBtn = screen.getByText('Import')
fireEvent.click(importBtn)
expect(mockOnImportProxy).toHaveBeenCalledWith(
videoAsset,
expect.objectContaining({ id: 'proxy-1', label: '1080p (MP4)' }),
)
expect(mockOnClose).toHaveBeenCalled()
})
it('closes on Escape key or cancel button', async () => {
vi.spyOn(importService, 'fetchVideoProxies').mockResolvedValue([])
await act(async () => {
render(
<ImportVideoDialog
asset={videoAsset}
endpoint="https://api.shumai.test"
apiKey="test-key"
isOpen={true}
onClose={mockOnClose}
onImportRaw={mockOnImportRaw}
onImportProxy={mockOnImportProxy}
/>,
)
})
const cancelBtn = screen.getByText('Cancel')
fireEvent.click(cancelBtn)
expect(mockOnClose).toHaveBeenCalledTimes(1)
act(() => {
fireEvent.keyDown(document, { key: 'Escape' })
})
expect(mockOnClose).toHaveBeenCalledTimes(2)
})
})
@@ -0,0 +1,245 @@
import React, { useState, useEffect, useCallback } from 'react'
import type { AssetSummary } from './FileItem'
import { fetchVideoProxies, type ProxyOption } from '../services/import'
import { formatBytes, formatDuration } from '../utils/format'
import { resolveAssetUrl } from '../utils/url'
import { ProgressCircle } from '@swc-react/progress-circle'
export interface ImportVideoDialogProps {
asset: AssetSummary | null
endpoint: string
apiKey: string
isOpen: boolean
onClose: () => void
onImportRaw: (asset: AssetSummary) => void
onImportProxy: (asset: AssetSummary, proxy: ProxyOption) => void
}
export const ImportVideoDialog: React.FC<ImportVideoDialogProps> = ({
asset,
endpoint,
apiKey,
isOpen,
onClose,
onImportRaw,
onImportProxy,
}) => {
const [selectedVersion, setSelectedVersion] = useState<'raw' | string>('raw')
const [proxies, setProxies] = useState<ProxyOption[]>([])
const [loadingProxies, setLoadingProxies] = useState(false)
const [thumbError, setThumbError] = useState(false)
// Reset and fetch proxies when a new video asset is opened
useEffect(() => {
if (!isOpen || !asset) {
setProxies([])
setSelectedVersion('raw')
setLoadingProxies(false)
setThumbError(false)
return
}
let isMounted = true
setLoadingProxies(true)
setSelectedVersion('raw')
void fetchVideoProxies(endpoint, apiKey, asset.id)
.then((items) => {
if (isMounted) {
setProxies(items)
}
})
.catch((err) => {
console.warn('Failed to load video proxies:', err)
})
.finally(() => {
if (isMounted) {
setLoadingProxies(false)
}
})
return () => {
isMounted = false
}
}, [isOpen, asset, endpoint, apiKey])
// Handle Escape key to close dialog
useEffect(() => {
if (!isOpen) return
const handleKeyDown = (e: KeyboardEvent) => {
if (e.key === 'Escape') {
onClose()
}
}
document.addEventListener('keydown', handleKeyDown)
return () => {
document.removeEventListener('keydown', handleKeyDown)
}
}, [isOpen, onClose])
const handleConfirm = useCallback(() => {
if (!asset) return
if (selectedVersion === 'raw') {
onClose()
onImportRaw(asset)
} else if (selectedVersion.startsWith('proxy:')) {
const proxyId = selectedVersion.slice('proxy:'.length)
const targetProxy = proxies.find((p) => p.id === proxyId)
if (targetProxy) {
onClose()
onImportProxy(asset, targetProxy)
}
}
}, [asset, selectedVersion, proxies, onClose, onImportRaw, onImportProxy])
if (!isOpen || !asset) return null
const effectiveSize = asset.sizeByte ?? asset.size
const thumbUrl = resolveAssetUrl(asset.preview?.thumbnailUrl, endpoint)
const duration = asset.preview?.duration ?? asset.media?.metadata?.duration
const durationText = formatDuration(duration)
return (
<div
className="shumai-dialog-backdrop"
onClick={(e) => {
if (e.target === e.currentTarget) {
onClose()
}
}}
>
<div className="shumai-dialog" role="dialog" aria-modal="true" aria-labelledby="dialog-title">
{/* Dialog Header */}
<div className="shumai-dialog-header">
<span id="dialog-title" className="shumai-dialog-title">
Import Video
</span>
<button
type="button"
className="shumai-dialog-close"
onClick={onClose}
title="Close dialog"
aria-label="Close dialog"
>
<sp-icon-close size="s"></sp-icon-close>
</button>
</div>
{/* Video Asset Preview Info */}
<div className="shumai-dialog-asset-info">
<div className="shumai-dialog-thumb">
{thumbUrl && !thumbError ? (
<img src={thumbUrl} alt={asset.name} onError={() => setThumbError(true)} />
) : (
<sp-icon-filmstrip size="xxl" style={{ color: '#60a5fa' }}></sp-icon-filmstrip>
)}
</div>
<div className="shumai-dialog-asset-meta">
<span className="shumai-dialog-asset-name" title={asset.name}>
{asset.name}
</span>
<span className="shumai-dialog-asset-details">
{durationText ? `${durationText} • ` : ''}
{effectiveSize ? formatBytes(effectiveSize) : 'Video'}
</span>
</div>
</div>
{/* Options Selection Body */}
<div className="shumai-dialog-body">
<div className="shumai-dialog-section-label">Choose Version to Import</div>
{/* Original Version Card */}
<div
className={`shumai-option-card ${selectedVersion === 'raw' ? 'selected' : ''}`}
onClick={() => setSelectedVersion('raw')}
role="radio"
aria-checked={selectedVersion === 'raw'}
tabIndex={0}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault()
setSelectedVersion('raw')
}
}}
>
<div className="shumai-option-left">
<div className="shumai-option-texts">
<span className="shumai-option-title">Original File</span>
<span className="shumai-option-meta">
Full resolution • {effectiveSize ? formatBytes(effectiveSize) : 'Raw file'}
</span>
</div>
</div>
<div className="shumai-option-radio">
{selectedVersion === 'raw' && <div className="shumai-option-radio-dot" />}
</div>
</div>
<div className="shumai-dialog-divider" />
{/* Proxies Section */}
<div className="shumai-dialog-section-label">Transcode Proxies</div>
{loadingProxies ? (
<div className="shumai-dialog-loading">
<ProgressCircle indeterminate size="s" label="Checking available proxies..." />
<span>Checking available proxies...</span>
</div>
) : proxies.length > 0 ? (
proxies.map((proxy) => {
const isSelected = selectedVersion === `proxy:${proxy.id}`
return (
<div
key={proxy.id}
className={`shumai-option-card ${isSelected ? 'selected' : ''}`}
onClick={() => setSelectedVersion(`proxy:${proxy.id}`)}
role="radio"
aria-checked={isSelected}
tabIndex={0}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault()
setSelectedVersion(`proxy:${proxy.id}`)
}
}}
>
<div className="shumai-option-left">
<div className="shumai-option-texts">
<span className="shumai-option-title">{proxy.label}</span>
<span className="shumai-option-meta">
{proxy.width && proxy.height ? `${proxy.width}x${proxy.height} • ` : ''}
{proxy.size ? `${formatBytes(proxy.size)} • ` : ''}
Fast editing proxy
</span>
</div>
</div>
<div className="shumai-option-radio">
{isSelected && <div className="shumai-option-radio-dot" />}
</div>
</div>
)
})
) : (
<div className="shumai-dialog-empty-proxies">
<span>No proxy transcodes available for this video.</span>
</div>
)}
</div>
{/* Dialog Footer Actions */}
<div className="shumai-dialog-footer">
<sp-button quiet variant="secondary" size="s" onClick={onClose}>
Cancel
</sp-button>
<sp-button variant="accent" size="s" onClick={handleConfirm}>
Import
</sp-button>
</div>
</div>
</div>
)
}
@@ -0,0 +1,194 @@
// @vitest-environment happy-dom
import React, { act } from 'react'
import { describe, it, expect, vi, afterEach, beforeEach } from 'vitest'
import { render, screen, fireEvent, cleanup } from '@testing-library/react'
import { LinkSequenceDialog } from './LinkSequenceDialog'
import type { AssetSummary } from './FileItem'
import * as premiereService from '../services/premiere'
import * as linkStorage from '../services/linkStorage'
import * as markersService from '../services/markers'
import type { Project, Sequence } from '@adobe/premierepro'
import type { CommentInfo } from '@shumai/dtos'
// Configure React 19 act environment for happy-dom
;(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true
describe('LinkSequenceDialog Component', () => {
const mockOnClose = vi.fn()
const mockOnLinkSuccess = vi.fn()
const videoAsset: AssetSummary = {
id: 'asset-vid-1',
name: 'interview_clip.mp4',
type: 'file',
mimeType: 'video/mp4',
sizeByte: 1024 * 1024 * 45,
preview: {
duration: 154,
},
commentsCount: 3,
}
beforeEach(() => {
vi.restoreAllMocks()
})
afterEach(() => {
cleanup()
})
it('renders nothing when closed or asset is null', () => {
const { container } = render(
<LinkSequenceDialog
asset={videoAsset}
endpoint="https://api.shumai.test"
apiKey="test-key"
isOpen={false}
onClose={mockOnClose}
onLinkSuccess={mockOnLinkSuccess}
/>,
)
expect(container.firstChild).toBeNull()
const { container: containerNull } = render(
<LinkSequenceDialog
asset={null}
endpoint="https://api.shumai.test"
apiKey="test-key"
isOpen={true}
onClose={mockOnClose}
onLinkSuccess={mockOnLinkSuccess}
/>,
)
expect(containerNull.firstChild).toBeNull()
})
it('displays error message when no active project is open', async () => {
vi.spyOn(premiereService, 'getActiveProject').mockResolvedValue(null)
await act(async () => {
render(
<LinkSequenceDialog
asset={videoAsset}
endpoint="https://api.shumai.test"
apiKey="test-key"
isOpen={true}
onClose={mockOnClose}
onLinkSuccess={mockOnLinkSuccess}
/>,
)
})
expect(screen.getByText(/no active premiere pro project found/i)).toBeDefined()
})
it('lists project sequences and highlights active sequence without sequence icon', async () => {
const mockSeq1 = { guid: 'seq-1', name: 'Rough Cut' }
const mockSeq2 = { guid: 'seq-2', name: 'Fine Cut' }
const mockProject = { guid: 'proj-1' }
vi.spyOn(premiereService, 'getActiveProject').mockResolvedValue(
mockProject as unknown as Project,
)
vi.spyOn(premiereService, 'getAllSequences').mockResolvedValue([
mockSeq1,
mockSeq2,
] as unknown as Sequence[])
vi.spyOn(premiereService, 'getActiveSequence').mockResolvedValue(
mockSeq2 as unknown as Sequence,
)
vi.spyOn(linkStorage, 'getAllLinkedSequences').mockResolvedValue([])
let renderedContainer: HTMLElement = null!
await act(async () => {
const { container } = render(
<LinkSequenceDialog
asset={videoAsset}
endpoint="https://api.shumai.test"
apiKey="test-key"
isOpen={true}
onClose={mockOnClose}
onLinkSuccess={mockOnLinkSuccess}
/>,
)
renderedContainer = container
})
expect(screen.getByText('Rough Cut')).toBeDefined()
expect(screen.getByText('Fine Cut')).toBeDefined()
expect(screen.getByText('Active')).toBeDefined()
expect(renderedContainer.querySelectorAll('.shumai-option-card sp-icon-filmstrip').length).toBe(
0,
)
})
it('executes sync and invokes onLinkSuccess on confirmation', async () => {
const mockSeq1 = { guid: 'seq-1', name: 'Rough Cut' }
const mockProject = { guid: 'proj-1' }
vi.spyOn(premiereService, 'getActiveProject').mockResolvedValue(
mockProject as unknown as Project,
)
vi.spyOn(premiereService, 'getAllSequences').mockResolvedValue([
mockSeq1,
] as unknown as Sequence[])
vi.spyOn(premiereService, 'getActiveSequence').mockResolvedValue(
mockSeq1 as unknown as Sequence,
)
vi.spyOn(linkStorage, 'getAllLinkedSequences').mockResolvedValue([])
vi.spyOn(markersService, 'fetchAssetComments').mockResolvedValue([
{ id: 'comm-1', second: 10, message: 'Test marker' } as unknown as CommentInfo,
])
const mockUpdatedLink = {
sequenceGuid: 'seq-1',
sequenceName: 'Rough Cut',
assetId: 'asset-vid-1',
assetName: 'interview_clip.mp4',
syncedCommentIds: ['comm-1'],
lastSyncAt: Date.now(),
totalCommentsSynced: 1,
}
vi.spyOn(markersService, 'syncCommentsToSequence').mockResolvedValue({
updatedLink: mockUpdatedLink,
addedCount: 1,
})
await act(async () => {
render(
<LinkSequenceDialog
asset={videoAsset}
endpoint="https://api.shumai.test"
apiKey="test-key"
isOpen={true}
onClose={mockOnClose}
onLinkSuccess={mockOnLinkSuccess}
/>,
)
})
const linkBtn = screen.getByText('Link Sequence')
await act(async () => {
fireEvent.click(linkBtn)
})
expect(markersService.fetchAssetComments).toHaveBeenCalledWith(
'https://api.shumai.test',
'test-key',
'asset-vid-1',
)
expect(markersService.syncCommentsToSequence).toHaveBeenCalledWith(
mockProject,
mockSeq1,
expect.any(Array),
expect.objectContaining({
endpoint: 'https://api.shumai.test',
sequenceGuid: 'seq-1',
assetId: 'asset-vid-1',
}),
)
expect(mockOnLinkSuccess).toHaveBeenCalledWith(mockUpdatedLink, 1)
expect(mockOnClose).toHaveBeenCalled()
})
})
@@ -0,0 +1,420 @@
import React, { useState, useEffect, useCallback } from 'react'
import type { Sequence, Project } from '@adobe/premierepro'
import type { AssetSummary } from './FileItem'
import type { LinkedSequenceAsset } from '../types/link'
import { getActiveProject, getAllSequences, getActiveSequence } from '../services/premiere'
import { getAllLinkedSequences, normalizeGuid, removeSequenceLink } from '../services/linkStorage'
import { fetchAssetComments, syncCommentsToSequence } from '../services/markers'
import { resolveAssetUrl, isSameEndpoint } from '../utils/url'
import { formatBytes, formatDuration } from '../utils/format'
import { ProgressCircle } from '@swc-react/progress-circle'
export interface LinkSequenceDialogProps {
asset: AssetSummary | null
endpoint: string
apiKey: string
isOpen: boolean
onClose: () => void
onLinkSuccess: (link: LinkedSequenceAsset, addedMarkersCount: number) => void
}
interface SequenceOption {
sequence: Sequence
guid: string
name: string
isActive: boolean
currentLink: LinkedSequenceAsset | null
}
export const LinkSequenceDialog: React.FC<LinkSequenceDialogProps> = ({
asset,
endpoint,
apiKey,
isOpen,
onClose,
onLinkSuccess,
}) => {
const [project, setProject] = useState<Project | null>(null)
const [sequences, setSequences] = useState<SequenceOption[]>([])
const [selectedGuid, setSelectedGuid] = useState<string>('')
const [loadingSequences, setLoadingSequences] = useState(true)
const [linking, setLinking] = useState(false)
const [errorMessage, setErrorMessage] = useState<string | null>(null)
const [thumbError, setThumbError] = useState(false)
// Load project sequences and link states when opened
useEffect(() => {
if (!isOpen || !asset) {
setProject(null)
setSequences([])
setSelectedGuid('')
setErrorMessage(null)
setLinking(false)
setThumbError(false)
return
}
let isMounted = true
setLoadingSequences(true)
setErrorMessage(null)
async function loadProjectData() {
try {
const pr = await getActiveProject()
if (!isMounted) return
if (!pr) {
setProject(null)
setLoadingSequences(false)
setErrorMessage('No active Premiere Pro project found. Please open a project first.')
return
}
setProject(pr)
const [allSeqs, activeSeq, existingLinks] = await Promise.all([
getAllSequences(pr),
getActiveSequence(pr),
getAllLinkedSequences(pr),
])
if (!isMounted) return
if (!allSeqs || allSeqs.length === 0) {
setLoadingSequences(false)
setErrorMessage(
'No sequences found in the current project. Please create a sequence first.',
)
return
}
const activeGuid = normalizeGuid(activeSeq?.guid)
const linksMap = new Map<string, LinkedSequenceAsset>()
for (const link of existingLinks) {
if (!link.endpoint || isSameEndpoint(link.endpoint, endpoint)) {
linksMap.set(normalizeGuid(link.sequenceGuid), link)
}
}
const options: SequenceOption[] = allSeqs.map((seq) => {
const guidStr = normalizeGuid(seq.guid)
return {
sequence: seq,
guid: guidStr,
name: seq.name || 'Untitled Sequence',
isActive: Boolean(activeGuid && guidStr === activeGuid),
currentLink: linksMap.get(guidStr) || null,
}
})
setSequences(options)
// Pre-select active sequence if found, else first sequence
if (activeGuid && options.some((opt) => opt.guid === activeGuid)) {
setSelectedGuid(activeGuid)
} else if (options.length > 0) {
setSelectedGuid(options[0].guid)
}
} catch (err) {
if (!isMounted) return
console.error('[LinkSequenceDialog] Error loading project data:', err)
setErrorMessage('Failed to load project sequences from Premiere Pro.')
} finally {
if (isMounted) {
setLoadingSequences(false)
}
}
}
void loadProjectData()
return () => {
isMounted = false
}
}, [isOpen, asset, endpoint])
// Escape key handler
useEffect(() => {
if (!isOpen) return
const handleKeyDown = (e: KeyboardEvent) => {
if (e.key === 'Escape' && !linking) {
onClose()
}
}
document.addEventListener('keydown', handleKeyDown)
return () => {
document.removeEventListener('keydown', handleKeyDown)
}
}, [isOpen, linking, onClose])
const handleConfirm = useCallback(async () => {
if (!asset || !project || !selectedGuid || linking) return
const targetOption = sequences.find(
(opt) => normalizeGuid(opt.guid) === normalizeGuid(selectedGuid),
)
if (!targetOption) return
setLinking(true)
try {
// If sequence was linked to another asset, remove its previous link and markers first
if (targetOption.currentLink && targetOption.currentLink.assetId !== asset.id) {
await removeSequenceLink(project, targetOption.sequence)
}
// 1. Fetch timecoded comments for this asset
const comments = await fetchAssetComments(endpoint, apiKey, asset.id)
// 2. Prepare initial link metadata
const prGuidStr = project.guid ? normalizeGuid(project.guid) : undefined
const initialLink: LinkedSequenceAsset = {
sequenceGuid: normalizeGuid(targetOption.guid),
sequenceName: targetOption.name,
assetId: asset.id,
assetName: asset.name,
assetThumbnailUrl: asset.preview?.thumbnailUrl,
endpoint: endpoint.trim().replace(/\/+$/, ''),
projectId: prGuidStr,
syncedCommentIds:
targetOption.currentLink?.assetId === asset.id
? targetOption.currentLink.syncedCommentIds
: [],
syncedMarkerGuids:
targetOption.currentLink?.assetId === asset.id
? (targetOption.currentLink.syncedMarkerGuids || []).map(normalizeGuid)
: [],
lastSyncAt: Date.now(),
totalCommentsSynced:
targetOption.currentLink?.assetId === asset.id
? targetOption.currentLink.totalCommentsSynced
: 0,
}
// 3. Translate comments to markers on the sequence
const { updatedLink, addedCount } = await syncCommentsToSequence(
project,
targetOption.sequence,
comments,
initialLink,
)
onLinkSuccess(updatedLink, addedCount)
onClose()
} catch (err) {
console.error('[LinkSequenceDialog] Failed to link sequence:', err)
setErrorMessage('Failed to link sequence and sync markers. Please try again.')
} finally {
setLinking(false)
}
}, [asset, project, selectedGuid, linking, sequences, endpoint, apiKey, onLinkSuccess, onClose])
if (!isOpen || !asset) return null
const selectedOption = sequences.find((opt) => opt.guid === selectedGuid)
const isReplacingOtherAsset =
selectedOption?.currentLink && selectedOption.currentLink.assetId !== asset.id
const effectiveSize = asset.sizeByte ?? asset.size
const thumbUrl = resolveAssetUrl(asset.preview?.thumbnailUrl, endpoint)
const duration = asset.preview?.duration ?? asset.media?.metadata?.duration
const durationText = formatDuration(duration)
return (
<div
className="shumai-dialog-backdrop"
onClick={(e) => {
if (e.target === e.currentTarget && !linking) {
onClose()
}
}}
>
<div
className="shumai-dialog"
role="dialog"
aria-modal="true"
aria-labelledby="link-dialog-title"
>
{/* Header */}
<div className="shumai-dialog-header">
<div style={{ display: 'flex', alignItems: 'center' }}>
<sp-icon-link size="s" style={{ marginRight: 6, color: '#3b82f6' }}></sp-icon-link>
<span id="link-dialog-title" className="shumai-dialog-title">
Link to Sequence
</span>
</div>
<button
type="button"
className="shumai-dialog-close"
onClick={onClose}
disabled={linking}
title="Close dialog"
aria-label="Close dialog"
>
<sp-icon-close size="s"></sp-icon-close>
</button>
</div>
{/* Asset Info Card */}
<div className="shumai-dialog-asset-info">
<div className="shumai-dialog-thumb">
{thumbUrl && !thumbError ? (
<img src={thumbUrl} alt={asset.name} onError={() => setThumbError(true)} />
) : asset.type === 'video' ? (
<sp-icon-filmstrip size="xxl" style={{ color: '#60a5fa' }}></sp-icon-filmstrip>
) : asset.type === 'audio' ? (
<sp-icon-audio size="xxl" style={{ color: '#a78bfa' }}></sp-icon-audio>
) : (
<sp-icon-document size="xxl" style={{ color: '#999999' }}></sp-icon-document>
)}
</div>
<div className="shumai-dialog-asset-meta">
<span className="shumai-dialog-asset-name" title={asset.name}>
{asset.name}
</span>
<span className="shumai-dialog-asset-details">
{durationText ? `${durationText} • ` : ''}
{effectiveSize ? `${formatBytes(effectiveSize)} • ` : ''}
{asset.commentsCount != null && asset.commentsCount > 0
? `${asset.commentsCount} comments`
: 'No comments'}
</span>
</div>
</div>
{/* Dialog Body */}
<div className="shumai-dialog-body">
<div className="shumai-dialog-section-label">Select Sequence in Project</div>
{loadingSequences ? (
<div className="shumai-dialog-loading">
<ProgressCircle indeterminate size="s" label="Checking project sequences..." />
<span>Checking project sequences...</span>
</div>
) : errorMessage ? (
<div className="shumai-dialog-empty-proxies" style={{ color: '#f87171' }}>
<span>{errorMessage}</span>
</div>
) : sequences.length > 0 ? (
sequences.map((opt) => {
const isSelected = selectedGuid === opt.guid
const isLinkedToAnother = opt.currentLink && opt.currentLink.assetId !== asset.id
const isLinkedToThis = opt.currentLink && opt.currentLink.assetId === asset.id
return (
<div
key={opt.guid}
className={`shumai-option-card ${isSelected ? 'selected' : ''}`}
onClick={() => !linking && setSelectedGuid(opt.guid)}
role="radio"
aria-checked={isSelected}
tabIndex={0}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault()
if (!linking) setSelectedGuid(opt.guid)
}
}}
>
<div className="shumai-option-left">
<div className="shumai-option-texts">
<div style={{ display: 'flex', alignItems: 'center' }}>
<span className="shumai-option-title">{opt.name}</span>
{opt.isActive && (
<span
style={{
fontSize: '10px',
marginLeft: 6,
padding: '1px 5px',
borderRadius: '3px',
backgroundColor: 'rgba(59, 130, 246, 0.2)',
color: '#60a5fa',
fontWeight: 500,
}}
>
Active
</span>
)}
</div>
<span className="shumai-option-meta">
{isLinkedToThis ? (
<span style={{ color: '#34d399' }}>Already linked to this asset</span>
) : isLinkedToAnother ? (
<span style={{ color: '#fbbf24' }}>
Linked to &quot;{opt.currentLink?.assetName}&quot; (will replace)
</span>
) : (
'Ready to link'
)}
</span>
</div>
</div>
<div className="shumai-option-radio">
{isSelected && <div className="shumai-option-radio-dot" />}
</div>
</div>
)
})
) : (
<div className="shumai-dialog-empty-proxies">
<span>No sequences available in current project.</span>
</div>
)}
{isReplacingOtherAsset && (
<div
style={{
marginTop: 10,
padding: '8px 10px',
borderRadius: 4,
backgroundColor: 'rgba(245, 158, 11, 0.12)',
border: '1px solid rgba(245, 158, 11, 0.3)',
display: 'flex',
alignItems: 'center',
fontSize: 11,
color: '#fbbf24',
}}
>
<sp-icon-alert-triangle
size="s"
style={{ marginRight: 6, flexShrink: 0 }}
></sp-icon-alert-triangle>
<span>
This sequence is already linked to another asset. Proceeding will replace the link
and sync markers for this asset.
</span>
</div>
)}
<div style={{ marginTop: 12, fontSize: 11, color: 'var(--text-secondary)' }}>
Comments with timestamps will be placed on the sequence timeline as markers. Markers
deleted in Premiere Pro will not be re-synced.
</div>
</div>
{/* Footer */}
<div className="shumai-dialog-footer">
<sp-button quiet variant="secondary" size="s" onClick={onClose} disabled={linking}>
Cancel
</sp-button>
<sp-button
variant="accent"
size="s"
onClick={handleConfirm}
disabled={!selectedGuid || loadingSequences || Boolean(errorMessage) || linking}
>
{linking ? (
<>
<ProgressCircle indeterminate size="s" slot="icon" label="Linking..." />
Linking...
</>
) : isReplacingOtherAsset ? (
'Replace & Link'
) : (
'Link Sequence'
)}
</sp-button>
</div>
</div>
</div>
)
}
@@ -0,0 +1,33 @@
// @vitest-environment happy-dom
import React from 'react'
import { describe, it, expect, vi, afterEach } from 'vitest'
import { render, screen, fireEvent, cleanup } from '@testing-library/react'
import { NavigationTabs } from './NavigationTabs'
describe('NavigationTabs Component', () => {
afterEach(() => {
cleanup()
})
it('renders Sequences and Browse tabs with badge', () => {
const handleTabChange = vi.fn()
render(<NavigationTabs activeTab="sequences" onTabChange={handleTabChange} linkedCount={3} />)
expect(screen.getByText('Sequences')).toBeDefined()
expect(screen.getByText('Browse')).toBeDefined()
expect(screen.getByText('3')).toBeDefined()
})
it('handles tab click events', () => {
const handleTabChange = vi.fn()
render(<NavigationTabs activeTab="sequences" onTabChange={handleTabChange} linkedCount={0} />)
const browseTab = screen.getByText('Browse')
fireEvent.click(browseTab)
expect(handleTabChange).toHaveBeenCalledWith('browse')
const sequencesTab = screen.getByText('Sequences')
fireEvent.click(sequencesTab)
expect(handleTabChange).toHaveBeenCalledWith('sequences')
})
})
@@ -0,0 +1,44 @@
import React from 'react'
export type MainTab = 'sequences' | 'browse'
export interface NavigationTabsProps {
activeTab: MainTab
onTabChange: (tab: MainTab) => void
linkedCount?: number
}
export const NavigationTabs: React.FC<NavigationTabsProps> = ({
activeTab,
onTabChange,
linkedCount = 0,
}) => {
return (
<div className="shumai-nav-tabs-bar" role="tablist">
<sp-button
size="s"
variant={activeTab === 'sequences' ? 'accent' : 'secondary'}
treatment="fill"
onClick={() => onTabChange('sequences')}
className={`shumai-tab-sp-btn ${activeTab === 'sequences' ? 'active' : ''}`}
>
<span className="shumai-tab-label">Sequences</span>
{linkedCount > 0 && (
<span className="shumai-tab-badge" title={`${linkedCount} linked sequence assets`}>
{linkedCount}
</span>
)}
</sp-button>
<sp-button
size="s"
variant={activeTab === 'browse' ? 'accent' : 'secondary'}
treatment="fill"
onClick={() => onTabChange('browse')}
className={`shumai-tab-sp-btn ${activeTab === 'browse' ? 'active' : ''}`}
>
<span className="shumai-tab-label">Browse</span>
</sp-button>
</div>
)
}
@@ -0,0 +1,88 @@
import React, { useState } from 'react'
import { formatDateAgo } from '../utils/date'
import { resolveAssetUrl } from '../utils/url'
import type { ProjectSummary } from '../views/ProjectsView'
interface ProjectCardProps {
project: ProjectSummary
endpoint?: string
onClick: () => void
}
export const ShumaiPolygonCover: React.FC = () => (
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 180.95 164.7"
preserveAspectRatio="xMidYMid slice"
style={{ width: '100%', height: '100%', display: 'block' }}
>
<polygon fill="#FC9F8E" points="0 18.5 0 76.0 151.69 164.7 180.95 164.7 180.95 113.6" />
<polygon fill="#FEBAB8" points="0 0 74.58 61.5 90.53 51.6 110.33 63.9 180.95 18.9 180.95 0" />
<polyline
fill="#FAA5A5"
points="0 18.5 74.58 61.5 90.53 51.6 110.33 63.9 180.95 18.9 180.95 0 0 0"
/>
<polygon fill="#EC5B6C" points="0 76.0 0 164.7 151.69 164.7" />
<polygon fill="#E85C71" points="180.95 18.9 110.33 63.9 117.37 68.0 117.26 73.4 180.95 113.6" />
<polygon
fill="#C8405B"
points="117.26 73.4 117.37 99.0 90.53 114.9 174.35 164.7 180.95 164.7 180.95 113.6"
/>
<polygon fill="#FFCCBE" points="90.53 51.6 63.69 68.1 90.53 83.4" />
<path
fill="#FB9991"
d="M 90.53 51.6 L 90.53 61.3 L 100.87 67.4 L 90.53 73.5 L 90.53 83.4 L 117.37 68.0 C 117.15 67.6 90.53 51.6 90.53 51.6 Z"
/>
<path
fill="#FFEACD"
d="M 63.69 68.1 C 63.47 68.5 64.02 99.3 64.02 99.3 C 64.02 99.3 64.46 99.6 64.9 99.9 L 90.53 83.4 L 63.69 68.1 Z"
/>
<polygon fill="#FFCFB5" points="64.02 99.3 90.53 114.9 90.53 83.4" />
<path fill="#F67D73" d="M 90.53 83.4 L 90.53 114.9 L 117.37 99.0 Z" />
<path fill="#F26560" d="M 90.53 83.4 L 117.37 99.0 L 117.37 68.0 Z" />
<polygon fill="#EB5F5B" points="80.08 67.5 90.53 73.5 90.53 61.3" />
<polygon fill="#DB4D50" points="90.53 61.3 90.53 73.5 100.87 67.4" />
</svg>
)
export const ProjectCard: React.FC<ProjectCardProps> = ({ project, endpoint, onClick }) => {
const [imgError, setImgError] = useState(false)
const updatedText = formatDateAgo(project.updatedAt)
const coverUrl = resolveAssetUrl(project.coverImage, endpoint)
return (
<div
className="project-row-card"
onClick={onClick}
role="button"
tabIndex={0}
title={project.name}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault()
onClick()
}
}}
>
<div className="project-row-preview">
{coverUrl && !imgError ? (
<img
src={coverUrl}
alt={project.name}
className="project-row-img"
onError={() => setImgError(true)}
/>
) : (
<ShumaiPolygonCover />
)}
</div>
<div className="project-row-content">
<span className="project-row-title">{project.name}</span>
<span className="project-row-subtext">
{updatedText ? `Updated ${updatedText}` : 'Project'}
</span>
</div>
</div>
)
}
@@ -0,0 +1,41 @@
import React from 'react'
export const ShumaiLogo: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
return (
<svg viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<defs>
<clipPath id="bg-clip">
<rect x="5" y="5" width="90" height="90" rx="22" />
</clipPath>
</defs>
{/* Background */}
<rect x="5" y="5" width="90" height="90" rx="22" fill="#D95A66" />
{/* Long Shadow */}
<path
d="M 35 75 L 65 75 L 80 60 L 75 30 L 175 130 L 135 175 Z"
fill="#A8384D"
clipPath="url(#bg-clip)"
/>
{/* Left Cream */}
<path d="M 25 30 Q 38 36 50 42 L 35 55 L 35 75 L 20 60 Z" fill="#FDF0D5" />
{/* Right Orange */}
<path d="M 50 42 Q 62 36 75 30 L 80 60 L 65 75 L 65 55 Z" fill="#E77A65" />
{/* Front Peach */}
<path d="M 35 75 L 65 75 L 65 55 L 50 42 L 35 55 Z" fill="#F5B895" />
{/* Top Pink */}
<path d="M 50 42 Q 38 36 25 30 Q 38 26 50 20 Q 62 26 75 30 Q 62 36 50 42 Z" fill="#F4B8B8" />
{/* Hole Left */}
<path d="M 50 25 L 42 30 L 50 35 Z" fill="#E57A5F" />
{/* Hole Right */}
<path d="M 50 25 L 58 30 L 50 35 Z" fill="#C2523C" />
</svg>
)
}
+299
View File
@@ -0,0 +1,299 @@
/* eslint-disable @typescript-eslint/naming-convention -- Custom element tag names in IntrinsicElements require hyphens */
declare module '@swc-uxp-wrappers/utils' {
export const aliases: Record<string, string>
}
type SpIconCustomElementProps = import('react').DetailedHTMLProps<
import('react').HTMLAttributes<HTMLElement>,
HTMLElement
> & {
size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'
slot?: string
name?: string
label?: string
}
type SpButtonCustomElementProps = import('react').DetailedHTMLProps<
import('react').ButtonHTMLAttributes<HTMLButtonElement>,
HTMLButtonElement
> & {
variant?: 'accent' | 'primary' | 'secondary' | 'negative' | 'white' | 'black' | string
treatment?: 'fill' | 'outline' | string
quiet?: boolean
size?: 'xs' | 's' | 'm' | 'l' | 'xl'
label?: string
'icon-only'?: boolean
disabled?: boolean
slot?: string
}
type SpButtonGroupCustomElementProps = import('react').DetailedHTMLProps<
import('react').HTMLAttributes<HTMLElement>,
HTMLElement
> & {
vertical?: boolean
size?: 'xs' | 's' | 'm' | 'l' | 'xl'
}
type SpActionButtonCustomElementProps = import('react').DetailedHTMLProps<
import('react').ButtonHTMLAttributes<HTMLButtonElement>,
HTMLButtonElement
> & {
quiet?: boolean
size?: 'xs' | 's' | 'm' | 'l' | 'xl'
label?: string
disabled?: boolean
selected?: boolean
toggles?: boolean
emphasized?: boolean
slot?: string
}
type SpActionMenuCustomElementProps = import('react').DetailedHTMLProps<
import('react').HTMLAttributes<HTMLElement>,
HTMLElement
> & {
quiet?: boolean
size?: 'xs' | 's' | 'm' | 'l' | 'xl'
label?: string
disabled?: boolean
open?: boolean
placement?:
| 'top'
| 'top-start'
| 'top-end'
| 'right'
| 'right-start'
| 'right-end'
| 'bottom'
| 'bottom-start'
| 'bottom-end'
| 'left'
| 'left-start'
| 'left-end'
'force-popover'?: boolean
selects?: 'single'
value?: string
slot?: string
}
type SpMenuCustomElementProps = import('react').DetailedHTMLProps<
import('react').HTMLAttributes<HTMLElement>,
HTMLElement
> & {
slot?: string
selects?: 'single' | 'multiple' | 'inherit'
label?: string
}
type SpMenuItemCustomElementProps = import('react').DetailedHTMLProps<
import('react').HTMLAttributes<HTMLElement>,
HTMLElement
> & {
disabled?: boolean
selected?: boolean
value?: string
slot?: string
}
type SpMenuDividerCustomElementProps = import('react').DetailedHTMLProps<
import('react').HTMLAttributes<HTMLElement>,
HTMLElement
> & {
size?: 's' | 'm' | 'l'
}
type SpMenuGroupCustomElementProps = import('react').DetailedHTMLProps<
import('react').HTMLAttributes<HTMLElement>,
HTMLElement
> & {
slot?: string
}
type SpStatusLightCustomElementProps = import('react').DetailedHTMLProps<
import('react').HTMLAttributes<HTMLElement>,
HTMLElement
> & {
variant?:
| 'negative'
| 'notice'
| 'positive'
| 'info'
| 'neutral'
| 'yellow'
| 'fuchsia'
| 'indigo'
| 'seafoam'
| 'chartreuse'
| 'magenta'
| 'celery'
| 'purple'
| string
disabled?: boolean
slot?: string
}
type SpProgressCircleCustomElementProps = import('react').DetailedHTMLProps<
import('react').HTMLAttributes<HTMLElement>,
HTMLElement
> & {
size?: 's' | 'm' | 'l'
indeterminate?: boolean
label?: string
slot?: string
'static-color'?: 'white' | string
}
type SpTopNavCustomElementProps = import('react').DetailedHTMLProps<
import('react').HTMLAttributes<HTMLElement>,
HTMLElement
> & {
selected?: string
quiet?: boolean
compact?: boolean
label?: string
}
type SpTopNavItemCustomElementProps = import('react').DetailedHTMLProps<
import('react').HTMLAttributes<HTMLElement>,
HTMLElement
> & {
value?: string
selected?: boolean
href?: string
disabled?: boolean
}
declare namespace React {
namespace JSX {
interface IntrinsicElements {
'sp-icon': SpIconCustomElementProps
'sp-icon-refresh': SpIconCustomElementProps
'sp-icon-chevron-down': SpIconCustomElementProps
'sp-icon-chevron-right': SpIconCustomElementProps
'sp-icon-log-out': SpIconCustomElementProps
'sp-icon-arrow-right': SpIconCustomElementProps
'sp-icon-filmstrip': SpIconCustomElementProps
'sp-icon-folder': SpIconCustomElementProps
'sp-icon-folder-open': SpIconCustomElementProps
'sp-icon-audio': SpIconCustomElementProps
'sp-icon-image': SpIconCustomElementProps
'sp-icon-document': SpIconCustomElementProps
'sp-icon-link': SpIconCustomElementProps
'sp-icon-unlink': SpIconCustomElementProps
'sp-icon-link-out': SpIconCustomElementProps
'sp-icon-download': SpIconCustomElementProps
'sp-icon-briefcase': SpIconCustomElementProps
'sp-icon-alert-circle': SpIconCustomElementProps
'sp-icon-alert-triangle': SpIconCustomElementProps
'sp-icon-checkmark-circle': SpIconCustomElementProps
'sp-icon-close': SpIconCustomElementProps
'sp-icon-movie-camera': SpIconCustomElementProps
'sp-icon-video-filled': SpIconCustomElementProps
'sp-button': SpButtonCustomElementProps
'sp-button-group': SpButtonGroupCustomElementProps
'sp-action-button': SpActionButtonCustomElementProps
'sp-action-menu': SpActionMenuCustomElementProps
'sp-menu': SpMenuCustomElementProps
'sp-menu-item': SpMenuItemCustomElementProps
'sp-menu-divider': SpMenuDividerCustomElementProps
'sp-menu-group': SpMenuGroupCustomElementProps
'sp-status-light': SpStatusLightCustomElementProps
'sp-progress-circle': SpProgressCircleCustomElementProps
'sp-top-nav': SpTopNavCustomElementProps
'sp-top-nav-item': SpTopNavItemCustomElementProps
}
}
}
declare namespace JSX {
interface IntrinsicElements {
'sp-icon': SpIconCustomElementProps
'sp-icon-refresh': SpIconCustomElementProps
'sp-icon-chevron-down': SpIconCustomElementProps
'sp-icon-chevron-right': SpIconCustomElementProps
'sp-icon-log-out': SpIconCustomElementProps
'sp-icon-arrow-right': SpIconCustomElementProps
'sp-icon-filmstrip': SpIconCustomElementProps
'sp-icon-folder': SpIconCustomElementProps
'sp-icon-folder-open': SpIconCustomElementProps
'sp-icon-audio': SpIconCustomElementProps
'sp-icon-image': SpIconCustomElementProps
'sp-icon-document': SpIconCustomElementProps
'sp-icon-link': SpIconCustomElementProps
'sp-icon-unlink': SpIconCustomElementProps
'sp-icon-link-out': SpIconCustomElementProps
'sp-icon-download': SpIconCustomElementProps
'sp-icon-briefcase': SpIconCustomElementProps
'sp-icon-alert-circle': SpIconCustomElementProps
'sp-icon-alert-triangle': SpIconCustomElementProps
'sp-icon-checkmark-circle': SpIconCustomElementProps
'sp-icon-close': SpIconCustomElementProps
'sp-icon-movie-camera': SpIconCustomElementProps
'sp-icon-video-filled': SpIconCustomElementProps
'sp-button': SpButtonCustomElementProps
'sp-button-group': SpButtonGroupCustomElementProps
'sp-action-button': SpActionButtonCustomElementProps
'sp-action-menu': SpActionMenuCustomElementProps
'sp-menu': SpMenuCustomElementProps
'sp-menu-item': SpMenuItemCustomElementProps
'sp-menu-divider': SpMenuDividerCustomElementProps
'sp-menu-group': SpMenuGroupCustomElementProps
'sp-status-light': SpStatusLightCustomElementProps
'sp-progress-circle': SpProgressCircleCustomElementProps
'sp-top-nav': SpTopNavCustomElementProps
'sp-top-nav-item': SpTopNavItemCustomElementProps
}
}
type UxpEntry = UxpFileEntry | UxpFolderEntry
interface UxpFileEntry {
readonly isFile: true
readonly isFolder: false
readonly name: string
readonly nativePath: string
write(data: ArrayBuffer | string, options?: { format?: unknown; append?: boolean }): Promise<void>
}
interface UxpFolderEntry {
readonly isFile: false
readonly isFolder: true
readonly name: string
readonly nativePath: string
createFile(name: string, options?: { overwrite?: boolean }): Promise<UxpFileEntry>
getEntries(): Promise<UxpEntry[]>
getFiles?(): Promise<UxpFileEntry[]>
}
interface UxpLocalFileSystem {
getFileForSaving(
defaultName?: string,
options?: { types?: string[] },
): Promise<UxpFileEntry | null>
getFileForOpening(options?: {
allowMultiple?: boolean
types?: string[]
}): Promise<UxpFileEntry | UxpFileEntry[] | null>
getFolder(): Promise<UxpFolderEntry | null>
getTemporaryFolder(): Promise<UxpFolderEntry>
getDataFolder(): Promise<UxpFolderEntry>
getPluginFolder(): Promise<UxpFolderEntry>
}
interface UxpStorageFormats {
readonly binary: unknown
readonly utf8: unknown
}
interface UxpModule {
storage: {
localFileSystem: UxpLocalFileSystem
formats: UxpStorageFormats
}
}
declare module 'uxp' {
const uxp: UxpModule
export = uxp
}
+52
View File
@@ -0,0 +1,52 @@
import './polyfills'
import React from 'react'
import { createRoot } from 'react-dom/client'
import { Theme } from '@swc-react/theme'
import '@spectrum-web-components/theme/theme-dark.js'
import '@spectrum-web-components/theme/theme-darkest.js'
import '@spectrum-web-components/theme/theme-light.js'
import '@spectrum-web-components/theme/scale-medium.js'
import '@swc-uxp-wrappers/button/sp-button.js'
import '@swc-uxp-wrappers/action-button/sp-action-button.js'
import '@swc-uxp-wrappers/menu/sp-menu.js'
import '@swc-uxp-wrappers/menu/sp-menu-item.js'
import '@swc-uxp-wrappers/menu/sp-menu-divider.js'
import '@swc-uxp-wrappers/menu/sp-menu-group.js'
import '@swc-uxp-wrappers/popover/sp-popover.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-refresh.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-chevron-down.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-chevron-right.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-log-out.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-arrow-right.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-filmstrip.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-folder.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-folder-open.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-audio.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-image.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-document.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-link.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-unlink.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-link-out.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-download.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-briefcase.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-alert-circle.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-alert-triangle.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-checkmark-circle.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-close.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-movie-camera.js'
import '@spectrum-web-components/icons-workflow/icons/sp-icon-video-filled.js'
import { App } from './App'
const container = document.getElementById('root')
if (container) {
const root = createRoot(container)
root.render(
<React.StrictMode>
<Theme theme="spectrum" scale="medium" color="dark">
<App />
</Theme>
</React.StrictMode>,
)
} else {
console.error('Failed to find root container element')
}
+12
View File
@@ -0,0 +1,12 @@
// @vitest-environment happy-dom
import { describe, it, expect } from 'vitest'
import './polyfills'
describe('polyfills', () => {
it('defines window.matchMedia polyfill when missing', () => {
expect(typeof window.matchMedia).toBe('function')
const mql = window.matchMedia('(prefers-color-scheme: dark)')
expect(mql).toBeDefined()
expect(mql.matches).toBe(false)
})
})
+31
View File
@@ -0,0 +1,31 @@
// Guard against duplicate custom element registrations during UXP development and plugin reload
if (typeof window !== 'undefined' && window.customElements) {
const origDefine = window.customElements.define.bind(window.customElements)
window.customElements.define = (
name: string,
constructor: CustomElementConstructor,
options?: ElementDefinitionOptions,
) => {
if (window.customElements.get(name)) {
return
}
origDefine(name, constructor, options)
}
}
// Polyfill window.matchMedia for Adobe UXP environment
if (typeof window !== 'undefined' && typeof window.matchMedia !== 'function') {
window.matchMedia = (query: string): MediaQueryList => {
const mql: MediaQueryList = {
matches: false,
media: query,
onchange: null,
addListener: () => {},
removeListener: () => {},
addEventListener: () => {},
removeEventListener: () => {},
dispatchEvent: () => false,
}
return mql
}
}
@@ -0,0 +1,182 @@
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
import { autoSyncService } from './autoSyncService'
import type { Project, Sequence } from '@adobe/premierepro'
import type { CommentInfo } from '@shumai/dtos'
import * as premiereService from './premiere'
import * as linkStorage from './linkStorage'
import * as markersService from './markers'
describe('autoSyncService', () => {
beforeEach(() => {
vi.useFakeTimers()
vi.restoreAllMocks()
autoSyncService.stop()
})
afterEach(() => {
autoSyncService.stop()
vi.useRealTimers()
})
it('starts and stops background interval without throwing', () => {
autoSyncService.start('https://api.shumai.test', 'test-key')
expect(autoSyncService['timer']).not.toBeNull()
autoSyncService.stop()
expect(autoSyncService['timer']).toBeNull()
})
it('syncs all linked sequences on triggerImmediateSync', async () => {
const mockSeq = { guid: 'seq-1', name: 'Seq 1' }
const mockProject = { guid: 'proj-1' }
const mockLink = {
sequenceGuid: 'seq-1',
sequenceName: 'Seq 1',
assetId: 'asset-1',
assetName: 'video.mp4',
syncedCommentIds: [],
lastSyncAt: 0,
totalCommentsSynced: 0,
}
vi.spyOn(premiereService, 'getActiveProject').mockResolvedValue(
mockProject as unknown as Project,
)
vi.spyOn(premiereService, 'getAllSequences').mockResolvedValue([mockSeq as unknown as Sequence])
vi.spyOn(linkStorage, 'getAllLinkedSequences').mockResolvedValue([mockLink])
vi.spyOn(markersService, 'fetchAssetComments').mockResolvedValue([
{ id: 'comm-1', second: 5, message: 'hello' } as unknown as CommentInfo,
])
vi.spyOn(markersService, 'syncCommentsToSequence').mockResolvedValue({
updatedLink: { ...mockLink, syncedCommentIds: ['comm-1'] },
addedCount: 1,
})
autoSyncService.start('https://api.shumai.test', 'test-key')
await autoSyncService.triggerImmediateSync()
expect(markersService.fetchAssetComments).toHaveBeenCalledWith(
'https://api.shumai.test',
'test-key',
'asset-1',
)
expect(markersService.syncCommentsToSequence).toHaveBeenCalled()
})
it('normalizes sequence GUIDs with braces and uppercase when matching against linked sequences', async () => {
const mockSeq = { guid: '{B991F605-7BD7-4028-B05F-0BC36B66CD0A}', name: 'Seq Braced' }
const mockProject = { guid: 'proj-1' }
const mockLink = {
sequenceGuid: 'b991f605-7bd7-4028-b05f-0bc36b66cd0a',
sequenceName: 'Seq Braced',
assetId: 'asset-99',
assetName: 'video.mp4',
syncedCommentIds: [],
lastSyncAt: 0,
totalCommentsSynced: 0,
}
vi.spyOn(premiereService, 'getActiveProject').mockResolvedValue(
mockProject as unknown as Project,
)
vi.spyOn(premiereService, 'getAllSequences').mockResolvedValue([mockSeq as unknown as Sequence])
vi.spyOn(linkStorage, 'getAllLinkedSequences').mockResolvedValue([mockLink])
vi.spyOn(markersService, 'fetchAssetComments').mockResolvedValue([
{ id: 'comm-1', second: 1, message: 'braced guid comment' } as unknown as CommentInfo,
])
vi.spyOn(markersService, 'syncCommentsToSequence').mockResolvedValue({
updatedLink: { ...mockLink, syncedCommentIds: ['comm-1'] },
addedCount: 1,
})
autoSyncService.start('https://api.shumai.test', 'test-key')
await autoSyncService.triggerImmediateSync()
expect(markersService.fetchAssetComments).toHaveBeenCalledWith(
'https://api.shumai.test',
'test-key',
'asset-99',
)
expect(markersService.syncCommentsToSequence).toHaveBeenCalledWith(
mockProject,
mockSeq,
expect.any(Array),
mockLink,
)
})
it('skips linked sequences configured for a different server endpoint', async () => {
const mockSeq1 = { guid: 'seq-foreign', name: 'Seq Foreign' }
const mockSeq2 = { guid: 'seq-local', name: 'Seq Local' }
const mockProject = { guid: 'proj-1' }
const foreignLink = {
sequenceGuid: 'seq-foreign',
sequenceName: 'Seq Foreign',
assetId: 'asset-foreign',
assetName: 'foreign.mp4',
endpoint: 'http://localhost:3000',
syncedCommentIds: [],
lastSyncAt: 0,
totalCommentsSynced: 0,
}
const sameLink = {
sequenceGuid: 'seq-local',
sequenceName: 'Seq Local',
assetId: 'asset-local',
assetName: 'local.mp4',
endpoint: 'https://staging.shumai.one/', // trailing slash variation
syncedCommentIds: [],
lastSyncAt: 0,
totalCommentsSynced: 0,
}
vi.spyOn(premiereService, 'getActiveProject').mockResolvedValue(
mockProject as unknown as Project,
)
vi.spyOn(premiereService, 'getAllSequences').mockResolvedValue([
mockSeq1 as unknown as Sequence,
mockSeq2 as unknown as Sequence,
])
vi.spyOn(linkStorage, 'getAllLinkedSequences').mockResolvedValue([foreignLink, sameLink])
vi.spyOn(markersService, 'fetchAssetComments').mockResolvedValue([
{ id: 'comm-1', second: 2, message: 'comment' } as unknown as CommentInfo,
])
vi.spyOn(markersService, 'syncCommentsToSequence').mockResolvedValue({
updatedLink: { ...sameLink, syncedCommentIds: ['comm-1'] },
addedCount: 1,
})
autoSyncService.start('https://staging.shumai.one', 'test-key')
await autoSyncService.triggerImmediateSync()
// Foreign link should be skipped
expect(markersService.fetchAssetComments).not.toHaveBeenCalledWith(
expect.anything(),
expect.anything(),
'asset-foreign',
)
// Matching link should be synced
expect(markersService.fetchAssetComments).toHaveBeenCalledWith(
'https://staging.shumai.one',
'test-key',
'asset-local',
)
expect(markersService.syncCommentsToSequence).toHaveBeenCalledWith(
mockProject,
mockSeq2,
expect.any(Array),
sameLink,
)
})
it('aborts syncing when stop() is called and credentials are reset', async () => {
const fetchSpy = vi.spyOn(markersService, 'fetchAssetComments')
autoSyncService.start('https://api.shumai.test', 'test-key')
autoSyncService.stop()
await autoSyncService.triggerImmediateSync()
expect(fetchSpy).not.toHaveBeenCalled()
})
})
@@ -0,0 +1,175 @@
import type { Sequence } from '@adobe/premierepro'
import { getActiveProject, getAllSequences, getPremiereModule } from './premiere'
import { getAllLinkedSequences, normalizeGuid } from './linkStorage'
import { fetchAssetComments, syncCommentsToSequence } from './markers'
import { isSameEndpoint } from '../utils/url'
const SYNC_INTERVAL_MS = 12000 // 12 seconds
class AutoSyncService {
private timer: ReturnType<typeof setInterval> | null = null
private endpoint = ''
private apiKey = ''
private cleanupListeners: (() => void) | null = null
private syncPromise: Promise<void> | null = null
/**
* Starts the background auto-sync loop.
*/
start(endpoint: string, apiKey: string): void {
this.stop()
this.endpoint = endpoint
this.apiKey = apiKey
if (!endpoint || !apiKey) return
// Setup background interval
this.timer = setInterval(() => {
void this.syncAllLinkedSequences()
}, SYNC_INTERVAL_MS)
// Setup host and window event listeners
this.setupListeners()
}
/**
* Stops the background auto-sync loop and tears down listeners.
*/
stop(): void {
if (this.timer) {
clearInterval(this.timer)
this.timer = null
}
if (this.cleanupListeners) {
this.cleanupListeners()
this.cleanupListeners = null
}
this.endpoint = ''
this.apiKey = ''
this.syncPromise = null
}
/**
* Forces an immediate synchronization cycle.
*/
async triggerImmediateSync(): Promise<void> {
if (this.syncPromise) {
await this.syncPromise
}
await this.syncAllLinkedSequences()
}
private setupListeners(): void {
const onFocus = () => {
void this.triggerImmediateSync()
}
const onVisibilityChange = () => {
if (typeof document !== 'undefined' && document.visibilityState === 'visible') {
void this.triggerImmediateSync()
}
}
if (typeof window !== 'undefined') {
window.addEventListener('focus', onFocus)
}
if (typeof document !== 'undefined') {
document.addEventListener('visibilitychange', onVisibilityChange)
}
// Premiere Pro Sequence Activated listener
const ppro = getPremiereModule()
let hasSeqListener = false
const onSequenceActivated = () => {
void this.triggerImmediateSync()
}
if (ppro?.EventManager && ppro.Constants?.SequenceEvent?.ACTIVATED) {
try {
ppro.EventManager.addGlobalEventListener(
ppro.Constants.SequenceEvent.ACTIVATED,
onSequenceActivated,
)
hasSeqListener = true
} catch (err) {
console.warn('[autoSyncService] Could not register SequenceEvent listener:', err)
}
}
this.cleanupListeners = () => {
if (typeof window !== 'undefined') {
window.removeEventListener('focus', onFocus)
}
if (typeof document !== 'undefined') {
document.removeEventListener('visibilitychange', onVisibilityChange)
}
if (hasSeqListener && ppro?.EventManager && ppro.Constants?.SequenceEvent?.ACTIVATED) {
try {
ppro.EventManager.removeGlobalEventListener(
ppro.Constants.SequenceEvent.ACTIVATED,
onSequenceActivated,
)
} catch {
// Ignore error during cleanup
}
}
}
}
private async syncAllLinkedSequences(): Promise<void> {
if (this.syncPromise) {
return this.syncPromise
}
const currentEndpoint = this.endpoint
const currentApiKey = this.apiKey
if (!currentEndpoint || !currentApiKey) return
this.syncPromise = (async () => {
try {
const project = await getActiveProject()
if (!project || this.endpoint !== currentEndpoint || this.apiKey !== currentApiKey) return
const allSeqs = await getAllSequences(project)
if (!allSeqs || allSeqs.length === 0 || this.endpoint !== currentEndpoint) return
const linkedItems = await getAllLinkedSequences(project, allSeqs)
if (!linkedItems || linkedItems.length === 0 || this.endpoint !== currentEndpoint) return
const seqsMap = new Map<string, Sequence>()
for (const s of allSeqs) {
const normGuid = normalizeGuid(s.guid)
if (normGuid) {
seqsMap.set(normGuid, s)
}
}
for (const link of linkedItems) {
if (this.endpoint !== currentEndpoint || this.apiKey !== currentApiKey) break
// Skip links created against a different server endpoint
if (link.endpoint && !isSameEndpoint(link.endpoint, currentEndpoint)) {
continue
}
const targetSeq = seqsMap.get(normalizeGuid(link.sequenceGuid))
if (!targetSeq) continue
try {
const comments = await fetchAssetComments(currentEndpoint, currentApiKey, link.assetId)
if (this.endpoint !== currentEndpoint) break
await syncCommentsToSequence(project, targetSeq, comments, link)
} catch (itemErr) {
console.error(`[autoSyncService] Error syncing sequence ${link.sequenceName}:`, itemErr)
}
}
} catch (err) {
console.error('[autoSyncService] Sync cycle failed:', err)
} finally {
this.syncPromise = null
}
})()
return this.syncPromise
}
}
export const autoSyncService = new AutoSyncService()
@@ -0,0 +1,124 @@
import { describe, it, expect, vi, beforeEach } from 'vitest'
import { fetchAssetComments, formatCommentBody } from './commentUtils'
import * as clientModule from '../api/client'
import type { CommentInfo } from '@shumai/dtos'
describe('commentUtils', () => {
beforeEach(() => {
vi.restoreAllMocks()
})
describe('fetchAssetComments', () => {
it('returns comments array when response is ok', async () => {
const mockComments: Partial<CommentInfo>[] = [
{ id: 'c1', message: 'First comment', second: 12 },
{ id: 'c2', message: 'Second comment', second: 45 },
]
const mockGet = vi.fn().mockResolvedValue({
ok: true,
json: async () => ({ data: mockComments }),
})
vi.spyOn(clientModule, 'getShumaiClient').mockReturnValue({
api: {
files: {
':fileId': {
comments: {
$get: mockGet,
},
},
},
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any)
const result = await fetchAssetComments('https://api.shumai.test', 'test-key', 'asset-1')
expect(mockGet).toHaveBeenCalledWith({
param: { fileId: 'asset-1' },
query: { first: '100' },
})
expect(result).toEqual(mockComments)
})
it('throws error with message from server response when res.ok is false', async () => {
const mockGet = vi.fn().mockResolvedValue({
ok: false,
status: 404,
json: async () => ({ error: 'Asset not found on this server' }),
})
vi.spyOn(clientModule, 'getShumaiClient').mockReturnValue({
api: {
files: {
':fileId': {
comments: {
$get: mockGet,
},
},
},
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any)
await expect(
fetchAssetComments('https://api.shumai.test', 'test-key', 'asset-missing'),
).rejects.toThrow('Asset not found on this server')
})
it('throws fallback HTTP status error when res.ok is false and response has no error field', async () => {
const mockGet = vi.fn().mockResolvedValue({
ok: false,
status: 500,
json: async () => {
throw new Error('Invalid JSON')
},
})
vi.spyOn(clientModule, 'getShumaiClient').mockReturnValue({
api: {
files: {
':fileId': {
comments: {
$get: mockGet,
},
},
},
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any)
await expect(
fetchAssetComments('https://api.shumai.test', 'test-key', 'asset-crash'),
).rejects.toThrow('Failed to fetch comments (HTTP 500)')
})
})
describe('formatCommentBody', () => {
it('formats single comment without replies', () => {
const comment = {
message: 'Review cut at 01:23',
replies: [],
} as unknown as CommentInfo
expect(formatCommentBody(comment)).toBe('Review cut at 01:23')
})
it('formats comment with nested replies and authors', () => {
const comment = {
message: 'Needs color correction',
replies: [
{ creator: { name: 'Alice' }, message: 'Applied LUT' },
{ creator: { name: 'Bob' }, message: 'Looks better' },
],
} as unknown as CommentInfo
const result = formatCommentBody(comment)
expect(result).toContain('Needs color correction')
expect(result).toContain('--- Replies ---')
expect(result).toContain('Alice: Applied LUT')
expect(result).toContain('Bob: Looks better')
})
})
})
@@ -0,0 +1,43 @@
import type { CommentInfo } from '@shumai/dtos'
import { getShumaiClient } from '../api/client'
/**
* Fetches timecoded comments for an asset from Shumai.
*/
export async function fetchAssetComments(
endpoint: string,
apiKey: string,
assetId: string,
): Promise<CommentInfo[]> {
const client = getShumaiClient(endpoint, apiKey)
const res = await client.api.files[':fileId'].comments.$get({
param: { fileId: assetId },
query: { first: '100' },
})
if (!res.ok) {
const errData = (await res.json().catch(() => ({}))) as { error?: string }
throw new Error(errData.error || `Failed to fetch comments (HTTP ${res.status})`)
}
const data = await res.json()
return (data?.data as CommentInfo[]) || []
}
/**
* Formats a Shumai comment into marker text including any threaded replies.
*/
export function formatCommentBody(comment: CommentInfo): string {
let body = comment.message || ''
if (comment.replies && comment.replies.length > 0) {
body += '\n\n--- Replies ---'
for (const reply of comment.replies) {
const author = reply.creator?.name || 'User'
const replyMsg = reply.message || ''
body += `\n${author}: ${replyMsg}`
}
}
return body
}
@@ -0,0 +1,619 @@
import { describe, it, expect, vi, beforeEach } from 'vitest'
import {
formatResolutionLabel,
getResolutionRank,
resolveRawDownloadUrl,
fetchVideoProxies,
getUniqueFileName,
getFolderEntryNames,
createUniqueFileInFolder,
importAssetIntoPremiere,
} from './import'
import * as premiereModule from './premiere'
import * as clientModule from '../api/client'
import type { AssetSummary } from '../components/FileItem'
describe('import service', () => {
beforeEach(() => {
vi.restoreAllMocks()
})
describe('formatResolutionLabel', () => {
it('formats given resolution strings', () => {
expect(formatResolutionLabel(undefined, undefined, '1080p')).toBe('1080p (MP4)')
expect(formatResolutionLabel(undefined, undefined, '720')).toBe('720p (MP4)')
})
it('formats given height numbers', () => {
expect(formatResolutionLabel(1920, 1080)).toBe('1080p (MP4)')
expect(formatResolutionLabel(1280, 720)).toBe('720p (MP4)')
})
it('formats by width if height is missing', () => {
expect(formatResolutionLabel(1920, undefined)).toBe('1080p (MP4)')
expect(formatResolutionLabel(1280, undefined)).toBe('720p (MP4)')
expect(formatResolutionLabel(3840, undefined)).toBe('2160p (MP4)')
})
it('falls back to Proxy (MP4)', () => {
expect(formatResolutionLabel(undefined, undefined)).toBe('Proxy (MP4)')
})
})
describe('getResolutionRank', () => {
it('extracts resolution numeric rank', () => {
expect(getResolutionRank('1080p (MP4)')).toBe(1080)
expect(getResolutionRank('720p (MP4)')).toBe(720)
expect(getResolutionRank('Proxy (MP4)')).toBe(0)
})
})
describe('resolveRawDownloadUrl', () => {
it('resolves directly via download-url when original key is in knownAsset', async () => {
const mockDownloadUrlPost = vi.fn().mockResolvedValue({
ok: true,
json: async () => ({ url: 'https://s3.example.com/direct-raw.mp4' }),
})
vi.spyOn(clientModule, 'getShumaiClient').mockReturnValue({
api: {
files: {
'download-url': {
$post: mockDownloadUrlPost,
},
},
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any)
const knownAsset: AssetSummary = {
id: 'file-1',
name: 'direct-raw.mp4',
type: 'file',
media: {
original: {
key: 'files/test/direct-raw.mp4',
},
},
}
const result = await resolveRawDownloadUrl('http://test', 'key', 'file-1', knownAsset)
expect(result.url).toBe('https://s3.example.com/direct-raw.mp4')
expect(result.name).toBe('direct-raw.mp4')
expect(mockDownloadUrlPost).toHaveBeenCalledWith({
json: { key: 'files/test/direct-raw.mp4', assetId: 'file-1' },
})
})
it('resolves via GET :fileId and download-url when not in knownAsset', async () => {
const mockGet = vi.fn().mockResolvedValue({
ok: true,
json: async () => ({
id: 'file-1',
name: 'remote-video.mp4',
media: {
original: {
key: 'files/remote/video.mp4',
},
},
}),
})
const mockDownloadUrlPost = vi.fn().mockResolvedValue({
ok: true,
json: async () => ({ url: 'https://s3.example.com/presigned-remote.mp4' }),
})
vi.spyOn(clientModule, 'getShumaiClient').mockReturnValue({
api: {
files: {
':fileId': {
$get: mockGet,
},
'download-url': {
$post: mockDownloadUrlPost,
},
},
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any)
const result = await resolveRawDownloadUrl('http://test', 'key', 'file-1')
expect(result.url).toBe('https://s3.example.com/presigned-remote.mp4')
expect(result.name).toBe('remote-video.mp4')
expect(mockGet).toHaveBeenCalledWith({ param: { fileId: 'file-1' } })
expect(mockDownloadUrlPost).toHaveBeenCalledWith({
json: { key: 'files/remote/video.mp4', assetId: 'file-1' },
})
})
it('falls back to download-links endpoint when download-url is unavailable', async () => {
const mockPost = vi.fn().mockResolvedValue({
ok: true,
json: async () => ({
files: [{ id: 'file-1', name: 'video.mov', url: 'https://s3.example.com/video.mov' }],
}),
})
vi.spyOn(clientModule, 'getShumaiClient').mockReturnValue({
api: {
files: {
'download-links': {
$post: mockPost,
},
},
},
// Partial mock of Hono client for unit test isolation
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any)
const result = await resolveRawDownloadUrl('http://test', 'key', 'file-1')
expect(result.url).toBe('https://s3.example.com/video.mov')
expect(result.name).toBe('video.mov')
expect(mockPost).toHaveBeenCalledWith({ json: { ids: ['file-1'] } })
})
it('throws error when all resolution methods fail', async () => {
vi.spyOn(clientModule, 'getShumaiClient').mockReturnValue({
api: {
files: {
'download-links': {
$post: vi.fn().mockResolvedValue({
ok: false,
status: 500,
json: async () => ({ error: 'Server error' }),
}),
},
},
},
// Partial mock of Hono client for unit test isolation
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any)
await expect(resolveRawDownloadUrl('http://test', 'key', 'file-1')).rejects.toThrow(
'Server error',
)
})
})
describe('fetchVideoProxies', () => {
it('returns available proxies sorted descending', async () => {
const mockGet = vi.fn().mockResolvedValue({
ok: true,
json: async () => ({
id: 'file-1',
media: {
videoTranscodes: [
{
id: 't-720',
key: 'files/720.mp4',
url: 'https://s3.example.com/720.mp4',
width: 1280,
height: 720,
},
{
id: 't-1080',
key: 'files/1080.mp4',
url: 'https://s3.example.com/1080.mp4',
width: 1920,
height: 1080,
},
],
},
}),
})
vi.spyOn(clientModule, 'getShumaiClient').mockReturnValue({
api: {
files: {
':fileId': {
$get: mockGet,
},
},
},
// Partial mock of Hono client for unit test isolation
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any)
const proxies = await fetchVideoProxies('http://test', 'key', 'file-1')
expect(proxies).toHaveLength(2)
// Highest resolution first
expect(proxies[0].label).toBe('1080p (MP4)')
expect(proxies[1].label).toBe('720p (MP4)')
})
})
describe('getUniqueFileName', () => {
it('returns exact name when no collision exists', () => {
expect(getUniqueFileName([], 'image.png')).toBe('image.png')
expect(getUniqueFileName(['other.png', 'test.mov'], 'image.png')).toBe('image.png')
})
it('appends _1 on first collision', () => {
expect(getUniqueFileName(['image.png'], 'image.png')).toBe('image_1.png')
})
it('appends _2 when original and _1 both exist', () => {
expect(getUniqueFileName(['image.png', 'image_1.png'], 'image.png')).toBe('image_2.png')
})
it('handles case-insensitive collision checks', () => {
expect(getUniqueFileName(['IMAGE.PNG'], 'image.png')).toBe('image_1.png')
expect(getUniqueFileName(['image.png', 'IMAGE_1.PNG'], 'image.png')).toBe('image_2.png')
})
it('handles files without extensions', () => {
expect(getUniqueFileName(['README'], 'README')).toBe('README_1')
expect(getUniqueFileName(['README', 'README_1'], 'README')).toBe('README_2')
})
it('handles files with multiple dots', () => {
expect(getUniqueFileName(['archive.tar.gz'], 'archive.tar.gz')).toBe('archive.tar_1.gz')
expect(getUniqueFileName(['archive.tar.gz', 'archive.tar_1.gz'], 'archive.tar.gz')).toBe(
'archive.tar_2.gz',
)
})
})
describe('getFolderEntryNames', () => {
it('reads entry names from folder.getEntries', async () => {
const mockFolder = {
isFile: false as const,
isFolder: true as const,
name: 'dir',
nativePath: '/path/dir',
createFile: vi.fn(),
getEntries: vi.fn().mockResolvedValue([
{ name: 'file1.mp4', isFile: true, isFolder: false },
{ name: 'subfolder', isFile: false, isFolder: true },
]),
}
const names = await getFolderEntryNames(mockFolder)
expect(names).toEqual(['file1.mp4', 'subfolder'])
})
it('handles folder.getEntries error gracefully', async () => {
const mockFolder = {
isFile: false as const,
isFolder: true as const,
name: 'dir',
nativePath: '/path/dir',
createFile: vi.fn(),
getEntries: vi.fn().mockRejectedValue(new Error('Permission denied')),
}
const names = await getFolderEntryNames(mockFolder)
expect(names).toEqual([])
})
})
describe('createUniqueFileInFolder', () => {
it('creates file with candidate name when no collision', async () => {
const mockCreatedFile = {
isFile: true as const,
isFolder: false as const,
name: 'test.mp4',
nativePath: '/path/test.mp4',
write: vi.fn(),
}
const mockFolder = {
isFile: false as const,
isFolder: true as const,
name: 'dir',
nativePath: '/path/dir',
createFile: vi.fn().mockResolvedValue(mockCreatedFile),
getEntries: vi.fn().mockResolvedValue([]),
}
const res = await createUniqueFileInFolder(mockFolder, 'test.mp4')
expect(res.name).toBe('test.mp4')
expect(res.file).toBe(mockCreatedFile)
expect(mockFolder.createFile).toHaveBeenCalledWith('test.mp4', { overwrite: false })
})
it('auto-increments suffix when candidate creation fails due to collision', async () => {
const mockCreatedFile = {
isFile: true as const,
isFolder: false as const,
name: 'test_1.mp4',
nativePath: '/path/test_1.mp4',
write: vi.fn(),
}
const mockFolder = {
isFile: false as const,
isFolder: true as const,
name: 'dir',
nativePath: '/path/dir',
createFile: vi
.fn()
.mockRejectedValueOnce(new Error('File exists'))
.mockResolvedValueOnce(mockCreatedFile),
getEntries: vi.fn().mockResolvedValue([]),
}
const res = await createUniqueFileInFolder(mockFolder, 'test.mp4')
expect(res.name).toBe('test_1.mp4')
expect(res.file).toBe(mockCreatedFile)
})
})
describe('importAssetIntoPremiere', () => {
const mockAsset: AssetSummary = {
id: 'asset-1',
name: 'Sample.mov',
type: 'file',
}
it('returns error when no active project in Premiere', async () => {
vi.spyOn(premiereModule, 'getActiveProject').mockResolvedValue(null)
const result = await importAssetIntoPremiere({
endpoint: 'http://test',
apiKey: 'key',
asset: mockAsset,
type: 'raw',
})
expect(result.success).toBe(false)
expect(result.message).toContain('Please open or create a project')
})
it('returns cancelled when user cancels folder picker', async () => {
// Mocking incomplete Premiere Project object in unit test
// eslint-disable-next-line @typescript-eslint/no-explicit-any
vi.spyOn(premiereModule, 'getActiveProject').mockResolvedValue({} as any)
vi.spyOn(premiereModule, 'promptSelectFolder').mockResolvedValue(null)
const result = await importAssetIntoPremiere({
endpoint: 'http://test',
apiKey: 'key',
asset: mockAsset,
type: 'raw',
})
expect(result.success).toBe(false)
expect(result.cancelled).toBe(true)
expect(premiereModule.promptSelectFolder).toHaveBeenCalled()
})
it('fails after folder selection if download link resolution fails', async () => {
// Mocking incomplete Premiere Project object in unit test
// eslint-disable-next-line @typescript-eslint/no-explicit-any
vi.spyOn(premiereModule, 'getActiveProject').mockResolvedValue({} as any)
const mockFolder = {
isFile: false as const,
isFolder: true as const,
name: 'dir',
nativePath: '/path/dir',
createFile: vi.fn(),
getEntries: vi.fn().mockResolvedValue([]),
}
vi.spyOn(premiereModule, 'promptSelectFolder').mockResolvedValue(mockFolder)
vi.spyOn(clientModule, 'getShumaiClient').mockReturnValue({
api: {
files: {
'download-links': {
$post: vi.fn().mockResolvedValue({
ok: false,
status: 401,
json: async () => ({ error: 'Unauthorized: Invalid API Key' }),
}),
},
},
},
// Partial mock of Hono client for unit test isolation
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any)
await expect(
importAssetIntoPremiere({
endpoint: 'http://test',
apiKey: 'key',
asset: mockAsset,
type: 'raw',
}),
).rejects.toThrow('Unauthorized: Invalid API Key')
})
it('downloads and imports file successfully with original name when no conflict', async () => {
// Mocking incomplete Premiere Project object in unit test
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const mockProject = {} as any
vi.spyOn(premiereModule, 'getActiveProject').mockResolvedValue(mockProject)
const mockSaveFile = {
isFile: true as const,
isFolder: false as const,
name: 'Sample.mov',
nativePath: '/Users/test/Downloads/Sample.mov',
write: vi.fn().mockResolvedValue(undefined),
}
const mockFolder = {
isFile: false as const,
isFolder: true as const,
name: 'Downloads',
nativePath: '/Users/test/Downloads',
createFile: vi.fn().mockResolvedValue(mockSaveFile),
getEntries: vi.fn().mockResolvedValue([]),
}
vi.spyOn(premiereModule, 'promptSelectFolder').mockResolvedValue(mockFolder)
vi.spyOn(premiereModule, 'writeBinaryFile').mockResolvedValue(undefined)
vi.spyOn(premiereModule, 'importFilesIntoProject').mockResolvedValue(true)
vi.spyOn(clientModule, 'getShumaiClient').mockReturnValue({
api: {
files: {
'download-links': {
$post: vi.fn().mockResolvedValue({
ok: true,
json: async () => ({
files: [{ id: 'asset-1', name: 'Sample.mov', url: 'https://s3.example.com/raw' }],
}),
}),
},
},
},
// Partial mock of Hono client for unit test isolation
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any)
// Mock global fetch
const dummyBuffer = new ArrayBuffer(8)
const fetchSpy = vi.spyOn(globalThis, 'fetch').mockResolvedValue({
ok: true,
arrayBuffer: async () => dummyBuffer,
// Mocking Response object for unit test
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any)
const onProgress = vi.fn()
const result = await importAssetIntoPremiere({
endpoint: 'http://test',
apiKey: 'key',
asset: mockAsset,
type: 'raw',
onProgress,
})
expect(result.success).toBe(true)
expect(result.fileName).toBe('Sample.mov')
expect(result.message).toContain('Successfully imported Sample.mov')
expect(mockFolder.createFile).toHaveBeenCalledWith('Sample.mov', { overwrite: false })
expect(premiereModule.importFilesIntoProject).toHaveBeenCalledWith(mockProject, [
'/Users/test/Downloads/Sample.mov',
])
expect(onProgress).toHaveBeenCalled()
fetchSpy.mockRestore()
})
it('automatically adds _1 suffix when name conflict exists in selected folder', async () => {
// Mocking incomplete Premiere Project object in unit test
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const mockProject = {} as any
vi.spyOn(premiereModule, 'getActiveProject').mockResolvedValue(mockProject)
const mockSaveFile = {
isFile: true as const,
isFolder: false as const,
name: 'Sample_1.mov',
nativePath: '/Users/test/Downloads/Sample_1.mov',
write: vi.fn().mockResolvedValue(undefined),
}
const mockFolder = {
isFile: false as const,
isFolder: true as const,
name: 'Downloads',
nativePath: '/Users/test/Downloads',
createFile: vi.fn().mockResolvedValue(mockSaveFile),
getEntries: vi
.fn()
.mockResolvedValue([{ name: 'Sample.mov', isFile: true, isFolder: false }]),
}
vi.spyOn(premiereModule, 'promptSelectFolder').mockResolvedValue(mockFolder)
vi.spyOn(premiereModule, 'writeBinaryFile').mockResolvedValue(undefined)
vi.spyOn(premiereModule, 'importFilesIntoProject').mockResolvedValue(true)
vi.spyOn(clientModule, 'getShumaiClient').mockReturnValue({
api: {
files: {
'download-links': {
$post: vi.fn().mockResolvedValue({
ok: true,
json: async () => ({
files: [{ id: 'asset-1', name: 'Sample.mov', url: 'https://s3.example.com/raw' }],
}),
}),
},
},
},
// Partial mock of Hono client for unit test isolation
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any)
const dummyBuffer = new ArrayBuffer(8)
const fetchSpy = vi.spyOn(globalThis, 'fetch').mockResolvedValue({
ok: true,
arrayBuffer: async () => dummyBuffer,
// Mocking Response object for unit test
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any)
const result = await importAssetIntoPremiere({
endpoint: 'http://test',
apiKey: 'key',
asset: mockAsset,
type: 'raw',
})
expect(result.success).toBe(true)
expect(result.fileName).toBe('Sample_1.mov')
expect(result.message).toContain('Successfully imported Sample_1.mov')
expect(mockFolder.createFile).toHaveBeenCalledWith('Sample_1.mov', { overwrite: false })
expect(premiereModule.importFilesIntoProject).toHaveBeenCalledWith(mockProject, [
'/Users/test/Downloads/Sample_1.mov',
])
fetchSpy.mockRestore()
})
it('resolves relative download URL with endpoint before fetching', async () => {
// Mocking incomplete Premiere Project object in unit test
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const mockProject = {} as any
vi.spyOn(premiereModule, 'getActiveProject').mockResolvedValue(mockProject)
const mockSaveFile = {
isFile: true as const,
isFolder: false as const,
name: 'Sample.mov',
nativePath: '/Users/test/Downloads/Sample.mov',
write: vi.fn().mockResolvedValue(undefined),
}
const mockFolder = {
isFile: false as const,
isFolder: true as const,
name: 'Downloads',
nativePath: '/Users/test/Downloads',
createFile: vi.fn().mockResolvedValue(mockSaveFile),
getEntries: vi.fn().mockResolvedValue([]),
}
vi.spyOn(premiereModule, 'promptSelectFolder').mockResolvedValue(mockFolder)
vi.spyOn(premiereModule, 'writeBinaryFile').mockResolvedValue(undefined)
vi.spyOn(premiereModule, 'importFilesIntoProject').mockResolvedValue(true)
vi.spyOn(clientModule, 'getShumaiClient').mockReturnValue({
api: {
files: {
'download-links': {
$post: vi.fn().mockResolvedValue({
ok: true,
json: async () => ({
files: [{ id: 'asset-1', name: 'Sample.mov', url: '/api/upload/local?key=test' }],
}),
}),
},
},
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any)
const dummyBuffer = new ArrayBuffer(8)
const fetchSpy = vi.spyOn(globalThis, 'fetch').mockResolvedValue({
ok: true,
arrayBuffer: async () => dummyBuffer,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any)
const result = await importAssetIntoPremiere({
endpoint: 'http://test:3000',
apiKey: 'key',
asset: mockAsset,
type: 'raw',
})
expect(result.success).toBe(true)
expect(fetchSpy).toHaveBeenCalledWith('http://test:3000/api/upload/local?key=test')
fetchSpy.mockRestore()
})
})
})
+357
View File
@@ -0,0 +1,357 @@
import { getShumaiClient } from '../api/client'
import type { AssetSummary } from '../components/FileItem'
import {
getActiveProject,
importFilesIntoProject,
promptSelectFolder,
writeBinaryFile,
} from './premiere'
import { resolveAssetUrl } from '../utils/url'
export interface ProxyOption {
id: string
label: string
resolution: string
url: string
key: string
width?: number
height?: number
size?: number
}
export function formatResolutionLabel(width?: number, height?: number, res?: string): string {
if (res) {
const cleanRes = res.endsWith('p') ? res : `${res}p`
return `${cleanRes} (MP4)`
}
if (height) return `${height}p (MP4)`
if (width) {
if (width >= 3840) return '2160p (MP4)'
if (width >= 1920) return '1080p (MP4)'
if (width >= 1280) return '720p (MP4)'
if (width >= 960) return '540p (MP4)'
if (width >= 640) return '360p (MP4)'
}
return 'Proxy (MP4)'
}
export function getResolutionRank(label: string): number {
const match = label.match(/(\d+)p/) || label.match(/^(\d+)/)
return match ? parseInt(match[1], 10) : 0
}
/**
* Resolves the presigned download URL for the original / raw file.
*/
export async function resolveRawDownloadUrl(
endpoint: string,
apiKey: string,
assetId: string,
knownAsset?: AssetSummary,
): Promise<{ url: string; name?: string }> {
const client = getShumaiClient(endpoint, apiKey)
// 1. If original key is known directly from asset summary, presign via download-url endpoint
const directKey = knownAsset?.media?.original?.key
if (directKey) {
try {
const res = await client.api.files['download-url']?.$post({
json: { key: directKey, assetId },
})
if (res?.ok) {
const data = await res.json()
if (data.url) {
return { url: data.url, name: knownAsset?.name }
}
}
} catch (err) {
console.warn('Failed to resolve download URL via known key:', err)
}
}
// 2. Fetch full asset details via GET /api/files/:fileId to get the original media key
try {
const detailRes = await client.api.files[':fileId']?.$get({
param: { fileId: assetId },
})
if (detailRes?.ok) {
const assetData = await detailRes.json()
const originalKey = assetData.media?.original?.key
if (originalKey) {
const urlRes = await client.api.files['download-url']?.$post({
json: { key: originalKey, assetId },
})
if (urlRes?.ok) {
const urlData = await urlRes.json()
if (urlData.url) {
return { url: urlData.url, name: assetData.name || knownAsset?.name }
}
}
}
}
} catch (err) {
console.warn('Failed to fetch asset details for download URL:', err)
}
// 3. Fallback to POST /api/files/download-links batch resolution
const res = await client.api.files['download-links']?.$post({
json: { ids: [assetId] },
})
if (res?.ok) {
const data = await res.json()
const file = data.files?.[0]
if (file?.url) {
return { url: file.url, name: file.name || knownAsset?.name }
}
} else if (res) {
const errData = (await res.json().catch(() => ({}))) as { error?: string }
throw new Error(errData.error || `Failed to get download link (${res.status})`)
}
throw new Error('No download URL returned from server.')
}
/**
* Fetches available video proxy transcodes for an asset.
*/
export async function fetchVideoProxies(
endpoint: string,
apiKey: string,
assetId: string,
): Promise<ProxyOption[]> {
const client = getShumaiClient(endpoint, apiKey)
const res = await client.api.files[':fileId'].$get({
param: { fileId: assetId },
})
if (!res.ok) {
const errData = (await res.json().catch(() => ({}))) as { error?: string }
throw new Error(errData.error || `Failed to get asset details (${res.status})`)
}
const asset = await res.json()
const transcodes = asset.media?.videoTranscodes || []
if (!transcodes.length) return []
const proxies: ProxyOption[] = []
for (const t of transcodes) {
let url = t.url
if (!url && t.key) {
// If transcode url wasn't presigned yet, request via download-url endpoint
try {
const urlRes = await client.api.files['download-url'].$post({
json: { key: t.key, assetId },
})
if (urlRes.ok) {
const urlData = await urlRes.json()
url = urlData.url
}
} catch (err) {
console.warn(`Failed to presign transcode key ${t.key}:`, err)
}
}
if (url) {
const label = formatResolutionLabel(t.width, t.height)
proxies.push({
id: t.id || t.key,
label,
resolution: `${t.height || 0}p`,
url,
key: t.key,
width: t.width,
height: t.height,
size: t.size,
})
}
}
// Sort descending by resolution (1080p, 720p, 540p, 360p)
proxies.sort((a, b) => getResolutionRank(b.label) - getResolutionRank(a.label))
return proxies
}
/**
* Resolves a unique filename within the specified existing file names in a folder.
* If requestedName exists, it appends _1, _2, etc. before the file extension.
* Comparison is case-insensitive to safely handle Windows and macOS filesystems.
*/
export function getUniqueFileName(existingNames: string[], requestedName: string): string {
const existingSet = new Set(existingNames.map((n) => n.toLowerCase()))
if (!existingSet.has(requestedName.toLowerCase())) {
return requestedName
}
const dotIndex = requestedName.lastIndexOf('.')
const base = dotIndex > 0 ? requestedName.slice(0, dotIndex) : requestedName
const ext = dotIndex > 0 ? requestedName.slice(dotIndex) : ''
let counter = 1
while (true) {
const candidate = `${base}_${counter}${ext}`
if (!existingSet.has(candidate.toLowerCase())) {
return candidate
}
counter++
}
}
/**
* Reads existing file/folder names inside a UXP FolderEntry safely.
*/
export async function getFolderEntryNames(folder: UxpFolderEntry): Promise<string[]> {
try {
if (typeof folder.getEntries === 'function') {
const entries = await folder.getEntries()
return entries.map((e) => e.name)
}
const folderRecord = folder as unknown as Record<string, unknown>
if (typeof folderRecord.getFiles === 'function') {
const files = await (folderRecord.getFiles as () => Promise<Array<{ name: string }>>)()
return files.map((f) => f.name)
}
} catch (err) {
console.warn('Failed to read folder entries:', err)
}
return []
}
/**
* Creates a unique file entry in the target folder, preventing overwrites by auto-incrementing suffixes (_1, _2).
*/
export async function createUniqueFileInFolder(
folder: UxpFolderEntry,
requestedName: string,
): Promise<{ file: UxpFileEntry; name: string }> {
const existingNames = await getFolderEntryNames(folder)
const candidateName = getUniqueFileName(existingNames, requestedName)
try {
const file = await folder.createFile(candidateName, { overwrite: false })
return { file, name: candidateName }
} catch (err) {
console.warn(`Could not create file "${candidateName}" with overwrite: false, retrying...`, err)
const dotIndex = requestedName.lastIndexOf('.')
const base = dotIndex > 0 ? requestedName.slice(0, dotIndex) : requestedName
const ext = dotIndex > 0 ? requestedName.slice(dotIndex) : ''
for (let counter = 1; counter <= 50; counter++) {
const retryName = `${base}_${counter}${ext}`
try {
const file = await folder.createFile(retryName, { overwrite: false })
return { file, name: retryName }
} catch {
continue
}
}
const fallbackFile = await folder.createFile(candidateName, { overwrite: true })
return { file: fallbackFile, name: candidateName }
}
}
export interface ImportAssetOptions {
endpoint: string
apiKey: string
asset: AssetSummary
type: 'raw' | 'proxy'
proxyItem?: ProxyOption
onProgress?: (message: string) => void
}
export interface ImportResult {
success: boolean
cancelled?: boolean
message: string
fileName?: string
}
/**
* Orchestrates the full import workflow:
* 1. Checks active Premiere Pro project
* 2. Prompts user with native folder picker (Frame.io pattern)
* 3. Resolves download URL from Shumai S3 presigned URL
* 4. Resolves unique filename in folder with auto-increment (_1, _2) on collision
* 5. Downloads binary data and writes to disk
* 6. Calls Premiere project.importFiles
*/
export async function importAssetIntoPremiere({
endpoint,
apiKey,
asset,
type,
proxyItem,
onProgress,
}: ImportAssetOptions): Promise<ImportResult> {
// 1. Verify active Premiere project
const project = await getActiveProject()
if (!project) {
return {
success: false,
message: 'Please open or create a project in Premiere Pro first.',
}
}
// 2. Open native folder picker (Frame.io pattern)
const targetFolder = await promptSelectFolder()
if (!targetFolder) {
return {
success: false,
cancelled: true,
message: 'Import cancelled by user.',
}
}
// 3. Determine default filename & download URL
onProgress?.('Preparing download link...')
let downloadUrl: string
let defaultFileName: string
if (type === 'raw') {
const rawInfo = await resolveRawDownloadUrl(endpoint, apiKey, asset.id, asset)
downloadUrl = rawInfo.url
defaultFileName = rawInfo.name || asset.name
} else {
if (!proxyItem?.url) {
throw new Error('Proxy URL not available.')
}
downloadUrl = proxyItem.url
const rawName = asset.name
const dotIndex = rawName.lastIndexOf('.')
const baseName = dotIndex !== -1 ? rawName.slice(0, dotIndex) : rawName
const resTag = proxyItem ? proxyItem.label.split(' ')[0] : 'proxy'
defaultFileName = `${baseName}_proxy_${resTag}.mp4`
}
const resolvedDownloadUrl = resolveAssetUrl(downloadUrl, endpoint) || downloadUrl
// 4. Create unique file in destination folder with collision avoidance (_1, _2)
const { file: saveFile, name: finalFileName } = await createUniqueFileInFolder(
targetFolder,
defaultFileName,
)
// 5. Download binary data
onProgress?.(`Downloading ${finalFileName}...`)
const response = await fetch(resolvedDownloadUrl)
if (!response.ok) {
throw new Error(`Failed to download file (HTTP ${response.status})`)
}
const arrayBuffer = await response.arrayBuffer()
// 6. Write file to disk
onProgress?.(`Saving ${finalFileName} to disk...`)
await writeBinaryFile(saveFile, arrayBuffer)
// 7. Import into Premiere Pro
onProgress?.('Importing into Premiere Pro...')
const imported = await importFilesIntoProject(project, [saveFile.nativePath])
if (!imported) {
throw new Error(`Premiere Pro could not import "${finalFileName}".`)
}
return {
success: true,
fileName: finalFileName,
message: `Successfully imported ${finalFileName} into Premiere Pro.`,
}
}
@@ -0,0 +1,548 @@
import { describe, it, expect, vi, beforeEach } from 'vitest'
import {
saveSequenceLinkToCache,
getSequenceLinkFromCache,
removeSequenceLinkFromCache,
getAllSequenceLinksFromCache,
getAllLinkedSequences,
getSequenceLink,
saveSequenceLink,
removeSequenceLink,
normalizeGuid,
LINK_STORAGE_PROP_KEY,
} from './linkStorage'
import * as commentUtils from './commentUtils'
import type { Project, Sequence } from '@adobe/premierepro'
import type { LinkedSequenceAsset } from '../types/link'
const localStorageMock = (() => {
let store: Record<string, string> = {}
return {
getItem: (key: string) => store[key] || null,
setItem: (key: string, value: string) => {
store[key] = value.toString()
},
removeItem: (key: string) => {
delete store[key]
},
clear: () => {
store = {}
},
key: (index: number) => Object.keys(store)[index] || null,
get length() {
return Object.keys(store).length
},
}
})()
Object.defineProperty(globalThis, 'localStorage', {
value: localStorageMock,
configurable: true,
writable: true,
})
describe('linkStorage service', () => {
beforeEach(() => {
localStorage.clear()
vi.restoreAllMocks()
// Reset global require
// eslint-disable-next-line @typescript-eslint/no-explicit-any
delete (globalThis as any).require
// eslint-disable-next-line @typescript-eslint/no-explicit-any
delete (globalThis as any).window
})
const sampleLink: LinkedSequenceAsset = {
sequenceGuid: 'seq-guid-1',
sequenceName: 'Sequence 01',
assetId: 'asset-1',
assetName: 'video.mp4',
syncedCommentIds: ['comm-1', 'comm-2'],
lastSyncAt: 1000,
totalCommentsSynced: 2,
}
describe('cache operations (localStorage)', () => {
it('saves and retrieves link from cache', () => {
saveSequenceLinkToCache(sampleLink, 'proj-1')
const result = getSequenceLinkFromCache('seq-guid-1', 'proj-1')
expect(result).toEqual(sampleLink)
})
it('saves and retrieves link with endpoint from cache', () => {
const linkWithEndpoint: LinkedSequenceAsset = {
...sampleLink,
endpoint: 'https://staging.shumai.one',
}
saveSequenceLinkToCache(linkWithEndpoint, 'proj-1')
const result = getSequenceLinkFromCache('seq-guid-1', 'proj-1')
expect(result?.endpoint).toBe('https://staging.shumai.one')
})
it('returns null when link is not in cache', () => {
expect(getSequenceLinkFromCache('unknown-seq', 'proj-1')).toBeNull()
})
it('lists all links for a project', () => {
saveSequenceLinkToCache(sampleLink, 'proj-1')
const link2: LinkedSequenceAsset = {
...sampleLink,
sequenceGuid: 'seq-guid-2',
sequenceName: 'Sequence 02',
}
saveSequenceLinkToCache(link2, 'proj-1')
const all = getAllSequenceLinksFromCache('proj-1')
expect(all).toHaveLength(2)
expect(all.map((l) => l.sequenceGuid)).toContain('seq-guid-1')
expect(all.map((l) => l.sequenceGuid)).toContain('seq-guid-2')
})
it('removes a link from cache', () => {
saveSequenceLinkToCache(sampleLink, 'proj-1')
expect(getSequenceLinkFromCache('seq-guid-1', 'proj-1')).not.toBeNull()
removeSequenceLinkFromCache('seq-guid-1', 'proj-1')
expect(getSequenceLinkFromCache('seq-guid-1', 'proj-1')).toBeNull()
})
it('returns all links across projects when projectGuid is omitted', () => {
saveSequenceLinkToCache(sampleLink, 'proj-1')
const link2: LinkedSequenceAsset = {
...sampleLink,
sequenceGuid: 'seq-guid-2',
sequenceName: 'Sequence 02',
assetId: 'asset-2',
}
saveSequenceLinkToCache(link2, 'proj-2')
const all = getAllSequenceLinksFromCache()
expect(all).toHaveLength(2)
expect(all.map((l) => l.sequenceGuid)).toContain('seq-guid-1')
expect(all.map((l) => l.sequenceGuid)).toContain('seq-guid-2')
})
it('does not return links from default cache when projectGuid is specified', () => {
saveSequenceLinkToCache(sampleLink, null)
const result = getAllSequenceLinksFromCache('proj-unknown')
expect(result).toEqual([])
})
})
describe('host sequence properties integration', () => {
it('retrieves persistent property from sequence when available', async () => {
const mockProps = {
getValue: vi.fn().mockReturnValue(JSON.stringify(sampleLink)),
}
const mockPpro = {
Properties: {
getProperties: vi.fn().mockResolvedValue(mockProps),
},
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(globalThis as any).window = {
require: vi.fn().mockImplementation((name: string) => {
if (name === 'premierepro') return mockPpro
return null
}),
}
const mockSeq = { guid: 'seq-guid-1' }
const mockProj = { guid: 'proj-1' }
const link = await getSequenceLink(
mockSeq as unknown as Sequence,
mockProj as unknown as Project,
)
expect(link).toEqual(sampleLink)
expect(mockProps.getValue).toHaveBeenCalledWith(LINK_STORAGE_PROP_KEY)
})
it('saves persistent property and executes transaction', async () => {
const mockCompoundAction = { addAction: vi.fn() }
const mockProps = {
createSetValueAction: vi.fn().mockReturnValue({ id: 'action-set' }),
}
const mockPpro = {
Properties: {
getProperties: vi.fn().mockResolvedValue(mockProps),
PROPERTY_PERSISTENT: 1,
},
Constants: {
PropertyType: { PERSISTENT: 1 },
},
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(globalThis as any).window = {
require: vi.fn().mockImplementation((name: string) => {
if (name === 'premierepro') return mockPpro
return null
}),
}
const mockSeq = { guid: 'seq-guid-1' }
const mockProj = {
guid: 'proj-1',
lockedAccess: vi.fn((cb) => cb()),
executeTransaction: vi.fn((cb) => {
cb(mockCompoundAction)
return true
}),
}
const success = await saveSequenceLink(
mockProj as unknown as Project,
mockSeq as unknown as Sequence,
sampleLink,
)
expect(success).toBe(true)
expect(mockProps.createSetValueAction).toHaveBeenCalledWith(
LINK_STORAGE_PROP_KEY,
JSON.stringify(sampleLink),
1,
)
expect(mockCompoundAction.addAction).toHaveBeenCalledWith({ id: 'action-set' })
})
it('clears persistent property on removeSequenceLink', async () => {
const mockCompoundAction = { addAction: vi.fn() }
const mockProps = {
createClearValueAction: vi.fn().mockReturnValue({ id: 'action-clear' }),
}
const mockPpro = {
Properties: {
getProperties: vi.fn().mockResolvedValue(mockProps),
},
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(globalThis as any).window = {
require: vi.fn().mockImplementation((name: string) => {
if (name === 'premierepro') return mockPpro
return null
}),
}
const mockSeq = { guid: 'seq-guid-1' }
const mockProj = {
guid: 'proj-1',
lockedAccess: vi.fn((cb) => cb()),
executeTransaction: vi.fn((cb) => {
cb(mockCompoundAction)
return true
}),
}
const success = await removeSequenceLink(
mockProj as unknown as Project,
mockSeq as unknown as Sequence,
)
expect(success).toBe(true)
expect(mockProps.createClearValueAction).toHaveBeenCalledWith(LINK_STORAGE_PROP_KEY)
})
it('removes synced markers matching syncedMarkerGuids on removeSequenceLink, preserving manual markers', async () => {
const mockCompoundAction = { addAction: vi.fn() }
const mockProps = {
getValue: vi.fn().mockReturnValue(
JSON.stringify({
...sampleLink,
syncedMarkerGuids: ['synced-marker-1', 'synced-marker-2'],
}),
),
createClearValueAction: vi.fn().mockReturnValue({ id: 'action-clear' }),
}
const mockMarker1 = {
guid: 'synced-marker-1',
name: 'Director (edited)',
comments: 'Edited comment',
}
const mockMarker2 = { guid: 'synced-marker-2', name: 'Producer', comments: 'Another comment' }
const mockManualMarker = {
guid: 'manual-user-marker',
name: 'Editor Note',
comments: 'Manual marker',
}
const mockSeqMarkers = {
getMarkers: vi.fn().mockReturnValue([mockMarker1, mockManualMarker, mockMarker2]),
createRemoveMarkerAction: vi.fn().mockImplementation((marker) => ({
type: 'remove-marker',
guid: marker.guid,
})),
}
const mockPpro = {
Properties: {
getProperties: vi.fn().mockResolvedValue(mockProps),
},
Markers: {
getMarkers: vi.fn().mockResolvedValue(mockSeqMarkers),
},
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(globalThis as any).window = {
require: vi.fn().mockImplementation((name: string) => {
if (name === 'premierepro') return mockPpro
return null
}),
}
const mockSeq = { guid: 'seq-guid-1' }
const mockProj = {
guid: 'proj-1',
lockedAccess: vi.fn((cb) => cb()),
executeTransaction: vi.fn((cb) => {
cb(mockCompoundAction)
return true
}),
}
const success = await removeSequenceLink(
mockProj as unknown as Project,
mockSeq as unknown as Sequence,
)
expect(success).toBe(true)
// Only synced-marker-1 and synced-marker-2 should be removed; manual-user-marker must NOT be removed
expect(mockSeqMarkers.createRemoveMarkerAction).toHaveBeenCalledTimes(2)
expect(mockSeqMarkers.createRemoveMarkerAction).toHaveBeenCalledWith(mockMarker1)
expect(mockSeqMarkers.createRemoveMarkerAction).toHaveBeenCalledWith(mockMarker2)
expect(mockSeqMarkers.createRemoveMarkerAction).not.toHaveBeenCalledWith(mockManualMarker)
expect(mockCompoundAction.addAction).toHaveBeenCalledWith({
type: 'remove-marker',
guid: 'synced-marker-1',
})
expect(mockCompoundAction.addAction).toHaveBeenCalledWith({
type: 'remove-marker',
guid: 'synced-marker-2',
})
expect(mockProps.createClearValueAction).toHaveBeenCalledWith(LINK_STORAGE_PROP_KEY)
})
it('removes markers by comment matching fallback when syncedMarkerGuids is empty', async () => {
localStorage.setItem('shumai_uxp_endpoint', 'https://shumai.example.com')
localStorage.setItem('shumai_uxp_api_key', 'test-api-key')
vi.spyOn(commentUtils, 'fetchAssetComments').mockResolvedValue([
{
id: 'comm-1',
creator: {
id: 'u1',
name: 'Director',
} as unknown as import('@shumai/dtos').CommentInfo['creator'],
message: 'Please trim this scene',
} as unknown as import('@shumai/dtos').CommentInfo,
])
const mockCompoundAction = { addAction: vi.fn() }
const mockProps = {
getValue: vi.fn().mockReturnValue(
JSON.stringify({
...sampleLink,
syncedMarkerGuids: [],
}),
),
createClearValueAction: vi.fn().mockReturnValue({ id: 'action-clear' }),
}
const mockLegacyShumaiMarker = {
guid: 'legacy-guid-1',
getName: () => 'Director',
getComments: () => 'Please trim this scene',
}
const mockManualMarker = {
guid: 'manual-guid-2',
getName: () => 'Editor',
getComments: () => 'My own note',
}
const mockSeqMarkers = {
getMarkers: vi.fn().mockReturnValue([mockLegacyShumaiMarker, mockManualMarker]),
createRemoveMarkerAction: vi.fn().mockImplementation((marker) => ({
type: 'remove-marker',
guid: marker.guid,
})),
}
const mockPpro = {
Properties: {
getProperties: vi.fn().mockResolvedValue(mockProps),
},
Markers: {
getMarkers: vi.fn().mockResolvedValue(mockSeqMarkers),
},
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(globalThis as any).window = {
require: vi.fn().mockImplementation((name: string) => {
if (name === 'premierepro') return mockPpro
return null
}),
}
const mockSeq = { guid: 'seq-guid-1' }
const mockProj = {
guid: 'proj-1',
lockedAccess: vi.fn((cb) => cb()),
executeTransaction: vi.fn((cb) => {
cb(mockCompoundAction)
return true
}),
}
const success = await removeSequenceLink(
mockProj as unknown as Project,
mockSeq as unknown as Sequence,
)
expect(success).toBe(true)
expect(mockSeqMarkers.createRemoveMarkerAction).toHaveBeenCalledWith(mockLegacyShumaiMarker)
expect(mockSeqMarkers.createRemoveMarkerAction).not.toHaveBeenCalledWith(mockManualMarker)
})
it('attempts individual marker removals if compound batch remove returns false', async () => {
const mockCompoundAction = { addAction: vi.fn() }
const mockProps = {
getValue: vi.fn().mockReturnValue(
JSON.stringify({
...sampleLink,
syncedMarkerGuids: ['synced-1'],
}),
),
createClearValueAction: vi.fn().mockReturnValue({ id: 'action-clear' }),
}
const mockMarker = { guid: 'synced-1' }
const mockSeqMarkers = {
getMarkers: vi.fn().mockReturnValue([mockMarker]),
createRemoveMarkerAction: vi.fn().mockReturnValue({ type: 'remove-marker' }),
}
const mockPpro = {
Properties: {
getProperties: vi.fn().mockResolvedValue(mockProps),
},
Markers: {
getMarkers: vi.fn().mockResolvedValue(mockSeqMarkers),
},
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(globalThis as any).window = {
require: vi.fn().mockImplementation((name: string) => {
if (name === 'premierepro') return mockPpro
return null
}),
}
let txCount = 0
const mockProj = {
guid: 'proj-1',
lockedAccess: vi.fn((cb) => cb()),
executeTransaction: vi.fn((cb) => {
txCount++
cb(mockCompoundAction)
if (txCount === 1) return false // batch failed
return true // individual succeeded
}),
}
const mockSeq = { guid: 'seq-guid-1' }
const success = await removeSequenceLink(
mockProj as unknown as Project,
mockSeq as unknown as Sequence,
)
expect(success).toBe(true)
expect(txCount).toBeGreaterThanOrEqual(2)
})
it('skips fallback comment fetch if link endpoint does not match current session endpoint', async () => {
localStorage.setItem('shumai_uxp_endpoint', 'https://staging.shumai.one')
localStorage.setItem('shumai_uxp_api_key', 'test-key')
const fetchCommentsSpy = vi.spyOn(commentUtils, 'fetchAssetComments')
const mockSeq = {
guid: 'seq-diff-endpoint',
name: 'Diff Endpoint Seq',
}
const mockProj = {
guid: 'proj-diff',
lockedAccess: (fn: () => void) => fn(),
executeTransaction: () => true,
}
const linkFromLocal: LinkedSequenceAsset = {
...sampleLink,
sequenceGuid: 'seq-diff-endpoint',
endpoint: 'http://localhost:3000',
syncedMarkerGuids: [], // Trigger fallback
}
saveSequenceLinkToCache(linkFromLocal, 'proj-diff')
await removeSequenceLink(mockProj as unknown as Project, mockSeq as unknown as Sequence)
expect(fetchCommentsSpy).not.toHaveBeenCalled()
})
})
describe('getAllLinkedSequences', () => {
it('does not leak cached links across projects when a project has an empty sequence list', async () => {
saveSequenceLinkToCache(sampleLink, 'proj-A')
const defaultLink: LinkedSequenceAsset = {
...sampleLink,
sequenceGuid: 'seq-default',
sequenceName: 'Default Seq',
}
saveSequenceLinkToCache(defaultLink, null)
const mockProjB = {
guid: 'proj-B',
getSequences: vi.fn().mockResolvedValue([]),
}
const results = await getAllLinkedSequences(mockProjB as unknown as Project, [])
expect(results).toEqual([])
})
it('restores cached link only if the sequence actually exists in the project', async () => {
saveSequenceLinkToCache(sampleLink, 'proj-A')
const mockSeq1 = { guid: 'seq-guid-1' }
const mockSeq2 = { guid: 'seq-guid-2' }
const mockProjA = {
guid: 'proj-A',
getSequences: vi.fn().mockResolvedValue([mockSeq1]),
}
const results = await getAllLinkedSequences(mockProjA as unknown as Project, [
mockSeq1 as unknown as Sequence,
])
expect(results).toHaveLength(1)
expect(results[0].sequenceGuid).toBe('seq-guid-1')
const resultsSeq2 = await getAllLinkedSequences(mockProjA as unknown as Project, [
mockSeq2 as unknown as Sequence,
])
expect(resultsSeq2).toHaveLength(0)
})
})
describe('normalizeGuid', () => {
it('normalizes GUIDs with uppercase, braces, whitespace, and objects', () => {
expect(normalizeGuid('{1234-ABCD-5678}')).toBe('1234-abcd-5678')
expect(normalizeGuid(' ABC-DEF ')).toBe('abc-def')
expect(normalizeGuid({ toString: () => '{Guid-Obj}' })).toBe('guid-obj')
expect(normalizeGuid(null)).toBe('')
expect(normalizeGuid(undefined)).toBe('')
})
})
})
@@ -0,0 +1,472 @@
import type { Marker, Project, Sequence } from '@adobe/premierepro'
import { getPremiereModule } from './premiere'
import type { LinkedSequenceAsset } from '../types/link'
import { getStoredCredentials } from './storage'
import { fetchAssetComments, formatCommentBody } from './commentUtils'
import { isSameEndpoint } from '../utils/url'
export const LINK_STORAGE_PROP_KEY = 'shumai_linked_asset'
const STORAGE_PREFIX = '@shumai/premiere-uxp:project-links'
/**
* Normalizes a GUID or string identifier by removing curly braces,
* trimming whitespace, and converting to lower case for reliable comparison.
*/
export function normalizeGuid(guid: unknown): string {
if (!guid) return ''
const str =
typeof guid === 'string'
? guid
: typeof (guid as { toString?: () => string }).toString === 'function'
? (guid as { toString: () => string }).toString()
: String(guid)
return str.trim().toLowerCase().replace(/[{}]/g, '')
}
function getStorageKey(projectGuid?: string | null): string {
return `${STORAGE_PREFIX}:${projectGuid ? normalizeGuid(projectGuid) : 'default'}`
}
/**
* Reads all cached sequence links for a project from localStorage.
* If projectGuid is omitted or null, aggregates across all project keys in localStorage.
*/
export function getAllSequenceLinksFromCache(projectGuid?: string | null): LinkedSequenceAsset[] {
if (typeof localStorage === 'undefined') return []
try {
const normProj = projectGuid ? normalizeGuid(projectGuid) : null
if (normProj) {
const raw = localStorage.getItem(getStorageKey(normProj))
if (raw) {
const parsed = JSON.parse(raw)
if (Array.isArray(parsed)) return parsed
if (typeof parsed === 'object' && parsed !== null) {
return Object.values(parsed)
}
}
return []
}
// When projectGuid is not provided, aggregate all cached sequence links
const results: LinkedSequenceAsset[] = []
const seenGuids = new Set<string>()
// Check default key
const defaultRaw = localStorage.getItem(getStorageKey(null))
if (defaultRaw) {
try {
const parsed = JSON.parse(defaultRaw)
const items: LinkedSequenceAsset[] = Array.isArray(parsed)
? parsed
: typeof parsed === 'object' && parsed !== null
? Object.values(parsed)
: []
for (const item of items) {
const normSeq = normalizeGuid(item.sequenceGuid)
if (normSeq && !seenGuids.has(normSeq)) {
seenGuids.add(normSeq)
results.push(item)
}
}
} catch {
// Ignore JSON error
}
}
// Scan all keys matching STORAGE_PREFIX in localStorage
if (typeof localStorage.length === 'number') {
for (let i = 0; i < localStorage.length; i++) {
const key = typeof localStorage.key === 'function' ? localStorage.key(i) : null
if (key && key.startsWith(STORAGE_PREFIX)) {
const raw = localStorage.getItem(key)
if (raw) {
try {
const parsed = JSON.parse(raw)
const items: LinkedSequenceAsset[] = Array.isArray(parsed)
? parsed
: typeof parsed === 'object' && parsed !== null
? Object.values(parsed)
: []
for (const item of items) {
const normSeq = normalizeGuid(item.sequenceGuid)
if (normSeq && !seenGuids.has(normSeq)) {
seenGuids.add(normSeq)
results.push(item)
}
}
} catch {
// Ignore corrupted item
}
}
}
}
}
return results
} catch (err) {
console.warn('[linkStorage] Failed to read cached links from localStorage:', err)
return []
}
}
/**
* Gets a cached sequence link by sequence GUID from localStorage.
*/
export function getSequenceLinkFromCache(
sequenceGuid: string,
projectGuid?: string | null,
): LinkedSequenceAsset | null {
const normSeq = normalizeGuid(sequenceGuid)
const all = getAllSequenceLinksFromCache(projectGuid)
return all.find((item) => normalizeGuid(item.sequenceGuid) === normSeq) || null
}
/**
* Saves a sequence link in the local cache.
*/
export function saveSequenceLinkToCache(
linkData: LinkedSequenceAsset,
projectGuid?: string | null,
): void {
if (typeof localStorage === 'undefined') return
try {
const normSeq = normalizeGuid(linkData.sequenceGuid)
const normalizedData: LinkedSequenceAsset = {
...linkData,
sequenceGuid: normSeq,
...(linkData.syncedMarkerGuids != null
? { syncedMarkerGuids: linkData.syncedMarkerGuids.map(normalizeGuid).filter(Boolean) }
: {}),
}
if (projectGuid) {
const all = getAllSequenceLinksFromCache(projectGuid).filter(
(item) => normalizeGuid(item.sequenceGuid) !== normSeq,
)
all.push(normalizedData)
localStorage.setItem(getStorageKey(projectGuid), JSON.stringify(all))
}
// Always also update default key so it's accessible when projectGuid is unknown
const defaultAll = getAllSequenceLinksFromCache(null).filter(
(item) => normalizeGuid(item.sequenceGuid) !== normSeq,
)
defaultAll.push(normalizedData)
localStorage.setItem(getStorageKey(null), JSON.stringify(defaultAll))
} catch (err) {
console.warn('[linkStorage] Failed to save link to localStorage:', err)
}
}
/**
* Removes a sequence link from the local cache.
*/
export function removeSequenceLinkFromCache(
sequenceGuid: string,
projectGuid?: string | null,
): void {
if (typeof localStorage === 'undefined') return
try {
const normSeq = normalizeGuid(sequenceGuid)
if (projectGuid) {
const all = getAllSequenceLinksFromCache(projectGuid).filter(
(item) => normalizeGuid(item.sequenceGuid) !== normSeq,
)
localStorage.setItem(getStorageKey(projectGuid), JSON.stringify(all))
}
const defaultAll = getAllSequenceLinksFromCache(null).filter(
(item) => normalizeGuid(item.sequenceGuid) !== normSeq,
)
localStorage.setItem(getStorageKey(null), JSON.stringify(defaultAll))
// Also remove from any other keys matching STORAGE_PREFIX
if (typeof localStorage.length === 'number') {
for (let i = 0; i < localStorage.length; i++) {
const key = typeof localStorage.key === 'function' ? localStorage.key(i) : null
if (key && key.startsWith(STORAGE_PREFIX)) {
const raw = localStorage.getItem(key)
if (raw) {
try {
const parsed = JSON.parse(raw)
if (Array.isArray(parsed)) {
const filtered = parsed.filter(
(item) => normalizeGuid(item.sequenceGuid) !== normSeq,
)
localStorage.setItem(key, JSON.stringify(filtered))
}
} catch {
// Ignore
}
}
}
}
}
} catch (err) {
console.warn('[linkStorage] Failed to remove link from localStorage:', err)
}
}
/**
* Retrieves the persistent link metadata from a sequence's properties.
*/
export async function getSequenceLink(
sequence: Sequence,
project?: Project | null,
): Promise<LinkedSequenceAsset | null> {
const ppro = getPremiereModule()
const seqGuidStr = normalizeGuid(sequence.guid)
const prGuidStr = project?.guid ? normalizeGuid(project.guid) : null
// Check persistent sequence properties in Premiere
if (ppro?.Properties) {
try {
const properties = await ppro.Properties.getProperties(sequence)
const raw = properties.getValue(LINK_STORAGE_PROP_KEY)
if (raw) {
const parsed = JSON.parse(raw) as LinkedSequenceAsset
// Synchronize with cache
saveSequenceLinkToCache(parsed, prGuidStr)
return parsed
}
} catch (err) {
// Property might not exist or failed to load
console.debug('[linkStorage] No persistent property found or failed:', err)
}
}
// Fallback to local cache if sequence property was not available
return getSequenceLinkFromCache(seqGuidStr, prGuidStr)
}
/**
* Retrieves all linked sequence assets across a project.
*/
export async function getAllLinkedSequences(
project: Project,
allSequences?: Sequence[],
): Promise<LinkedSequenceAsset[]> {
const prGuidStr = project.guid ? normalizeGuid(project.guid) : null
const seqs = allSequences || (await project.getSequences()) || []
const results: LinkedSequenceAsset[] = []
const checkedGuids = new Set<string>()
for (const seq of seqs) {
const seqGuid = normalizeGuid(seq.guid)
if (seqGuid) checkedGuids.add(seqGuid)
const link = await getSequenceLink(seq, project)
if (link) {
results.push(link)
}
}
// Also check cache for any items matching known sequences
const cached = getAllSequenceLinksFromCache(prGuidStr)
for (const item of cached) {
const normItemSeq = normalizeGuid(item.sequenceGuid)
if (!results.some((r) => normalizeGuid(r.sequenceGuid) === normItemSeq)) {
if (checkedGuids.has(normItemSeq)) {
results.push(item)
}
}
}
return results
}
/**
* Saves the link metadata persistently on the sequence and in the cache.
*/
export async function saveSequenceLink(
project: Project,
sequence: Sequence,
linkData: LinkedSequenceAsset,
): Promise<boolean> {
const ppro = getPremiereModule()
const prGuidStr = project.guid ? normalizeGuid(project.guid) : null
// Always update cache first
saveSequenceLinkToCache(linkData, prGuidStr)
if (!ppro?.Properties) {
return true
}
try {
const properties = await ppro.Properties.getProperties(sequence)
const persistentType =
ppro.Constants?.PropertyType?.PERSISTENT ?? ppro.Properties.PROPERTY_PERSISTENT ?? 0
let success = false
project.lockedAccess(() => {
success = project.executeTransaction((compoundAction) => {
const setValAction = properties.createSetValueAction(
LINK_STORAGE_PROP_KEY,
JSON.stringify(linkData),
persistentType,
)
compoundAction.addAction(setValAction)
}, 'Save Shumai Link')
})
return success
} catch (err) {
console.warn('[linkStorage] Failed to set sequence persistent property:', err)
return true // Local cache succeeded
}
}
/**
* Removes the persistent link metadata from the sequence and cache,
* and deletes any markers that were synced from Shumai (matching Frame.io behavior).
*/
export async function removeSequenceLink(project: Project, sequence: Sequence): Promise<boolean> {
const ppro = getPremiereModule()
const seqGuidStr = normalizeGuid(sequence.guid)
const prGuidStr = project.guid ? normalizeGuid(project.guid) : null
console.log('[linkStorage] removeSequenceLink called for sequence:', sequence.name || seqGuidStr)
// Retrieve link metadata before clearing, to identify synced marker GUIDs
let linkData = await getSequenceLink(sequence, project)
if (!linkData) {
const cached = getAllSequenceLinksFromCache(prGuidStr)
linkData = cached.find((item) => normalizeGuid(item.sequenceGuid) === seqGuidStr) || null
}
console.log(
'[linkStorage] Retrieved linkData:',
linkData ? { assetId: linkData.assetId, guidsCount: linkData.syncedMarkerGuids?.length } : null,
)
// Remove from cache
removeSequenceLinkFromCache(seqGuidStr, prGuidStr)
// Remove synced markers from the sequence timeline
if (ppro?.Markers) {
try {
const sequenceMarkers = await ppro.Markers.getMarkers(sequence)
const allMarkers = sequenceMarkers.getMarkers() || []
console.log('[linkStorage] Found', allMarkers.length, 'markers on sequence timeline')
const targetGuids = new Set(
(linkData?.syncedMarkerGuids || []).map(normalizeGuid).filter(Boolean),
)
console.log('[linkStorage] targetGuids count:', targetGuids.size)
const markersToRemove: Marker[] = []
// 1. Match markers by GUID
if (targetGuids.size > 0) {
for (const m of allMarkers) {
const g = normalizeGuid(m.guid)
if (g && targetGuids.has(g)) {
markersToRemove.push(m)
}
}
}
// 2. Fallback: If targetGuids was empty/missing or didn't find markers, match by asset comments
if (markersToRemove.length === 0 && linkData?.assetId) {
console.log(
'[linkStorage] Fallback: attempting comment-based marker identification for asset:',
linkData.assetId,
)
try {
const creds = getStoredCredentials()
const canFetchComments =
creds?.endpoint &&
creds?.apiKey &&
(!linkData.endpoint || isSameEndpoint(linkData.endpoint, creds.endpoint))
if (canFetchComments) {
const comments = await fetchAssetComments(
creds.endpoint,
creds.apiKey,
linkData.assetId,
)
for (const comm of comments) {
const commBody = formatCommentBody(comm)
const commAuthor = comm.creator?.name || 'Comment'
for (const m of allMarkers) {
if (markersToRemove.includes(m)) continue
try {
const mName = m.getName()
const mComments = m.getComments()
if (
(mName === commAuthor && mComments === commBody) ||
(mComments && comm.message && mComments.includes(comm.message))
) {
markersToRemove.push(m)
break
}
} catch {
// ignore
}
}
}
}
} catch (err) {
console.warn('[linkStorage] Fallback comment fetch failed:', err)
}
}
console.log('[linkStorage] Total markers to remove:', markersToRemove.length)
if (markersToRemove.length > 0) {
let removeSuccess = false
try {
project.lockedAccess(() => {
removeSuccess = project.executeTransaction((compoundAction) => {
for (const marker of markersToRemove) {
const removeAction = sequenceMarkers.createRemoveMarkerAction(marker)
compoundAction.addAction(removeAction)
}
}, 'Remove Shumai Synced Markers')
})
} catch (err) {
console.error('[linkStorage] executeTransaction batch remove failed:', err)
}
console.log('[linkStorage] Batch remove result:', removeSuccess)
// If batch compound action did not succeed, attempt individual removals
if (!removeSuccess) {
console.warn('[linkStorage] Batch remove returned false, attempting individual removals')
for (const marker of markersToRemove) {
try {
project.lockedAccess(() => {
project.executeTransaction((compoundAction) => {
const removeAction = sequenceMarkers.createRemoveMarkerAction(marker)
compoundAction.addAction(removeAction)
}, 'Remove Shumai Synced Marker')
})
} catch (indErr) {
console.warn('[linkStorage] Failed individual remove:', indErr)
}
}
}
}
} catch (err) {
console.warn('[linkStorage] Failed to remove synced markers from sequence:', err)
}
}
if (!ppro?.Properties) {
return true
}
try {
const properties = await ppro.Properties.getProperties(sequence)
let success = false
project.lockedAccess(() => {
success = project.executeTransaction((compoundAction) => {
const clearAction = properties.createClearValueAction(LINK_STORAGE_PROP_KEY)
compoundAction.addAction(clearAction)
}, 'Unlink Shumai Asset')
})
console.log('[linkStorage] Clear property result:', success)
return success
} catch (err) {
console.warn('[linkStorage] Failed to clear sequence persistent property:', err)
return true // Cache was cleared
}
}
@@ -0,0 +1,405 @@
import { describe, it, expect, vi, beforeEach } from 'vitest'
import { formatCommentBody, syncCommentsToSequence } from './markers'
import type { Project, Sequence } from '@adobe/premierepro'
import type { CommentInfo } from '@shumai/dtos'
import type { LinkedSequenceAsset } from '../types/link'
const localStorageMock = (() => {
let store: Record<string, string> = {}
return {
getItem: (key: string) => store[key] || null,
setItem: (key: string, value: string) => {
store[key] = value.toString()
},
removeItem: (key: string) => {
delete store[key]
},
clear: () => {
store = {}
},
}
})()
Object.defineProperty(globalThis, 'localStorage', {
value: localStorageMock,
configurable: true,
writable: true,
})
describe('markers service', () => {
beforeEach(() => {
localStorage.clear()
vi.restoreAllMocks()
// Reset global require
// eslint-disable-next-line @typescript-eslint/no-explicit-any
delete (globalThis as any).require
// eslint-disable-next-line @typescript-eslint/no-explicit-any
delete (globalThis as any).window
})
describe('formatCommentBody', () => {
it('formats simple comment without replies', () => {
const comment: Partial<CommentInfo> = {
message: 'This is a test comment',
replies: [],
}
expect(formatCommentBody(comment as CommentInfo)).toBe('This is a test comment')
})
it('appends formatted replies beneath message', () => {
const comment: Partial<CommentInfo> = {
message: 'Original cut feedback',
replies: [
{
creator: { id: 'u2', name: 'Alice' },
message: 'Fixed in v2',
} as unknown as CommentInfo,
{
creator: { id: 'u3', name: 'Bob' },
message: 'Looks great now',
} as unknown as CommentInfo,
],
}
const formatted = formatCommentBody(comment as CommentInfo)
expect(formatted).toContain('Original cut feedback')
expect(formatted).toContain('--- Replies ---')
expect(formatted).toContain('Alice: Fixed in v2')
expect(formatted).toContain('Bob: Looks great now')
})
})
describe('syncCommentsToSequence', () => {
const existingLink: LinkedSequenceAsset = {
sequenceGuid: 'seq-guid-1',
sequenceName: 'Seq 1',
assetId: 'asset-1',
assetName: 'test.mp4',
syncedCommentIds: ['comm-1'],
lastSyncAt: 1000,
totalCommentsSynced: 1,
}
it('returns without creating markers if no new comments exist', async () => {
const comments: Partial<CommentInfo>[] = [
{ id: 'comm-1', second: 10, message: 'Already synced' },
]
const mockProject = {
guid: 'proj-1',
lockedAccess: vi.fn(),
executeTransaction: vi.fn(),
}
const mockSeq = { guid: 'seq-guid-1' }
const result = await syncCommentsToSequence(
mockProject as unknown as Project,
mockSeq as unknown as Sequence,
comments as CommentInfo[],
existingLink,
)
expect(result.addedCount).toBe(0)
expect(result.updatedLink.syncedCommentIds).toEqual(['comm-1'])
expect(mockProject.executeTransaction).not.toHaveBeenCalled()
})
it('creates markers for new comments, placing non-timestamped comments at time 0 (zeroPoint)', async () => {
const mockCompoundAction = { addAction: vi.fn() }
let callCount = 0
const mockSeqMarkers = {
getMarkers: vi.fn().mockImplementation(() => {
callCount++
if (callCount === 1) {
return [{ guid: 'old-guid-1' }]
}
return [{ guid: 'old-guid-1' }, { guid: 'marker-guid-2' }, { guid: 'marker-guid-3' }]
}),
createAddMarkerAction: vi.fn().mockImplementation((name, type, time, dur, comment) => {
return { name, type, time, dur, comment }
}),
}
const mockPpro = {
Marker: { MARKER_TYPE_COMMENT: 'CommentMarkerType' },
Markers: {
getMarkers: vi.fn().mockResolvedValue(mockSeqMarkers),
},
TickTime: {
TIME_ZERO: { ticks: '0' },
createWithSeconds: vi.fn((sec) => ({ seconds: sec })),
},
Properties: {
getProperties: vi.fn().mockResolvedValue({
createSetValueAction: vi.fn().mockReturnValue({}),
}),
},
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(globalThis as any).window = {
require: vi.fn().mockImplementation((name: string) => {
if (name === 'premierepro') return mockPpro
return null
}),
}
const comments: Partial<CommentInfo>[] = [
{ id: 'comm-1', second: 10, message: 'Already synced' },
{
id: 'comm-2',
second: 15.5,
message: 'New timestamped comment',
creator: { id: 'u1', name: 'Director' } as unknown as CommentInfo['creator'],
replies: [],
},
{
id: 'comm-3',
second: null,
message: 'General comment without timestamp',
creator: { id: 'u2', name: 'Producer' } as unknown as CommentInfo['creator'],
replies: [],
},
]
const mockProject = {
guid: 'proj-1',
lockedAccess: vi.fn((cb) => cb()),
executeTransaction: vi.fn((cb) => {
cb(mockCompoundAction)
return true
}),
}
const mockSeq = {
guid: 'seq-guid-1',
getZeroPoint: vi.fn().mockResolvedValue({ seconds: 3600 }), // 1hr timecode start
}
const result = await syncCommentsToSequence(
mockProject as unknown as Project,
mockSeq as unknown as Sequence,
comments as CommentInfo[],
existingLink,
)
expect(result.addedCount).toBe(2)
expect(result.updatedLink.syncedCommentIds).toEqual(['comm-1', 'comm-2', 'comm-3'])
expect(result.updatedLink.syncedMarkerGuids).toEqual(['marker-guid-2', 'marker-guid-3'])
expect(result.updatedLink.totalCommentsSynced).toBe(3)
// Time should be offset by zeroPoint (3600 + 15.5 = 3615.5 for comm-2, 3600 + 0 = 3600 for comm-3)
expect(mockPpro.TickTime.createWithSeconds).toHaveBeenCalledWith(3615.5)
expect(mockPpro.TickTime.createWithSeconds).toHaveBeenCalledWith(3600)
expect(mockSeqMarkers.createAddMarkerAction).toHaveBeenCalledWith(
'Director',
'CommentMarkerType',
{ seconds: 3615.5 },
mockPpro.TickTime.TIME_ZERO,
'New timestamped comment',
)
expect(mockSeqMarkers.createAddMarkerAction).toHaveBeenCalledWith(
'Producer',
'CommentMarkerType',
{ seconds: 3600 },
mockPpro.TickTime.TIME_ZERO,
'General comment without timestamp',
)
expect(mockSeqMarkers.createAddMarkerAction).toHaveBeenCalledTimes(2)
expect(mockCompoundAction.addAction).toHaveBeenCalled()
})
it('backfills missing marker GUIDs from sequence when syncedMarkerGuids is incomplete', async () => {
const existingLink: LinkedSequenceAsset = {
sequenceGuid: 'seq-guid-1',
sequenceName: 'Sequence 01',
assetId: 'asset-1',
assetName: 'video.mp4',
syncedCommentIds: ['comm-1'],
syncedMarkerGuids: [], // missing GUIDs from previous sync
totalCommentsSynced: 1,
lastSyncAt: 1000,
}
const mockLegacyMarker = {
guid: '{LEGACY-MARKER-GUID-1}',
getName: () => 'Director',
getComments: () => 'Existing comment message',
}
const mockSeqMarkers = {
getMarkers: vi.fn().mockReturnValue([mockLegacyMarker]),
createAddMarkerAction: vi.fn(),
}
const mockPpro = {
Marker: { MARKER_TYPE_COMMENT: 'CommentMarkerType' },
Markers: {
getMarkers: vi.fn().mockResolvedValue(mockSeqMarkers),
},
TickTime: {
TIME_ZERO: { ticks: '0' },
createWithSeconds: vi.fn((sec) => ({ seconds: sec })),
},
Properties: {
getProperties: vi.fn().mockResolvedValue({
createSetValueAction: vi.fn().mockReturnValue({}),
}),
},
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(globalThis as any).window = {
require: vi.fn().mockImplementation((name: string) => {
if (name === 'premierepro') return mockPpro
return null
}),
}
const comments: Partial<CommentInfo>[] = [
{
id: 'comm-1',
second: 10,
message: 'Existing comment message',
creator: { id: 'u1', name: 'Director' } as unknown as CommentInfo['creator'],
replies: [],
},
]
const mockProject = {
guid: 'proj-1',
lockedAccess: vi.fn((cb) => cb()),
executeTransaction: vi.fn(),
}
const mockSeq = {
guid: 'seq-guid-1',
getZeroPoint: vi.fn().mockResolvedValue({ seconds: 0 }),
}
const result = await syncCommentsToSequence(
mockProject as unknown as Project,
mockSeq as unknown as Sequence,
comments as CommentInfo[],
existingLink,
)
expect(result.addedCount).toBe(0)
expect(result.updatedLink.syncedMarkerGuids).toEqual(['legacy-marker-guid-1'])
expect(mockSeqMarkers.createAddMarkerAction).not.toHaveBeenCalled()
})
it('does not advance synced comments when executeTransaction returns false', async () => {
const mockSeqMarkers = {
getMarkers: vi.fn().mockReturnValue([]),
createAddMarkerAction: vi.fn().mockReturnValue({}),
}
const mockPpro = {
Marker: { MARKER_TYPE_COMMENT: 'CommentMarkerType' },
Markers: {
getMarkers: vi.fn().mockResolvedValue(mockSeqMarkers),
},
TickTime: {
TIME_ZERO: { ticks: '0' },
createWithSeconds: vi.fn((sec) => ({ seconds: sec })),
},
Properties: {
getProperties: vi.fn().mockResolvedValue({
createSetValueAction: vi.fn().mockReturnValue({}),
}),
},
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(globalThis as any).window = {
require: vi.fn().mockImplementation((name: string) => {
if (name === 'premierepro') return mockPpro
return null
}),
}
const comments: Partial<CommentInfo>[] = [
{ id: 'comm-1', second: 10, message: 'Already synced' },
{ id: 'comm-2', second: 20, message: 'New comment' },
]
const mockProject = {
guid: 'proj-1',
lockedAccess: vi.fn((cb) => cb()),
executeTransaction: vi.fn().mockReturnValue(false),
}
const mockSeq = {
guid: 'seq-guid-1',
getZeroPoint: vi.fn().mockResolvedValue({ seconds: 0 }),
}
const result = await syncCommentsToSequence(
mockProject as unknown as Project,
mockSeq as unknown as Sequence,
comments as CommentInfo[],
existingLink,
)
expect(result.addedCount).toBe(0)
expect(result.updatedLink.syncedCommentIds).toEqual(['comm-1'])
expect(result.updatedLink.totalCommentsSynced).toBe(1)
})
it('does not advance synced comments when executeTransaction throws an error', async () => {
const mockSeqMarkers = {
getMarkers: vi.fn().mockReturnValue([]),
createAddMarkerAction: vi.fn().mockReturnValue({}),
}
const mockPpro = {
Marker: { MARKER_TYPE_COMMENT: 'CommentMarkerType' },
Markers: {
getMarkers: vi.fn().mockResolvedValue(mockSeqMarkers),
},
TickTime: {
TIME_ZERO: { ticks: '0' },
createWithSeconds: vi.fn((sec) => ({ seconds: sec })),
},
Properties: {
getProperties: vi.fn().mockResolvedValue({
createSetValueAction: vi.fn().mockReturnValue({}),
}),
},
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(globalThis as any).window = {
require: vi.fn().mockImplementation((name: string) => {
if (name === 'premierepro') return mockPpro
return null
}),
}
const comments: Partial<CommentInfo>[] = [
{ id: 'comm-1', second: 10, message: 'Already synced' },
{ id: 'comm-2', second: 20, message: 'New comment' },
]
const mockProject = {
guid: 'proj-1',
lockedAccess: vi.fn(() => {
throw new Error('Transaction execution crashed')
}),
executeTransaction: vi.fn(),
}
const mockSeq = {
guid: 'seq-guid-1',
getZeroPoint: vi.fn().mockResolvedValue({ seconds: 0 }),
}
const result = await syncCommentsToSequence(
mockProject as unknown as Project,
mockSeq as unknown as Sequence,
comments as CommentInfo[],
existingLink,
)
expect(result.addedCount).toBe(0)
expect(result.updatedLink.syncedCommentIds).toEqual(['comm-1'])
expect(result.updatedLink.totalCommentsSynced).toBe(1)
})
})
})
+179
View File
@@ -0,0 +1,179 @@
import type { Project, Sequence } from '@adobe/premierepro'
import { getPremiereModule } from './premiere'
import type { LinkedSequenceAsset } from '../types/link'
import { normalizeGuid, saveSequenceLink } from './linkStorage'
import type { CommentInfo } from '@shumai/dtos'
import { fetchAssetComments, formatCommentBody } from './commentUtils'
export { fetchAssetComments, formatCommentBody }
export interface SyncCommentsResult {
updatedLink: LinkedSequenceAsset
addedCount: number
}
/**
* Synchronizes new Shumai comments to a Premiere Pro sequence as markers.
* Comments without timestamps (`second == null`) default to time 0 (sequence start),
* matching Frame.io convention. Newly created marker GUIDs are captured and stored
* so they can be accurately removed when the sequence is unlinked.
*/
export async function syncCommentsToSequence(
project: Project,
sequence: Sequence,
comments: CommentInfo[],
existingLink: LinkedSequenceAsset,
): Promise<SyncCommentsResult> {
const ppro = getPremiereModule()
const now = Date.now()
// Filter comments that have not been synced yet; non-timestamped comments default to time 0
const alreadySyncedSet = new Set(existingLink.syncedCommentIds)
const newComments = comments.filter((c) => !alreadySyncedSet.has(c.id))
const currentMarkerGuids = (existingLink.syncedMarkerGuids || [])
.map(normalizeGuid)
.filter(Boolean)
const needsGuidBackfill =
currentMarkerGuids.length < (existingLink.syncedCommentIds?.length || 0) &&
ppro?.Markers != null
if (newComments.length === 0 && !needsGuidBackfill) {
const updatedLink: LinkedSequenceAsset = {
...existingLink,
lastSyncAt: now,
}
await saveSequenceLink(project, sequence, updatedLink)
return { updatedLink, addedCount: 0 }
}
if (!ppro?.Markers || !ppro?.TickTime) {
console.warn('[markers] premierepro Markers or TickTime module not available')
return { updatedLink: existingLink, addedCount: 0 }
}
const newMarkerGuids: string[] = []
try {
const sequenceMarkers = await ppro.Markers.getMarkers(sequence)
let zeroPointSeconds = 0
try {
const zeroPoint = await sequence.getZeroPoint()
if (zeroPoint && typeof zeroPoint.seconds === 'number') {
zeroPointSeconds = zeroPoint.seconds
}
} catch {
// zeroPoint defaults to 0
}
// Capture existing marker GUIDs before adding new markers
let beforeGuids = new Set<string>()
try {
const beforeMarkers = sequenceMarkers.getMarkers() || []
beforeGuids = new Set(beforeMarkers.map((m) => normalizeGuid(m.guid)).filter(Boolean))
console.log('[markers] Existing markers before sync:', beforeMarkers.length)
} catch (err) {
console.warn('[markers] Could not get existing markers before sync:', err)
}
if (newComments.length > 0) {
let txSuccess = false
project.lockedAccess(() => {
txSuccess =
project.executeTransaction((compoundAction) => {
for (const comment of newComments) {
const markerSeconds = zeroPointSeconds + (comment.second ?? 0)
const startTime = ppro.TickTime.createWithSeconds(markerSeconds)
const duration = ppro.TickTime.TIME_ZERO
const markerName = comment.creator?.name || 'Comment'
const markerText = formatCommentBody(comment)
const addMarkerAction = sequenceMarkers.createAddMarkerAction(
markerName,
ppro.Marker.MARKER_TYPE_COMMENT,
startTime,
duration,
markerText,
)
compoundAction.addAction(addMarkerAction)
}
}, 'Sync Shumai Comments') === true
})
console.log('[markers] executeTransaction result:', txSuccess)
if (!txSuccess) {
console.warn('[markers] Failed to execute add markers transaction (returned false)')
return { updatedLink: existingLink, addedCount: 0 }
}
}
// Re-fetch fresh Markers object after transaction to ensure newly committed markers are seen
const freshSequenceMarkers = await ppro.Markers.getMarkers(sequence)
const afterMarkers = freshSequenceMarkers.getMarkers() || []
console.log('[markers] Markers after sync transaction:', afterMarkers.length)
// 1. Identify newly added markers by GUID difference
for (const m of afterMarkers) {
const guidStr = normalizeGuid(m.guid)
if (guidStr && !beforeGuids.has(guidStr) && !newMarkerGuids.includes(guidStr)) {
newMarkerGuids.push(guidStr)
}
}
// 2. Fallback / Backfill: Match any comment markers by content/author
const allExpectedComments = [...newComments]
if (needsGuidBackfill) {
const alreadySyncedComments = comments.filter((c) => alreadySyncedSet.has(c.id))
allExpectedComments.push(...alreadySyncedComments)
}
const currentKnownGuids = new Set([...currentMarkerGuids, ...newMarkerGuids])
for (const comment of allExpectedComments) {
const commentBody = formatCommentBody(comment)
const commentAuthor = comment.creator?.name || 'Comment'
for (const m of afterMarkers) {
const g = normalizeGuid(m.guid)
if (!g || currentKnownGuids.has(g)) continue
try {
const mName = m.getName()
const mComments = m.getComments()
if (
(mName === commentAuthor && mComments === commentBody) ||
(mComments && comment.message && mComments.includes(comment.message))
) {
newMarkerGuids.push(g)
currentKnownGuids.add(g)
break
}
} catch {
// ignore
}
}
}
console.log(
'[markers] Total newly captured/backfilled marker GUIDs:',
newMarkerGuids.length,
newMarkerGuids,
)
const updatedMarkerGuids = Array.from(
new Set([...currentMarkerGuids, ...newMarkerGuids.map(normalizeGuid)]),
)
const updatedLink: LinkedSequenceAsset = {
...existingLink,
syncedCommentIds: [...existingLink.syncedCommentIds, ...newComments.map((c) => c.id)],
syncedMarkerGuids: updatedMarkerGuids,
totalCommentsSynced: existingLink.totalCommentsSynced + newComments.length,
lastSyncAt: now,
}
await saveSequenceLink(project, sequence, updatedLink)
return { updatedLink, addedCount: newComments.length }
} catch (err) {
console.error('[markers] Failed to execute add markers transaction:', err)
return { updatedLink: existingLink, addedCount: 0 }
}
}
@@ -0,0 +1,248 @@
import { describe, it, expect, vi, beforeEach } from 'vitest'
import {
getActiveProject,
importFilesIntoProject,
promptSelectFolder,
promptSaveFile,
writeBinaryFile,
getPremiereModule,
getUxpModule,
} from './premiere'
import type { Project, Sequence } from '@adobe/premierepro'
describe('premiere service', () => {
beforeEach(() => {
vi.restoreAllMocks()
// Reset any global require mocks on globalThis
// eslint-disable-next-line @typescript-eslint/no-explicit-any
delete (globalThis as any).require
// Reset window mock on globalThis
// eslint-disable-next-line @typescript-eslint/no-explicit-any
delete (globalThis as any).window
})
describe('module getters', () => {
it('returns null when premierepro is not available', () => {
expect(getPremiereModule()).toBeNull()
})
it('returns null when uxp is not available', () => {
expect(getUxpModule()).toBeNull()
})
it('resolves premiere module from global require when present', () => {
const mockPpro = { Project: { getActiveProject: vi.fn() } }
// Mocking UXP window environment on globalThis
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(globalThis as any).window = {
require: vi.fn().mockImplementation((name: string) => {
if (name === 'premierepro') return mockPpro
return null
}),
}
expect(getPremiereModule()).toBe(mockPpro)
})
})
describe('getActiveProject', () => {
it('returns null when module is missing', async () => {
const project = await getActiveProject()
expect(project).toBeNull()
})
it('returns active project when available', async () => {
const mockProject = { name: 'MyProject.prproj' }
// Mocking UXP window environment on globalThis
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(globalThis as any).window = {
require: vi.fn().mockImplementation((name: string) => {
if (name === 'premierepro') {
return {
Project: {
getActiveProject: vi.fn().mockResolvedValue(mockProject),
},
}
}
return null
}),
}
const project = await getActiveProject()
expect(project).toBe(mockProject)
})
})
describe('importFilesIntoProject', () => {
it('returns false when filePaths is empty', async () => {
const project = { importFiles: vi.fn() } as unknown as Project
const success = await importFilesIntoProject(project, [])
expect(success).toBe(false)
expect(project.importFiles).not.toHaveBeenCalled()
})
it('calls project.importFiles with suppressUI true', async () => {
const project = {
importFiles: vi.fn().mockResolvedValue(true),
} as unknown as Project
const success = await importFilesIntoProject(project, ['/path/to/video.mp4'])
expect(success).toBe(true)
expect(project.importFiles).toHaveBeenCalledWith(['/path/to/video.mp4'], true, null, false)
})
it('handles import error gracefully', async () => {
const project = {
importFiles: vi.fn().mockRejectedValue(new Error('Import failed in host')),
} as unknown as Project
const success = await importFilesIntoProject(project, ['/path/to/video.mp4'])
expect(success).toBe(false)
})
})
describe('promptSelectFolder', () => {
it('throws when UXP storage is unavailable', async () => {
await expect(promptSelectFolder()).rejects.toThrow('UXP storage')
})
it('delegates to uxp.storage.localFileSystem.getFolder', async () => {
const mockFolder: UxpFolderEntry = {
isFile: false,
isFolder: true,
name: 'Downloads',
nativePath: '/Users/test/Downloads',
createFile: vi.fn(),
getEntries: vi.fn().mockResolvedValue([]),
}
// Mocking UXP window environment on globalThis
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(globalThis as any).window = {
require: vi.fn().mockImplementation((name: string) => {
if (name === 'uxp') {
return {
storage: {
localFileSystem: {
getFolder: vi.fn().mockResolvedValue(mockFolder),
},
},
}
}
return null
}),
}
const folder = await promptSelectFolder()
expect(folder).toBe(mockFolder)
})
})
describe('promptSaveFile', () => {
it('throws when UXP storage is unavailable', async () => {
await expect(promptSaveFile('test.mp4')).rejects.toThrow('UXP storage')
})
it('delegates to uxp.storage.localFileSystem.getFileForSaving', async () => {
const mockFile: UxpFileEntry = {
isFile: true,
isFolder: false,
name: 'test.mp4',
nativePath: '/path/test.mp4',
write: vi.fn(),
}
// Mocking UXP window environment on globalThis
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(globalThis as any).window = {
require: vi.fn().mockImplementation((name: string) => {
if (name === 'uxp') {
return {
storage: {
localFileSystem: {
getFileForSaving: vi.fn().mockResolvedValue(mockFile),
},
},
}
}
return null
}),
}
const file = await promptSaveFile('test.mp4')
expect(file).toBe(mockFile)
})
})
describe('writeBinaryFile', () => {
it('calls file.write with binary format option', async () => {
const mockFile: UxpFileEntry = {
isFile: true,
isFolder: false,
name: 'test.mp4',
nativePath: '/path/test.mp4',
write: vi.fn().mockResolvedValue(undefined),
}
// Mocking UXP window environment on globalThis
// eslint-disable-next-line @typescript-eslint/no-explicit-any
;(globalThis as any).window = {
require: vi.fn().mockImplementation((name: string) => {
if (name === 'uxp') {
return {
storage: {
formats: { binary: 'binary-format-token' },
},
}
}
return null
}),
}
const dummyBuffer = new ArrayBuffer(16)
await writeBinaryFile(mockFile, dummyBuffer)
expect(mockFile.write).toHaveBeenCalledWith(dummyBuffer, { format: 'binary-format-token' })
})
})
describe('sequence functions', () => {
it('getActiveSequence returns active sequence from project', async () => {
const { getActiveSequence } = await import('./premiere')
const mockSeq = { name: 'Seq 1', guid: 'guid-1' }
const mockProject = {
getActiveSequence: vi.fn().mockResolvedValue(mockSeq),
}
const seq = await getActiveSequence(mockProject as unknown as Project)
expect(seq).toBe(mockSeq)
})
it('getAllSequences returns array of sequences', async () => {
const { getAllSequences } = await import('./premiere')
const mockSeq1 = { name: 'Seq 1', guid: 'guid-1' }
const mockSeq2 = { name: 'Seq 2', guid: 'guid-2' }
const mockProject = {
getSequences: vi.fn().mockResolvedValue([mockSeq1, mockSeq2]),
}
const seqs = await getAllSequences(mockProject as unknown as Project)
expect(seqs).toHaveLength(2)
expect(seqs[0].name).toBe('Seq 1')
})
it('openSequenceInTimeline opens and activates sequence', async () => {
const { openSequenceInTimeline } = await import('./premiere')
const mockSeq = { name: 'Seq 1', guid: 'guid-1' }
const mockProject = {
openSequence: vi.fn().mockResolvedValue(true),
setActiveSequence: vi.fn().mockResolvedValue(true),
}
const result = await openSequenceInTimeline(
mockSeq as unknown as Sequence,
mockProject as unknown as Project,
)
expect(result).toBe(true)
expect(mockProject.openSequence).toHaveBeenCalledWith(mockSeq)
expect(mockProject.setActiveSequence).toHaveBeenCalledWith(mockSeq)
})
})
})
+178
View File
@@ -0,0 +1,178 @@
import type { Project, Sequence, premierepro } from '@adobe/premierepro'
/**
* Safely resolves the Premiere Pro host module (`premierepro`).
*/
export function getPremiereModule(): premierepro | null {
try {
// In UXP, host modules are available via require()
if (typeof window !== 'undefined' && 'require' in window) {
// Dynamic runtime property injected on window by Adobe UXP
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return (window as any).require('premierepro')
}
if (typeof require !== 'undefined') {
// Adobe UXP host modules must be resolved dynamically at runtime via CommonJS require
// eslint-disable-next-line @typescript-eslint/no-require-imports
return require('premierepro')
}
} catch (err) {
console.warn('[UXP] premierepro module not available:', err)
}
return null
}
/**
* Safely resolves the UXP environment module (`uxp`).
*/
export function getUxpModule(): UxpModule | null {
try {
if (typeof window !== 'undefined' && 'require' in window) {
// Dynamic runtime property injected on window by Adobe UXP
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return (window as any).require('uxp')
}
if (typeof require !== 'undefined') {
// Adobe UXP host modules must be resolved dynamically at runtime via CommonJS require
// eslint-disable-next-line @typescript-eslint/no-require-imports
return require('uxp')
}
} catch (err) {
console.warn('[UXP] uxp module not available:', err)
}
return null
}
/**
* Retrieves the currently active project in Premiere Pro.
*/
export async function getActiveProject(): Promise<Project | null> {
const ppro = getPremiereModule()
if (!ppro?.Project) {
return null
}
try {
return await ppro.Project.getActiveProject()
} catch (err) {
console.error('Failed to get active project:', err)
return null
}
}
/**
* Retrieves the currently active sequence of the project.
*/
export async function getActiveSequence(project?: Project | null): Promise<Sequence | null> {
const pr = project || (await getActiveProject())
if (!pr) return null
try {
const seq = await pr.getActiveSequence()
return seq || null
} catch (err) {
console.error('Failed to get active sequence:', err)
return null
}
}
/**
* Retrieves all sequences in the project.
*/
export async function getAllSequences(project?: Project | null): Promise<Sequence[]> {
const pr = project || (await getActiveProject())
if (!pr) return []
try {
const seqs = await pr.getSequences()
return seqs || []
} catch (err) {
console.error('Failed to get all sequences:', err)
return []
}
}
/**
* Opens and activates a sequence in the Premiere Pro timeline.
*/
export async function openSequenceInTimeline(
sequence: Sequence,
project?: Project | null,
): Promise<boolean> {
const pr = project || (await getActiveProject())
if (!pr) return false
try {
const opened = await pr.openSequence(sequence)
try {
await pr.setActiveSequence(sequence)
} catch {
// setActiveSequence may not be required if openSequence already focuses it
}
return opened ?? true
} catch (err) {
console.error('Failed to open sequence in timeline:', err)
return false
}
}
/**
* Imports one or more files into the Premiere Pro project root.
*/
export async function importFilesIntoProject(
project: Project,
filePaths: string[],
): Promise<boolean> {
if (!filePaths.length) return false
try {
return await project.importFiles(
filePaths,
true, // suppressUI
// @ts-expect-error Premiere Pro UXP requires null instead of undefined to default to project root
null, // targetBin; `null` defaults to project root
false, // asNumberedStills
)
} catch (err) {
console.error('Failed to import files into Premiere project:', err)
return false
}
}
/**
* Opens the native OS folder picker to ask the user where to save files.
* Returns the selected UxpFolderEntry, or null if the user cancelled.
*/
export async function promptSelectFolder(): Promise<UxpFolderEntry | null> {
const uxp = getUxpModule()
if (!uxp?.storage?.localFileSystem) {
throw new Error('UXP storage.localFileSystem is not available.')
}
try {
return await uxp.storage.localFileSystem.getFolder()
} catch (err) {
console.error('Error in promptSelectFolder:', err)
return null
}
}
/**
* Opens the native OS file picker to ask the user where to save a file.
* Returns the selected UxpFileEntry, or null if the user cancelled.
*/
export async function promptSaveFile(defaultName: string): Promise<UxpFileEntry | null> {
const uxp = getUxpModule()
if (!uxp?.storage?.localFileSystem) {
throw new Error('UXP storage.localFileSystem is not available.')
}
try {
return await uxp.storage.localFileSystem.getFileForSaving(defaultName)
} catch (err) {
console.error('Error in promptSaveFile:', err)
return null
}
}
/**
* Writes an ArrayBuffer into a UXP File entry as binary.
*/
export async function writeBinaryFile(file: UxpFileEntry, data: ArrayBuffer): Promise<void> {
const uxp = getUxpModule()
const format = uxp?.storage?.formats?.binary
await file.write(data, { format })
}
@@ -0,0 +1,55 @@
import { describe, it, expect, beforeEach } from 'vitest'
import { getStoredCredentials, saveStoredCredentials, clearStoredCredentials } from './storage'
const localStorageMock = (() => {
let store: Record<string, string> = {}
return {
getItem: (key: string) => store[key] || null,
setItem: (key: string, value: string) => {
store[key] = value.toString()
},
removeItem: (key: string) => {
delete store[key]
},
clear: () => {
store = {}
},
}
})()
Object.defineProperty(globalThis, 'localStorage', {
value: localStorageMock,
configurable: true,
writable: true,
})
describe('Storage Service', () => {
beforeEach(() => {
localStorage.clear()
})
it('returns null when no credentials are stored', () => {
expect(getStoredCredentials()).toBeNull()
})
it('saves and retrieves credentials correctly', () => {
saveStoredCredentials('http://localhost:3000', 'test-api-key')
const creds = getStoredCredentials()
expect(creds).toEqual({
endpoint: 'http://localhost:3000',
apiKey: 'test-api-key',
})
})
it('normalizes endpoint URL by stripping trailing slashes', () => {
saveStoredCredentials('https://api.shumai.io///', 'test-api-key')
const creds = getStoredCredentials()
expect(creds?.endpoint).toBe('https://api.shumai.io')
})
it('clears stored credentials', () => {
saveStoredCredentials('http://localhost:3000', 'test-api-key')
clearStoredCredentials()
expect(getStoredCredentials()).toBeNull()
})
})
+38
View File
@@ -0,0 +1,38 @@
export interface StoredCredentials {
endpoint: string
apiKey: string
}
const STORAGE_KEY_ENDPOINT = 'shumai_uxp_endpoint'
const STORAGE_KEY_API_KEY = 'shumai_uxp_api_key'
export function getStoredCredentials(): StoredCredentials | null {
try {
const endpoint = localStorage.getItem(STORAGE_KEY_ENDPOINT)
const apiKey = localStorage.getItem(STORAGE_KEY_API_KEY)
if (endpoint && apiKey) {
return { endpoint, apiKey }
}
} catch (err) {
console.error('Failed to read credentials from localStorage:', err)
}
return null
}
export function saveStoredCredentials(endpoint: string, apiKey: string): void {
try {
localStorage.setItem(STORAGE_KEY_ENDPOINT, endpoint.trim().replace(/\/+$/, ''))
localStorage.setItem(STORAGE_KEY_API_KEY, apiKey.trim())
} catch (err) {
console.error('Failed to save credentials to localStorage:', err)
}
}
export function clearStoredCredentials(): void {
try {
localStorage.removeItem(STORAGE_KEY_ENDPOINT)
localStorage.removeItem(STORAGE_KEY_API_KEY)
} catch (err) {
console.error('Failed to clear credentials from localStorage:', err)
}
}
+13
View File
@@ -0,0 +1,13 @@
export interface LinkedSequenceAsset {
sequenceGuid: string
sequenceName: string
assetId: string
assetName: string
assetThumbnailUrl?: string
endpoint?: string
projectId?: string
syncedCommentIds: string[]
syncedMarkerGuids?: string[]
lastSyncAt: number
totalCommentsSynced: number
}
+27
View File
@@ -0,0 +1,27 @@
export function formatDateAgo(dateInput?: string | number | Date | null): string {
if (!dateInput) return ''
const date =
typeof dateInput === 'string' || typeof dateInput === 'number' ? new Date(dateInput) : dateInput
if (isNaN(date.getTime())) return ''
const now = new Date()
const diffSec = Math.max(0, Math.floor((now.getTime() - date.getTime()) / 1000))
if (diffSec < 60) return 'just now'
const diffMin = Math.floor(diffSec / 60)
if (diffMin < 60) return `${diffMin}m ago`
const diffHours = Math.floor(diffMin / 60)
if (diffHours < 24) return `${diffHours}h ago`
const diffDays = Math.floor(diffHours / 24)
if (diffDays === 1) return 'yesterday'
if (diffDays < 30) return `${diffDays}d ago`
const diffMonths = Math.floor(diffDays / 30)
if (diffMonths < 12) return `${diffMonths}mo ago`
const diffYears = Math.floor(diffMonths / 12)
return `${diffYears}y ago`
}
@@ -0,0 +1,44 @@
import { describe, it, expect } from 'vitest'
import { formatBytes, formatDuration } from './format'
describe('formatBytes', () => {
it('handles null, undefined, 0 and invalid inputs', () => {
expect(formatBytes(null)).toBe('0 B')
expect(formatBytes(undefined)).toBe('0 B')
expect(formatBytes(0)).toBe('0 B')
expect(formatBytes(-100)).toBe('0 B')
expect(formatBytes(NaN)).toBe('0 B')
})
it('formats bytes correctly', () => {
expect(formatBytes(500)).toBe('500 B')
expect(formatBytes(1024)).toBe('1.0 KB')
expect(formatBytes(1536)).toBe('1.5 KB')
expect(formatBytes(1048576)).toBe('1.0 MB')
expect(formatBytes(1073741824)).toBe('1.0 GB')
})
})
describe('formatDuration', () => {
it('returns null for invalid or non-positive durations', () => {
expect(formatDuration(null)).toBeNull()
expect(formatDuration(undefined)).toBeNull()
expect(formatDuration(0)).toBeNull()
expect(formatDuration(-15)).toBeNull()
expect(formatDuration(NaN)).toBeNull()
})
it('formats seconds into MM:SS format', () => {
expect(formatDuration(5.4)).toBe('00:05')
expect(formatDuration(59)).toBe('00:59')
expect(formatDuration(60)).toBe('01:00')
expect(formatDuration(65)).toBe('01:05')
expect(formatDuration(3599)).toBe('59:59')
})
it('formats hours into H:MM:SS format', () => {
expect(formatDuration(3600)).toBe('1:00:00')
expect(formatDuration(3665)).toBe('1:01:05')
expect(formatDuration(36665)).toBe('10:11:05')
})
})
+26
View File
@@ -0,0 +1,26 @@
/**
* Formats a byte count into a human-readable size string (e.g. 1.2 MB, 450 KB).
*/
export function formatBytes(bytes?: number | null): string {
if (bytes == null || bytes === 0 || isNaN(bytes) || bytes < 0) return '0 B'
const units = ['B', 'KB', 'MB', 'GB', 'TB']
const i = Math.floor(Math.log(bytes) / Math.log(1024))
const safeIndex = Math.min(Math.max(0, i), units.length - 1)
return `${(bytes / Math.pow(1024, safeIndex)).toFixed(safeIndex === 0 ? 0 : 1)} ${units[safeIndex]}`
}
/**
* Formats duration in seconds into MM:SS or H:MM:SS format (e.g. 02:45, 1:12:30).
* Returns null if duration is invalid, zero or negative.
*/
export function formatDuration(seconds?: number | null): string | null {
if (seconds == null || isNaN(seconds) || seconds <= 0) return null
const totalSecs = Math.round(seconds)
const hours = Math.floor(totalSecs / 3600)
const minutes = Math.floor((totalSecs % 3600) / 60)
const secs = totalSecs % 60
if (hours > 0) {
return `${hours}:${minutes.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`
}
return `${minutes.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`
}
+72
View File
@@ -0,0 +1,72 @@
import { describe, it, expect } from 'vitest'
import { resolveAssetUrl, normalizeEndpoint, isSameEndpoint } from './url'
describe('resolveAssetUrl', () => {
it('returns undefined for empty or null inputs', () => {
expect(resolveAssetUrl(null, 'http://localhost:3000')).toBeUndefined()
expect(resolveAssetUrl(undefined, 'http://localhost:3000')).toBeUndefined()
expect(resolveAssetUrl('', 'http://localhost:3000')).toBeUndefined()
})
it('returns original url if endpoint is not provided', () => {
expect(resolveAssetUrl('/files/123')).toBe('/files/123')
expect(resolveAssetUrl('http://example.com/img.png')).toBe('http://example.com/img.png')
})
it('prepends endpoint to relative paths', () => {
expect(resolveAssetUrl('/files/shumai/cat.png', 'http://localhost:3000')).toBe(
'http://localhost:3000/files/shumai/cat.png',
)
expect(resolveAssetUrl('/files/shumai/cat.png', 'http://localhost:3000/')).toBe(
'http://localhost:3000/files/shumai/cat.png',
)
})
it('preserves absolute URLs intact even when hosts differ', () => {
const localRaw = 'http://localhost:3000/files/shumai/files/cat.webp'
const endpoint = 'http://127.0.0.1:3000'
expect(resolveAssetUrl(localRaw, endpoint)).toBe(localRaw)
const remoteEndpoint = 'https://shumai.example.com'
expect(resolveAssetUrl(localRaw, remoteEndpoint)).toBe(localRaw)
})
it('keeps matching absolute URLs intact', () => {
const raw = 'http://localhost:3000/files/shumai/cat.png'
expect(resolveAssetUrl(raw, 'http://localhost:3000')).toBe(raw)
})
it('preserves remote cloud storage presigned URLs without rewriting host', () => {
const r2Url =
'https://04e37a3c563610bccea6a3ce6f8618ca.r2.cloudflarestorage.com/shumai/files/01KYKNT8NEJ3Q1G6A6K08M2XHC/Float%2002-480p.jpeg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Signature=8112ab30'
const endpoint = 'https://staging.shumai.one'
expect(resolveAssetUrl(r2Url, endpoint)).toBe(r2Url)
})
})
describe('normalizeEndpoint', () => {
it('handles empty and null values', () => {
expect(normalizeEndpoint('')).toBe('')
expect(normalizeEndpoint(null)).toBe('')
expect(normalizeEndpoint(undefined)).toBe('')
})
it('trims whitespace and trailing slashes and converts to lower case', () => {
expect(normalizeEndpoint(' https://STAGING.shumai.one/// ')).toBe('https://staging.shumai.one')
expect(normalizeEndpoint('http://localhost:3000/')).toBe('http://localhost:3000')
})
})
describe('isSameEndpoint', () => {
it('returns true when endpoints match ignoring slashes and casing', () => {
expect(isSameEndpoint('https://staging.shumai.one/', 'https://STAGING.shumai.one')).toBe(true)
expect(isSameEndpoint('http://localhost:3000', 'http://localhost:3000/')).toBe(true)
})
it('returns false when endpoints differ', () => {
expect(isSameEndpoint('http://localhost:3000', 'https://staging.shumai.one')).toBe(false)
expect(isSameEndpoint('http://localhost:3000', 'http://127.0.0.1:3000')).toBe(false)
expect(isSameEndpoint('', 'http://localhost:3000')).toBe(false)
expect(isSameEndpoint(null, undefined)).toBe(false)
})
})
+43
View File
@@ -0,0 +1,43 @@
/**
* Utility functions for URL manipulation and resolution in UXP plugins.
*/
/**
* Resolves an asset URL (such as a thumbnail or file download) against
* the user-configured Shumai endpoint.
*
* Handles:
* - Relative paths (/files/..., /api/...) by prepending the endpoint.
* - Absolute URLs (http://, https://) are preserved as-is.
*/
export function resolveAssetUrl(url?: string | null, endpoint?: string): string | undefined {
if (!url) return undefined
if (!endpoint) return url
const cleanEndpoint = endpoint.replace(/\/+$/, '')
// Handle relative URLs (e.g. /files/..., /api/...)
if (url.startsWith('/') && !url.startsWith('//')) {
return `${cleanEndpoint}${url}`
}
return url
}
/**
* Normalizes an endpoint URL by trimming whitespace, stripping trailing slashes,
* and converting to lower case for reliable comparison.
*/
export function normalizeEndpoint(endpoint?: string | null): string {
if (!endpoint) return ''
return endpoint.trim().replace(/\/+$/, '').toLowerCase()
}
/**
* Checks if two endpoints refer to the same server URL.
*/
export function isSameEndpoint(ep1?: string | null, ep2?: string | null): boolean {
const n1 = normalizeEndpoint(ep1)
const n2 = normalizeEndpoint(ep2)
return Boolean(n1 && n2 && n1 === n2)
}
+169
View File
@@ -0,0 +1,169 @@
import React, { useState } from 'react'
import { getShumaiClient } from '../api/client'
import { saveStoredCredentials } from '../services/storage'
import { Button } from '@swc-react/button'
import { Textfield } from '@swc-react/textfield'
import { FieldLabel } from '@swc-react/field-label'
import { HelpText } from '@swc-react/help-text'
import { ProgressCircle } from '@swc-react/progress-circle'
interface AuthViewProps {
initialEndpoint?: string
initialApiKey?: string
onConnectSuccess: (endpoint: string, apiKey: string) => void
}
export const AuthView: React.FC<AuthViewProps> = ({
initialEndpoint = 'http://localhost:3000',
initialApiKey = '',
onConnectSuccess,
}) => {
const [endpoint, setEndpoint] = useState(initialEndpoint)
const [apiKey, setApiKey] = useState(initialApiKey)
const [loading, setLoading] = useState(false)
const [errorMessage, setErrorMessage] = useState<string | null>(null)
const handleConnect = async (e?: React.SyntheticEvent) => {
if (e) {
e.preventDefault()
}
setErrorMessage(null)
const trimmedEndpoint = endpoint.trim().replace(/\/+$/, '')
const trimmedKey = apiKey.trim()
if (!trimmedEndpoint) {
setErrorMessage('Please enter your Shumai server endpoint.')
return
}
if (!trimmedKey) {
setErrorMessage('Please enter your Shumai API key.')
return
}
try {
new URL(trimmedEndpoint)
} catch {
setErrorMessage(
'Invalid endpoint URL. Example: http://localhost:3000 or https://shumai.example.com',
)
return
}
setLoading(true)
console.log('[Shumai UXP] Connecting to:', trimmedEndpoint)
try {
const client = getShumaiClient(trimmedEndpoint, trimmedKey)
const res = await client.api.projects.$get({
query: { first: '1' },
})
console.log('[Shumai UXP] Response status:', res.status)
if (res.status === 401) {
setErrorMessage('Unauthorized: Invalid API Key. Please verify your token.')
setLoading(false)
return
}
if (!res.ok) {
const errorData = (await res.json().catch(() => ({}))) as { error?: string }
setErrorMessage(errorData.error || `Connection failed with status ${res.status}`)
setLoading(false)
return
}
// Validated successfully
saveStoredCredentials(trimmedEndpoint, trimmedKey)
onConnectSuccess(trimmedEndpoint, trimmedKey)
} catch (err) {
console.error('[Shumai UXP] Failed to connect to Shumai server:', err)
setErrorMessage(
err instanceof Error
? `Cannot reach server: ${err.message}`
: 'Could not connect to the Shumai server. Please check the URL and your network connection.',
)
} finally {
setLoading(false)
}
}
const handleKeyDown = (e: React.KeyboardEvent) => {
if (e.key === 'Enter') {
e.preventDefault()
handleConnect(e)
}
}
return (
<div className="view-content" style={{ justifyContent: 'center' }}>
<div className="auth-container">
<div className="auth-header">
<h2>Connect to Shumai</h2>
<p>Enter your server URL and API key to integrate Premiere Pro with your workspace.</p>
</div>
{errorMessage && (
<div style={{ marginBottom: '12px' }}>
<HelpText variant="negative" icon>
{errorMessage}
</HelpText>
</div>
)}
<div className="auth-form">
<div className="form-group">
<FieldLabel for="endpoint-input">Server Endpoint</FieldLabel>
<Textfield
id="endpoint-input"
style={{ width: '100%' }}
placeholder="https://shumai.example.com"
value={endpoint}
onInput={(e: React.FormEvent<HTMLElement>) =>
setEndpoint((e.target as HTMLInputElement).value)
}
onKeyDown={handleKeyDown}
disabled={loading}
invalid={Boolean(errorMessage && !endpoint.trim())}
/>
<HelpText>The base URL of your Shumai backend instance.</HelpText>
</div>
<div className="form-group">
<FieldLabel for="api-key-input">API Key</FieldLabel>
<Textfield
id="api-key-input"
type="password"
style={{ width: '100%' }}
placeholder="Paste your API key here"
value={apiKey}
onInput={(e: React.FormEvent<HTMLElement>) =>
setApiKey((e.target as HTMLInputElement).value)
}
onKeyDown={handleKeyDown}
disabled={loading}
invalid={Boolean(errorMessage && !apiKey.trim())}
/>
<HelpText>Generate an API key in Shumai: Settings &gt; Developer.</HelpText>
</div>
<Button
variant="accent"
onClick={handleConnect}
style={{ width: '100%', marginTop: '8px' }}
disabled={loading}
>
{loading ? 'Connecting...' : 'Connect Workspace'}
{loading ? (
<ProgressCircle indeterminate size="s" static-color="white" slot="icon" />
) : (
<sp-icon-arrow-right size="s" slot="icon"></sp-icon-arrow-right>
)}
</Button>
</div>
</div>
</div>
)
}
@@ -0,0 +1,790 @@
import React, { useEffect, useState, useCallback } from 'react'
import { getShumaiClient } from '../api/client'
import { Breadcrumb, BreadcrumbCrumb } from '../components/Breadcrumb'
import { FileCardItem, AssetSummary } from '../components/FileItem'
import { ImportVideoDialog } from '../components/ImportVideoDialog'
import { LinkSequenceDialog } from '../components/LinkSequenceDialog'
import {
getAllSequenceLinksFromCache,
getAllLinkedSequences,
normalizeGuid,
removeSequenceLink,
removeSequenceLinkFromCache,
} from '../services/linkStorage'
import { getActiveProject, getAllSequences } from '../services/premiere'
import type { LinkedSequenceAsset } from '../types/link'
import { importAssetIntoPremiere, type ProxyOption } from '../services/import'
import { ProjectSummary } from './ProjectsView'
import { isSameEndpoint } from '../utils/url'
import { ActionButton } from '@swc-react/action-button'
import { Button } from '@swc-react/button'
import { Search } from '@swc-react/search'
import { ProgressCircle } from '@swc-react/progress-circle'
import { StatusLight } from '@swc-react/status-light'
import { IllustratedMessage } from '@swc-react/illustrated-message'
import { Divider } from '@swc-react/divider'
import type { SearchCondition, SearchSort } from '@shumai/dtos'
const PAGE_SIZE = 20
interface FileListViewProps {
endpoint: string
apiKey: string
project: ProjectSummary
onBackToProjects: () => void
onLinkCountChange?: (count: number) => void
}
export const FileListView: React.FC<FileListViewProps> = ({
endpoint,
apiKey,
project,
onBackToProjects,
onLinkCountChange,
}) => {
const [currentFolderId, setCurrentFolderId] = useState<string | null>(project.rootFolder || null)
const [crumbs, setCrumbs] = useState<BreadcrumbCrumb[]>([])
// Folders state
const [folders, setFolders] = useState<AssetSummary[]>([])
const [foldersTotal, setFoldersTotal] = useState<number | null>(null)
const [foldersCursor, setFoldersCursor] = useState<string | null>(null)
const [foldersHasNext, setFoldersHasNext] = useState(false)
const [foldersExpanded, setFoldersExpanded] = useState(true)
const [loadingMoreFolders, setLoadingMoreFolders] = useState(false)
// Files state
const [files, setFiles] = useState<AssetSummary[]>([])
const [filesTotal, setFilesTotal] = useState<number | null>(null)
const [filesCursor, setFilesCursor] = useState<string | null>(null)
const [filesHasNext, setFilesHasNext] = useState(false)
const [filesExpanded, setFilesExpanded] = useState(true)
const [loadingMoreFiles, setLoadingMoreFiles] = useState(false)
const [loading, setLoading] = useState(true)
const [error, setError] = useState<string | null>(null)
const [searchTerm, setSearchTerm] = useState('')
const [debouncedSearch, setDebouncedSearch] = useState('')
const [videoForDialog, setVideoForDialog] = useState<AssetSummary | null>(null)
const [assetForLinkDialog, setAssetForLinkDialog] = useState<AssetSummary | null>(null)
const [linkedAssetsMap, setLinkedAssetsMap] = useState<Record<string, LinkedSequenceAsset>>({})
// Refresh links from cache and active Premiere project
const refreshLinkedAssets = useCallback(async () => {
// 1. Immediately read from cache (fast, non-blocking)
const cachedLinks = getAllSequenceLinksFromCache()
if (cachedLinks.length > 0) {
const map: Record<string, LinkedSequenceAsset> = {}
for (const link of cachedLinks) {
if (!link.endpoint || isSameEndpoint(link.endpoint, endpoint)) {
map[link.assetId] = link
}
}
setLinkedAssetsMap((prev) => ({ ...prev, ...map }))
onLinkCountChange?.(Object.keys(map).length)
}
// 2. Query active project in Premiere Pro for live persistent links
try {
const pr = await getActiveProject()
if (pr) {
const liveLinks = await getAllLinkedSequences(pr)
const liveMap: Record<string, LinkedSequenceAsset> = {}
for (const link of liveLinks) {
if (!link.endpoint || isSameEndpoint(link.endpoint, endpoint)) {
liveMap[link.assetId] = link
}
}
setLinkedAssetsMap(liveMap)
onLinkCountChange?.(Object.keys(liveMap).length)
}
} catch (err) {
console.warn('[FileListView] Could not get linked sequences from active project:', err)
}
}, [endpoint, onLinkCountChange])
useEffect(() => {
void refreshLinkedAssets()
}, [refreshLinkedAssets])
const handleUnlinkAsset = useCallback(
async (asset: AssetSummary) => {
const link = linkedAssetsMap[asset.id]
if (!link) return
// Optimistically remove from state immediately
setLinkedAssetsMap((prev) => {
const copy = { ...prev }
delete copy[asset.id]
return copy
})
try {
const pr = await getActiveProject()
if (pr) {
const allSeqs = await getAllSequences(pr)
const targetSeq = allSeqs.find(
(s) => normalizeGuid(s.guid) === normalizeGuid(link.sequenceGuid),
)
if (targetSeq) {
await removeSequenceLink(pr, targetSeq)
} else {
removeSequenceLinkFromCache(link.sequenceGuid, pr.guid ? pr.guid.toString() : null)
}
} else {
removeSequenceLinkFromCache(link.sequenceGuid)
}
void refreshLinkedAssets()
setImportStatus({
id: Date.now().toString(),
fileName: asset.name,
status: 'success',
message: `Unlinked from "${link.sequenceName}".`,
})
setTimeout(() => {
setImportStatus((prev) => (prev?.fileName === asset.name ? null : prev))
}, 3000)
} catch (err) {
console.error('Failed to unlink asset:', err)
void refreshLinkedAssets()
setImportStatus({
id: Date.now().toString(),
fileName: asset.name,
status: 'error',
message: 'Failed to unlink sequence.',
})
setTimeout(() => {
setImportStatus((prev) => (prev?.fileName === asset.name ? null : prev))
}, 4000)
}
},
[linkedAssetsMap, refreshLinkedAssets],
)
// Import task state
const [importStatus, setImportStatus] = useState<{
id: string
fileName: string
status: 'importing' | 'success' | 'error'
message: string
} | null>(null)
const runImport = async (asset: AssetSummary, type: 'raw' | 'proxy', proxyItem?: ProxyOption) => {
const taskId = Date.now().toString()
const label = type === 'raw' ? asset.name : `${asset.name} (${proxyItem?.label || 'Proxy'})`
setImportStatus({
id: taskId,
fileName: label,
status: 'importing',
message: 'Starting import...',
})
try {
const result = await importAssetIntoPremiere({
endpoint,
apiKey,
asset,
type,
proxyItem,
onProgress: (msg) => {
setImportStatus((prev) => (prev?.id === taskId ? { ...prev, message: msg } : prev))
},
})
if (result.cancelled) {
setImportStatus(null)
return
}
if (result.success) {
setImportStatus({
id: taskId,
fileName: result.fileName || label,
status: 'success',
message: result.message,
})
setTimeout(() => {
setImportStatus((prev) => (prev?.id === taskId ? null : prev))
}, 4000)
} else {
setImportStatus({
id: taskId,
fileName: label,
status: 'error',
message: result.message,
})
setTimeout(() => {
setImportStatus((prev) => (prev?.id === taskId ? null : prev))
}, 6000)
}
} catch (err) {
setImportStatus({
id: taskId,
fileName: label,
status: 'error',
message: err instanceof Error ? err.message : 'Import failed.',
})
setTimeout(() => {
setImportStatus((prev) => (prev?.id === taskId ? null : prev))
}, 6000)
}
}
const handleImportRaw = (asset: AssetSummary) => {
runImport(asset, 'raw')
}
const handleImportProxy = (asset: AssetSummary, proxy: ProxyOption) => {
runImport(asset, 'proxy', proxy)
}
// Debounce search term by 300ms
useEffect(() => {
const timer = setTimeout(() => {
setDebouncedSearch(searchTerm.trim())
}, 300)
return () => clearTimeout(timer)
}, [searchTerm])
// Initial fetch of both folders and files
const fetchContents = useCallback(
async (folderId: string, query: string) => {
setLoading(true)
setError(null)
try {
const client = getShumaiClient(endpoint, apiKey)
const isSearching = Boolean(query)
const conditions: SearchCondition[] = isSearching
? [{ field: 'name', operator: 'contains', value: query }]
: []
const sort: SearchSort = { field: 'name', order: 'asc' }
// Fetch first page of folders and files in parallel
const [foldersRes, filesRes] = await Promise.all([
client.api.folders[':folderId'].search.$post({
param: { folderId },
json: {
assetType: 'folder',
recursively: isSearching,
conditions,
sort,
first: PAGE_SIZE,
previewFormat: 'jpeg',
},
}),
client.api.folders[':folderId'].search.$post({
param: { folderId },
json: {
assetType: 'file',
recursively: isSearching,
conditions,
sort,
first: PAGE_SIZE,
previewFormat: 'jpeg',
},
}),
])
if (!foldersRes.ok) {
const errData = (await foldersRes.json().catch(() => ({}))) as { error?: string }
throw new Error(errData.error || `Failed to search folders (${foldersRes.status})`)
}
if (!filesRes.ok) {
const errData = (await filesRes.json().catch(() => ({}))) as { error?: string }
throw new Error(errData.error || `Failed to search files (${filesRes.status})`)
}
const foldersBody = await foldersRes.json()
const filesBody = await filesRes.json()
const folderItems = (foldersBody.data || []) as AssetSummary[]
const fileItems = (filesBody.data || []) as AssetSummary[]
setFolders(folderItems)
setFoldersCursor(foldersBody.pageInfo?.cursor || null)
setFoldersHasNext(Boolean(foldersBody.pageInfo?.cursor))
setFoldersTotal(foldersBody.pageInfo?.total ?? folderItems.length)
setFiles(fileItems)
setFilesCursor(filesBody.pageInfo?.cursor || null)
setFilesHasNext(Boolean(filesBody.pageInfo?.cursor))
setFilesTotal(filesBody.pageInfo?.total ?? fileItems.length)
} catch (err) {
console.error('Error fetching folder contents via search API:', err)
setError(err instanceof Error ? err.message : 'Failed to load folder contents.')
} finally {
setLoading(false)
}
},
[endpoint, apiKey],
)
useEffect(() => {
if (currentFolderId) {
fetchContents(currentFolderId, debouncedSearch)
} else {
setError('Root folder ID not available for this project.')
setLoading(false)
}
}, [currentFolderId, debouncedSearch, fetchContents])
// Paginate next files
const fetchNextFilesPage = useCallback(async () => {
if (!currentFolderId || !filesHasNext || loadingMoreFiles || loading) return
setLoadingMoreFiles(true)
try {
const client = getShumaiClient(endpoint, apiKey)
const isSearching = Boolean(debouncedSearch)
const conditions: SearchCondition[] = isSearching
? [{ field: 'name', operator: 'contains', value: debouncedSearch }]
: []
const sort: SearchSort = { field: 'name', order: 'asc' }
const res = await client.api.folders[':folderId'].search.$post({
param: { folderId: currentFolderId },
json: {
assetType: 'file',
recursively: isSearching,
conditions,
sort,
first: PAGE_SIZE,
after: filesCursor || undefined,
previewFormat: 'jpeg',
},
})
if (res.ok) {
const body = await res.json()
const newFiles = (body.data || []) as AssetSummary[]
setFiles((prev) => [...prev, ...newFiles])
setFilesCursor(body.pageInfo?.cursor || null)
setFilesHasNext(Boolean(body.pageInfo?.cursor))
if (body.pageInfo?.total != null) {
setFilesTotal(body.pageInfo.total)
}
}
} catch (err) {
console.error('Error fetching next files page:', err)
} finally {
setLoadingMoreFiles(false)
}
}, [
currentFolderId,
filesHasNext,
loadingMoreFiles,
loading,
endpoint,
apiKey,
debouncedSearch,
filesCursor,
])
// Paginate next folders
const fetchNextFoldersPage = useCallback(async () => {
if (!currentFolderId || !foldersHasNext || loadingMoreFolders || loading) return
setLoadingMoreFolders(true)
try {
const client = getShumaiClient(endpoint, apiKey)
const isSearching = Boolean(debouncedSearch)
const conditions: SearchCondition[] = isSearching
? [{ field: 'name', operator: 'contains', value: debouncedSearch }]
: []
const sort: SearchSort = { field: 'name', order: 'asc' }
const res = await client.api.folders[':folderId'].search.$post({
param: { folderId: currentFolderId },
json: {
assetType: 'folder',
recursively: isSearching,
conditions,
sort,
first: PAGE_SIZE,
after: foldersCursor || undefined,
previewFormat: 'jpeg',
},
})
if (res.ok) {
const body = await res.json()
const newFolders = (body.data || []) as AssetSummary[]
setFolders((prev) => [...prev, ...newFolders])
setFoldersCursor(body.pageInfo?.cursor || null)
setFoldersHasNext(Boolean(body.pageInfo?.cursor))
if (body.pageInfo?.total != null) {
setFoldersTotal(body.pageInfo.total)
}
}
} catch (err) {
console.error('Error fetching next folders page:', err)
} finally {
setLoadingMoreFolders(false)
}
}, [
currentFolderId,
foldersHasNext,
loadingMoreFolders,
loading,
endpoint,
apiKey,
debouncedSearch,
foldersCursor,
])
// Infinite scroll listener
const handleScroll = (e: React.UIEvent<HTMLDivElement>) => {
const target = e.currentTarget
const threshold = 120
const isNearBottom = target.scrollHeight - target.scrollTop - target.clientHeight <= threshold
if (isNearBottom) {
if (filesExpanded && filesHasNext && !loadingMoreFiles) {
fetchNextFilesPage()
} else if (
foldersExpanded &&
foldersHasNext &&
!loadingMoreFolders &&
(!filesExpanded || files.length === 0)
) {
fetchNextFoldersPage()
}
}
}
const handleFolderClick = (folder: AssetSummary) => {
setCrumbs((prev) => [...prev, { id: folder.id, name: folder.name }])
setCurrentFolderId(folder.id)
setSearchTerm('')
}
const handleCrumbNavigate = (crumbIndex: number) => {
setSearchTerm('')
if (crumbIndex === -1) {
setCrumbs([])
if (project.rootFolder) {
setCurrentFolderId(project.rootFolder)
}
} else {
const targetCrumb = crumbs[crumbIndex]
setCrumbs((prev) => prev.slice(0, crumbIndex + 1))
setCurrentFolderId(targetCrumb.id)
}
}
return (
<div
style={{
display: 'flex',
flexDirection: 'column',
flex: 1,
minHeight: 0,
overflow: 'hidden',
}}
>
<Breadcrumb
projectName={project.name}
crumbs={crumbs}
onNavigateToProjects={onBackToProjects}
onNavigateToCrumb={handleCrumbNavigate}
/>
{/* Sticky Header: Search input & Refresh button */}
<div className="view-sticky-header">
<div
style={{
display: 'flex',
alignItems: 'center',
gap: '8px',
marginBottom: '8px',
}}
>
<div style={{ flex: 1 }}>
<Search
style={{ width: '100%' }}
placeholder="Search files and folders..."
value={searchTerm}
onInput={(e: React.FormEvent<HTMLElement>) =>
setSearchTerm((e.target as HTMLInputElement).value)
}
/>
</div>
<sp-button
quiet
variant="secondary"
size="s"
label="Refresh folder"
icon-only
onClick={() => {
if (currentFolderId) {
fetchContents(currentFolderId, debouncedSearch)
void refreshLinkedAssets()
}
}}
title="Refresh folder"
disabled={loading || !currentFolderId}
>
<sp-icon-refresh
slot="icon"
size="s"
className={loading ? 'spin' : ''}
></sp-icon-refresh>
</sp-button>
</div>
<Divider size="s" />
</div>
<div className="view-content" onScroll={handleScroll}>
{loading && (
<div className="state-container">
<ProgressCircle indeterminate size="m" label="Loading folder contents..." />
<p style={{ marginTop: '8px' }}>Loading folder contents...</p>
</div>
)}
{error && !loading && (
<div className="state-container">
<IllustratedMessage heading="Error loading folder" description={error}>
<sp-icon-alert-circle
size="xxl"
style={{ color: 'var(--accent-red)' }}
></sp-icon-alert-circle>
</IllustratedMessage>
{currentFolderId && (
<Button
variant="secondary"
onClick={() => fetchContents(currentFolderId, debouncedSearch)}
style={{ marginTop: '12px' }}
>
Try Again
</Button>
)}
</div>
)}
{!loading && !error && folders.length === 0 && files.length === 0 && (
<div className="state-container">
<IllustratedMessage
heading={searchTerm ? 'No matching items' : 'Folder is empty'}
description={
searchTerm
? `No files or subfolders match "${searchTerm}".`
: 'No files or subfolders found in this directory.'
}
>
<sp-icon-folder-open size="xxl" style={{ color: '#999999' }}></sp-icon-folder-open>
</IllustratedMessage>
</div>
)}
{!loading && !error && (folders.length > 0 || files.length > 0) && (
<>
{/* Folders Section */}
{folders.length > 0 && (
<div className="section-container">
<div
className="section-header"
onClick={() => setFoldersExpanded(!foldersExpanded)}
role="button"
tabIndex={0}
title={foldersExpanded ? 'Collapse Folders' : 'Expand Folders'}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault()
setFoldersExpanded(!foldersExpanded)
}
}}
>
<div className="section-header-left">
<sp-button
quiet
variant="secondary"
size="xs"
label={foldersExpanded ? 'Collapse Folders' : 'Expand Folders'}
icon-only
onClick={(e: React.MouseEvent) => {
e.stopPropagation()
setFoldersExpanded(!foldersExpanded)
}}
>
{foldersExpanded ? (
<sp-icon-chevron-down slot="icon" size="xs"></sp-icon-chevron-down>
) : (
<sp-icon-chevron-right slot="icon" size="xs"></sp-icon-chevron-right>
)}
</sp-button>
<span className="section-title">Folders</span>
<span className="count-badge">{foldersTotal ?? folders.length}</span>
</div>
</div>
{foldersExpanded && (
<>
<div className="file-card-list">
{folders.map((folder) => (
<FileCardItem
key={folder.id}
asset={folder}
endpoint={endpoint}
onClick={() => handleFolderClick(folder)}
/>
))}
</div>
{foldersHasNext && (
<div style={{ display: 'flex', justifyContent: 'center', padding: '6px 0' }}>
{loadingMoreFolders ? (
<ProgressCircle indeterminate size="s" label="Loading more folders..." />
) : (
<ActionButton quiet size="s" onClick={fetchNextFoldersPage}>
Load more folders
</ActionButton>
)}
</div>
)}
</>
)}
</div>
)}
{/* Files Section */}
{files.length > 0 && (
<div
className="section-container"
style={{ marginTop: folders.length > 0 && foldersExpanded ? '14px' : '4px' }}
>
<div
className="section-header"
onClick={() => setFilesExpanded(!filesExpanded)}
role="button"
tabIndex={0}
title={filesExpanded ? 'Collapse Files' : 'Expand Files'}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault()
setFilesExpanded(!filesExpanded)
}
}}
>
<div className="section-header-left">
<sp-button
quiet
variant="secondary"
size="xs"
label={filesExpanded ? 'Collapse Files' : 'Expand Files'}
icon-only
onClick={(e: React.MouseEvent) => {
e.stopPropagation()
setFilesExpanded(!filesExpanded)
}}
>
{filesExpanded ? (
<sp-icon-chevron-down slot="icon" size="xs"></sp-icon-chevron-down>
) : (
<sp-icon-chevron-right slot="icon" size="xs"></sp-icon-chevron-right>
)}
</sp-button>
<span className="section-title">Files</span>
<span className="count-badge">{filesTotal ?? files.length}</span>
</div>
</div>
{filesExpanded && (
<>
<div className="file-card-list">
{files.map((file) => (
<FileCardItem
key={file.id}
asset={file}
endpoint={endpoint}
apiKey={apiKey}
onClick={() => {}}
onImportRaw={handleImportRaw}
onSelectVideoForImport={setVideoForDialog}
onLinkSequence={setAssetForLinkDialog}
onUnlinkSequence={handleUnlinkAsset}
isLinked={Boolean(linkedAssetsMap[file.id])}
linkedSequenceName={linkedAssetsMap[file.id]?.sequenceName}
/>
))}
</div>
{loadingMoreFiles && (
<div style={{ display: 'flex', justifyContent: 'center', padding: '10px 0' }}>
<ProgressCircle indeterminate size="s" label="Loading more files..." />
</div>
)}
{filesHasNext && !loadingMoreFiles && (
<div style={{ display: 'flex', justifyContent: 'center', padding: '6px 0' }}>
<ActionButton quiet size="s" onClick={fetchNextFilesPage}>
Load more files
</ActionButton>
</div>
)}
</>
)}
</div>
)}
</>
)}
</div>
{/* Video Import Modal Dialog */}
<ImportVideoDialog
asset={videoForDialog}
endpoint={endpoint}
apiKey={apiKey}
isOpen={videoForDialog != null}
onClose={() => setVideoForDialog(null)}
onImportRaw={handleImportRaw}
onImportProxy={handleImportProxy}
/>
{/* Sequence Linking Modal Dialog */}
<LinkSequenceDialog
asset={assetForLinkDialog}
endpoint={endpoint}
apiKey={apiKey}
isOpen={assetForLinkDialog != null}
onClose={() => setAssetForLinkDialog(null)}
onLinkSuccess={(newLink, addedCount) => {
setLinkedAssetsMap((prev) => ({
...prev,
[newLink.assetId]: newLink,
}))
void refreshLinkedAssets()
setImportStatus({
id: Date.now().toString(),
fileName: newLink.assetName,
status: 'success',
message: `Linked to "${newLink.sequenceName}". Synced ${addedCount} comment ${addedCount === 1 ? 'marker' : 'markers'}.`,
})
}}
/>
{/* Toast Notification for Import Progress & Status */}
{importStatus && (
<div className={`shumai-import-toast ${importStatus.status}`}>
<div className="shumai-toast-left">
{importStatus.status === 'importing' && (
<ProgressCircle indeterminate size="s" label="Importing..." />
)}
{importStatus.status === 'success' && <StatusLight variant="positive"></StatusLight>}
{importStatus.status === 'error' && <StatusLight variant="negative"></StatusLight>}
<div className="shumai-toast-text">
<span className="shumai-toast-title">{importStatus.fileName}</span>
<span className="shumai-toast-msg">{importStatus.message}</span>
</div>
</div>
<sp-action-button
quiet
size="xs"
onClick={() => setImportStatus(null)}
title="Dismiss notification"
>
×
</sp-action-button>
</div>
)}
</div>
)
}
@@ -0,0 +1,154 @@
import React, { useEffect, useState } from 'react'
import { getShumaiClient } from '../api/client'
import { ProjectCard } from '../components/ProjectCard'
import { Button } from '@swc-react/button'
import { ProgressCircle } from '@swc-react/progress-circle'
import { IllustratedMessage } from '@swc-react/illustrated-message'
import { Divider } from '@swc-react/divider'
export interface ProjectSummary {
id: string
name: string
teamId: string
rootFolder?: string | null
coverImage?: string | null
updatedAt?: string | Date
}
interface ProjectsViewProps {
endpoint: string
apiKey: string
onSelectProject: (project: ProjectSummary) => void
}
export const ProjectsView: React.FC<ProjectsViewProps> = ({
endpoint,
apiKey,
onSelectProject,
}) => {
const [projects, setProjects] = useState<ProjectSummary[]>([])
const [loading, setLoading] = useState(true)
const [error, setError] = useState<string | null>(null)
const fetchProjects = async () => {
setLoading(true)
setError(null)
try {
const client = getShumaiClient(endpoint, apiKey)
const res = await client.api.projects.$get({
query: { first: '200', previewFormat: 'jpeg' },
})
if (!res.ok) {
const errData = (await res.json().catch(() => ({}))) as { error?: string }
throw new Error(errData.error || `Failed to fetch projects (${res.status})`)
}
const body = await res.json()
setProjects((body.data || []) as ProjectSummary[])
} catch (err) {
console.error('Error fetching projects:', err)
setError(err instanceof Error ? err.message : 'Failed to load projects.')
} finally {
setLoading(false)
}
}
useEffect(() => {
fetchProjects()
}, [endpoint, apiKey])
return (
<div
style={{
display: 'flex',
flexDirection: 'column',
flex: 1,
minHeight: 0,
overflow: 'hidden',
}}
>
{/* Sticky Title Bar */}
<div className="view-sticky-header">
<div
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
marginBottom: '8px',
}}
>
<div style={{ display: 'flex', alignItems: 'center', gap: '6px' }}>
<h2 style={{ fontSize: '13px', fontWeight: 600 }}>Projects</h2>
{!loading && <span className="count-badge">{projects.length}</span>}
</div>
<sp-button
quiet
variant="secondary"
size="s"
label="Refresh projects"
icon-only
onClick={fetchProjects}
title="Refresh projects"
disabled={loading}
>
<sp-icon-refresh
slot="icon"
size="s"
className={loading ? 'spin' : ''}
></sp-icon-refresh>
</sp-button>
</div>
<Divider size="s" />
</div>
<div className="view-content">
{loading && (
<div className="state-container">
<ProgressCircle indeterminate size="m" label="Loading projects..." />
<p style={{ marginTop: '8px' }}>Loading projects...</p>
</div>
)}
{error && !loading && (
<div className="state-container">
<IllustratedMessage heading="Error loading projects" description={error}>
<sp-icon-alert-circle
size="xxl"
style={{ color: 'var(--accent-red)' }}
></sp-icon-alert-circle>
</IllustratedMessage>
<Button variant="secondary" onClick={fetchProjects} style={{ marginTop: '12px' }}>
Try Again
</Button>
</div>
)}
{!loading && !error && projects.length === 0 && (
<div className="state-container">
<IllustratedMessage
heading="No projects found"
description="Create a project in your Shumai workspace to get started."
>
<sp-icon-briefcase size="xxl" style={{ color: '#999999' }}></sp-icon-briefcase>
</IllustratedMessage>
</div>
)}
{!loading && !error && projects.length > 0 && (
<div className="project-card-list">
{projects.map((project) => (
<ProjectCard
key={project.id}
project={project}
endpoint={endpoint}
onClick={() => onSelectProject(project)}
/>
))}
</div>
)}
</div>
</div>
)
}
@@ -0,0 +1,253 @@
// @vitest-environment happy-dom
import React, { act } from 'react'
import { describe, it, expect, vi, afterEach, beforeEach } from 'vitest'
import { render, screen, fireEvent, cleanup } from '@testing-library/react'
import { SequencesView } from './SequencesView'
import type { Project, Sequence } from '@adobe/premierepro'
import * as premiereService from '../services/premiere'
import * as linkStorage from '../services/linkStorage'
import * as markersService from '../services/markers'
import type { CommentInfo } from '@shumai/dtos'
// Configure React 19 act environment for happy-dom
;(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true
describe('SequencesView Component', () => {
const mockOnLinkCountChange = vi.fn()
beforeEach(() => {
vi.restoreAllMocks()
})
afterEach(() => {
cleanup()
})
it('renders unified empty state when no sequences are linked', async () => {
const mockSeq = { guid: 'seq-1', name: 'Sequence 01' }
const mockProject = { guid: 'proj-1' }
vi.spyOn(premiereService, 'getActiveProject').mockResolvedValue(
mockProject as unknown as Project,
)
vi.spyOn(premiereService, 'getActiveSequence').mockResolvedValue(mockSeq as unknown as Sequence)
vi.spyOn(premiereService, 'getAllSequences').mockResolvedValue([mockSeq as unknown as Sequence])
vi.spyOn(linkStorage, 'getAllLinkedSequences').mockResolvedValue([])
await act(async () => {
render(
<SequencesView
endpoint="https://api.shumai.test"
apiKey="test-key"
onLinkCountChange={mockOnLinkCountChange}
/>,
)
})
expect(screen.getByText('No Linked Sequences')).toBeDefined()
expect(screen.getByText(/Sequence 01/i)).toBeDefined()
expect(screen.queryByText('Browse Assets to Link')).toBeNull()
})
it('renders linked sequence card and handles unlink', async () => {
const mockSeq = { guid: 'seq-1', name: 'Sequence 01' }
const mockProject = { guid: 'proj-1' }
const mockLink = {
sequenceGuid: 'seq-1',
sequenceName: 'Sequence 01',
assetId: 'asset-1',
assetName: 'final_edit.mp4',
syncedCommentIds: ['comm-1'],
lastSyncAt: Date.now(),
totalCommentsSynced: 1,
}
vi.spyOn(premiereService, 'getActiveProject').mockResolvedValue(
mockProject as unknown as Project,
)
vi.spyOn(premiereService, 'getActiveSequence').mockResolvedValue(mockSeq as unknown as Sequence)
vi.spyOn(premiereService, 'getAllSequences').mockResolvedValue([mockSeq as unknown as Sequence])
vi.spyOn(linkStorage, 'getAllLinkedSequences').mockResolvedValue([mockLink])
vi.spyOn(linkStorage, 'removeSequenceLink').mockResolvedValue(true)
await act(async () => {
render(
<SequencesView
endpoint="https://api.shumai.test"
apiKey="test-key"
onLinkCountChange={mockOnLinkCountChange}
/>,
)
})
expect(screen.getAllByText('Sequence 01').length).toBeGreaterThan(0)
expect(screen.getAllByText(/Asset: final_edit.mp4/i).length).toBeGreaterThan(0)
const unlinkButtons = screen.getAllByTitle('Unlink sequence')
expect(unlinkButtons.length).toBeGreaterThan(0)
await act(async () => {
fireEvent.click(unlinkButtons[0])
})
expect(linkStorage.removeSequenceLink).toHaveBeenCalledWith(mockProject, mockSeq)
})
it('filters out foreign endpoint links from the view and link count', async () => {
const mockSeq1 = { guid: 'seq-1', name: 'Sequence Foreign' }
const mockSeq2 = { guid: 'seq-2', name: 'Sequence Staging' }
const mockProject = { guid: 'proj-1' }
const foreignLink = {
sequenceGuid: 'seq-1',
sequenceName: 'Sequence Foreign',
assetId: 'asset-dev',
assetName: 'dev_asset.mp4',
endpoint: 'http://localhost:3000',
syncedCommentIds: [],
lastSyncAt: Date.now(),
totalCommentsSynced: 0,
}
const stagingLink = {
sequenceGuid: 'seq-2',
sequenceName: 'Sequence Staging',
assetId: 'asset-staging',
assetName: 'staging_asset.mp4',
endpoint: 'https://staging.shumai.one',
syncedCommentIds: [],
lastSyncAt: Date.now(),
totalCommentsSynced: 0,
}
vi.spyOn(premiereService, 'getActiveProject').mockResolvedValue(
mockProject as unknown as Project,
)
vi.spyOn(premiereService, 'getActiveSequence').mockResolvedValue(
mockSeq1 as unknown as Sequence,
)
vi.spyOn(premiereService, 'getAllSequences').mockResolvedValue([
mockSeq1 as unknown as Sequence,
mockSeq2 as unknown as Sequence,
])
vi.spyOn(linkStorage, 'getAllLinkedSequences').mockResolvedValue([foreignLink, stagingLink])
await act(async () => {
render(
<SequencesView
endpoint="https://staging.shumai.one"
apiKey="staging-key"
onLinkCountChange={mockOnLinkCountChange}
/>,
)
})
// Foreign link should be completely hidden
expect(screen.queryByText('dev_asset.mp4')).toBeNull()
expect(screen.queryByText(/Server:/i)).toBeNull()
// Matching link should be visible
expect(screen.getAllByText(/staging_asset.mp4/i).length).toBeGreaterThan(0)
// Active sequence (seq-1) is linked to foreign server, so current sequence card should show unlinked state
expect(screen.getByText('This sequence is not linked to any Shumai asset.')).toBeDefined()
// Link count reported to parent should only count staging link (1)
expect(mockOnLinkCountChange).toHaveBeenCalledWith(1)
})
it('shows error toast when manual sync fails', async () => {
const mockSeq = { guid: 'seq-1', name: 'Sequence 01' }
const mockProject = { guid: 'proj-1' }
const mockLink = {
sequenceGuid: 'seq-1',
sequenceName: 'Sequence 01',
assetId: 'asset-missing',
assetName: 'missing.mp4',
endpoint: 'https://staging.shumai.one',
syncedCommentIds: [],
lastSyncAt: Date.now(),
totalCommentsSynced: 0,
}
vi.spyOn(premiereService, 'getActiveProject').mockResolvedValue(
mockProject as unknown as Project,
)
vi.spyOn(premiereService, 'getActiveSequence').mockResolvedValue(mockSeq as unknown as Sequence)
vi.spyOn(premiereService, 'getAllSequences').mockResolvedValue([mockSeq as unknown as Sequence])
vi.spyOn(linkStorage, 'getAllLinkedSequences').mockResolvedValue([mockLink])
vi.spyOn(markersService, 'fetchAssetComments').mockRejectedValue(
new Error('Asset not found on this server (HTTP 404)'),
)
await act(async () => {
render(
<SequencesView
endpoint="https://staging.shumai.one"
apiKey="staging-key"
onLinkCountChange={mockOnLinkCountChange}
/>,
)
})
const syncButtons = screen.getAllByTitle('Sync comments now')
expect(syncButtons[0].hasAttribute('disabled')).toBe(false)
await act(async () => {
fireEvent.click(syncButtons[0])
})
expect(markersService.fetchAssetComments).toHaveBeenCalledWith(
'https://staging.shumai.one',
'staging-key',
'asset-missing',
)
expect(screen.getByText('Asset not found on this server (HTTP 404)')).toBeDefined()
})
it('shows success toast when manual sync succeeds', async () => {
const mockSeq = { guid: 'seq-1', name: 'Sequence 01' }
const mockProject = { guid: 'proj-1' }
const mockLink = {
sequenceGuid: 'seq-1',
sequenceName: 'Sequence 01',
assetId: 'asset-1',
assetName: 'final.mp4',
endpoint: 'https://staging.shumai.one',
syncedCommentIds: [],
lastSyncAt: Date.now(),
totalCommentsSynced: 0,
}
vi.spyOn(premiereService, 'getActiveProject').mockResolvedValue(
mockProject as unknown as Project,
)
vi.spyOn(premiereService, 'getActiveSequence').mockResolvedValue(mockSeq as unknown as Sequence)
vi.spyOn(premiereService, 'getAllSequences').mockResolvedValue([mockSeq as unknown as Sequence])
vi.spyOn(linkStorage, 'getAllLinkedSequences').mockResolvedValue([mockLink])
vi.spyOn(markersService, 'fetchAssetComments').mockResolvedValue([
{ id: 'comm-1', second: 10, message: 'Fix color' } as unknown as CommentInfo,
])
vi.spyOn(markersService, 'syncCommentsToSequence').mockResolvedValue({
updatedLink: { ...mockLink, syncedCommentIds: ['comm-1'], totalCommentsSynced: 1 },
addedCount: 1,
})
await act(async () => {
render(
<SequencesView
endpoint="https://staging.shumai.one"
apiKey="staging-key"
onLinkCountChange={mockOnLinkCountChange}
/>,
)
})
const syncButtons = screen.getAllByTitle('Sync comments now')
await act(async () => {
fireEvent.click(syncButtons[0])
})
expect(screen.getByText('Synced 1 new comment marker for "Sequence 01".')).toBeDefined()
})
})
@@ -0,0 +1,524 @@
import React, { useState, useEffect, useCallback } from 'react'
import type { Project, Sequence } from '@adobe/premierepro'
import type { LinkedSequenceAsset } from '../types/link'
import {
getActiveProject,
getActiveSequence,
getAllSequences,
openSequenceInTimeline,
getPremiereModule,
} from '../services/premiere'
import { getAllLinkedSequences, normalizeGuid, removeSequenceLink } from '../services/linkStorage'
import { fetchAssetComments, syncCommentsToSequence } from '../services/markers'
import { resolveAssetUrl, isSameEndpoint } from '../utils/url'
import { formatDateAgo } from '../utils/date'
import { ProgressCircle } from '@swc-react/progress-circle'
export interface SequencesViewProps {
endpoint: string
apiKey: string
onLinkCountChange?: (count: number) => void
}
export const SequencesView: React.FC<SequencesViewProps> = ({
endpoint,
apiKey,
onLinkCountChange,
}) => {
const [project, setProject] = useState<Project | null>(null)
const [activeSeq, setActiveSeq] = useState<Sequence | null>(null)
const [allSeqs, setAllSeqs] = useState<Sequence[]>([])
const [linkedSequences, setLinkedSequences] = useState<LinkedSequenceAsset[]>([])
const [loading, setLoading] = useState(true)
const [syncingGuid, setSyncingGuid] = useState<string | null>(null)
const [unlinkingGuid, setUnlinkingGuid] = useState<string | null>(null)
const [toast, setToast] = useState<{ type: 'success' | 'error'; message: string } | null>(null)
const loadData = useCallback(async () => {
try {
const pr = await getActiveProject()
setProject(pr)
if (!pr) {
setActiveSeq(null)
setAllSeqs([])
setLinkedSequences([])
onLinkCountChange?.(0)
return
}
const [currentActive, seqsList] = await Promise.all([
getActiveSequence(pr),
getAllSequences(pr),
])
setActiveSeq(currentActive)
setAllSeqs(seqsList)
const allLinks = await getAllLinkedSequences(pr, seqsList)
// Hide foreign links entirely: only show sequences linked to the current endpoint
const currentServerLinks = allLinks.filter(
(link) => !link.endpoint || isSameEndpoint(link.endpoint, endpoint),
)
setLinkedSequences(currentServerLinks)
onLinkCountChange?.(currentServerLinks.length)
} catch (err) {
console.error('[SequencesView] Failed to load sequences data:', err)
} finally {
setLoading(false)
}
}, [endpoint, onLinkCountChange])
useEffect(() => {
void loadData()
// Listen for sequence activation events in Premiere Pro
const ppro = getPremiereModule()
if (ppro?.EventManager && ppro.Constants?.SequenceEvent?.ACTIVATED) {
const handleActivated = () => {
void loadData()
}
try {
ppro.EventManager.addGlobalEventListener(
ppro.Constants.SequenceEvent.ACTIVATED,
handleActivated,
true,
)
return () => {
try {
ppro.EventManager.removeGlobalEventListener(
ppro.Constants.SequenceEvent.ACTIVATED,
handleActivated,
)
} catch {
// Ignore error on unmount
}
}
} catch (err) {
console.warn('[SequencesView] Could not add SequenceEvent listener:', err)
}
}
}, [loadData])
const showToast = (type: 'success' | 'error', message: string, duration = 4000) => {
setToast({ type, message })
setTimeout(() => {
setToast((prev) => (prev?.message === message ? null : prev))
}, duration)
}
// Sync Now handler
const handleSyncNow = async (link: LinkedSequenceAsset) => {
if (!project || syncingGuid) return
if (link.endpoint && !isSameEndpoint(link.endpoint, endpoint)) {
showToast(
'error',
`Cannot sync comments: sequence was linked to "${link.endpoint}". Connect to that server to sync.`,
5000,
)
return
}
const targetSeq =
allSeqs.find((s) => normalizeGuid(s.guid) === normalizeGuid(link.sequenceGuid)) ||
(await getAllSequences(project)).find(
(s) => normalizeGuid(s.guid) === normalizeGuid(link.sequenceGuid),
)
if (!targetSeq) return
setSyncingGuid(link.sequenceGuid)
try {
const comments = await fetchAssetComments(endpoint, apiKey, link.assetId)
const { updatedLink, addedCount } = await syncCommentsToSequence(
project,
targetSeq,
comments,
link,
)
setLinkedSequences((prev) =>
prev.map((item) =>
normalizeGuid(item.sequenceGuid) === normalizeGuid(updatedLink.sequenceGuid)
? updatedLink
: item,
),
)
showToast(
'success',
addedCount > 0
? `Synced ${addedCount} new comment ${addedCount === 1 ? 'marker' : 'markers'} for "${link.sequenceName}".`
: `All comments are already synced for "${link.sequenceName}".`,
)
} catch (err) {
console.error('[SequencesView] Failed to sync comments:', err)
showToast(
'error',
err instanceof Error ? err.message : 'Failed to sync comments from server.',
5000,
)
} finally {
setSyncingGuid(null)
}
}
// Unlink handler
const handleUnlink = async (link: LinkedSequenceAsset) => {
if (!project || unlinkingGuid) return
const targetSeq =
allSeqs.find((s) => normalizeGuid(s.guid) === normalizeGuid(link.sequenceGuid)) ||
(await getAllSequences(project)).find(
(s) => normalizeGuid(s.guid) === normalizeGuid(link.sequenceGuid),
)
if (!targetSeq) return
setUnlinkingGuid(link.sequenceGuid)
try {
await removeSequenceLink(project, targetSeq)
setLinkedSequences((prev) => {
const next = prev.filter(
(item) => normalizeGuid(item.sequenceGuid) !== normalizeGuid(link.sequenceGuid),
)
onLinkCountChange?.(next.length)
return next
})
showToast('success', `Unlinked "${link.sequenceName}" from "${link.assetName}".`, 3000)
} catch (err) {
console.error('[SequencesView] Failed to unlink sequence:', err)
showToast('error', 'Failed to unlink sequence.', 4000)
} finally {
setUnlinkingGuid(null)
}
}
// Open Sequence in Timeline handler
const handleOpenSequence = async (link: LinkedSequenceAsset) => {
if (!project) return
const targetSeq =
allSeqs.find((s) => normalizeGuid(s.guid) === normalizeGuid(link.sequenceGuid)) ||
(await getAllSequences(project)).find(
(s) => normalizeGuid(s.guid) === normalizeGuid(link.sequenceGuid),
)
if (!targetSeq) return
await openSequenceInTimeline(targetSeq, project)
setActiveSeq(targetSeq)
}
const renderToast = () => {
if (!toast) return null
const isError = toast.type === 'error'
return (
<div
style={{
marginBottom: 10,
padding: '6px 10px',
borderRadius: 4,
backgroundColor: isError ? 'rgba(239, 68, 68, 0.15)' : 'rgba(59, 130, 246, 0.15)',
border: isError
? '1px solid rgba(239, 68, 68, 0.3)'
: '1px solid rgba(59, 130, 246, 0.3)',
color: isError ? '#f87171' : '#60a5fa',
fontSize: 11,
display: 'flex',
alignItems: 'center',
}}
>
{isError ? (
<sp-icon-alert-circle
size="s"
style={{ marginRight: 6, flexShrink: 0 }}
></sp-icon-alert-circle>
) : (
<sp-icon-checkmark-circle
size="s"
style={{ marginRight: 6, flexShrink: 0 }}
></sp-icon-checkmark-circle>
)}
<span>{toast.message}</span>
</div>
)
}
if (loading) {
return (
<div
className="sequences-view-container"
style={{ justifyContent: 'center', alignItems: 'center' }}
>
<ProgressCircle indeterminate size="m" label="Loading sequences..." />
</div>
)
}
const activeGuidStr = normalizeGuid(activeSeq?.guid)
const currentSequenceLink = linkedSequences.find(
(item) => normalizeGuid(item.sequenceGuid) === activeGuidStr,
)
if (linkedSequences.length === 0) {
return (
<div className="sequences-view-container sequences-empty-container">
{renderToast()}
<div className="sequence-empty-state unified-empty">
<sp-icon-movie-camera
size="xxl"
style={{ color: '#60a5fa', opacity: 0.7, marginBottom: 12 }}
></sp-icon-movie-camera>
<div className="sequence-empty-state-title" style={{ fontSize: 14, marginBottom: 6 }}>
No Linked Sequences
</div>
<div style={{ fontSize: 11, marginBottom: 8, maxWidth: 280, lineHeight: 1.4 }}>
{activeSeq
? `Active sequence "${activeSeq.name}" is not linked to any Shumai asset.`
: 'Open a sequence in Premiere Pro and link it to a Shumai asset.'}
</div>
<div
style={{
fontSize: 11,
color: 'var(--text-secondary)',
marginBottom: 0,
maxWidth: 280,
lineHeight: 1.4,
}}
>
Linking a sequence enables automatic synchronization of comments from Shumai as timeline
markers.
</div>
</div>
</div>
)
}
return (
<div className="sequences-view-container">
{/* Toast Notification */}
{renderToast()}
{/* SECTION 1: Current Sequence Asset */}
<div className="sequence-section">
<div className="sequence-section-title">Current Sequence Asset</div>
{currentSequenceLink ? (
<div className="sequence-link-card current-active">
<div className="sequence-card-row">
<div className="sequence-card-left">
<div className="sequence-card-thumb">
{currentSequenceLink.assetThumbnailUrl ? (
<img
src={resolveAssetUrl(
currentSequenceLink.assetThumbnailUrl,
currentSequenceLink.endpoint || endpoint,
)}
alt={currentSequenceLink.assetName}
/>
) : (
<sp-icon-movie-camera
size="m"
style={{ color: '#3b82f6' }}
></sp-icon-movie-camera>
)}
</div>
<div className="sequence-card-info">
<div style={{ display: 'flex', alignItems: 'center' }}>
<span className="sequence-card-title">{currentSequenceLink.sequenceName}</span>
<span
style={{
fontSize: '9px',
marginLeft: 6,
padding: '1px 4px',
borderRadius: 3,
backgroundColor: 'rgba(59, 130, 246, 0.2)',
color: '#60a5fa',
fontWeight: 600,
}}
>
Active
</span>
</div>
<span className="sequence-card-subtitle" title={currentSequenceLink.assetName}>
Asset: {currentSequenceLink.assetName}
</span>
</div>
</div>
<div className="sequence-card-actions">
<sp-action-button
quiet
size="xs"
label="Sync comments now"
title="Sync comments now"
disabled={syncingGuid === currentSequenceLink.sequenceGuid}
onClick={() => handleSyncNow(currentSequenceLink)}
>
{syncingGuid === currentSequenceLink.sequenceGuid ? (
<ProgressCircle indeterminate size="s" slot="icon" label="Syncing..." />
) : (
<sp-icon-refresh size="s" slot="icon"></sp-icon-refresh>
)}
</sp-action-button>
<sp-action-button
quiet
size="xs"
label="Unlink sequence"
title="Unlink sequence"
disabled={unlinkingGuid === currentSequenceLink.sequenceGuid}
onClick={() => handleUnlink(currentSequenceLink)}
>
{unlinkingGuid === currentSequenceLink.sequenceGuid ? (
<ProgressCircle indeterminate size="s" slot="icon" label="Unlinking..." />
) : (
<sp-icon-unlink
size="s"
slot="icon"
style={{ color: '#f87171' }}
></sp-icon-unlink>
)}
</sp-action-button>
</div>
</div>
<div className="sequence-card-footer">
<span>
{currentSequenceLink.totalCommentsSynced}{' '}
{currentSequenceLink.totalCommentsSynced === 1 ? 'comment' : 'comments'} synced
</span>
<span>Last sync: {formatDateAgo(currentSequenceLink.lastSyncAt) || 'Just now'}</span>
</div>
</div>
) : (
<div className="sequence-empty-state compact">
<sp-icon-movie-camera
size="l"
style={{ color: '#60a5fa', opacity: 0.6, marginBottom: 4 }}
></sp-icon-movie-camera>
<div className="sequence-empty-state-title">
{activeSeq ? activeSeq.name : 'No Active Sequence'}
</div>
<div style={{ fontSize: 11, color: 'var(--text-secondary)', marginBottom: 8 }}>
{activeSeq
? 'This sequence is not linked to any Shumai asset.'
: 'Open a sequence in the timeline to view its linked asset.'}
</div>
</div>
)}
</div>
{/* SECTION 2: All Sequence Assets */}
<div className="sequence-section" style={{ marginTop: 8 }}>
<div className="sequence-section-title">All Sequence Assets ({linkedSequences.length})</div>
{linkedSequences.map((link) => {
const isActive = normalizeGuid(link.sequenceGuid) === activeGuidStr
const isSyncing = syncingGuid === link.sequenceGuid
const isUnlinking = unlinkingGuid === link.sequenceGuid
return (
<div
key={link.sequenceGuid}
className={`sequence-link-card ${isActive ? 'current-active' : ''}`}
>
<div className="sequence-card-row">
<div className="sequence-card-left">
<div className="sequence-card-thumb">
{link.assetThumbnailUrl ? (
<img
src={resolveAssetUrl(link.assetThumbnailUrl, link.endpoint || endpoint)}
alt={link.assetName}
/>
) : (
<sp-icon-movie-camera
size="m"
style={{ color: '#60a5fa' }}
></sp-icon-movie-camera>
)}
</div>
<div className="sequence-card-info">
<div style={{ display: 'flex', alignItems: 'center' }}>
<span className="sequence-card-title">{link.sequenceName}</span>
{isActive && (
<span
style={{
fontSize: '9px',
marginLeft: 6,
padding: '1px 4px',
borderRadius: 3,
backgroundColor: 'rgba(59, 130, 246, 0.2)',
color: '#60a5fa',
fontWeight: 600,
}}
>
Active
</span>
)}
</div>
<span className="sequence-card-subtitle" title={link.assetName}>
Asset: {link.assetName}
</span>
</div>
</div>
<div className="sequence-card-actions">
{!isActive && (
<sp-action-button
quiet
size="xs"
label="Open sequence in timeline"
title="Open sequence in timeline"
onClick={() => handleOpenSequence(link)}
>
<sp-icon-link-out size="s" slot="icon"></sp-icon-link-out>
</sp-action-button>
)}
<sp-action-button
quiet
size="xs"
label="Sync comments now"
title="Sync comments now"
disabled={isSyncing}
onClick={() => handleSyncNow(link)}
>
{isSyncing ? (
<ProgressCircle indeterminate size="s" slot="icon" label="Syncing..." />
) : (
<sp-icon-refresh size="s" slot="icon"></sp-icon-refresh>
)}
</sp-action-button>
<sp-action-button
quiet
size="xs"
label="Unlink sequence"
title="Unlink sequence"
disabled={isUnlinking}
onClick={() => handleUnlink(link)}
>
{isUnlinking ? (
<ProgressCircle indeterminate size="s" slot="icon" label="Unlinking..." />
) : (
<sp-icon-unlink
size="s"
slot="icon"
style={{ color: '#f87171' }}
></sp-icon-unlink>
)}
</sp-action-button>
</div>
</div>
<div className="sequence-card-footer">
<span>
{link.totalCommentsSynced}{' '}
{link.totalCommentsSynced === 1 ? 'comment' : 'comments'} synced
</span>
<span>Last sync: {formatDateAgo(link.lastSyncAt) || 'Just now'}</span>
</div>
</div>
)
})}
</div>
</div>
)
}
+9
View File
@@ -0,0 +1,9 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "react",
"types": ["bun", "node", "@adobe/premierepro"]
},
"include": ["src/**/*"]
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@shumai/transcode-app",
"version": "0.4.4",
"version": "0.5.2",
"private": true,
"type": "module",
"bin": {
+4
View File
@@ -73,6 +73,8 @@ apps/web/e2e/
| Owner creates a project with a cover image | `tests/project/create-project.spec.ts` |
| Owner uploads a file or an unsupported file via the "Upload File" context menu action | `tests/project/upload-file.spec.ts` |
| Owner deletes a file, finds it in recently deleted, and restores it | `tests/project/delete-restore.spec.ts` |
| Owner deletes a folder and still sees its contents preview and countdown in recently deleted | `tests/project/delete-restore.spec.ts` |
| Owner deletes a version stack and restores it from recently deleted | `tests/project/delete-restore.spec.ts` |
| Owner creates a share link from a file context menu and lands on the share page | `tests/project/create-share-link.spec.ts` |
| Owner protects a share with a password; guests must enter it to view | `tests/project/share-password.spec.ts` |
| Owner creates a collection from the sidebar; the collection shows project files | `tests/project/create-collection.spec.ts` |
@@ -103,6 +105,8 @@ apps/web/e2e/
| Upload an image file, wait for transcode, and create a comment with draw | `tests/file/image-draw-comment.spec.ts` |
| Upload a video file, wait for transcode, and create a comment with draw at a non-zero timestamp | `tests/file/video-draw-comment.spec.ts` |
| Upload an audio file, wait for transcode, and create a comment at a non-zero timestamp | `tests/file/audio-timestamp-comment.spec.ts` |
| Show a breathing poster preview and "Preparing..." while a video is still transcoding | `tests/file/processing-preview.spec.ts` |
| Show a preparing circle before the poster is generated | `tests/file/processing-preview.spec.ts` |
## Conventions
@@ -0,0 +1,82 @@
import { expect, test } from '../../fixtures'
import { fileCard } from '../../helpers/files'
// Uploaded as a binary file so no real transcode task races with the simulated mid-transcode
// state we set up directly in the database.
test.use({ fileOptions: { mediaType: 'binary' } })
test('shows the poster preview and "Preparing..." while a video is still transcoding', async ({
file,
prisma,
}) => {
const { page, projectId, fileId, fileName } = file
// Simulate a video that is mid-transcode: the poster/sprite preview already exists, but the
// asset is still marked as processing.
const assetDir = `files/e2e/${fileId}`
await prisma.asset.update({
where: { id: fileId },
data: {
status: 'processing',
mediaType: 'video/mp4',
media: {
duration: 10,
filesize: 0,
frames: 300,
proxyType: 'video',
imageTranscodes: [],
videoTranscodes: [],
sprite: { key: `${assetDir}/sprite.webp`, frames: 100, tileX: 10, tileY: 10 },
poster: { key: `${assetDir}/poster.webp` },
finishedAt: new Date().toISOString(),
metadata: {
originalWidth: 1920,
originalHeight: 1080,
hasAudio: false,
duration: 10,
bitRate: 0,
frameRate: 30,
totalFrames: 300,
startTimecode: '00:00:00:00',
format: {},
},
original: { key: `${assetDir}/original.mp4`, filesizeInBytes: 0, codec: '' },
},
},
})
await page.goto(`/projects/${projectId}`)
const card = fileCard(page, fileName)
await expect(card).toBeVisible()
// The preview (poster thumbnail used as the sprite scrubber base) is rendered instead of a
// blank placeholder, and its opacity breathes while transcoding is in progress.
await expect(card.locator('img[alt="Thumbnail"]')).toBeVisible()
await expect(card.getByTestId('file-card-preview-media')).toHaveClass(/animate-pulse/)
// The creator row is replaced by a "Preparing..." label while transcoding.
await expect(card.getByText(/Preparing|准备中/i)).toBeVisible()
// The duration badge is hidden until the asset is ready.
await expect(card.getByText('00:10')).toHaveCount(0)
})
test('shows a preparing circle before the poster is generated', async ({ file, prisma }) => {
const { page, projectId, fileId, fileName } = file
// Simulate an asset whose upload finished but whose poster does not exist yet.
await prisma.asset.update({
where: { id: fileId },
data: { status: 'processing', mediaType: 'video/mp4' },
})
await page.goto(`/projects/${projectId}`)
const card = fileCard(page, fileName)
await expect(card).toBeVisible()
// A size-breathing circle stands in until the poster is available, with a "Preparing..." label.
await expect(card.getByTestId('file-card-preparing-circle')).toBeVisible()
await expect(card.getByText(/Preparing|准备中/i)).toBeVisible()
})
@@ -1,4 +1,5 @@
import { expect, test } from '../../fixtures'
import { seedFile, seedFolder } from '../../helpers/assets'
import { fileCard } from '../../helpers/files'
test('owner deletes a file, finds it in recently deleted, and restores it', async ({
@@ -43,3 +44,121 @@ test('owner deletes a file, finds it in recently deleted, and restores it', asyn
await page.goto(`/projects/${projectId}`)
await expect(fileCard(page, fileName)).toBeVisible()
})
test('owner deletes a folder and still sees its contents preview and countdown in recently deleted', async ({
project,
prisma,
}) => {
const { page, projectId, rootFolderId } = project
const folderName = `e2e-deleted-folder-${Date.now()}`
const folder = await seedFolder(prisma, projectId, rootFolderId, folderName)
await seedFile(prisma, projectId, folder.id, 'inside-1.png')
await seedFile(prisma, projectId, folder.id, 'inside-2.png')
await page.goto(`/projects/${projectId}`)
await expect(fileCard(page, folderName)).toBeVisible()
// Delete the folder through the context menu + confirmation dialog
await fileCard(page, folderName).click({ button: 'right' })
await page.getByRole('menuitem', { name: 'Delete' }).click()
const deleteDialog = page.getByRole('alertdialog')
await expect(deleteDialog.getByText('Delete Asset?')).toBeVisible()
await deleteDialog.getByRole('button', { name: 'Delete' }).click()
await expect(fileCard(page, folderName)).not.toBeVisible()
// Navigate to the Recently Deleted view
await page.getByText('Recently Deleted').click()
await expect(page).toHaveURL(/\/recently-deleted/)
const deletedFolderCard = fileCard(page, folderName)
await expect(deletedFolderCard).toBeVisible()
// The folder still shows previews of the files that were deleted with it
await expect(deletedFolderCard.getByTestId('folder-preview-grid')).toBeVisible()
// And each item shows how many days are left before permanent deletion
await expect(deletedFolderCard.getByTestId('folder-card-days-left')).toHaveText(/30\s*(d|天)/)
})
test('owner deletes a version stack and restores it from recently deleted', async ({
project,
prisma,
}) => {
const { page, projectId, rootFolderId } = project
const latestVersionName = `e2e-stack-latest-${Date.now()}.png`
const olderVersionName = `e2e-stack-older-${Date.now()}.png`
const stack = await prisma.asset.create({
data: {
name: `e2e-stack-${Date.now()}`,
type: 'version_stack',
status: 'processed',
projectId,
parentId: rootFolderId,
fileCount: 2,
sizeByte: 20,
},
})
await prisma.asset.create({
data: {
name: latestVersionName,
type: 'file',
status: 'processed',
sizeByte: 10,
sortIndex: 'a0',
projectId,
parentId: stack.id,
},
})
await prisma.asset.create({
data: {
name: olderVersionName,
type: 'file',
status: 'processed',
sizeByte: 10,
sortIndex: 'a1',
projectId,
parentId: stack.id,
},
})
// The stack card is labelled with its latest version's name
await page.goto(`/projects/${projectId}`)
await expect(fileCard(page, latestVersionName)).toBeVisible()
await fileCard(page, latestVersionName).click({ button: 'right' })
await page.getByRole('menuitem', { name: 'Delete' }).click()
const deleteDialog = page.getByRole('alertdialog')
await expect(deleteDialog.getByText('Delete Asset?')).toBeVisible()
await deleteDialog.getByRole('button', { name: 'Delete' }).click()
await expect(fileCard(page, latestVersionName)).not.toBeVisible()
// The whole stack is soft-deleted, including its versions
await expect
.poll(async () => {
const row = await prisma.asset.findUnique({ where: { id: stack.id } })
return row?.isDeleted
})
.toBe(true)
// Restore it from the Recently Deleted view
await page.getByText('Recently Deleted').click()
await expect(page).toHaveURL(/\/recently-deleted/)
await expect(fileCard(page, latestVersionName)).toBeVisible()
await fileCard(page, latestVersionName).click({ button: 'right' })
await page.getByRole('menuitem', { name: 'Restore' }).click()
await expect(fileCard(page, latestVersionName)).not.toBeVisible()
await expect
.poll(async () => {
const row = await prisma.asset.findUnique({ where: { id: stack.id } })
return row?.isDeleted
})
.toBe(false)
// Back at the project root the stack is visible again
await page.goto(`/projects/${projectId}`)
await expect(fileCard(page, latestVersionName)).toBeVisible()
})
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@shumai/web-app",
"version": "0.4.4",
"version": "0.5.2",
"private": true,
"type": "module",
"dependencies": {
+2
View File
@@ -16,6 +16,7 @@ import { migrateLegacyAgentAvatars } from '@shumai/core/src/agent/migration'
import { handleDaemonCommands } from '@shumai/core/src/utils/daemon'
import { authService } from '@shumai/core/src/auth/auth'
import { sandboxService } from '@shumai/core'
import { notificationJobService } from '@shumai/core/src/notification/notification-job'
if (process.argv.includes('--check')) {
console.log('✅ Web app evaluated successfully!')
@@ -58,6 +59,7 @@ async function run() {
await metadataService.syncSystemFields().catch(console.error)
await migrateLegacyAgentAvatars().catch(console.error)
assetService.startCleanupJob()
notificationJobService.start()
workflowService.start()
if (process.env.WORKFLOW_EXECUTOR === 'temporal') {
const args = process.argv.slice(2)
+520 -50
View File
@@ -33,7 +33,7 @@
},
"apps/agent": {
"name": "@shumai/agent-app",
"version": "0.4.4",
"version": "0.5.2",
"bin": {
"shumai-agent": "./src/index.ts",
},
@@ -45,7 +45,7 @@
},
"apps/cli": {
"name": "@shumai/cli",
"version": "0.4.4",
"version": "0.5.2",
"bin": {
"shumai-cli": "./src/index.ts",
},
@@ -58,9 +58,63 @@
"ulid": "3.0.2",
},
},
"apps/premiere-uxp": {
"name": "@shumai/premiere-uxp",
"version": "0.5.2",
"dependencies": {
"@shumai/api": "workspace:*",
"@shumai/dtos": "workspace:*",
"@spectrum-web-components/action-menu": "0.37.0",
"@spectrum-web-components/badge": "0.37.0",
"@spectrum-web-components/icon": "1.12.2",
"@spectrum-web-components/icons-workflow": "1.12.2",
"@spectrum-web-components/menu": "0.37.0",
"@spectrum-web-components/progress-circle": "0.37.0",
"@spectrum-web-components/status-light": "0.37.0",
"@spectrum-web-components/theme": "0.37.0",
"@swc-react/action-button": "0.37.0",
"@swc-react/action-group": "0.37.0",
"@swc-react/action-menu": "0.37.0",
"@swc-react/badge": "0.37.0",
"@swc-react/button": "0.37.0",
"@swc-react/card": "0.37.0",
"@swc-react/divider": "0.37.0",
"@swc-react/field-label": "0.37.0",
"@swc-react/help-text": "0.37.0",
"@swc-react/illustrated-message": "0.37.0",
"@swc-react/menu": "0.37.0",
"@swc-react/progress-circle": "0.37.0",
"@swc-react/search": "0.37.0",
"@swc-react/status-light": "0.37.0",
"@swc-react/textfield": "0.37.0",
"@swc-react/theme": "0.37.0",
"@swc-uxp-wrappers/action-button": "2.0.0",
"@swc-uxp-wrappers/action-group": "2.0.0",
"@swc-uxp-wrappers/button": "2.0.0",
"@swc-uxp-wrappers/card": "2.0.0",
"@swc-uxp-wrappers/divider": "2.0.0",
"@swc-uxp-wrappers/field-label": "2.0.0",
"@swc-uxp-wrappers/help-text": "2.0.0",
"@swc-uxp-wrappers/illustrated-message": "2.0.0",
"@swc-uxp-wrappers/menu": "2.0.0",
"@swc-uxp-wrappers/overlay": "2.0.0",
"@swc-uxp-wrappers/popover": "2.0.0",
"@swc-uxp-wrappers/search": "2.0.0",
"@swc-uxp-wrappers/textfield": "2.0.0",
"@swc-uxp-wrappers/utils": "2.0.1",
"hono": "4.13.5",
"react": "19.2.8",
"react-dom": "19.2.8",
},
"devDependencies": {
"@adobe/premierepro": "26.3.0",
"@types/react": "19.2.18",
"@types/react-dom": "19.2.7",
},
},
"apps/transcode": {
"name": "@shumai/transcode-app",
"version": "0.4.4",
"version": "0.5.2",
"bin": {
"shumai-transcode": "./src/index.ts",
},
@@ -72,7 +126,7 @@
},
"apps/web": {
"name": "@shumai/web-app",
"version": "0.4.4",
"version": "0.5.2",
"dependencies": {
"@shumai/agent": "workspace:*",
"@shumai/api": "workspace:*",
@@ -92,7 +146,7 @@
},
"packages/agent": {
"name": "@shumai/agent",
"version": "0.4.4",
"version": "0.5.2",
"dependencies": {
"@anthropic-ai/sandbox-runtime": "0.0.74",
"@earendil-works/pi-agent-core": "0.82.1",
@@ -117,7 +171,7 @@
},
"packages/api": {
"name": "@shumai/api",
"version": "0.4.4",
"version": "0.5.2",
"dependencies": {
"@hono/zod-validator": "0.7.6",
"@shumai/core": "workspace:*",
@@ -131,7 +185,7 @@
},
"packages/core": {
"name": "@shumai/core",
"version": "0.4.4",
"version": "0.5.2",
"dependencies": {
"@ai-sdk/alibaba": "2.0.38",
"@ai-sdk/amazon-bedrock": "5.0.67",
@@ -160,6 +214,8 @@
"@shumai/db": "workspace:*",
"@shumai/dtos": "workspace:*",
"@sinclair/typebox": "0.34.52",
"@temporalio/activity": "1.24.0",
"@temporalio/workflow": "1.24.0",
"adm-zip": "0.6.0",
"ai": "7.0.84",
"better-auth": "1.6.11",
@@ -167,9 +223,11 @@
"date-fns": "4.4.0",
"dotenv": "17.4.2",
"dotenv-expand": "13.0.0",
"exiftool-vendored": "38.1.0",
"extract-zip": "2.0.1",
"hono": "4.13.5",
"jittered-fractional-indexing": "1.0.1",
"nodemailer": "10.0.10",
"pdfkit": "0.20.1",
"pino": "10.3.1",
"sharp": "0.35.4",
@@ -183,12 +241,13 @@
"@modelcontextprotocol/server": "2.0.0",
"@types/adm-zip": "0.5.8",
"@types/extract-zip": "2.0.3",
"@types/nodemailer": "8.0.2",
"@types/pdfkit": "0.17.6",
},
},
"packages/db": {
"name": "@shumai/db",
"version": "0.4.4",
"version": "0.5.2",
"dependencies": {
"@earendil-works/pi-agent-core": "0.82.1",
"@prisma/adapter-pg": "7.10.0",
@@ -204,7 +263,7 @@
},
"packages/dtos": {
"name": "@shumai/dtos",
"version": "0.4.4",
"version": "0.5.2",
"dependencies": {
"@earendil-works/pi-agent-core": "0.82.1",
"zod": "4.5.4",
@@ -212,7 +271,7 @@
},
"packages/e2e": {
"name": "@shumai/e2e",
"version": "0.4.4",
"version": "0.5.2",
"dependencies": {
"@earendil-works/pi-agent-core": "0.82.1",
"@google/genai": "2.19.0",
@@ -227,11 +286,11 @@
},
"packages/tableprinter": {
"name": "@shumai/tableprinter",
"version": "0.4.4",
"version": "0.5.2",
},
"packages/transcode": {
"name": "@shumai/transcode",
"version": "0.4.4",
"version": "0.5.2",
"dependencies": {
"@shumai/core": "workspace:*",
"@shumai/db": "workspace:*",
@@ -245,12 +304,13 @@
},
"packages/webui": {
"name": "@shumai/webui",
"version": "0.4.4",
"version": "0.5.2",
"dependencies": {
"@base-ui/react": "1.7.0",
"@dnd-kit/abstract": "0.5.0",
"@dnd-kit/dom": "0.5.0",
"@dnd-kit/react": "0.5.0",
"@ferrucc-io/emoji-picker": "0.1.2",
"@hookform/resolvers": "5.9.1",
"@lexical/code": "0.49.0",
"@lexical/link": "0.49.0",
@@ -304,6 +364,7 @@
"cmdk": "1.1.1",
"date-fns": "4.4.0",
"embla-carousel-react": "8.6.0",
"hls.js": "1.7.3",
"hono": "4.13.5",
"input-otp": "1.5.0",
"konva": "10.3.2",
@@ -327,7 +388,6 @@
"ulid": "3.0.2",
"use-image": "1.1.4",
"vaul": "1.1.2",
"video.js": "8.24.0",
"zod": "4.5.4",
"zustand": "5.0.15",
},
@@ -346,7 +406,7 @@
},
"packages/workflow-core": {
"name": "@shumai/workflow-core",
"version": "0.4.4",
"version": "0.5.2",
"dependencies": {
"@shumai/core": "workspace:*",
"@shumai/db": "workspace:*",
@@ -362,6 +422,8 @@
"@earendil-works/pi-ai@0.82.1": "patches/@earendil-works%2Fpi-ai@0.82.1.patch",
},
"packages": {
"@adobe/premierepro": ["@adobe/premierepro@26.3.0", "", {}, "sha512-J84zEX8R4L5EU5EVVs3AWkd4LRoXPKueo28jPNfwwDAo69TOSNsAblImtsAmJR4HGDDazsvHkMQE3JBJqIcB9Q=="],
"@ai-sdk/alibaba": ["@ai-sdk/alibaba@2.0.38", "", { "dependencies": { "@ai-sdk/provider": "4.0.8", "@ai-sdk/provider-utils": "5.0.33" }, "peerDependencies": { "zod": "^3.25.76 || ^4.1.8" } }, "sha512-cPXqexcd/l94AyDeo2DoRBqQl6jrXwZbv7FBcnrKbz59U3RHJcxOs3a9KnxYYrmI4rs5iCqh3LGI0jb+Efw+ng=="],
"@ai-sdk/amazon-bedrock": ["@ai-sdk/amazon-bedrock@5.0.67", "", { "dependencies": { "@ai-sdk/anthropic": "4.0.45", "@ai-sdk/openai": "4.0.51", "@ai-sdk/provider": "4.0.8", "@ai-sdk/provider-utils": "5.0.33", "@smithy/eventstream-codec": "^4.3.3", "@smithy/util-utf8": "^4.3.3", "aws4fetch": "^1.0.20" }, "peerDependencies": { "zod": "^3.25.76 || ^4.1.8" } }, "sha512-GFhqE9rHOTrSwcNcqvBNGdU4DD9a6tsYCz/KelQZJy3XAAaUpLkTvefITLNX2A+n/MHfu6Q9TPhKrOpXj5auSQ=="],
@@ -578,6 +640,8 @@
"@eslint/plugin-kit": ["@eslint/plugin-kit@0.7.2", "", { "dependencies": { "@eslint/core": "^1.2.1", "levn": "^0.4.1" } }, "sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A=="],
"@ferrucc-io/emoji-picker": ["@ferrucc-io/emoji-picker@0.1.2", "", { "dependencies": { "@tanstack/react-virtual": "^3.11.2", "clsx": "^2.1.1", "jotai": "^2.11.1", "node-emoji": "^2.1.3", "tailwind-merge": "^3.4.0", "unicode-emoji-json": "^0.8.0" }, "peerDependencies": { "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0", "tailwindcss": ">=3.0.0" } }, "sha512-P15x8qOOz3n12lkCWrnKbniy2otHTg0JLyK2LNsQzrj2UJwltSDcitqj10+FRf4dMEFuGKHPjiwqP/8Xz2e+YA=="],
"@floating-ui/core": ["@floating-ui/core@1.8.0", "", { "dependencies": { "@floating-ui/utils": "^0.2.12" } }, "sha512-0CIZ5itps/8x7BG8dEIhs53BvCUH2PCoogtakwRTut+Arm58sJooJ0AuZhLw2HJYIR5cMLNPBSS728sPho2khQ=="],
"@floating-ui/dom": ["@floating-ui/dom@1.8.0", "", { "dependencies": { "@floating-ui/core": "^1.8.0", "@floating-ui/utils": "^0.2.12" } }, "sha512-yXSrzeHZBTZadLOlfyhCkJHNeLJnHRnRInwdZ40L7ZiaAtrBwoYlsDrX3v5zB1Utk7CLfzcOVnVVWoXEky7Ceg=="],
@@ -764,6 +828,14 @@
"@lexical/yjs": ["@lexical/yjs@0.49.0", "", { "dependencies": { "@lexical/internal": "0.49.0", "@lexical/selection": "0.49.0", "lexical": "0.49.0" }, "peerDependencies": { "typescript": ">=5.2", "yjs": ">=13.5.22" }, "optionalPeers": ["typescript"] }, "sha512-uqV3D0AOLqQ1f/Bo6ZtuDLoJYGlBm0RlucNYhNvfMAncEw0f/xHc1pTyXeWjdCI/iWgWR/MV6hgVi26TSPs+Vg=="],
"@lit-labs/observers": ["@lit-labs/observers@2.0.2", "", { "dependencies": { "@lit/reactive-element": "^1.0.0 || ^2.0.0" } }, "sha512-eZb5+W9Cb0e/Y5m1DNxBSGTvGB2TAVTGMnTxL/IzFhPQEcZIAHewW1eVBhN8W07A5tirRaAmmF6fGL1V20p3gQ=="],
"@lit-labs/react": ["@lit-labs/react@1.2.1", "", {}, "sha512-DiZdJYFU0tBbdQkfwwRSwYyI/mcWkg3sWesKRsHUd4G+NekTmmeq9fzsurvcKTNVa0comNljwtg4Hvi1ds3V+A=="],
"@lit-labs/ssr-dom-shim": ["@lit-labs/ssr-dom-shim@1.6.0", "", {}, "sha512-VHb0ALPMTlgKjM6yIxxoQNnpKyUKLD04VzeQdsiXkMqkvYlAHxq9glGLmgbb889/1GsohSOAjvQYoiBppXFqrQ=="],
"@lit/reactive-element": ["@lit/reactive-element@2.1.2", "", { "dependencies": { "@lit-labs/ssr-dom-shim": "^1.5.0" } }, "sha512-pbCDiVMnne1lYUIaYNN5wrwQXDtHaYtg7YEFPeW+hws6U47WeFvISGUWekPGKWOP1ygrs0ef0o1VJMk1exos5A=="],
"@lix-js/sdk": ["@lix-js/sdk@0.12.3", "", { "dependencies": { "fflate": "^0.8.3" }, "optionalDependencies": { "@lix-js/sdk-darwin-arm64": "0.12.3", "@lix-js/sdk-linux-arm64": "0.12.3", "@lix-js/sdk-linux-x64": "0.12.3", "@lix-js/sdk-win32-x64": "0.12.3" } }, "sha512-T2194yoZsM2S9kyRmI8UtEJL0fgXYAkeY9jZ/PVyC0K78/wmBvrqOSt9SdvgYxM5qnZ57re3NLOjVlV+X5hWxQ=="],
"@lix-js/sdk-darwin-arm64": ["@lix-js/sdk-darwin-arm64@0.12.3", "", { "os": "darwin", "cpu": "arm64" }, "sha512-YeMJyYGk+QwvQe8O4AAcBMgfNm68IjAGDvuvZHr1U1rIb3GC2kYFStajqf4mT4BGc+cN65/P/2kkqEo+Igu/sA=="],
@@ -840,6 +912,8 @@
"@oxc-project/types": ["@oxc-project/types@0.147.0", "", {}, "sha512-IJ3s6ltHLp45S0bh7phkX+gJO7A1Wuz2EaqpAhb8WjqDwbzMiWKHhyyT42tskaWjEYXtHtVCPpnBJVT9+dcRLg=="],
"@photostructure/tz-lookup": ["@photostructure/tz-lookup@11.7.0", "", {}, "sha512-QbKHXvleluMIlAHf2JiQTJNU5rLQBeQhLobyRqgXZ6NNGKqNikaRkjYviJ4nMU7Y75QE7bBYM8xjiFGjAukyhw=="],
"@pinojs/redact": ["@pinojs/redact@0.4.0", "", {}, "sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg=="],
"@pkgjs/parseargs": ["@pkgjs/parseargs@0.11.0", "", {}, "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg=="],
@@ -1074,6 +1148,8 @@
"@shumai/e2e": ["@shumai/e2e@workspace:packages/e2e"],
"@shumai/premiere-uxp": ["@shumai/premiere-uxp@workspace:apps/premiere-uxp"],
"@shumai/tableprinter": ["@shumai/tableprinter@workspace:packages/tableprinter"],
"@shumai/transcode": ["@shumai/transcode@workspace:packages/transcode"],
@@ -1088,6 +1164,8 @@
"@sinclair/typebox": ["@sinclair/typebox@0.34.52", "", {}, "sha512-XiMQh7qqVlxZzcVD+kkGMNGMzcTrDMLWI7S4x7z1MkCkbDPrekpZXEUK0eZqZFMuHQg2a2DZOcDIh9o5v3Gonw=="],
"@sindresorhus/is": ["@sindresorhus/is@4.6.0", "", {}, "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="],
"@smithy/core": ["@smithy/core@3.33.3", "", { "dependencies": { "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-CsOeKq/9kA3y6VJHt+/+VTCtBaxJ4OTFpgrjIUhPpDIKxBci1k2bJaQASF2h/ELWrulGp+t97DZ0mevfAD8idg=="],
"@smithy/credential-provider-imds": ["@smithy/credential-provider-imds@4.5.2", "", { "dependencies": { "@smithy/core": "^3.33.2", "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-A9uSdn72ozbRUSit0eib0TW7nXuNPlaeM0zcGkJ+nE6tFcSDbnmtwoxbTCFBukVQcszDAyvsd7+rTduPTXpygg=="],
@@ -1108,12 +1186,200 @@
"@smithy/util-utf8": ["@smithy/util-utf8@4.5.2", "", { "dependencies": { "@smithy/core": "^3.33.2", "tslib": "^2.6.2" } }, "sha512-7wNWV7SugHpcMA7uzEawJNpE0GrasXM7a9E+1+Wm6NxVuDClESac/AKt+G7jMZNUz5vBLWqKlqVV7Sv7AtUr6Q=="],
"@spectrum-web-components/action-button": ["@spectrum-web-components/action-button@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/button": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/icons-ui": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0" } }, "sha512-cU/5sHpRSA823sHUH6jZccmizkTxWr/LJHTDJ4jj0LxCLh15OHfxKM+hu/vcc5fXYrAPma5Hp54xTBc/l/frDA=="],
"@spectrum-web-components/action-group": ["@spectrum-web-components/action-group@0.37.0", "", { "dependencies": { "@lit-labs/observers": "^2.0.0", "@spectrum-web-components/action-button": "^0.37.0", "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icons-workflow": "^0.37.0", "@spectrum-web-components/reactive-controllers": "^0.37.0" } }, "sha512-unC1SMjhWI080lfHeAMxBL1y2Vyk6fIhKdukWzqQnzMpPdogh+tvKF9kUgPLZ3rq0hFFCquT0ZZezyywvjTWZA=="],
"@spectrum-web-components/action-menu": ["@spectrum-web-components/action-menu@0.37.0", "", { "dependencies": { "@spectrum-web-components/action-button": "^0.37.0", "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/icons-workflow": "^0.37.0", "@spectrum-web-components/picker": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0" } }, "sha512-Xgta0n0bSRSBwh5ZZhwFC3YicwqcAYgvmSZQiZ6TEgccNMpwsgFj66e/r3K1dCEkVcsONfV3dbuIu3eqTCAXSA=="],
"@spectrum-web-components/asset": ["@spectrum-web-components/asset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-nFZ4/TCHbUcNUay5NI1fLhLejtx7QJ3H+diCNsZXOvmUI+0atcNPid6j5/4CyvSd8PQooEvCgHpbHf39AM57Cg=="],
"@spectrum-web-components/badge": ["@spectrum-web-components/badge@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0" } }, "sha512-C2ZgSLcQ2crQ/fmgpfy6xAi2Vc+XsPr5bAdfAQG4yy/5S3etSwVzxdDCSY7JB8tWyA/mvQk5vSqUyEB9JmD+PQ=="],
"@spectrum-web-components/base": ["@spectrum-web-components/base@0.37.0", "", { "dependencies": { "lit": "^2.5.0" } }, "sha512-3JOI36CemlFzXKAuennOBZ2k99ayd6yooG8eX24z58r0nT6I+3q6jYbytBRJuj48Y7vxwxqMIKX4V118A1dmMQ=="],
"@spectrum-web-components/button": ["@spectrum-web-components/button@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/clear-button": "^0.37.0", "@spectrum-web-components/close-button": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/icons-ui": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0" } }, "sha512-Cz69UtdNDqNVAMUjz2i1RjZ4LetR+bTnUvaDlj8heQHYR/ZHKdnMWaxS1DnZjlu7+osFo57XJPLyhlEEgYT1Ig=="],
"@spectrum-web-components/card": ["@spectrum-web-components/card@0.37.0", "", { "dependencies": { "@spectrum-web-components/asset": "^0.37.0", "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/checkbox": "^0.37.0", "@spectrum-web-components/icons-workflow": "^0.37.0", "@spectrum-web-components/quick-actions": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0", "@spectrum-web-components/styles": "^0.37.0" } }, "sha512-NNwdXU4O7aI4gkLA2xOSHqYc/DDMoefp0YL2PFHjkxdEMW1G0cL4G7TTvow11yWmIyrtysra8sqTikNohW8Rmw=="],
"@spectrum-web-components/checkbox": ["@spectrum-web-components/checkbox@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/icons-ui": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0" } }, "sha512-5DV4/aTZUkKyb6U3AHn/zxqbCeb+P1dWibp4Zjvr1FcRbMKdmY782pzRSOOXygLPkLJMKPCN4r6py32gBZY+eg=="],
"@spectrum-web-components/clear-button": ["@spectrum-web-components/clear-button@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-8NGvpHogC/pWGgKnVD1ZN0t+WWtuKrW6muNRI9fPJW0rGzVTTNzsTvL/QNrGusBES8/aiT08L35ayV3QfnAU7g=="],
"@spectrum-web-components/close-button": ["@spectrum-web-components/close-button@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-sqqDyi725V3/3oy2J+IbUTlcHpZKEY7m+wXifanQ5mDOjP/8zX17DDZgSX2X7HI4IFevBSVYZxCV2MUhG5Zp1w=="],
"@spectrum-web-components/divider": ["@spectrum-web-components/divider@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-f08h0pQ4srKw9R1fT+jKHUF3s1GfV2UPpcKrrfXFclXRRlu4AuQBO8Wo6nYUj/yYCz+hRWhlmtxL/BDKmREu9w=="],
"@spectrum-web-components/field-label": ["@spectrum-web-components/field-label@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/icons-ui": "^0.37.0", "@spectrum-web-components/reactive-controllers": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0" } }, "sha512-QTk0IwONj1P8jnsIwr3xyxkNs2fMHBs2nNoHMrmEiW1/6a5TIjIIntmeOj1BUcP2wRbUB5CD3mnh44OWSbmbHQ=="],
"@spectrum-web-components/help-text": ["@spectrum-web-components/help-text@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icons-workflow": "^0.37.0" } }, "sha512-MsBD9I/mVOKRrnTqFxzbtmcLvgIGrA6y7kPwldKSQeFBHmm1oey2dnrlu7NK4OtWUdJJ3dQDKi/REJX35USOcw=="],
"@spectrum-web-components/icon": ["@spectrum-web-components/icon@1.12.2", "", { "dependencies": { "@spectrum-web-components/base": "1.12.2", "@spectrum-web-components/iconset": "1.12.2", "@spectrum-web-components/reactive-controllers": "1.12.2" } }, "sha512-mvnP1wcjdRVQCV73Le0rKJ22EhPi2jb5xAktRaPdYQebH0yjqVV1EvRNB5ZQPLqVzzDz9UzBm2RzOoGDupu+Jg=="],
"@spectrum-web-components/icons-ui": ["@spectrum-web-components/icons-ui@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DmaK+NDIgYhtYW19Y4lZoGYLfnFWPBjLNcLWGTQtc41yccEmgWrJbaf9n+nP4TADVJMT5dKNgE2vHnmDABtydg=="],
"@spectrum-web-components/icons-workflow": ["@spectrum-web-components/icons-workflow@1.12.2", "", { "dependencies": { "@spectrum-web-components/base": "1.12.2", "@spectrum-web-components/icon": "1.12.2" } }, "sha512-r8r5YhaCwlw8D839HIbqZ+G3J1H49/ibbnp4golnfa96u9oY0OTkQIrdpPefrDxgk4eLXAjwovCMQk7hCWtuNw=="],
"@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@1.12.2", "", { "dependencies": { "@spectrum-web-components/base": "1.12.2" } }, "sha512-s6BsY6VnZQOcTx8LfLixdu16g0QXr54wC4PiY7wKcgqkS+VJzo3Up02y7nUUcga38tDb2XcYHZU3rqKVagz6zQ=="],
"@spectrum-web-components/illustrated-message": ["@spectrum-web-components/illustrated-message@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/styles": "^0.37.0" } }, "sha512-JUop4B2MgkQpYR6PrEifHOFNNKhVwqoBy1xS1HUKLidlOovagY1Wa769ajeXUBGoL1HLKif3O+CmWTBCwAaa5A=="],
"@spectrum-web-components/menu": ["@spectrum-web-components/menu@0.37.0", "", { "dependencies": { "@lit-labs/observers": "^2.0.0", "@spectrum-web-components/action-button": "^0.37.0", "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/divider": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/icons-ui": "^0.37.0", "@spectrum-web-components/overlay": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0" } }, "sha512-WG7lqePUERK/xE6/DlyfNzbW8gjSkQPEwGSxbe8AFOWTImzQALAz0rxmGTzHOkoThvsSGErt/mC7WiXkL5IWjQ=="],
"@spectrum-web-components/modal": ["@spectrum-web-components/modal@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-GXtRZdXFHZoP3UKu5oG7TQFEOShHhxGE5p7vvN7oFPm2Yz1WtpmjH2HdBFb2mI8BmEvKax/KEG5kZCrTDQpTvg=="],
"@spectrum-web-components/overlay": ["@spectrum-web-components/overlay@0.37.0", "", { "dependencies": { "@floating-ui/dom": "^1.5.1", "@floating-ui/utils": "^0.1.1", "@spectrum-web-components/action-button": "^0.37.0", "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/reactive-controllers": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0", "@spectrum-web-components/theme": "^0.37.0" } }, "sha512-kMEXAWdHJ/RGLbR4GHAEvgb03uaKNJSakVYgqoxQ15Z8PTq669FZQZMvYGr5VftRaXpejm5n1GK+KxuK6Cy+uw=="],
"@spectrum-web-components/picker": ["@spectrum-web-components/picker@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/button": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/icons-ui": "^0.37.0", "@spectrum-web-components/icons-workflow": "^0.37.0", "@spectrum-web-components/menu": "^0.37.0", "@spectrum-web-components/overlay": "^0.37.0", "@spectrum-web-components/popover": "^0.37.0", "@spectrum-web-components/reactive-controllers": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0", "@spectrum-web-components/tray": "^0.37.0" } }, "sha512-9PEysOL7auFrlwFRkZWYb+OI2yTAZ+GM2mvEqkHfONU98g0aZO6oyjtg69RUNH9VUveqUfoEEBiZ0ihyuAL3cA=="],
"@spectrum-web-components/popover": ["@spectrum-web-components/popover@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/overlay": "^0.37.0" } }, "sha512-UilQj4W2HgDMopON2RG7wEYxnGViAWBJYFaTuO7dCLgEHuQMbIN6h30JvSwfz5Z0Vr/eJgSd3I7xj0K9Bl2c6Q=="],
"@spectrum-web-components/progress-circle": ["@spectrum-web-components/progress-circle@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-OjabwypclIBqjUwwiWDztjy4QRV1guIojhmdv3HaCEbueX0zhv9y9XqYZn3dxKnDubSkNfT4FrYHJXaMsKrovQ=="],
"@spectrum-web-components/quick-actions": ["@spectrum-web-components/quick-actions@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-h9KRwowJ4AQh6UpDcC+iuijm1wPxf/ZhmQgwH4CeYXXl2HU9NuW67QwVkVz7axjNdY5dDh6I2bdwFD/IcZW/ug=="],
"@spectrum-web-components/reactive-controllers": ["@spectrum-web-components/reactive-controllers@1.12.2", "", { "dependencies": { "@spectrum-web-components/progress-circle": "1.12.2", "colorjs.io": "0.5.2", "lit": "^2.5.0 || ^3.1.3" } }, "sha512-TD94tuA5XDK8ISUM4pWHxJF9oe/IvSHYoR/4P6aYsAj8oPZgrGerNh1a+vzQZ0PorRpVMV4Rg/UHCbtTwxOgOQ=="],
"@spectrum-web-components/search": ["@spectrum-web-components/search@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/button": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/icons-workflow": "^0.37.0", "@spectrum-web-components/textfield": "^0.37.0" } }, "sha512-9ithHfHhMTC4SpVC04XRDP8SEJwI2aEJRbbpjODNJcpUruclweutsektMvh4Jm3Qk3+95C5QE8fZHBIfQ5Quhw=="],
"@spectrum-web-components/shared": ["@spectrum-web-components/shared@0.37.0", "", { "dependencies": { "@lit-labs/observers": "^2.0.0", "@spectrum-web-components/base": "^0.37.0", "focus-visible": "^5.1.0" } }, "sha512-i2yJ1tpQxUffP0xcx9QfusxKlRS3eOBZXjCnxhiicHIIlQtK+mPENbUTe2mRmVLT3WPwIt6mNzoO8w/p5h0Pxw=="],
"@spectrum-web-components/status-light": ["@spectrum-web-components/status-light@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-oFzV1mB2c148Es6udezsR11xEAgEhOlS+DsMSMxhcn7XPXOSRBKtLMUYJ0Q+F5Fb+lcUfCgNy3sDEDqqbYPtrg=="],
"@spectrum-web-components/styles": ["@spectrum-web-components/styles@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-OGG7KSoKG7Ut/idWHUicNBQdk6Wsi/ZZASj5+UgjMGv8qivZ2XOgqms+Zg4mamnYH2aE80CG/GMxKZ3VB/iAPg=="],
"@spectrum-web-components/textfield": ["@spectrum-web-components/textfield@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/help-text": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/icons-ui": "^0.37.0", "@spectrum-web-components/icons-workflow": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0" } }, "sha512-pDhBXQth3w3OaxXGe9tMzEHvHFoJjmf2SQzOnrPPldRYx+JOEX6/fhBGel4EVXjl81oIpR9BRGAQEOFvtIWmLg=="],
"@spectrum-web-components/theme": ["@spectrum-web-components/theme@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/styles": "^0.37.0" } }, "sha512-xfKnzwWmjD6zN1T7Jo+3yLRdjh7qx8CX2FCL/PrUu8sE2Jo4cO3/vKYLAt27bbeHF5+zxKx2hOZdPOgEpZG9Hg=="],
"@spectrum-web-components/tray": ["@spectrum-web-components/tray@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/modal": "^0.37.0", "@spectrum-web-components/reactive-controllers": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0", "@spectrum-web-components/underlay": "^0.37.0" } }, "sha512-vYjGeIYaVWQ0+6hZMQy25qqB+AjQZllEkpO/ua9nGXSvo/wbb43H6duSwVhmT2hkyqLy0sBw7Yt2LFgPYiSySQ=="],
"@spectrum-web-components/underlay": ["@spectrum-web-components/underlay@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-H3a3HmxrqGY6+N9nQwiapxXVLEIJoQ87naoXKy7ZnEmRyUnPcLjBaoXvLZKKXEDosaYxE3Mm6dnfjyKpk5PM1Q=="],
"@sqlite.org/sqlite-wasm": ["@sqlite.org/sqlite-wasm@3.48.0-build4", "", { "bin": { "sqlite-wasm": "bin/index.js" } }, "sha512-hI6twvUkzOmyGZhQMza1gpfqErZxXRw6JEsiVjUbo7tFanVD+8Oil0Ih3l2nGzHdxPI41zFmfUQG7GHqhciKZQ=="],
"@standard-schema/spec": ["@standard-schema/spec@1.1.0", "", {}, "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w=="],
"@standard-schema/utils": ["@standard-schema/utils@0.3.0", "", {}, "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g=="],
"@swc-react/action-button": ["@swc-react/action-button@0.37.0", "", { "dependencies": { "@lit-labs/react": "^1.1.1", "@spectrum-web-components/action-button": "^0.37.0" }, "peerDependencies": { "next": "~13.4" }, "optionalPeers": ["next"] }, "sha512-S9NsUcklTFLMz3KCEd3q6rhYEOMu5fTk2TSi3MAQRFAHuCs0whb7ml9bVnyqCyBIGo+r3m20ynRzW/NymV1Ixw=="],
"@swc-react/action-group": ["@swc-react/action-group@0.37.0", "", { "dependencies": { "@lit-labs/react": "^1.1.1", "@spectrum-web-components/action-group": "^0.37.0" }, "peerDependencies": { "next": "~13.4" }, "optionalPeers": ["next"] }, "sha512-+V0KVx0JPBrOd24tGddslLBF7b+0IfReULuxcgZnjDCzfzMseVIphetXSEx9u4MT8ymUBsbrbG8wWHYloxpiQQ=="],
"@swc-react/action-menu": ["@swc-react/action-menu@0.37.0", "", { "dependencies": { "@lit-labs/react": "^1.1.1", "@spectrum-web-components/action-menu": "^0.37.0" }, "peerDependencies": { "next": "~13.4" }, "optionalPeers": ["next"] }, "sha512-tw32XTQaLBpG7BE0i56Te1Hxcl38DX93BLiuRIN2B36s1Vrn9n0cPcY4nyBVlNu/Z+uhGu44qamZLf2qiZsRcA=="],
"@swc-react/badge": ["@swc-react/badge@0.37.0", "", { "dependencies": { "@lit-labs/react": "^1.1.1", "@spectrum-web-components/badge": "^0.37.0" }, "peerDependencies": { "next": "~13.4" }, "optionalPeers": ["next"] }, "sha512-kziT/wzswh6eXRAnCxwXa0zTnp8LrmI6A5khrkCVybzGGsR6VAmqBZkjtGmhCjyLazj2LiG+x7xix0UCpbrToA=="],
"@swc-react/button": ["@swc-react/button@0.37.0", "", { "dependencies": { "@lit-labs/react": "^1.1.1", "@spectrum-web-components/button": "^0.37.0" }, "peerDependencies": { "next": "~13.4" }, "optionalPeers": ["next"] }, "sha512-8okizgzPhdRGbooPztgqnSHqmVQ64sMb/jWZp1n731hKjx0fKcHzRtn9S1qNg7RaDRPCsEvfLB1k4dBShllaRA=="],
"@swc-react/card": ["@swc-react/card@0.37.0", "", { "dependencies": { "@lit-labs/react": "^1.1.1", "@spectrum-web-components/card": "^0.37.0" }, "peerDependencies": { "next": "~13.4" }, "optionalPeers": ["next"] }, "sha512-/DDENblDw9fXULduV9nuYssZVotzM5rV4CwkpieBpukVfySfBCpIC60Zj0ihBsg0mmFQtsd9DINop3nO5SpUpg=="],
"@swc-react/divider": ["@swc-react/divider@0.37.0", "", { "dependencies": { "@lit-labs/react": "^1.1.1", "@spectrum-web-components/divider": "^0.37.0" }, "peerDependencies": { "next": "~13.4" }, "optionalPeers": ["next"] }, "sha512-wDTbhe1Qj6ZvBvdWE//wpg/jtVnG3UTG8baBmhZPgVIWSn0KxMeoh9j2XAneEkfhdu6KqZXhp9Wy/cfYw8e+nQ=="],
"@swc-react/field-label": ["@swc-react/field-label@0.37.0", "", { "dependencies": { "@lit-labs/react": "^1.1.1", "@spectrum-web-components/field-label": "^0.37.0" }, "peerDependencies": { "next": "~13.4" }, "optionalPeers": ["next"] }, "sha512-dCwtWlEhXCoh+KFomHDnoAVVsKLUBD4XObeJiSvlg2x3iRcWRDEylsmZjUDqJaTXsbxw0/kRWvtM+TlW1y5Rgw=="],
"@swc-react/help-text": ["@swc-react/help-text@0.37.0", "", { "dependencies": { "@lit-labs/react": "^1.1.1", "@spectrum-web-components/help-text": "^0.37.0" }, "peerDependencies": { "next": "~13.4" }, "optionalPeers": ["next"] }, "sha512-AtiUqtARgHIcqeivy3+ud0912LBZac06u5ww8dV8qdnx+C+eDgI0W2hDBoVxTsUxbhiPy2Emkjrv5ZrypGon4g=="],
"@swc-react/illustrated-message": ["@swc-react/illustrated-message@0.37.0", "", { "dependencies": { "@lit-labs/react": "^1.1.1", "@spectrum-web-components/illustrated-message": "^0.37.0" }, "peerDependencies": { "next": "~13.4" }, "optionalPeers": ["next"] }, "sha512-XMF8hnG9YUj7uBoJJX6z1lLjpC4wkNvvjh2y7toqHvZBPiheWJoNqV1tYvbchZJb2xTmXadWUus59o4lHH5ZzA=="],
"@swc-react/menu": ["@swc-react/menu@0.37.0", "", { "dependencies": { "@lit-labs/react": "^1.1.1", "@spectrum-web-components/menu": "^0.37.0" }, "peerDependencies": { "next": "~13.4" }, "optionalPeers": ["next"] }, "sha512-oGiVmTUAVRVgwiU81GrUTX+LSwtigZy5JaqPb/I48bzmay6iWd2PkkWs6HiWxpu8oK5tRkauegPYJFW12ZzcbQ=="],
"@swc-react/progress-circle": ["@swc-react/progress-circle@0.37.0", "", { "dependencies": { "@lit-labs/react": "^1.1.1", "@spectrum-web-components/progress-circle": "^0.37.0" }, "peerDependencies": { "next": "~13.4" }, "optionalPeers": ["next"] }, "sha512-j1S08ncB1IQ7Piq5UnHCvDF/bC320vTDSFH17i83IyosHYmxiXmOzrjB6SxbPI5SVpAunAjWBFwLkEusGli85w=="],
"@swc-react/search": ["@swc-react/search@0.37.0", "", { "dependencies": { "@lit-labs/react": "^1.1.1", "@spectrum-web-components/search": "^0.37.0" }, "peerDependencies": { "next": "~13.4" }, "optionalPeers": ["next"] }, "sha512-ZxwEj622rtbvyxPHRCL7Y9QKS8sXyt2GcB+11Cb7fxIpAd7bz2vHOwZqFSVE1w4cQrcjKjAKdSqv9lKc9cYgJw=="],
"@swc-react/status-light": ["@swc-react/status-light@0.37.0", "", { "dependencies": { "@lit-labs/react": "^1.1.1", "@spectrum-web-components/status-light": "^0.37.0" }, "peerDependencies": { "next": "~13.4" }, "optionalPeers": ["next"] }, "sha512-HrKaxoxNQ7mwquIwSg9FCzJ1NQHk1lpJ8nYg4mODxXx7fvPbbcLjDA1CFE9k3/GDqD1+yrUEEXMaBX+V+aS/OQ=="],
"@swc-react/textfield": ["@swc-react/textfield@0.37.0", "", { "dependencies": { "@lit-labs/react": "^1.1.1", "@spectrum-web-components/textfield": "^0.37.0" }, "peerDependencies": { "next": "~13.4" }, "optionalPeers": ["next"] }, "sha512-jhm1Z9tIOuNDwg4Eqfhxcmcv2I+84hNhVuh7Re8tOYu4hF0ICkifQl0luXXPLAO6mqc7ldkfEtM/yTl9sqJryA=="],
"@swc-react/theme": ["@swc-react/theme@0.37.0", "", { "dependencies": { "@lit-labs/react": "^1.1.1", "@spectrum-web-components/theme": "^0.37.0" }, "peerDependencies": { "next": "~13.4" }, "optionalPeers": ["next"] }, "sha512-TA9MpFOWUFd1sY0B6ZX9IDc3gGTsLyLykDBr772vSyuajLjIhG1ZXd9ccOlP1NDK0TF9ySc3MxK0MA4gRmS51g=="],
"@swc-uxp-internal/action-button": ["@spectrum-web-components/action-button@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/button": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/icons-ui": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0" } }, "sha512-cU/5sHpRSA823sHUH6jZccmizkTxWr/LJHTDJ4jj0LxCLh15OHfxKM+hu/vcc5fXYrAPma5Hp54xTBc/l/frDA=="],
"@swc-uxp-internal/action-group": ["@spectrum-web-components/action-group@0.37.0", "", { "dependencies": { "@lit-labs/observers": "^2.0.0", "@spectrum-web-components/action-button": "^0.37.0", "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icons-workflow": "^0.37.0", "@spectrum-web-components/reactive-controllers": "^0.37.0" } }, "sha512-unC1SMjhWI080lfHeAMxBL1y2Vyk6fIhKdukWzqQnzMpPdogh+tvKF9kUgPLZ3rq0hFFCquT0ZZezyywvjTWZA=="],
"@swc-uxp-internal/asset": ["@spectrum-web-components/asset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-nFZ4/TCHbUcNUay5NI1fLhLejtx7QJ3H+diCNsZXOvmUI+0atcNPid6j5/4CyvSd8PQooEvCgHpbHf39AM57Cg=="],
"@swc-uxp-internal/base": ["@spectrum-web-components/base@0.37.0", "", { "dependencies": { "lit": "^2.5.0" } }, "sha512-3JOI36CemlFzXKAuennOBZ2k99ayd6yooG8eX24z58r0nT6I+3q6jYbytBRJuj48Y7vxwxqMIKX4V118A1dmMQ=="],
"@swc-uxp-internal/button": ["@spectrum-web-components/button@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/clear-button": "^0.37.0", "@spectrum-web-components/close-button": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/icons-ui": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0" } }, "sha512-Cz69UtdNDqNVAMUjz2i1RjZ4LetR+bTnUvaDlj8heQHYR/ZHKdnMWaxS1DnZjlu7+osFo57XJPLyhlEEgYT1Ig=="],
"@swc-uxp-internal/card": ["@spectrum-web-components/card@0.37.0", "", { "dependencies": { "@spectrum-web-components/asset": "^0.37.0", "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/checkbox": "^0.37.0", "@spectrum-web-components/icons-workflow": "^0.37.0", "@spectrum-web-components/quick-actions": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0", "@spectrum-web-components/styles": "^0.37.0" } }, "sha512-NNwdXU4O7aI4gkLA2xOSHqYc/DDMoefp0YL2PFHjkxdEMW1G0cL4G7TTvow11yWmIyrtysra8sqTikNohW8Rmw=="],
"@swc-uxp-internal/checkbox": ["@spectrum-web-components/checkbox@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/icons-ui": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0" } }, "sha512-5DV4/aTZUkKyb6U3AHn/zxqbCeb+P1dWibp4Zjvr1FcRbMKdmY782pzRSOOXygLPkLJMKPCN4r6py32gBZY+eg=="],
"@swc-uxp-internal/divider": ["@spectrum-web-components/divider@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-f08h0pQ4srKw9R1fT+jKHUF3s1GfV2UPpcKrrfXFclXRRlu4AuQBO8Wo6nYUj/yYCz+hRWhlmtxL/BDKmREu9w=="],
"@swc-uxp-internal/field-label": ["@spectrum-web-components/field-label@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/icons-ui": "^0.37.0", "@spectrum-web-components/reactive-controllers": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0" } }, "sha512-QTk0IwONj1P8jnsIwr3xyxkNs2fMHBs2nNoHMrmEiW1/6a5TIjIIntmeOj1BUcP2wRbUB5CD3mnh44OWSbmbHQ=="],
"@swc-uxp-internal/help-text": ["@spectrum-web-components/help-text@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icons-workflow": "^0.37.0" } }, "sha512-MsBD9I/mVOKRrnTqFxzbtmcLvgIGrA6y7kPwldKSQeFBHmm1oey2dnrlu7NK4OtWUdJJ3dQDKi/REJX35USOcw=="],
"@swc-uxp-internal/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@swc-uxp-internal/icons": ["@spectrum-web-components/icons@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-OH8+I2vpE+73XQKWBUBPbR36m/RYRDkuotK7DvhgJd4TjM3q2jBq4zQCxEe4vFC/eeADdgWy2CmAiK/5wrXASw=="],
"@swc-uxp-internal/icons-ui": ["@spectrum-web-components/icons-ui@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DmaK+NDIgYhtYW19Y4lZoGYLfnFWPBjLNcLWGTQtc41yccEmgWrJbaf9n+nP4TADVJMT5dKNgE2vHnmDABtydg=="],
"@swc-uxp-internal/icons-workflow": ["@spectrum-web-components/icons-workflow@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0" } }, "sha512-D1Dg+ZjlqbaU/2uKYhmMtZXQMVUw9J9LevHSKSzMFL+Y++JMqRROQuzwAOFW7tttCw1w0+3kIuv2ohkeE+8fNQ=="],
"@swc-uxp-internal/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@swc-uxp-internal/illustrated-message": ["@spectrum-web-components/illustrated-message@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/styles": "^0.37.0" } }, "sha512-JUop4B2MgkQpYR6PrEifHOFNNKhVwqoBy1xS1HUKLidlOovagY1Wa769ajeXUBGoL1HLKif3O+CmWTBCwAaa5A=="],
"@swc-uxp-internal/menu": ["@spectrum-web-components/menu@0.37.0", "", { "dependencies": { "@lit-labs/observers": "^2.0.0", "@spectrum-web-components/action-button": "^0.37.0", "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/divider": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/icons-ui": "^0.37.0", "@spectrum-web-components/overlay": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0" } }, "sha512-WG7lqePUERK/xE6/DlyfNzbW8gjSkQPEwGSxbe8AFOWTImzQALAz0rxmGTzHOkoThvsSGErt/mC7WiXkL5IWjQ=="],
"@swc-uxp-internal/overlay": ["@spectrum-web-components/overlay@0.37.0", "", { "dependencies": { "@floating-ui/dom": "^1.5.1", "@floating-ui/utils": "^0.1.1", "@spectrum-web-components/action-button": "^0.37.0", "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/reactive-controllers": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0", "@spectrum-web-components/theme": "^0.37.0" } }, "sha512-kMEXAWdHJ/RGLbR4GHAEvgb03uaKNJSakVYgqoxQ15Z8PTq669FZQZMvYGr5VftRaXpejm5n1GK+KxuK6Cy+uw=="],
"@swc-uxp-internal/popover": ["@spectrum-web-components/popover@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/overlay": "^0.37.0" } }, "sha512-UilQj4W2HgDMopON2RG7wEYxnGViAWBJYFaTuO7dCLgEHuQMbIN6h30JvSwfz5Z0Vr/eJgSd3I7xj0K9Bl2c6Q=="],
"@swc-uxp-internal/quick-actions": ["@spectrum-web-components/quick-actions@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-h9KRwowJ4AQh6UpDcC+iuijm1wPxf/ZhmQgwH4CeYXXl2HU9NuW67QwVkVz7axjNdY5dDh6I2bdwFD/IcZW/ug=="],
"@swc-uxp-internal/reactive-controllers": ["@spectrum-web-components/reactive-controllers@0.37.0", "", { "dependencies": { "lit": "^2.5.0" } }, "sha512-1wnWLt88iyTPrElxZqPpyWWzScSkXY3zxi+QxIV0cFGmhRlPsH+XXqs/kGkfzRyNtE4s2AWuRZ2wtbcao6MzJQ=="],
"@swc-uxp-internal/search": ["@spectrum-web-components/search@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/button": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/icons-workflow": "^0.37.0", "@spectrum-web-components/textfield": "^0.37.0" } }, "sha512-9ithHfHhMTC4SpVC04XRDP8SEJwI2aEJRbbpjODNJcpUruclweutsektMvh4Jm3Qk3+95C5QE8fZHBIfQ5Quhw=="],
"@swc-uxp-internal/shared": ["@spectrum-web-components/shared@0.37.0", "", { "dependencies": { "@lit-labs/observers": "^2.0.0", "@spectrum-web-components/base": "^0.37.0", "focus-visible": "^5.1.0" } }, "sha512-i2yJ1tpQxUffP0xcx9QfusxKlRS3eOBZXjCnxhiicHIIlQtK+mPENbUTe2mRmVLT3WPwIt6mNzoO8w/p5h0Pxw=="],
"@swc-uxp-internal/styles": ["@spectrum-web-components/styles@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-OGG7KSoKG7Ut/idWHUicNBQdk6Wsi/ZZASj5+UgjMGv8qivZ2XOgqms+Zg4mamnYH2aE80CG/GMxKZ3VB/iAPg=="],
"@swc-uxp-internal/textfield": ["@spectrum-web-components/textfield@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/help-text": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0", "@spectrum-web-components/icons-ui": "^0.37.0", "@spectrum-web-components/icons-workflow": "^0.37.0", "@spectrum-web-components/shared": "^0.37.0" } }, "sha512-pDhBXQth3w3OaxXGe9tMzEHvHFoJjmf2SQzOnrPPldRYx+JOEX6/fhBGel4EVXjl81oIpR9BRGAQEOFvtIWmLg=="],
"@swc-uxp-internal/theme": ["@spectrum-web-components/theme@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/styles": "^0.37.0" } }, "sha512-xfKnzwWmjD6zN1T7Jo+3yLRdjh7qx8CX2FCL/PrUu8sE2Jo4cO3/vKYLAt27bbeHF5+zxKx2hOZdPOgEpZG9Hg=="],
"@swc-uxp-wrappers/action-button": ["@swc-uxp-wrappers/action-button@2.0.0", "", { "dependencies": { "@swc-uxp-internal/action-button": "npm:@spectrum-web-components/action-button@0.37.0", "@swc-uxp-wrappers/button": "2.0.0" } }, "sha512-MsGVtZRxY9jR8oO6X60FEVcrjLSp05YS/rFfqawr4tGKwyqRaOQ4x9THBLcVpRti6c4MuzpDs5CQ3Duz0NqqDw=="],
"@swc-uxp-wrappers/action-group": ["@swc-uxp-wrappers/action-group@2.0.0", "", { "dependencies": { "@swc-uxp-internal/action-group": "npm:@spectrum-web-components/action-group@0.37.0", "@swc-uxp-wrappers/action-button": "2.0.0" } }, "sha512-bDN9IlzwaT4Fz8vCHg53/wI1N4C4fM9WtsK8QvpY+V2nwBYF3NdYPLfNBo2g6KjoSOkRR+kDmlDRafj9fU31eA=="],
"@swc-uxp-wrappers/asset": ["@swc-uxp-wrappers/asset@2.0.0", "", { "dependencies": { "@swc-uxp-internal/asset": "npm:@spectrum-web-components/asset@0.37.0" } }, "sha512-NOrlHLLbZyNtjEYYri8GAHON9vPBXTnJ1QLLgdfJ7p++IixZBuHQ6IC/9lO4oDtwNHrwkPziUSvkZQ/8BbSyPQ=="],
"@swc-uxp-wrappers/button": ["@swc-uxp-wrappers/button@2.0.0", "", { "dependencies": { "@swc-uxp-internal/button": "npm:@spectrum-web-components/button@0.37.0" } }, "sha512-gu0SktpuDntmWAyGJ3isNyNHAm2nyKiLWmkPXIZRygSHqpE36wNkeYar6Fdh+wFZcmqYYEL7lIZjqdCZuYcA0w=="],
"@swc-uxp-wrappers/card": ["@swc-uxp-wrappers/card@2.0.0", "", { "dependencies": { "@swc-uxp-internal/card": "npm:@spectrum-web-components/card@0.37.0", "@swc-uxp-wrappers/asset": "2.0.0", "@swc-uxp-wrappers/checkbox": "2.0.0", "@swc-uxp-wrappers/quick-actions": "2.0.0" } }, "sha512-uOz72BKsjv2tAueejZIEKSHvJibI6pGSA6hy9SjknbcWd+teIHkqqJLlCmM1OBsYG5msm/nMxS0bm5ZcOKNJjw=="],
"@swc-uxp-wrappers/checkbox": ["@swc-uxp-wrappers/checkbox@2.0.0", "", { "dependencies": { "@swc-uxp-internal/checkbox": "npm:@spectrum-web-components/checkbox@0.37.0" } }, "sha512-Rgns87G9dh5LWGr3v9hx2eML8CK0WGpt5c+6KArRiMLAQ64GcbN8y7s4/pOLvrx3kivX6XcZczqpns3zFl3lDw=="],
"@swc-uxp-wrappers/divider": ["@swc-uxp-wrappers/divider@2.0.0", "", { "dependencies": { "@swc-uxp-internal/divider": "npm:@spectrum-web-components/divider@0.37.0" } }, "sha512-HqJ7hmMgF9bfeG/N03tze1N4NQaRzlmIyN637wepB6gxOilLcDtdSIeJ7El5UDzNNEbTp2eFjUW9FuiSiYrwqg=="],
"@swc-uxp-wrappers/field-label": ["@swc-uxp-wrappers/field-label@2.0.0", "", { "dependencies": { "@swc-uxp-internal/field-label": "npm:@spectrum-web-components/field-label@0.37.0" } }, "sha512-tzOBQafXfxGORNQPQFajOlFolIblgApoiMzm81T8ye/U1NTzOVHozHL3RVXhepESMKu2oAgVUY/8ZQK6h71KRQ=="],
"@swc-uxp-wrappers/help-text": ["@swc-uxp-wrappers/help-text@2.0.0", "", { "dependencies": { "@swc-uxp-internal/help-text": "npm:@spectrum-web-components/help-text@0.37.0" } }, "sha512-caiMb+PbhDC1999Uw5ugYr77PQ7pih/30DNaMry5/7UCeWuiphGGfJEXtwsfr5evdI8pRNILHbrqgiQLqhLuTg=="],
"@swc-uxp-wrappers/illustrated-message": ["@swc-uxp-wrappers/illustrated-message@2.0.0", "", { "dependencies": { "@swc-uxp-internal/illustrated-message": "npm:@spectrum-web-components/illustrated-message@0.37.0" } }, "sha512-uBZSU0VLGRfpBnCTOCxU/XIZLli6Dvwedu56ZuJc6nl+CqXI1zyEjkqxNmGefYZIHUmlJ/Q/Ko5NTTm+07hvAw=="],
"@swc-uxp-wrappers/menu": ["@swc-uxp-wrappers/menu@2.0.0", "", { "dependencies": { "@swc-uxp-internal/menu": "npm:@spectrum-web-components/menu@0.37.0", "@swc-uxp-wrappers/action-button": "2.0.0", "@swc-uxp-wrappers/divider": "2.0.0" } }, "sha512-dPjS2OKJ7bWSfLzGeiCo6XN3SSSwA+lUC1BWOjn6g72BTtOUg/S6n9JpSEa2mtwxGn8AN3bpc452EgTBTPbF1w=="],
"@swc-uxp-wrappers/overlay": ["@swc-uxp-wrappers/overlay@2.0.0", "", { "dependencies": { "@swc-uxp-internal/overlay": "npm:@spectrum-web-components/overlay@0.37.0", "@swc-uxp-wrappers/action-button": "2.0.0" } }, "sha512-z62AFiL9thiwN1lM1Zwal9YXY4b30tLoaPGg2sGPRCZL7lrRTEDdQzMRC2J7dudqP/BzirDSlzBtqEns9sw60Q=="],
"@swc-uxp-wrappers/popover": ["@swc-uxp-wrappers/popover@2.0.0", "", { "dependencies": { "@swc-uxp-internal/popover": "npm:@spectrum-web-components/popover@0.37.0" } }, "sha512-KZCVCo9qs3IH582ou28t/8GROYxBYl+og0OOC5nCFIBcL9DakkQHZBLviU68R29+1PzcS1EnZ6ZMAU2UrOiixw=="],
"@swc-uxp-wrappers/quick-actions": ["@swc-uxp-wrappers/quick-actions@2.0.0", "", { "dependencies": { "@swc-uxp-internal/quick-actions": "npm:@spectrum-web-components/quick-actions@0.37.0" } }, "sha512-9tW/T15dJTibR5BQIUGw5i3LhIZWfU91UNBcP/Siuyv3KM6wxYAlAHcnJA+70LNeP0NE+OQuTbo9XJiGT25GjQ=="],
"@swc-uxp-wrappers/search": ["@swc-uxp-wrappers/search@2.0.0", "", { "dependencies": { "@swc-uxp-internal/search": "npm:@spectrum-web-components/search@0.37.0", "@swc-uxp-wrappers/button": "2.0.0", "@swc-uxp-wrappers/textfield": "2.0.0" } }, "sha512-+59SCaLEJNWci/ETnvFbdlu+GSa5SSivLOIZFNGnbXsXRZ/DN8ldNOAugH1AA/3u7qoYlqAxXWKQYc++DJv6aA=="],
"@swc-uxp-wrappers/textfield": ["@swc-uxp-wrappers/textfield@2.0.0", "", { "dependencies": { "@swc-uxp-internal/textfield": "npm:@spectrum-web-components/textfield@0.37.0", "@swc-uxp-wrappers/help-text": "2.0.0" } }, "sha512-gKs8rxl4y9ajV/mAiibPI1pXRcagiQSBZ1mrk0or3WU7EiFzcP//kSclL2EihtVxLLsxhLFgxwZYjfkavdSCRA=="],
"@swc-uxp-wrappers/utils": ["@swc-uxp-wrappers/utils@2.0.1", "", { "dependencies": { "@swc-uxp-internal/base": "npm:@spectrum-web-components/base@0.37.0", "@swc-uxp-internal/icon": "npm:@spectrum-web-components/icon@0.37.0", "@swc-uxp-internal/icons": "npm:@spectrum-web-components/icons@0.37.0", "@swc-uxp-internal/icons-ui": "npm:@spectrum-web-components/icons-ui@0.37.0", "@swc-uxp-internal/icons-workflow": "npm:@spectrum-web-components/icons-workflow@0.37.0", "@swc-uxp-internal/iconset": "npm:@spectrum-web-components/iconset@0.37.0", "@swc-uxp-internal/reactive-controllers": "npm:@spectrum-web-components/reactive-controllers@0.37.0", "@swc-uxp-internal/shared": "npm:@spectrum-web-components/shared@0.37.0", "@swc-uxp-internal/styles": "npm:@spectrum-web-components/styles@0.37.0", "@swc-uxp-internal/theme": "npm:@spectrum-web-components/theme@0.37.0" } }, "sha512-8vbd6fOok2/f8Tp0KPlBPUJYlMhnMGmEhiiySf/dhsOR85kiFMKf3VwILWkd0No2+fViARviDCVZbk+5F8EtNA=="],
"@swc/core": ["@swc/core@1.16.1", "", { "dependencies": { "@swc/counter": "^0.1.3", "@swc/types": "^0.1.28" }, "optionalDependencies": { "@swc/core-darwin-arm64": "1.16.1", "@swc/core-darwin-x64": "1.16.1", "@swc/core-linux-arm-gnueabihf": "1.16.1", "@swc/core-linux-arm64-gnu": "1.16.1", "@swc/core-linux-arm64-musl": "1.16.1", "@swc/core-linux-ppc64-gnu": "1.16.1", "@swc/core-linux-s390x-gnu": "1.16.1", "@swc/core-linux-x64-gnu": "1.16.1", "@swc/core-linux-x64-musl": "1.16.1", "@swc/core-win32-arm64-msvc": "1.16.1", "@swc/core-win32-ia32-msvc": "1.16.1", "@swc/core-win32-x64-msvc": "1.16.1" }, "peerDependencies": { "@swc/helpers": ">=0.5.17" }, "optionalPeers": ["@swc/helpers"] }, "sha512-nUaeu91O5QZKrQdaDCHd402ogUIoNOOjpkZNq0UomWK0G6gDaGmLhvddF1/3BXf5O8aLyo6ZPY/aMDWvaJQ/hg=="],
"@swc/core-darwin-arm64": ["@swc/core-darwin-arm64@1.16.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-zlJblJ8ncErD43lKdxjbUaUskJQf+LxiPXYcWXD8/8ZMV+7uuAT+CwjciLXpyZBd5Pq/S726bMpeeAwSeL1hhg=="],
@@ -1298,19 +1564,23 @@
"@types/lodash": ["@types/lodash@4.17.25", "", {}, "sha512-+K1NIO8I+F9/wNulfVvu23QYd0Pe9/OCqRrim4NoYIf1VoEDL90Ve4ClzpyqBLc7NpGGWRvYNCKZ1BE/Jpf8dQ=="],
"@types/luxon": ["@types/luxon@3.7.5", "", {}, "sha512-jJ41Q4z6ZVO260MNDdHfW7+7a5iMiX8Mr6ZJHcmgrvhZha6dz5704o/lF2kKl6URjH6ivEL97w9xS/MgpJEphg=="],
"@types/mdast": ["@types/mdast@4.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA=="],
"@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],
"@types/node": ["@types/node@25.9.1", "", { "dependencies": { "undici-types": ">=7.24.0 <7.24.7" } }, "sha512-xfrlY7UD5rMJk3ZVJP8BNzS28J36YJg+xp+LPXV1TdWxr8uMH5A860QNxYDGQe/ylDSgjxE52Q9VnO7p75tJxg=="],
"@types/nodemailer": ["@types/nodemailer@8.0.2", "", { "dependencies": { "@types/node": "*" } }, "sha512-c7M5ox8p0nEOfbJ2E9Qcmt8/QCu/VzsiAhzBiZbvky2PhKZDHpKB3sQHBM5MEZNkCfBOaS6S9//AGPRTNB7IaA=="],
"@types/pdfkit": ["@types/pdfkit@0.17.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-tIwzxk2uWKp0Cq9JIluQXJid77lYhF52EsIOwhsMF4iWLA6YneoBR1xVKYYdAysHuepUB0OX4tdwMiUDdGKmig=="],
"@types/pg": ["@types/pg@8.23.1", "", { "dependencies": { "@types/node": "*", "pg-protocol": "*", "pg-types": "^2.2.0" } }, "sha512-fKVHpikPdg4GKks3JuLEhvwSyvwzF23hnabPy6DD8ljVbC7+6J5dQzdv4arV6jqq57djnMgs1HKBxX4P8aBI3A=="],
"@types/react": ["@types/react@19.2.18", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w=="],
"@types/react-dom": ["@types/react-dom@19.2.5", "", { "peerDependencies": { "@types/react": "^19.2.0" } }, "sha512-fMPwH9v7r/pp43yUd2/Mbiex5KouJwwR3dzHkhLREUC6764VyDsqxhAxv6OFEYR1RhjOyD1naqba8ECDBe7ZQg=="],
"@types/react-dom": ["@types/react-dom@19.2.7", "", { "peerDependencies": { "@types/react": "^19.2.0" } }, "sha512-I8bPpDLcHBv1qiIiXDCy71Rt8eQDKJP0sMSWJphDdAcdqiJ1sGpZamavoEIRZmYzjia9LuEb2HlYdDpmoENpvQ=="],
"@types/react-reconciler": ["@types/react-reconciler@0.33.0", "", { "peerDependencies": { "@types/react": "*" } }, "sha512-HZOXsKT0tGI9LlUw2LuedXsVeB88wFa536vVL0M6vE8zN63nI+sSr1ByxmPToP5K5bukaVscyeCJcF9guVNJ1g=="],
@@ -1362,12 +1632,6 @@
"@vercel/oidc": ["@vercel/oidc@3.2.0", "", {}, "sha512-UycprH3T6n3jH0k44NHMa7pnFHGu/N05MjojYr+Mc6I7obkoLIJujSWwin1pCvdy/eOxrI/l3uDLQsmcrOb4ug=="],
"@videojs/http-streaming": ["@videojs/http-streaming@3.17.5", "", { "dependencies": { "@babel/runtime": "^7.12.5", "@videojs/vhs-utils": "^4.1.2", "aes-decrypter": "^4.0.2", "global": "^4.4.0", "m3u8-parser": "^7.2.0", "mpd-parser": "^1.4.0", "mux.js": "7.1.0", "video.js": "^7 || ^8" } }, "sha512-PRRQVu0hYW5h0XvRWpIyIpEatpMZzZtf7L1avV89Hnu+69f+0c7oLsSL9jwpg2nbvzGkdX5rQxQkz5Vc7tFR9w=="],
"@videojs/vhs-utils": ["@videojs/vhs-utils@4.1.2", "", { "dependencies": { "@babel/runtime": "^7.12.5", "global": "^4.4.0" } }, "sha512-1Dsv5dtWOq0LP1G37O46FQFA2tKAZON5UMe6dFPxT7JvPhEx8QIXcFQxan8+hHI3fX6aomFRFrUBJNgRYQDSXA=="],
"@videojs/xhr": ["@videojs/xhr@2.7.0", "", { "dependencies": { "@babel/runtime": "^7.5.5", "global": "~4.4.0", "is-function": "^1.0.1" } }, "sha512-giab+EVRanChIupZK7gXjHy90y3nncA2phIOyG3Ne5fvpiMJzvqYwiTOnEVW2S4CoYcuKJkomat7bMXA/UoUZQ=="],
"@visx/curve": ["@visx/curve@4.0.1-alpha.0", "", { "dependencies": { "@visx/vendor": "4.0.0-alpha.0" } }, "sha512-jRu61Uz274pV1zyioXmboyrLutYbnKsgjj4njSGCnhdXj5GkZvZbg+ThDb6oOzoAnJOBRLz4rzPlWvNJOzuVMg=="],
"@visx/event": ["@visx/event@4.0.1-alpha.0", "", { "dependencies": { "@types/react": "*", "@visx/point": "4.0.1-alpha.0" } }, "sha512-EQqCMSv/s8NbFjo+hz3FKsvvYfP+2QslsFJ/24/O5l/W+7UC6J6aAvO0ujVwrTwdYbuQ+vhxKi1xdPdKR/qj1g=="],
@@ -1432,8 +1696,6 @@
"@workflow/serde": ["@workflow/serde@4.1.0", "", {}, "sha512-pav4F2BoirECWR7Nf1TKt+2eETcBj7jj4cBefQ8VXQCA6NPkaKeLfj/zMgi+3zYV5ZIBT4GuUiphsj0/b9hPQQ=="],
"@xmldom/xmldom": ["@xmldom/xmldom@0.8.15", "", {}, "sha512-/5NV/vDALVFDXgLmfsy9TRCBlKwO2LNBFzpzvb9iIj+jR+eSc6DLYYvVOdivT/jm7MtU6TebYuRmzEOI7w40UA=="],
"@xtuc/ieee754": ["@xtuc/ieee754@1.2.0", "", {}, "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA=="],
"@xtuc/long": ["@xtuc/long@4.2.2", "", {}, "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="],
@@ -1446,8 +1708,6 @@
"adm-zip": ["adm-zip@0.6.0", "", {}, "sha512-XleryMhbuksdKtofnWZ9Sk+4CUTbms4Mb/EU32SZwToAyZ5RgVos/ki8n+yr0LWHOGKuakbXTuuYNHLQjhddgg=="],
"aes-decrypter": ["aes-decrypter@4.0.2", "", { "dependencies": { "@babel/runtime": "^7.12.5", "@videojs/vhs-utils": "^4.1.1", "global": "^4.4.0", "pkcs7": "^1.0.4" } }, "sha512-lc+/9s6iJvuaRe5qDlMTpCFjnwpkeOXp8qP3oiZ5jsj1MRg+SBVUmmICrhxHvc8OELSmc+fEyyxAuppY6hrWzw=="],
"agent-base": ["agent-base@7.1.4", "", {}, "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ=="],
"ai": ["ai@7.0.84", "", { "dependencies": { "@ai-sdk/gateway": "4.0.68", "@ai-sdk/provider": "4.0.8", "@ai-sdk/provider-utils": "5.0.33" }, "peerDependencies": { "zod": "^3.25.76 || ^4.1.8" } }, "sha512-znHNBWADOy79k8EK7636kDm5LmnjF4tMzegC2TfmlLDobDZbs0z0OXD2sxtH3eDTp5Re+pJQESvjinWJ6+kadQ=="],
@@ -1530,6 +1790,8 @@
"baseline-browser-mapping": ["baseline-browser-mapping@2.11.20", "", { "bin": { "baseline-browser-mapping": "dist/cli.cjs" } }, "sha512-H0ulySigv6icDJ1F7SjtdCD6PrhTpdYCmP0CactWy1+ekh0AFd0o1Wn5T8b+hnTmdBx19u9yhL6wvCylXMY7zw=="],
"batch-cluster": ["batch-cluster@19.2.0", "", {}, "sha512-mvozaN/7TYxl+lmXDYH+HocCcRMvW25QmghrJux2y93o+NhHPQ4wir0nBS1p8oTlinjc/l5LaNX+VFxNISrqgQ=="],
"bcrypt-pbkdf": ["bcrypt-pbkdf@1.0.2", "", { "dependencies": { "tweetnacl": "^0.14.3" } }, "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w=="],
"better-auth": ["better-auth@1.6.11", "", { "dependencies": { "@better-auth/core": "1.6.11", "@better-auth/drizzle-adapter": "1.6.11", "@better-auth/kysely-adapter": "1.6.11", "@better-auth/memory-adapter": "1.6.11", "@better-auth/mongo-adapter": "1.6.11", "@better-auth/prisma-adapter": "1.6.11", "@better-auth/telemetry": "1.6.11", "@better-auth/utils": "0.4.0", "@better-fetch/fetch": "1.1.21", "@noble/ciphers": "^2.1.1", "@noble/hashes": "^2.0.1", "better-call": "1.3.5", "defu": "^6.1.4", "jose": "^6.1.3", "kysely": "^0.28.17", "nanostores": "^1.1.1", "zod": "^4.3.6" }, "peerDependencies": { "@lynx-js/react": "*", "@prisma/client": "^5.0.0 || ^6.0.0 || ^7.0.0", "@sveltejs/kit": "^2.0.0", "@tanstack/react-start": "^1.0.0", "@tanstack/solid-start": "^1.0.0", "better-sqlite3": "^12.0.0", "drizzle-kit": ">=0.31.4", "drizzle-orm": "^0.45.2", "mongodb": "^6.0.0 || ^7.0.0", "mysql2": "^3.0.0", "next": "^14.0.0 || ^15.0.0 || ^16.0.0", "pg": "^8.0.0", "prisma": "^5.0.0 || ^6.0.0 || ^7.0.0", "react": "^18.0.0 || ^19.0.0", "react-dom": "^18.0.0 || ^19.0.0", "solid-js": "^1.0.0", "svelte": "^4.0.0 || ^5.0.0", "vitest": "^2.0.0 || ^3.0.0 || ^4.0.0", "vue": "^3.0.0" }, "optionalPeers": ["@lynx-js/react", "@prisma/client", "@sveltejs/kit", "@tanstack/react-start", "@tanstack/solid-start", "better-sqlite3", "drizzle-kit", "drizzle-orm", "mongodb", "mysql2", "next", "pg", "prisma", "react", "react-dom", "solid-js", "svelte", "vitest", "vue"] }, "sha512-Wwt6+q07dwIhsp6XiM7L1qSXVUWBEtNl+eZvwM778CguFqDZFBN9Pt6LtFaHl55t8Z+Zc//5kxcbgDY8/79vFQ=="],
@@ -1586,6 +1848,8 @@
"chai": ["chai@6.2.2", "", {}, "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg=="],
"char-regex": ["char-regex@1.0.2", "", {}, "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw=="],
"character-entities": ["character-entities@2.0.2", "", {}, "sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ=="],
"character-entities-html4": ["character-entities-html4@2.1.0", "", {}, "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA=="],
@@ -1618,6 +1882,8 @@
"colorette": ["colorette@2.0.20", "", {}, "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w=="],
"colorjs.io": ["colorjs.io@0.5.2", "", {}, "sha512-twmVoizEW7ylZSN32OgKdXRmo1qg+wT5/6C3xu5b9QsWzSFAhHLn2xd8ro0diCsKfCj1RdaTP/nrcW+vAoQPIw=="],
"comma-separated-tokens": ["comma-separated-tokens@2.0.3", "", {}, "sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg=="],
"commander": ["commander@11.1.0", "", {}, "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ=="],
@@ -1732,8 +1998,6 @@
"dom-accessibility-api": ["dom-accessibility-api@0.5.16", "", {}, "sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg=="],
"dom-walk": ["dom-walk@0.1.2", "", {}, "sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w=="],
"dotenv": ["dotenv@17.4.2", "", {}, "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw=="],
"dotenv-expand": ["dotenv-expand@13.0.0", "", { "dependencies": { "dotenv": "^17.4.2" } }, "sha512-aBfBS8eYIeXmpHI9ThIlA7/WLq+SLt18iXUZhb52rW89QLKQFoIpPG1bPeewoPZsTyjSSO3T7234FBVUM1V2rA=="],
@@ -1758,6 +2022,8 @@
"emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
"emojilib": ["emojilib@2.4.0", "", {}, "sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw=="],
"empathic": ["empathic@2.0.0", "", {}, "sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA=="],
"end-of-stream": ["end-of-stream@1.4.5", "", { "dependencies": { "once": "^1.4.0" } }, "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg=="],
@@ -1834,6 +2100,12 @@
"eventsource-parser": ["eventsource-parser@3.1.1", "", {}, "sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ=="],
"exiftool-vendored": ["exiftool-vendored@38.1.0", "", { "dependencies": { "@photostructure/tz-lookup": "^11.7.0", "@types/luxon": "^3.7.5", "batch-cluster": "^19.2.0", "he": "^1.2.0", "luxon": "^3.7.2" }, "optionalDependencies": { "exiftool-vendored.exe": "13.59.2", "exiftool-vendored.pl": "13.59.2" } }, "sha512-LIERqM/Qb0oqJlSswLFKWsxGVH81skp7omsX2BPKA/dEzfLP5syNO5KL7k5UlMCf+m0jqEXrKTQr/xV5vScPow=="],
"exiftool-vendored.exe": ["exiftool-vendored.exe@13.59.2", "", { "os": "win32" }, "sha512-U0l0CApIGO+AjpFYCiNCApQsMdlf6sqCyEl4wlKKqvwVAEVcvMRw91k7zj32OPFZE+/+XlLFsc6876MpOqBLiw=="],
"exiftool-vendored.pl": ["exiftool-vendored.pl@13.59.2", "", { "os": "!win32", "bin": { "exiftool": "bin/exiftool" } }, "sha512-5B80JT9phZSUsc7zz77rQ6DfW0YssTpJ5qW/1bOH1N8XQq/jcn+9eRW9HFwhVT9uoIliw9Fg007ST3pUzQIzyw=="],
"expect-type": ["expect-type@1.4.0", "", {}, "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA=="],
"exsolve": ["exsolve@1.1.1", "", {}, "sha512-9U/jZUgjnSGyntRr6y5Muu1MJcwFl6kPu7k8qLF0IMNfLqvw0NZ4nnVDq0RVoZ0RvCyumib4Ez3KYrVfilrw+g=="],
@@ -1882,6 +2154,8 @@
"flatted": ["flatted@3.4.4", "", {}, "sha512-5+ybhBZANEJxaH3X5evAFatUxLfEHSr7n6kYJ+1Qd0mUqr4eu9gIf6GDbWHf8RJijHrjjO8G+la14SlL2SeS1Q=="],
"focus-visible": ["focus-visible@5.2.1", "", {}, "sha512-8Bx950VD1bWTQJEH/AM6SpEk+SU55aVnp4Ujhuuxy3eMEBCRwBnTBnVXr9YAPvZL3/CNjCa8u4IWfNmEO53whA=="],
"fontkit": ["fontkit@2.0.4", "", { "dependencies": { "@swc/helpers": "^0.5.12", "brotli": "^1.3.2", "clone": "^2.1.2", "dfa": "^1.2.0", "fast-deep-equal": "^3.1.3", "restructure": "^3.0.0", "tiny-inflate": "^1.0.3", "unicode-properties": "^1.4.0", "unicode-trie": "^2.0.0" } }, "sha512-syetQadaUEDNdxdugga9CpEYVaQIxOwk7GlwZWWZ19//qW4zE5bknOKeMBDYAASwnpaSHKJITRLMF9m1fp3s6g=="],
"for-each": ["for-each@0.3.5", "", { "dependencies": { "is-callable": "^1.2.7" } }, "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg=="],
@@ -1940,8 +2214,6 @@
"glob-to-regex.js": ["glob-to-regex.js@1.2.0", "", { "peerDependencies": { "tslib": "2" } }, "sha512-QMwlOQKU/IzqMUOAZWubUOT8Qft+Y0KQWnX9nK3ch0CJg0tTp4TvGZsTfudYKv2NzoQSyPcnA6TYeIQ3jGichQ=="],
"global": ["global@4.4.0", "", { "dependencies": { "min-document": "^2.19.0", "process": "^0.11.10" } }, "sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w=="],
"globals": ["globals@17.11.0", "", {}, "sha512-Z2I8hM+PbJDXQDq3Icgpzv+mPdwr68iZUU9d5WW4FuXfDUQfkZaZuvjMv42/5crNyw154+9+VWXbYrUgDXbxNw=="],
"globalthis": ["globalthis@1.0.4", "", { "dependencies": { "define-properties": "^1.2.1", "gopd": "^1.0.1" } }, "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ=="],
@@ -1980,10 +2252,14 @@
"hast-util-whitespace": ["hast-util-whitespace@3.0.0", "", { "dependencies": { "@types/hast": "^3.0.0" } }, "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw=="],
"he": ["he@1.2.0", "", { "bin": { "he": "bin/he" } }, "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="],
"heap-js": ["heap-js@2.7.1", "", {}, "sha512-EQfezRg0NCZGNlhlDR3Evrw1FVL2G3LhU7EgPoxufQKruNBSYA8MiRPHeWbU+36o+Fhel0wMwM+sLEiBAlNLJA=="],
"help-me": ["help-me@5.0.0", "", {}, "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg=="],
"hls.js": ["hls.js@1.7.3", "", {}, "sha512-MsPlx6yVW4Qv4C7mEVou4/gk/5cN2dVxOTnrNjPSmyH2f0Ln+/UkG10Ax1PE6OvrmTVPKgQYozTtBaPOuCzq7A=="],
"hono": ["hono@4.13.5", "", {}, "sha512-O6+/eCYRkzzzy0rPWwKLiGBR1nFuUPZynnwjxN1MBA62NNqbT0wQEzQyK2gSO5yDIDB336sXQleAhOHrzlYyKw=="],
"html-url-attributes": ["html-url-attributes@3.0.1", "", {}, "sha512-ol6UPyBWqsrO6EJySPz2O7ZSr856WDrEzM5zMqp+FJJLGMW35cLYmmZnl0vztAZxRUoNZJFTCohfjuIJ8I4QBQ=="],
@@ -2044,8 +2320,6 @@
"is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="],
"is-function": ["is-function@1.0.2", "", {}, "sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ=="],
"is-generator-function": ["is-generator-function@1.1.2", "", { "dependencies": { "call-bound": "^1.0.4", "generator-function": "^2.0.0", "get-proto": "^1.0.1", "has-tostringtag": "^1.0.2", "safe-regex-test": "^1.1.0" } }, "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA=="],
"is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="],
@@ -2106,6 +2380,8 @@
"jose": ["jose@6.2.10", "", {}, "sha512-iiW7J9qRFlGxvCOIBDBDxFePQSn7ZMAnrYGhrrOo6siO/MIqwfyilLR27pkfDgUk+raLuzADS8A3S/KLBisc0g=="],
"jotai": ["jotai@2.20.3", "", { "peerDependencies": { "@babel/core": ">=7.0.0", "@babel/template": ">=7.0.0", "@types/react": ">=17.0.0", "react": ">=17.0.0" }, "optionalPeers": ["@babel/core", "@babel/template", "@types/react", "react"] }, "sha512-N8L9FUbeGDP+0qNJw1FebOxt+5hk+jTOwUA2LlRE4C081jUcY6F1T/FSETp4DT2/INMtiSRZyNm2D+yZdzrSgA=="],
"joycon": ["joycon@3.1.1", "", {}, "sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw=="],
"js-tokens": ["js-tokens@4.0.0", "", {}, "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="],
@@ -2172,6 +2448,12 @@
"linebreak": ["linebreak@1.1.0", "", { "dependencies": { "base64-js": "0.0.8", "unicode-trie": "^2.0.0" } }, "sha512-MHp03UImeVhB7XZtjd0E4n6+3xr5Dq/9xI/5FptGk5FrbDR3zagPa2DS6U8ks/3HjbKWG9Q1M2ufOzxV2qLYSQ=="],
"lit": ["lit@2.8.0", "", { "dependencies": { "@lit/reactive-element": "^1.6.0", "lit-element": "^3.3.0", "lit-html": "^2.8.0" } }, "sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA=="],
"lit-element": ["lit-element@3.3.3", "", { "dependencies": { "@lit-labs/ssr-dom-shim": "^1.1.0", "@lit/reactive-element": "^1.3.0", "lit-html": "^2.8.0" } }, "sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA=="],
"lit-html": ["lit-html@2.8.0", "", { "dependencies": { "@types/trusted-types": "^2.0.2" } }, "sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q=="],
"locate-path": ["locate-path@6.0.0", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="],
"lodash": ["lodash@4.18.1", "", {}, "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q=="],
@@ -2190,9 +2472,9 @@
"lucide-react": ["lucide-react@1.37.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-LPsB4rD1TD6wZu1djKOf9vUnS1jTNaHbolXebXDgiTdb6jeA1agIJhJsIybCmjKmQClcOaal1o1OaiYahEftyQ=="],
"lz-string": ["lz-string@1.5.0", "", { "bin": { "lz-string": "bin/bin.js" } }, "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ=="],
"luxon": ["luxon@3.7.2", "", {}, "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew=="],
"m3u8-parser": ["m3u8-parser@7.2.0", "", { "dependencies": { "@babel/runtime": "^7.12.5", "@videojs/vhs-utils": "^4.1.1", "global": "^4.4.0" } }, "sha512-CRatFqpjVtMiMaKXxNvuI3I++vUumIXVVT/JpCpdU/FynV/ceVw1qpPyyBNindL+JlPMSesx+WX1QJaZEJSaMQ=="],
"lz-string": ["lz-string@1.5.0", "", { "bin": { "lz-string": "bin/bin.js" } }, "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ=="],
"magic-string": ["magic-string@0.30.21", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="],
@@ -2264,8 +2546,6 @@
"mime-match": ["mime-match@1.0.2", "", { "dependencies": { "wildcard": "^1.1.0" } }, "sha512-VXp/ugGDVh3eCLOBCiHZMYWQaTNUHv2IJrut+yXA6+JbLPXHglHwfS/5A5L0ll+jkCY7fIzRJcH6OIunF+c6Cg=="],
"min-document": ["min-document@2.19.2", "", { "dependencies": { "dom-walk": "^0.1.0" } }, "sha512-8S5I8db/uZN8r9HSLFVWPdJCvYOejMcEC82VIzNUc6Zkklf/d1gg2psfE79/vyhWOj4+J8MtwmoOz3TmvaGu5A=="],
"minimatch": ["minimatch@10.2.6", "", { "dependencies": { "brace-expansion": "^5.0.8" } }, "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A=="],
"minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="],
@@ -2278,12 +2558,8 @@
"mkdirp-classic": ["mkdirp-classic@0.5.3", "", {}, "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="],
"mpd-parser": ["mpd-parser@1.4.0", "", { "dependencies": { "@babel/runtime": "^7.12.5", "@videojs/vhs-utils": "^4.1.2", "@xmldom/xmldom": "^0.8.3", "global": "^4.4.0" }, "bin": { "mpd-to-m3u8-json": "bin/parse.js" } }, "sha512-blbA7XpAaOdC/PR0Tu8GiUxlx6CpBuRowQPYV7lhi9Yr9G9+dkPXIUjqjzc/NCn/uZZPopluaJlIYntIEI/VLw=="],
"ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
"mux.js": ["mux.js@7.1.0", "", { "dependencies": { "@babel/runtime": "^7.11.2", "global": "^4.4.0" }, "bin": { "muxjs-transmux": "bin/transmux.js" } }, "sha512-NTxawK/BBELJrYsZThEulyUMDVlLizKdxyAsMuzoCD1eFj97BVaA8D/CvKsKu6FOLYkFojN5CbM9h++ZTZtknA=="],
"mysql2": ["mysql2@3.15.3", "", { "dependencies": { "aws-ssl-profiles": "^1.1.1", "denque": "^2.1.0", "generate-function": "^2.3.1", "iconv-lite": "^0.7.0", "long": "^5.2.1", "lru.min": "^1.0.0", "named-placeholders": "^1.1.3", "seq-queue": "^0.0.5", "sqlstring": "^2.3.2" } }, "sha512-FBrGau0IXmuqg4haEZRBfHNWB5mUARw6hNwPDXXGg0XzVJ50mr/9hb267lvpVMnhZ1FON3qNd4Xfcez1rbFwSg=="],
"named-placeholders": ["named-placeholders@1.1.6", "", { "dependencies": { "lru.min": "^1.1.0" } }, "sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w=="],
@@ -2306,6 +2582,8 @@
"node-domexception": ["node-domexception@1.0.0", "", {}, "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="],
"node-emoji": ["node-emoji@2.2.0", "", { "dependencies": { "@sindresorhus/is": "^4.6.0", "char-regex": "^1.0.2", "emojilib": "^2.4.0", "skin-tone": "^2.0.0" } }, "sha512-Z3lTE9pLaJF47NyMhd4ww1yFTAP8YhYI8SleJiHzM46Fgpm5cnNzSl9XfzFNqbaz+VlJrIj3fXQ4DeN1Rjm6cw=="],
"node-exports-info": ["node-exports-info@1.6.2", "", { "dependencies": { "array.prototype.flatmap": "^1.3.3", "es-errors": "^1.3.0", "object.entries": "^1.1.9", "semver": "^6.3.1" } }, "sha512-kXs9Go0cah0qHVV2v389IXQLdLCeE1xfFtjOAF+iobu0OIoG1pje8At2vMHyaPMiPMnG/LWP50twML21eMcAag=="],
"node-fetch": ["node-fetch@3.3.2", "", { "dependencies": { "data-uri-to-buffer": "^4.0.0", "fetch-blob": "^3.1.4", "formdata-polyfill": "^4.0.10" } }, "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA=="],
@@ -2314,6 +2592,8 @@
"node-releases": ["node-releases@2.0.54", "", {}, "sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ=="],
"nodemailer": ["nodemailer@10.0.10", "", {}, "sha512-He9XskOFms62SyAKkLu8CcGcYHAo+BSHSsORI8s4PJH8qZgZY4L4lDfvyN0twvmbpyG+eGrxpyBlskj9d9rJ8A=="],
"normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="],
"object-assign": ["object-assign@4.1.1", "", {}, "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg=="],
@@ -2410,8 +2690,6 @@
"pkce-challenge": ["pkce-challenge@5.0.1", "", {}, "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ=="],
"pkcs7": ["pkcs7@1.0.4", "", { "dependencies": { "@babel/runtime": "^7.5.5" }, "bin": { "pkcs7": "bin/cli.js" } }, "sha512-afRERtHn54AlwaF2/+LFszyAANTCggGilmcmILUzEjvs3XgFZT+xE6+QWQcAGmu4xajy+Xtj7acLOPdx5/eXWQ=="],
"pkg-types": ["pkg-types@2.3.1", "", { "dependencies": { "confbox": "^0.2.4", "exsolve": "^1.0.8", "pathe": "^2.0.3" } }, "sha512-y+ichcgc2LrADuhLNAx8DFjVfgz91pRxfZdI3UDhxHvcVEZsenLO+7XaU5vOp0u/7V/wZ+plyuQxtrDlZJ+yeg=="],
"playwright": ["playwright@1.61.1", "", { "dependencies": { "playwright-core": "1.61.1" }, "optionalDependencies": { "fsevents": "2.3.2" }, "bin": { "playwright": "cli.js" } }, "sha512-DWnY5o3YbLWK4GovuAVwpqL+1VwGNdUGrRr++8j8PtQQzvAVZUIMjKQ90fY689sEJZJBbZVw1rXaOKSTitkzPQ=="],
@@ -2608,6 +2886,8 @@
"signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="],
"skin-tone": ["skin-tone@2.0.0", "", { "dependencies": { "unicode-emoji-modifier-base": "^1.0.0" } }, "sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA=="],
"sonic-boom": ["sonic-boom@4.2.1", "", { "dependencies": { "atomic-sleep": "^1.0.0" } }, "sha512-w6AxtubXa2wTXAUsZMMWERrsIRAdrK0Sc+FUytWvYAhBJLyuI4llrMIC1DtlNSdI99EI86KZum2MMq3EAZlF9Q=="],
"sonner": ["sonner@2.0.8", "", { "peerDependencies": { "@types/react": "^18.0.0 || ^19.0.0", "react": "^18.0.0 || ^19.0.0 || ^19.0.0-rc", "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-UM/ByIoFra8yzV75n1o0Puu0bw5U/9UNnDacrJNspekBewIfsQ3D6ez1nvlWpt7aTsO6rujQtifBpycwIivqlg=="],
@@ -2762,6 +3042,10 @@
"undici-types": ["undici-types@7.24.6", "", {}, "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg=="],
"unicode-emoji-json": ["unicode-emoji-json@0.8.0", "", {}, "sha512-3wDXXvp6YGoKGhS2O2H7+V+bYduOBydN1lnI0uVfr1cIdY02uFFiEH1i3kE5CCE4l6UqbLKVmEFW9USxTAMD1g=="],
"unicode-emoji-modifier-base": ["unicode-emoji-modifier-base@1.0.0", "", {}, "sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g=="],
"unicode-properties": ["unicode-properties@1.4.1", "", { "dependencies": { "base64-js": "^1.3.0", "unicode-trie": "^2.0.0" } }, "sha512-CLjCCLQ6UuMxWnbIylkisbRj31qxHPAurvena/0iwSVbQ2G1VY5/HjV0IRabOEbDHlzZlRdCrD4NhB0JtU40Pg=="],
"unicode-trie": ["unicode-trie@2.0.0", "", { "dependencies": { "pako": "^0.2.5", "tiny-inflate": "^1.0.0" } }, "sha512-x7bc76x0bm4prf1VLg79uhAzKw8DVboClSN5VxJuQ+LKDOVEW9CdH+VY7SP+vX7xCYQqzzgQpFqz15zeLvAtZQ=="],
@@ -2810,14 +3094,6 @@
"victory-vendor": ["victory-vendor@37.3.6", "", { "dependencies": { "@types/d3-array": "^3.0.3", "@types/d3-ease": "^3.0.0", "@types/d3-interpolate": "^3.0.1", "@types/d3-scale": "^4.0.2", "@types/d3-shape": "^3.1.0", "@types/d3-time": "^3.0.0", "@types/d3-timer": "^3.0.0", "d3-array": "^3.1.6", "d3-ease": "^3.0.1", "d3-interpolate": "^3.0.1", "d3-scale": "^4.0.2", "d3-shape": "^3.1.0", "d3-time": "^3.0.0", "d3-timer": "^3.0.1" } }, "sha512-SbPDPdDBYp+5MJHhBCAyI7wKM3d5ivekigc2Dk2s7pgbZ9wIgIBYGVw4zGHBml/qTFbexrofXW6Gu4noGxrOwQ=="],
"video.js": ["video.js@8.24.0", "", { "dependencies": { "@babel/runtime": "^7.28.4", "@videojs/http-streaming": "^3.17.5", "@videojs/vhs-utils": "^4.1.2", "@videojs/xhr": "2.7.0", "aes-decrypter": "^4.0.2", "global": "4.4.0", "m3u8-parser": "^7.2.0", "mpd-parser": "^1.4.0", "mux.js": "^7.0.1", "videojs-contrib-quality-levels": "4.1.0", "videojs-font": "4.2.0", "videojs-vtt.js": "0.15.5" } }, "sha512-ZUuxTlDRkEWhpp2mvGCSFzI0Tc3zcC6IUZbIhBcZ3QW0Ms+IRp/tzYkhqexcMYwrcukRFiWWJmRANsLKvv8Vsg=="],
"videojs-contrib-quality-levels": ["videojs-contrib-quality-levels@4.1.0", "", { "dependencies": { "global": "^4.4.0" }, "peerDependencies": { "video.js": "^8" } }, "sha512-TfrXJJg1Bv4t6TOCMEVMwF/CoS8iENYsWNKip8zfhB5kTcegiFYezEA0eHAJPU64ZC8NQbxQgOwAsYU8VXbOWA=="],
"videojs-font": ["videojs-font@4.2.0", "", {}, "sha512-YPq+wiKoGy2/M7ccjmlvwi58z2xsykkkfNMyIg4xb7EZQQNwB71hcSsB3o75CqQV7/y5lXkXhI/rsGAS7jfEmQ=="],
"videojs-vtt.js": ["videojs-vtt.js@0.15.5", "", { "dependencies": { "global": "^4.3.1" } }, "sha512-yZbBxvA7QMYn15Lr/ZfhhLPrNpI/RmCSCqgIff57GC2gIrV5YfyzLfLyZMj0NnZSAz8syB4N0nHXpZg9MyrMOQ=="],
"vite": ["vite@8.2.2", "", { "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.5", "postcss": "^8.5.26", "rolldown": "~1.2.4", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.4.0 || ^0.5.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q=="],
"vite-tsconfig-paths": ["vite-tsconfig-paths@6.1.1", "", { "dependencies": { "debug": "^4.1.1", "globrex": "^0.1.2", "tsconfck": "^3.0.3" }, "peerDependencies": { "vite": "*" } }, "sha512-2cihq7zliibCCZ8P9cKJrQBkfgdvcFkOOc3Y02o3GWUDLgqjWsZudaoiuOwO/gzTzy17cS5F7ZPo4bsnS4DGkg=="],
@@ -2956,6 +3232,110 @@
"@reduxjs/toolkit/reselect": ["reselect@5.3.0", "", {}, "sha512-XGoLeRAVzUTcJ1qkxPQhDJyIZ5d6zzZD9nT7AEZOaaU9UbWclhycElmhO+VD5bFeLuzhPBaOV2oXC8uG35ZSpg=="],
"@shumai/core/@temporalio/activity": ["@temporalio/activity@1.24.0", "", { "dependencies": { "@temporalio/client": "1.24.0", "@temporalio/common": "1.24.0" } }, "sha512-eBBho/r9XHe2KczYGzmaSp6e9+6c9ta/GGOBldIBr00D/cV34kJ76iAY3Ue1pQTaP7YaX3phMuOz07uUg/IKyA=="],
"@shumai/core/@temporalio/workflow": ["@temporalio/workflow@1.24.0", "", { "dependencies": { "@temporalio/common": "1.24.0", "@temporalio/proto": "1.24.0", "nexus-rpc": "^0.0.3" } }, "sha512-pIA9nxkDCCbBnNuMSffQ44HWHYe3zXFfrDpDLwzh/FUSx8uLbsBM8jwf5oUMf+5eV/qVW9PknZhOu9IFO4XnPA=="],
"@shumai/webui/@types/react-dom": ["@types/react-dom@19.2.5", "", { "peerDependencies": { "@types/react": "^19.2.0" } }, "sha512-fMPwH9v7r/pp43yUd2/Mbiex5KouJwwR3dzHkhLREUC6764VyDsqxhAxv6OFEYR1RhjOyD1naqba8ECDBe7ZQg=="],
"@spectrum-web-components/action-button/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@spectrum-web-components/action-group/@spectrum-web-components/icons-workflow": ["@spectrum-web-components/icons-workflow@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0" } }, "sha512-D1Dg+ZjlqbaU/2uKYhmMtZXQMVUw9J9LevHSKSzMFL+Y++JMqRROQuzwAOFW7tttCw1w0+3kIuv2ohkeE+8fNQ=="],
"@spectrum-web-components/action-group/@spectrum-web-components/reactive-controllers": ["@spectrum-web-components/reactive-controllers@0.37.0", "", { "dependencies": { "lit": "^2.5.0" } }, "sha512-1wnWLt88iyTPrElxZqPpyWWzScSkXY3zxi+QxIV0cFGmhRlPsH+XXqs/kGkfzRyNtE4s2AWuRZ2wtbcao6MzJQ=="],
"@spectrum-web-components/action-menu/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@spectrum-web-components/action-menu/@spectrum-web-components/icons-workflow": ["@spectrum-web-components/icons-workflow@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0" } }, "sha512-D1Dg+ZjlqbaU/2uKYhmMtZXQMVUw9J9LevHSKSzMFL+Y++JMqRROQuzwAOFW7tttCw1w0+3kIuv2ohkeE+8fNQ=="],
"@spectrum-web-components/button/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@spectrum-web-components/card/@spectrum-web-components/icons-workflow": ["@spectrum-web-components/icons-workflow@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0" } }, "sha512-D1Dg+ZjlqbaU/2uKYhmMtZXQMVUw9J9LevHSKSzMFL+Y++JMqRROQuzwAOFW7tttCw1w0+3kIuv2ohkeE+8fNQ=="],
"@spectrum-web-components/checkbox/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@spectrum-web-components/field-label/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@spectrum-web-components/field-label/@spectrum-web-components/reactive-controllers": ["@spectrum-web-components/reactive-controllers@0.37.0", "", { "dependencies": { "lit": "^2.5.0" } }, "sha512-1wnWLt88iyTPrElxZqPpyWWzScSkXY3zxi+QxIV0cFGmhRlPsH+XXqs/kGkfzRyNtE4s2AWuRZ2wtbcao6MzJQ=="],
"@spectrum-web-components/help-text/@spectrum-web-components/icons-workflow": ["@spectrum-web-components/icons-workflow@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0" } }, "sha512-D1Dg+ZjlqbaU/2uKYhmMtZXQMVUw9J9LevHSKSzMFL+Y++JMqRROQuzwAOFW7tttCw1w0+3kIuv2ohkeE+8fNQ=="],
"@spectrum-web-components/icon/@spectrum-web-components/base": ["@spectrum-web-components/base@1.12.2", "", { "dependencies": { "lit": "^2.5.0 || ^3.1.3" } }, "sha512-7vB3182FqJzRevafUWlFRw/bfM4ZjC+Mmh5Fh0mDmVcP/SohUowrmHsQns1fsQPi+/O8iMP8XbtT7sAFp6ejkA=="],
"@spectrum-web-components/icons-ui/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@spectrum-web-components/icons-ui/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@spectrum-web-components/icons-workflow/@spectrum-web-components/base": ["@spectrum-web-components/base@1.12.2", "", { "dependencies": { "lit": "^2.5.0 || ^3.1.3" } }, "sha512-7vB3182FqJzRevafUWlFRw/bfM4ZjC+Mmh5Fh0mDmVcP/SohUowrmHsQns1fsQPi+/O8iMP8XbtT7sAFp6ejkA=="],
"@spectrum-web-components/iconset/@spectrum-web-components/base": ["@spectrum-web-components/base@1.12.2", "", { "dependencies": { "lit": "^2.5.0 || ^3.1.3" } }, "sha512-7vB3182FqJzRevafUWlFRw/bfM4ZjC+Mmh5Fh0mDmVcP/SohUowrmHsQns1fsQPi+/O8iMP8XbtT7sAFp6ejkA=="],
"@spectrum-web-components/menu/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@spectrum-web-components/overlay/@floating-ui/utils": ["@floating-ui/utils@0.1.6", "", {}, "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A=="],
"@spectrum-web-components/overlay/@spectrum-web-components/reactive-controllers": ["@spectrum-web-components/reactive-controllers@0.37.0", "", { "dependencies": { "lit": "^2.5.0" } }, "sha512-1wnWLt88iyTPrElxZqPpyWWzScSkXY3zxi+QxIV0cFGmhRlPsH+XXqs/kGkfzRyNtE4s2AWuRZ2wtbcao6MzJQ=="],
"@spectrum-web-components/picker/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@spectrum-web-components/picker/@spectrum-web-components/icons-workflow": ["@spectrum-web-components/icons-workflow@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0" } }, "sha512-D1Dg+ZjlqbaU/2uKYhmMtZXQMVUw9J9LevHSKSzMFL+Y++JMqRROQuzwAOFW7tttCw1w0+3kIuv2ohkeE+8fNQ=="],
"@spectrum-web-components/picker/@spectrum-web-components/reactive-controllers": ["@spectrum-web-components/reactive-controllers@0.37.0", "", { "dependencies": { "lit": "^2.5.0" } }, "sha512-1wnWLt88iyTPrElxZqPpyWWzScSkXY3zxi+QxIV0cFGmhRlPsH+XXqs/kGkfzRyNtE4s2AWuRZ2wtbcao6MzJQ=="],
"@spectrum-web-components/reactive-controllers/@spectrum-web-components/progress-circle": ["@spectrum-web-components/progress-circle@1.12.2", "", { "dependencies": { "@spectrum-web-components/base": "1.12.2", "@spectrum-web-components/reactive-controllers": "1.12.2", "@spectrum-web-components/shared": "1.12.2" } }, "sha512-I7gAZM8gza/gDZ+tJuKcWF8lld4030GcJpLcySb1NTzBpJlnIItPuybBolSpSb+QzmFTAnlGJaRWTXPZkC8hwA=="],
"@spectrum-web-components/search/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@spectrum-web-components/search/@spectrum-web-components/icons-workflow": ["@spectrum-web-components/icons-workflow@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0" } }, "sha512-D1Dg+ZjlqbaU/2uKYhmMtZXQMVUw9J9LevHSKSzMFL+Y++JMqRROQuzwAOFW7tttCw1w0+3kIuv2ohkeE+8fNQ=="],
"@spectrum-web-components/textfield/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@spectrum-web-components/textfield/@spectrum-web-components/icons-workflow": ["@spectrum-web-components/icons-workflow@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0" } }, "sha512-D1Dg+ZjlqbaU/2uKYhmMtZXQMVUw9J9LevHSKSzMFL+Y++JMqRROQuzwAOFW7tttCw1w0+3kIuv2ohkeE+8fNQ=="],
"@spectrum-web-components/tray/@spectrum-web-components/reactive-controllers": ["@spectrum-web-components/reactive-controllers@0.37.0", "", { "dependencies": { "lit": "^2.5.0" } }, "sha512-1wnWLt88iyTPrElxZqPpyWWzScSkXY3zxi+QxIV0cFGmhRlPsH+XXqs/kGkfzRyNtE4s2AWuRZ2wtbcao6MzJQ=="],
"@swc-uxp-internal/action-button/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@swc-uxp-internal/action-group/@spectrum-web-components/icons-workflow": ["@spectrum-web-components/icons-workflow@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0" } }, "sha512-D1Dg+ZjlqbaU/2uKYhmMtZXQMVUw9J9LevHSKSzMFL+Y++JMqRROQuzwAOFW7tttCw1w0+3kIuv2ohkeE+8fNQ=="],
"@swc-uxp-internal/action-group/@spectrum-web-components/reactive-controllers": ["@spectrum-web-components/reactive-controllers@0.37.0", "", { "dependencies": { "lit": "^2.5.0" } }, "sha512-1wnWLt88iyTPrElxZqPpyWWzScSkXY3zxi+QxIV0cFGmhRlPsH+XXqs/kGkfzRyNtE4s2AWuRZ2wtbcao6MzJQ=="],
"@swc-uxp-internal/button/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@swc-uxp-internal/card/@spectrum-web-components/icons-workflow": ["@spectrum-web-components/icons-workflow@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0" } }, "sha512-D1Dg+ZjlqbaU/2uKYhmMtZXQMVUw9J9LevHSKSzMFL+Y++JMqRROQuzwAOFW7tttCw1w0+3kIuv2ohkeE+8fNQ=="],
"@swc-uxp-internal/checkbox/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@swc-uxp-internal/field-label/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@swc-uxp-internal/field-label/@spectrum-web-components/reactive-controllers": ["@spectrum-web-components/reactive-controllers@0.37.0", "", { "dependencies": { "lit": "^2.5.0" } }, "sha512-1wnWLt88iyTPrElxZqPpyWWzScSkXY3zxi+QxIV0cFGmhRlPsH+XXqs/kGkfzRyNtE4s2AWuRZ2wtbcao6MzJQ=="],
"@swc-uxp-internal/help-text/@spectrum-web-components/icons-workflow": ["@spectrum-web-components/icons-workflow@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0" } }, "sha512-D1Dg+ZjlqbaU/2uKYhmMtZXQMVUw9J9LevHSKSzMFL+Y++JMqRROQuzwAOFW7tttCw1w0+3kIuv2ohkeE+8fNQ=="],
"@swc-uxp-internal/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@swc-uxp-internal/icons/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@swc-uxp-internal/icons-ui/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@swc-uxp-internal/icons-ui/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@swc-uxp-internal/icons-workflow/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@swc-uxp-internal/menu/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@swc-uxp-internal/overlay/@floating-ui/utils": ["@floating-ui/utils@0.1.6", "", {}, "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A=="],
"@swc-uxp-internal/overlay/@spectrum-web-components/reactive-controllers": ["@spectrum-web-components/reactive-controllers@0.37.0", "", { "dependencies": { "lit": "^2.5.0" } }, "sha512-1wnWLt88iyTPrElxZqPpyWWzScSkXY3zxi+QxIV0cFGmhRlPsH+XXqs/kGkfzRyNtE4s2AWuRZ2wtbcao6MzJQ=="],
"@swc-uxp-internal/search/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@swc-uxp-internal/search/@spectrum-web-components/icons-workflow": ["@spectrum-web-components/icons-workflow@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0" } }, "sha512-D1Dg+ZjlqbaU/2uKYhmMtZXQMVUw9J9LevHSKSzMFL+Y++JMqRROQuzwAOFW7tttCw1w0+3kIuv2ohkeE+8fNQ=="],
"@swc-uxp-internal/textfield/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@swc-uxp-internal/textfield/@spectrum-web-components/icons-workflow": ["@spectrum-web-components/icons-workflow@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/icon": "^0.37.0" } }, "sha512-D1Dg+ZjlqbaU/2uKYhmMtZXQMVUw9J9LevHSKSzMFL+Y++JMqRROQuzwAOFW7tttCw1w0+3kIuv2ohkeE+8fNQ=="],
"@tailwindcss/node/lightningcss": ["lightningcss@1.32.0", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.32.0", "lightningcss-darwin-arm64": "1.32.0", "lightningcss-darwin-x64": "1.32.0", "lightningcss-freebsd-x64": "1.32.0", "lightningcss-linux-arm-gnueabihf": "1.32.0", "lightningcss-linux-arm64-gnu": "1.32.0", "lightningcss-linux-arm64-musl": "1.32.0", "lightningcss-linux-x64-gnu": "1.32.0", "lightningcss-linux-x64-musl": "1.32.0", "lightningcss-win32-arm64-msvc": "1.32.0", "lightningcss-win32-x64-msvc": "1.32.0" } }, "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ=="],
"@tailwindcss/oxide-wasm32-wasi/@emnapi/core": ["@emnapi/core@1.11.3", "", { "dependencies": { "@emnapi/wasi-threads": "1.2.3", "tslib": "^2.4.0" }, "bundled": true }, "sha512-zLpS5asjEb7lq8jYLq37N6XKaE41DIexlY1rF/z4/tIl3wo13Sqm28fRyfIsKZD+NZ8mM5RoKkpW/rBcuoSZSg=="],
@@ -3040,6 +3420,10 @@
"linebreak/base64-js": ["base64-js@0.0.8", "", {}, "sha512-3XSA2cR/h/73EzlXXdU6YNycmYI7+kicTxks4eJg2g39biHR84slg2+des+p7iHYhbRg/udIS4TD53WabcOUkw=="],
"lit/@lit/reactive-element": ["@lit/reactive-element@1.6.3", "", { "dependencies": { "@lit-labs/ssr-dom-shim": "^1.0.0" } }, "sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ=="],
"lit-element/@lit/reactive-element": ["@lit/reactive-element@1.6.3", "", { "dependencies": { "@lit-labs/ssr-dom-shim": "^1.0.0" } }, "sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ=="],
"p-retry/retry": ["retry@0.13.1", "", {}, "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg=="],
"parse-entities/@types/unist": ["@types/unist@2.0.11", "", {}, "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA=="],
@@ -3102,6 +3486,64 @@
"@prisma/studio-core/@radix-ui/react-toggle/@radix-ui/react-use-controllable-state": ["@radix-ui/react-use-controllable-state@1.2.2", "", { "dependencies": { "@radix-ui/react-use-effect-event": "0.0.2", "@radix-ui/react-use-layout-effect": "1.1.1" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-BjasUjixPFdS+NKkypcyyN5Pmg83Olst0+c6vGov0diwTEo6mgdqVR6hxcEgFuh4QrAs7Rc+9KuGJ9TVCj0Zzg=="],
"@shumai/core/@temporalio/activity/@temporalio/client": ["@temporalio/client@1.24.0", "", { "dependencies": { "@grpc/grpc-js": "^1.12.4", "@temporalio/common": "1.24.0", "@temporalio/proto": "1.24.0", "abort-controller": "^3.0.0", "long": "^5.3.2", "nexus-rpc": "^0.0.3", "uuid": "^11.1.0" } }, "sha512-/GGg6ZYl+pN/bQEvq414CyjDvyM+MM1WsMzi/7SCYb3UlivVXx9nOmH/6BGx8OfYFayp11fkmfSh6rt7vW/ePQ=="],
"@shumai/core/@temporalio/activity/@temporalio/common": ["@temporalio/common@1.24.0", "", { "dependencies": { "@temporalio/proto": "1.24.0", "long": "^5.3.2", "ms": "3.0.0-canary.1", "nexus-rpc": "^0.0.3", "protobufjs": "^8.7.1" } }, "sha512-jXp77fXwynBcVNc/CaGMT33TVYnhcN26S959HDv7Q71oc0rN6d8RHWR5z0nRCDAu5CQwZQRRhVK0TRdyAiEg7Q=="],
"@shumai/core/@temporalio/workflow/@temporalio/common": ["@temporalio/common@1.24.0", "", { "dependencies": { "@temporalio/proto": "1.24.0", "long": "^5.3.2", "ms": "3.0.0-canary.1", "nexus-rpc": "^0.0.3", "protobufjs": "^8.7.1" } }, "sha512-jXp77fXwynBcVNc/CaGMT33TVYnhcN26S959HDv7Q71oc0rN6d8RHWR5z0nRCDAu5CQwZQRRhVK0TRdyAiEg7Q=="],
"@shumai/core/@temporalio/workflow/@temporalio/proto": ["@temporalio/proto@1.24.0", "", { "dependencies": { "long": "^5.3.2", "protobufjs": "^8.7.1" } }, "sha512-vhlhB9GpoyJx+78r3lDahHywpdri6LKx7kt7djLIw6XzHyb8FQTIi4lX8DSJBqKp3+HVfL1CLwiqO26KFRzg/g=="],
"@spectrum-web-components/action-button/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@spectrum-web-components/action-group/@spectrum-web-components/icons-workflow/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@spectrum-web-components/action-menu/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@spectrum-web-components/button/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@spectrum-web-components/card/@spectrum-web-components/icons-workflow/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@spectrum-web-components/checkbox/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@spectrum-web-components/field-label/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@spectrum-web-components/help-text/@spectrum-web-components/icons-workflow/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@spectrum-web-components/menu/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@spectrum-web-components/picker/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@spectrum-web-components/reactive-controllers/@spectrum-web-components/progress-circle/@spectrum-web-components/base": ["@spectrum-web-components/base@1.12.2", "", { "dependencies": { "lit": "^2.5.0 || ^3.1.3" } }, "sha512-7vB3182FqJzRevafUWlFRw/bfM4ZjC+Mmh5Fh0mDmVcP/SohUowrmHsQns1fsQPi+/O8iMP8XbtT7sAFp6ejkA=="],
"@spectrum-web-components/reactive-controllers/@spectrum-web-components/progress-circle/@spectrum-web-components/shared": ["@spectrum-web-components/shared@1.12.2", "", { "dependencies": { "@lit-labs/observers": "2.0.2", "@spectrum-web-components/base": "1.12.2", "focus-visible": "5.2.1" } }, "sha512-1vRimMtdKllujoFPbuDoPP0eSHZJfExWld2jeqboMKjzNTDvBfoOIN3ZOz7ClOVyrJOQDJSP2htCVfDBYl72Ug=="],
"@spectrum-web-components/search/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@spectrum-web-components/textfield/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@swc-uxp-internal/action-button/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@swc-uxp-internal/action-group/@spectrum-web-components/icons-workflow/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@swc-uxp-internal/button/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@swc-uxp-internal/card/@spectrum-web-components/icons-workflow/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@swc-uxp-internal/checkbox/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@swc-uxp-internal/field-label/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@swc-uxp-internal/help-text/@spectrum-web-components/icons-workflow/@spectrum-web-components/icon": ["@spectrum-web-components/icon@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0", "@spectrum-web-components/iconset": "^0.37.0" } }, "sha512-DZ1yOKHxNQygzIJ7u9akYComDnMmxuTzfmYxxt9sHdUXmc1NbMkCJqEaAG/LYsdb+hc4xWaDTT9SzArLKZ/btA=="],
"@swc-uxp-internal/icons-workflow/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@swc-uxp-internal/menu/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@swc-uxp-internal/search/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@swc-uxp-internal/textfield/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@tailwindcss/node/lightningcss/lightningcss-android-arm64": ["lightningcss-android-arm64@1.32.0", "", { "os": "android", "cpu": "arm64" }, "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg=="],
"@tailwindcss/node/lightningcss/lightningcss-darwin-arm64": ["lightningcss-darwin-arm64@1.32.0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ=="],
@@ -3162,6 +3604,32 @@
"@prisma/studio-core/@radix-ui/react-toggle/@radix-ui/react-use-controllable-state/@radix-ui/react-use-layout-effect": ["@radix-ui/react-use-layout-effect@1.1.1", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-RbJRS4UWQFkzHTTwVymMTUv8EqYhOp8dOOviLj2ugtTiXRaRQS7GLGxZTLL1jWhMeoSCf5zmcZkqTl9IiYfXcQ=="],
"@shumai/core/@temporalio/activity/@temporalio/client/@temporalio/proto": ["@temporalio/proto@1.24.0", "", { "dependencies": { "long": "^5.3.2", "protobufjs": "^8.7.1" } }, "sha512-vhlhB9GpoyJx+78r3lDahHywpdri6LKx7kt7djLIw6XzHyb8FQTIi4lX8DSJBqKp3+HVfL1CLwiqO26KFRzg/g=="],
"@shumai/core/@temporalio/activity/@temporalio/common/@temporalio/proto": ["@temporalio/proto@1.24.0", "", { "dependencies": { "long": "^5.3.2", "protobufjs": "^8.7.1" } }, "sha512-vhlhB9GpoyJx+78r3lDahHywpdri6LKx7kt7djLIw6XzHyb8FQTIi4lX8DSJBqKp3+HVfL1CLwiqO26KFRzg/g=="],
"@shumai/core/@temporalio/activity/@temporalio/common/ms": ["ms@3.0.0-canary.1", "", {}, "sha512-kh8ARjh8rMN7Du2igDRO9QJnqCb2xYTJxyQYK7vJJS4TvLLmsbyhiKpSW+t+y26gyOyMd0riphX0GeWKU3ky5g=="],
"@shumai/core/@temporalio/activity/@temporalio/common/protobufjs": ["protobufjs@8.8.0", "", { "dependencies": { "long": "^5.3.2" } }, "sha512-N3xhQ5yyBx3vQq4gubBfASzYhJGNzeDbjqBpu61g7UVylsN/qyffU96TKWD3GbbLOKF82VGNRNvv1+BFgE31Eg=="],
"@shumai/core/@temporalio/workflow/@temporalio/common/ms": ["ms@3.0.0-canary.1", "", {}, "sha512-kh8ARjh8rMN7Du2igDRO9QJnqCb2xYTJxyQYK7vJJS4TvLLmsbyhiKpSW+t+y26gyOyMd0riphX0GeWKU3ky5g=="],
"@shumai/core/@temporalio/workflow/@temporalio/common/protobufjs": ["protobufjs@8.8.0", "", { "dependencies": { "long": "^5.3.2" } }, "sha512-N3xhQ5yyBx3vQq4gubBfASzYhJGNzeDbjqBpu61g7UVylsN/qyffU96TKWD3GbbLOKF82VGNRNvv1+BFgE31Eg=="],
"@shumai/core/@temporalio/workflow/@temporalio/proto/protobufjs": ["protobufjs@8.8.0", "", { "dependencies": { "long": "^5.3.2" } }, "sha512-N3xhQ5yyBx3vQq4gubBfASzYhJGNzeDbjqBpu61g7UVylsN/qyffU96TKWD3GbbLOKF82VGNRNvv1+BFgE31Eg=="],
"@spectrum-web-components/action-group/@spectrum-web-components/icons-workflow/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@spectrum-web-components/card/@spectrum-web-components/icons-workflow/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@spectrum-web-components/help-text/@spectrum-web-components/icons-workflow/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@swc-uxp-internal/action-group/@spectrum-web-components/icons-workflow/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@swc-uxp-internal/card/@spectrum-web-components/icons-workflow/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"@swc-uxp-internal/help-text/@spectrum-web-components/icons-workflow/@spectrum-web-components/icon/@spectrum-web-components/iconset": ["@spectrum-web-components/iconset@0.37.0", "", { "dependencies": { "@spectrum-web-components/base": "^0.37.0" } }, "sha512-s1TBjWeQtGdGf6n+r+aG2glv77IgR0pNs0HLusGyYt6jzWFkP276fE7Neqq/2XvG9a9zvAwngffnWS3td/Gtmg=="],
"dockerode/tar-fs/tar-stream/readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],
"eslint-plugin-react/minimatch/brace-expansion/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
@@ -3171,5 +3639,7 @@
"readdir-glob/minimatch/brace-expansion/balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
"@prisma/studio-core/@radix-ui/react-toggle/@radix-ui/react-primitive/@radix-ui/react-slot/@radix-ui/react-compose-refs": ["@radix-ui/react-compose-refs@1.1.2", "", { "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-z4eqJvfiNnFMHIIvXP3CY57y2WJs5g2v3X0zm9mEJkrkNv4rDxu+sg9Jh8EkXyeqBkB7SOcboo9dMVqhyrACIg=="],
"@shumai/core/@temporalio/activity/@temporalio/client/@temporalio/proto/protobufjs": ["protobufjs@8.8.0", "", { "dependencies": { "long": "^5.3.2" } }, "sha512-N3xhQ5yyBx3vQq4gubBfASzYhJGNzeDbjqBpu61g7UVylsN/qyffU96TKWD3GbbLOKF82VGNRNvv1+BFgE31Eg=="],
}
}
@@ -6,8 +6,6 @@ services:
POSTGRES_USER: shumai
POSTGRES_PASSWORD: shumai_password
POSTGRES_DB: shumai_db
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/18/docker
healthcheck:
@@ -28,6 +26,11 @@ services:
- '3000:3000'
volumes:
- ./data:/app/data
# Hardware Acceleration (NVENC / QuickSync / VA-API / RKMPP)
# Uncomment the extends section below for hardware acceleration:
# extends:
# file: hwaccel.transcoding.yaml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
environment:
# Database Configuration
DATABASE_URL: postgres://shumai:shumai_password@shumai_postgres:5432/shumai_db?search_path=public&sslmode=disable
+5 -2
View File
@@ -6,8 +6,6 @@ services:
POSTGRES_USER: shumai
POSTGRES_PASSWORD: shumai_password
POSTGRES_DB: shumai_db
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql/18/docker
healthcheck:
@@ -28,6 +26,11 @@ services:
- '3000:3000'
volumes:
- ./data:/app/data
# Hardware Acceleration (NVENC / QuickSync / VA-API / RKMPP)
# Uncomment the extends section below for hardware acceleration:
# extends:
# file: hwaccel.transcoding.yaml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
environment:
# Database Configuration
DATABASE_URL: postgres://shumai:shumai_password@shumai_postgres:5432/shumai_db?search_path=public&sslmode=disable
@@ -0,0 +1,44 @@
# Configurations for hardware-accelerated transcoding
services:
cpu: {}
nvenc:
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities:
- gpu
- compute
- video
quicksync:
devices:
- /dev/dri:/dev/dri
rkmpp:
security_opt: # enables full access to /sys and /proc, still far better than privileged: true
- systempaths=unconfined
- apparmor=unconfined
group_add:
- video
devices:
- /dev/rga:/dev/rga
- /dev/dri:/dev/dri
- /dev/dma_heap:/dev/dma_heap
- /dev/mpp_service:/dev/mpp_service
vaapi:
devices:
- /dev/dri:/dev/dri
vaapi-wsl: # use this for VAAPI if running in WSL2
devices:
- /dev/dri:/dev/dri
- /dev/dxg:/dev/dxg
volumes:
- /usr/lib/wsl:/usr/lib/wsl
environment:
- LIBVA_DRIVER_NAME=d3d12
@@ -7,8 +7,6 @@ services:
POSTGRES_USER: shumai
POSTGRES_PASSWORD: shumai_password
POSTGRES_DB: shumai_db
ports:
- '5432:5432'
volumes:
- postgres_data:/var/lib/postgresql
healthcheck:
+890
View File
@@ -0,0 +1,890 @@
---
title: "Changelog"
description: "Recent updates, new features, and improvements in Shumai"
---
<Update label="v0.5.2" description="October 13, 2026">
### Added
* **3d asset**: Add support for 3D model files (.glb, .gltf, .obj, .fbx, .stl, .dae, .usd, .usda, .usdc, .usdz) with automated turntable video rendering, hover sprite scrubbing, and an interactive 3D turntable viewer featuring 360° ruler scrubbing and degree-based markup comments
* **kanban**: Related assets on a task are now clickable, taking you directly to that file or folder in its project
* **settings**: Add an Integrations section to Team Settings with dedicated configuration for Gotenberg Document Converter, supporting connection testing and environment variable override protection
### Fixed
* **transcode**: Fix an issue where portrait photos from cameras and phones appeared sideways in thumbnails, previews, watermarked share links and annotated snapshots, and were listed with their width and height swapped
### Changed
</Update>
<Update label="v0.5.1" description="October 6, 2026">
### Added
* **notification**: Notification cards are now clickable, taking you directly to the relevant file
* **transcode**: Add hardware decoding and GPU scaling support for NVIDIA NVENC, Intel QuickSync Video (QSV), Rockchip (RKMPP), and VA-API (Intel and AMD GPUs), significantly speeding up video proxy and HLS rendition generation across supported platforms. Set `SHUMAI_HW_DECODE=false` to turn hardware decoding off
* **transcode**: Add `dcraw_emu` fallback to generate WebP previews for camera RAW files without embedded JPEG previews
### Fixed
### Changed
</Update>
<Update label="v0.5.0" description="October 2, 2026">
### Added
* **transcode**: Add configurable target resolution ladders (480p, 720p, 1080p, 1440p, 2160p) for MP4 Multi Resolutions transcoding in team settings, with unified resolution matching and lowest-resolution fallback for both MP4 and HLS
* **transcode**: Add HLS live streaming with fMP4/CMAF adaptive bitrate ladders (480p, 720p, 1080p, 1440p, 2160p), configurable in Transcode Settings, with automatic quality switching, manual resolution selection in the video viewer, seamless rendition switching, and full watermarking support for shared links
* **transcode**: Add basic camera RAW image support for popular camera formats (including Sony ARW, Canon CR2/CR3, Nikon NEF, Adobe DNG, Fujifilm RAF, and Panasonic RW2), extracting high-quality embedded JPEG previews and automatically applying camera orientation for fast thumbnail and proxy generation
### Fixed
- **asset**: Fix an issue where media files remained stuck in a perpetual "Preparing..." state when transcoding failed, by displaying a clear failed status and error details in the file list and file viewer
* **transcode**: Fix an issue where videos or audio-only files containing attached cover art or picture streams could cause transcoding to fail during poster generation or select a single static image instead of the video
* **webui**: Fix inconsistent video resolution labels across download menus, mobile file headers, and the video player by correctly deriving resolutions from the video's short side, including portrait videos and 480p videos
* **trash**: Fix an issue where the "Empty Trash" confirmation dialog would close immediately instead of showing a loading state while files were being permanently deleted
### Changed
* **settings**: Redesign team Video Transcoding settings with dedicated cards for Transcode Policy, Hardware Acceleration, and FFmpeg Threads, clearly explaining MP4 and HLS playback vs download behavior and storage implications
* **settings**: Rename AI Settings group to Team AI Settings in settings navigation
</Update>
<Update label="v0.4.9" description="September 28, 2026">
### Added
- **notification**: You can now receive notifications via email, with batched digest emails and configurable team-level SMTP settings
- **transcode**: Add VA-API hardware acceleration support for Linux hosts and Docker environments with Intel and AMD GPUs, featuring automatic DRI render node discovery, variable bitrate control, and structured transcoding observability logs
- **transcode**: Add automatic fallback to software transcoding (libx264) when hardware-accelerated video encoding encounters GPU resolution constraints or runtime driver errors
- **docker**: Add modular hardware-accelerated transcoding presets matching Immich's compose configuration via `hwaccel.transcoding.yaml` with support for NVENC, QuickSync, RKMPP, and VA-API
### Fixed
### Changed
- **transcode**: Improve video poster selection using intelligent scene detection and color variance filtering to automatically skip black frames, fade-ins, and blank intros in favor of representative video content
- **transcode**: Optimize video sprite generation for large and long videos using a concurrent fast-seek pool and image compositing, avoiding full-video decoding while preserving instant single-pass generation for short clips
</Update>
<Update label="v0.4.8" description="September 24, 2026">
### Added
- **transcode**: Add HDR video proxy support: HDR videos automatically generate HDR video proxies and preview videos preserving HDR color characteristics, tone-mapped SDR thumbnails and posters, and automatic HDR player playback on supported displays with hardware EDR acceleration
- **docs**: Add a Changelog section to the documentation site so users can explore release notes and updates directly in Mintlify
### Fixed
- **webui**: Only show the center play button and darkened tint on initial video open before playback starts; once played, pausing or scrubbing back to start keeps the video canvas clean and unobstructed for review
- **transcode**: Fix an issue where videos with orientation or rotation metadata (such as smartphone vertical videos) were incorrectly displayed with stretched aspect ratios in the video player
- **cli**: Only manage and check PID files in daemon mode, preventing stale PID files, crash-loop conflicts, or spurious process checks during normal foreground and Docker execution
### Changed
- **transcode**: Improve video proxy visual quality and disable B-frames for smoother frame-by-frame seeking and scrubbing
</Update>
<Update label="v0.4.7" description="September 19, 2026">
### Added
- **changelog**: Introduce Keep a Changelog support, historical release summaries, and automated release notes extraction
- **release**: Automatically populate GitHub release bodies from CHANGELOG.md and promote unreleased notes during version bumps
- **settings**: Add FFmpeg threads slider to team media processing settings
- **asset**: Show previews of a folder's contents and a "days left" countdown for each item in Recently Deleted
- **asset**: Show the poster and hover preview for a video in the file list while it is still transcoding, with a gently pulsing cover (or an animated waiting circle before the poster is ready), "Uploading..."/"Preparing..." labels, and the duration hidden until it is ready
### Fixed
- **asset**: Fix an issue where moving a video to trash while it was still transcoding could cause it to lose its trashed status
- **transcode**: Immediately stop background video processing and transcoding when a file is permanently deleted from the trash
- **asset**: Fix proxy download filename using original file extension instead of proxy extension
- **asset**: Fix an issue where deleting or restoring a version stack from the file list did nothing
- **webui**: Center breadcrumb file action popup menu on the chevron icon
</Update>
<Update label="v0.4.6" description="September 17, 2026">
### Added
- **comment**: Add emoji reaction support for comments ([#405](https://github.com/shumaiOne/shumai/pull/405))
- **premiere-uxp**: Introduce Adobe Premiere Pro UXP plugin for Shumai ([#407](https://github.com/shumaiOne/shumai/pull/407))
- **settings**: Add team appearance setting to hide agent features ([#411](https://github.com/shumaiOne/shumai/pull/411))
### Fixed
- **premiere-uxp**: Preserve remote cloud storage presigned URLs in asset resolution ([#408](https://github.com/shumaiOne/shumai/pull/408))
- **premiere-uxp**: Scope sequence links by server endpoint and surface sync errors ([#409](https://github.com/shumaiOne/shumai/pull/409))
- **api**: Enforce SHUMAI_DEMO_MODE for API token and CLI requests ([#413](https://github.com/shumaiOne/shumai/pull/413))
### Documentation
- Add NLE export and Premiere Pro UXP plugin documentation ([#412](https://github.com/shumaiOne/shumai/pull/412))
</Update>
<Update label="v0.4.5" description="September 13, 2026">
### Added
- **core**: Export comments to FCP, Premiere, Media Composer, and Resolve ([#400](https://github.com/shumaiOne/shumai/pull/400))
- **webui**: Add NLE comments export and migrate export API to POST ([#401](https://github.com/shumaiOne/shumai/pull/401))
- **webui**: Add space key quick preview for files and folders ([#402](https://github.com/shumaiOne/shumai/pull/402))
- **webui**: Show comments count badge in file card preview area ([#403](https://github.com/shumaiOne/shumai/pull/403))
- **agent**: Use deterministic storage keys for preset avatars ([#404](https://github.com/shumaiOne/shumai/pull/404))
</Update>
<Update label="v0.4.4" description="September 9, 2026">
### Added
- **upload**: S3 multipart upload with offline resume and wake lock ([#391](https://github.com/shumaiOne/shumai/pull/391))
- **transcode**: Optimize video operations using ffmpeg http range requests ([#393](https://github.com/shumaiOne/shumai/pull/393))
- **agent**: Enable read_asset tool for autofill agent ([#396](https://github.com/shumaiOne/shumai/pull/396))
- **sandbox**: Abstract SandboxService and hot-reload allowed domains ([#398](https://github.com/shumaiOne/shumai/pull/398))
### Fixed
- **s3**: Stream downloadToFile and putObject to prevent OOM on large files ([#392](https://github.com/shumaiOne/shumai/pull/392))
- **agent**: Pass agent thinkingLevel to session name generation ([#395](https://github.com/shumaiOne/shumai/pull/395))
- **agent**: Restrict pageCount and duration recommendations to matching media types ([#397](https://github.com/shumaiOne/shumai/pull/397))
- **transcode**: Co-locate screenshots and derived artifacts in asset storage directory ([#399](https://github.com/shumaiOne/shumai/pull/399))
</Update>
<Update label="v0.4.3" description="September 6, 2026">
### Added
- **asset**: Record and display agent provenance on assets and audit logs ([#380](https://github.com/shumaiOne/shumai/pull/380))
- **agent**: Store preset avatars as real files in s3 storage ([#381](https://github.com/shumaiOne/shumai/pull/381))
- **agent**: Add built-in image and video generation tools and settings ([#382](https://github.com/shumaiOne/shumai/pull/382))
- **media-generation**: Add gemini-omni-1.1-flash video model and redesign settings UI ([#383](https://github.com/shumaiOne/shumai/pull/383))
- **settings**: Redesign image/video settings to provider dialog with model toggles ([#385](https://github.com/shumaiOne/shumai/pull/385))
- **agent**: Add asset management tools and CLI commands ([#387](https://github.com/shumaiOne/shumai/pull/387))
- **cli**: Control asset deletion via SHUMAI_ALLOW_DELETE env var ([#388](https://github.com/shumaiOne/shumai/pull/388))
### Fixed
- **webui**: Clamp file card creation info to 2 lines and show tooltip on hover ([#390](https://github.com/shumaiOne/shumai/pull/390))
### Documentation
- **agents**: Add documentation for image and video generation settings ([#389](https://github.com/shumaiOne/shumai/pull/389))
### Maintenance
- **deps**: Upgrade bun to 1.4.2 and update packages ([#384](https://github.com/shumaiOne/shumai/pull/384))
- **i18n**: Update paraglide-js to 2.25.0 and stop checking in generated code ([#386](https://github.com/shumaiOne/shumai/pull/386))
</Update>
<Update label="v0.4.2" description="September 3, 2026">
### Added
- **chat**: Support markups, attachments, and timestamps in agent 1-to-1 chat ([#368](https://github.com/shumaiOne/shumai/pull/368))
- **agent**: Move thread metadata to structured context XML ([#373](https://github.com/shumaiOne/shumai/pull/373))
- **agent**: Improve timestamp precision and proxy selection for video screenshots ([#374](https://github.com/shumaiOne/shumai/pull/374))
- **agent**: Support dynamic annotationId resolution across chat and comments ([#375](https://github.com/shumaiOne/shumai/pull/375))
- **agent**: Consolidate media tools into read_asset and add S3 key support to download_asset ([#376](https://github.com/shumaiOne/shumai/pull/376))
- **provider**: Optimize provider and model configuration management ([#377](https://github.com/shumaiOne/shumai/pull/377))
- **provider**: Add provider and model sync feature with vendored generator ([#378](https://github.com/shumaiOne/shumai/pull/378))
### Fixed
- **agent**: Set empty details in asset tool results to avoid data duplication ([#370](https://github.com/shumaiOne/shumai/pull/370))
- **webui**: Strip styles and preserve multiline text on paste in chat input ([#371](https://github.com/shumaiOne/shumai/pull/371))
- **agent**: Hide main comment sessions in dashboard sessions list ([#372](https://github.com/shumaiOne/shumai/pull/372))
### Changed
- **webui**: Use semantic system colors in notification settings ([#379](https://github.com/shumaiOne/shumai/pull/379))
</Update>
<Update label="v0.4.1" description="August 30, 2026">
### Added
- **webui**: Add manage versions option to file card context menu ([#364](https://github.com/shumaiOne/shumai/pull/364))
- **agent**: Refactor message context into unified shumai_message ([#365](https://github.com/shumaiOne/shumai/pull/365))
- **webui**: Redesign comment attachment display into compact rows ([#366](https://github.com/shumaiOne/shumai/pull/366))
### Fixed
- **asset,webui**: Disallow dropping version stacks onto files and version stacks ([#363](https://github.com/shumaiOne/shumai/pull/363))
- **webui**: Prevent empty folder flash during initial loading ([#367](https://github.com/shumaiOne/shumai/pull/367))
### Changed
- **agent**: Remove executeAgentToolWorkflow and invoke core services directly ([#362](https://github.com/shumaiOne/shumai/pull/362))
</Update>
<Update label="v0.4.0" description="August 28, 2026">
### Added
- **transcode**: Add hardware-accelerated video transcoding support ([#352](https://github.com/shumaiOne/shumai/pull/352))
- **webui**: Truncate long file names with 100ms hover tooltip ([#355](https://github.com/shumaiOne/shumai/pull/355))
- **webui**: Add simplified mobile-friendly layout for file and share lists ([#356](https://github.com/shumaiOne/shumai/pull/356))
- **webui**: Add mobile friendly file detail and public share view ([#359](https://github.com/shumaiOne/shumai/pull/359))
### Fixed
- **transcode**: Apply team hardware acceleration and source bitrate capping to watermark transcoding ([#353](https://github.com/shumaiOne/shumai/pull/353))
- **share**: Hide and soft-delete symlinks when target assets are trashed ([#354](https://github.com/shumaiOne/shumai/pull/354))
- **webui**: Fix breadcrumb file dropdown trigger stretching and alignment ([#360](https://github.com/shumaiOne/shumai/pull/360))
- **webui**: Align mobile comment cards and thread vertical indicator ([#361](https://github.com/shumaiOne/shumai/pull/361))
### Documentation
- Add SECURITY.md with a private disclosure path ([#357](https://github.com/shumaiOne/shumai/pull/357))
</Update>
<Update label="v0.3.11" description="August 25, 2026">
### Added
- **auth**: Add admin password reset CLI command and reset password web UI ([#347](https://github.com/shumaiOne/shumai/pull/347))
- **project**: Add recent viewed files section to project folder tree ([#348](https://github.com/shumaiOne/shumai/pull/348))
### Fixed
- **webui**: Prevent left carousel remounting and scroll jump on file selection ([#351](https://github.com/shumaiOne/shumai/pull/351))
</Update>
<Update label="v0.3.10" description="August 23, 2026">
### Added
- **agentic kanban**: Phase 1 not-agentic kanban board ([#330](https://github.com/shumaiOne/shumai/pull/330))
- **kanban**: Resolve latest version for linked version stack assets and update demo login text ([#342](https://github.com/shumaiOne/shumai/pull/342))
- **kanban**: Update task status permissions, reporter defaults, and participant access ([#345](https://github.com/shumaiOne/shumai/pull/345))
### Fixed
- **kanban**: Use true thumbnail and poster for task asset previews ([#343](https://github.com/shumaiOne/shumai/pull/343))
- **webui**: Sidebar selection styling, kanban active state, pointer cursors, and owner dashboard ([#344](https://github.com/shumaiOne/shumai/pull/344))
- **kanban**: Improve drag-drop to column bottom, remove empty drop line, and fix timeline alignment ([#346](https://github.com/shumaiOne/shumai/pull/346))
</Update>
<Update label="v0.3.9" description="August 18, 2026">
### Added
- **agent**: Add permission controls for chat agents ([#313](https://github.com/shumaiOne/shumai/pull/313))
- **authz**: Enforce project-aware roles for agent/skill/mcp permissions ([#314](https://github.com/shumaiOne/shumai/pull/314))
- **webui**: Use project members for asset comment mentions ([#315](https://github.com/shumaiOne/shumai/pull/315))
- **quota**: Add 2-level database-backed resource quota system ([#318](https://github.com/shumaiOne/shumai/pull/318))
- **settings**: Reorganize settings into personal, team, and AI sections ([#324](https://github.com/shumaiOne/shumai/pull/324))
- **quota**: Move usage monitoring to team dashboard ([#327](https://github.com/shumaiOne/shumai/pull/327))
### Fixed
- **webui**: Preserve selected chatbot agent preference on reload ([#323](https://github.com/shumaiOne/shumai/pull/323))
- **quota**: Exclude agents from quota rules and usage records ([#325](https://github.com/shumaiOne/shumai/pull/325))
### Documentation
- **team-settings**: Add resource quotas documentation and update readme features ([#326](https://github.com/shumaiOne/shumai/pull/326))
</Update>
<Update label="v0.3.8" description="August 15, 2026">
### Added
- **webui**: Replace legacy markdown editor with new lexical wysiwyg editor ([#308](https://github.com/shumaiOne/shumai/pull/308))
- **agent**: Add nested agents.md support across backend and webui ([#309](https://github.com/shumaiOne/shumai/pull/309))
- **webui**: Improve AGENTS.md editor placeholder and read-only notice ([#310](https://github.com/shumaiOne/shumai/pull/310))
- **version-stack**: Add manage versions dialog and version removal ([#311](https://github.com/shumaiOne/shumai/pull/311))
### Fixed
- **core**: Rename latest version child record on version stack rename ([#312](https://github.com/shumaiOne/shumai/pull/312))
</Update>
<Update label="v0.3.7" description="August 14, 2026">
### Added
- **metadata**: Replace aiAutofill boolean with autofillSource enum ([#302](https://github.com/shumaiOne/shumai/pull/302))
- **agent**: Type-safe CREATION_CONTEXT metadata on create_file/create_version ([#303](https://github.com/shumaiOne/shumai/pull/303))
- **sandbox**: Default Network Sandbox to off and add settings toggle switch ([#304](https://github.com/shumaiOne/shumai/pull/304))
- **webui**: Redesign select metadata fields and improve long text field widget ([#305](https://github.com/shumaiOne/shumai/pull/305))
- **agent**: Support dynamic newOption in select and selectMulti metadata fields ([#306](https://github.com/shumaiOne/shumai/pull/306))
### Fixed
- **webui**: Fix select field height and multi-select overflow/interaction issues ([#307](https://github.com/shumaiOne/shumai/pull/307))
</Update>
<Update label="v0.3.6" description="August 12, 2026">
### Added
- **mcp**: Add MCP server support with proxy tool and OAuth flow ([#289](https://github.com/shumaiOne/shumai/pull/289))
- **mcp**: Support tool-level directTools array and 3-state UI configuration ([#297](https://github.com/shumaiOne/shumai/pull/297))
- **webui**: Direct canvas PDF rendering with selectable text ([#299](https://github.com/shumaiOne/shumai/pull/299))
### Fixed
- **agent**: Prevent agents from accessing disabled skills ([#292](https://github.com/shumaiOne/shumai/pull/292))
- **agent**: Resolve version stack name and size in list_assets ([#296](https://github.com/shumaiOne/shumai/pull/296))
- **webui**: Content-only pinch-zoom and two-finger pan in media viewers ([#298](https://github.com/shumaiOne/shumai/pull/298))
- **i18n**: Update Chinese translation for dashboard to 仪表板 ([#301](https://github.com/shumaiOne/shumai/pull/301))
### Documentation
- **mcp**: Add MCP support documentation to README and docs ([#300](https://github.com/shumaiOne/shumai/pull/300))
</Update>
<Update label="v0.3.5" description="August 9, 2026">
### Added
- **transcode**: Add Gotenberg support for Office, HTML, CSV, and Markdown PDF proxies ([#283](https://github.com/shumaiOne/shumai/pull/283))
### Fixed
- **webui**: Resolve upload card freeze for unsupported files ([#284](https://github.com/shumaiOne/shumai/pull/284))
- **webui**: Exclude file extension when selecting file name during inline rename ([#285](https://github.com/shumaiOne/shumai/pull/285))
- Use renamed asset name in download Content-Disposition ([#286](https://github.com/shumaiOne/shumai/pull/286))
- **webui**: Batch download no longer flashes a tab per file ([#287](https://github.com/shumaiOne/shumai/pull/287))
- **webui**: Enable rename and delete actions in file detail top bar breadcrumb ([#288](https://github.com/shumaiOne/shumai/pull/288))
</Update>
<Update label="v0.3.4" description="August 8, 2026">
### Added
- **sharelink**: Add sharelink watermark support ([#270](https://github.com/shumaiOne/shumai/pull/270))
- **webui**: Remove original-file display fallbacks, use proxies only ([#273](https://github.com/shumaiOne/shumai/pull/273))
- **share**: Add allow download config to share links ([#275](https://github.com/shumaiOne/shumai/pull/275))
- **transcode**: Update preview thumbnail resolution to 300p with max length constraint ([#281](https://github.com/shumaiOne/shumai/pull/281))
### Fixed
- **share**: Resolve symlink asset downloads in public share pages ([#274](https://github.com/shumaiOne/shumai/pull/274))
- **webui**: Persist project sorting and prevent full page flash ([#276](https://github.com/shumaiOne/shumai/pull/276))
### Documentation
- **share-links**: Document allow download and lazy watermark settings ([#278](https://github.com/shumaiOne/shumai/pull/278))
- **agent**: Clarify create_file/create_version context param guidance ([#282](https://github.com/shumaiOne/shumai/pull/282))
### Maintenance
- **e2e**: Watermarked download-disabled share link coverage (image + video) ([#277](https://github.com/shumaiOne/shumai/pull/277))
- **e2e**: Stabilize watermark share spec on Firefox ([#279](https://github.com/shumaiOne/shumai/pull/279))
- Split e2e scripts into app and webui targets ([#280](https://github.com/shumaiOne/shumai/pull/280))
</Update>
<Update label="v0.3.3" description="August 5, 2026">
### Added
- **agent**: Enable LLM API call retries in AgentHarness ([#250](https://github.com/shumaiOne/shumai/pull/250))
- **audit**: Add audit log support for APIs and WebUI dashboard ([#251](https://github.com/shumaiOne/shumai/pull/251))
- **webui**: Persist agent preference in localStorage ([#254](https://github.com/shumaiOne/shumai/pull/254))
- **e2e**: Add file domain comment and draw tests ([#260](https://github.com/shumaiOne/shumai/pull/260))
- **agent**: Restrict bash access for non-owner users ([#262](https://github.com/shumaiOne/shumai/pull/262))
- **agent**: Allow create_file tool to create files directly from content ([#263](https://github.com/shumaiOne/shumai/pull/263))
- **agent**: Propagate autofill context from chat to autofill workflow ([#264](https://github.com/shumaiOne/shumai/pull/264))
- **webui**: Render select options in field creation mode and pick random option color ([#265](https://github.com/shumaiOne/shumai/pull/265))
- **project**: Include team-scoped members in project member list and add 3-section dialog layout ([#267](https://github.com/shumaiOne/shumai/pull/267))
- **webui**: Disable role dropdown for project-scoped members in team view ([#269](https://github.com/shumaiOne/shumai/pull/269))
### Fixed
- **webui**: Mention popup avatars, keyboard auto-scroll, and non-sticky section headers ([#256](https://github.com/shumaiOne/shumai/pull/256))
- **webui**: Persist field order on drag and drop ([#266](https://github.com/shumaiOne/shumai/pull/266))
### Changed
- **agent**: Load models directly from database without pi fallback ([#253](https://github.com/shumaiOne/shumai/pull/253))
- **core**: Replace generated provider files with pi-ai dynamic methods ([#255](https://github.com/shumaiOne/shumai/pull/255))
### Maintenance
- **core**: Add missing tests for methods introduced in 97069042 ([#252](https://github.com/shumaiOne/shumai/pull/252))
- **e2e**: Add domain-based auth and project web app e2e tests ([#257](https://github.com/shumaiOne/shumai/pull/257))
- **e2e**: Add file, share, and collection web app e2e tests ([#258](https://github.com/shumaiOne/shumai/pull/258))
- **e2e**: Add project-level invite and file-move e2e tests ([#259](https://github.com/shumaiOne/shumai/pull/259))
- **e2e**: Add search in file list and save-search-as-collection cases ([#261](https://github.com/shumaiOne/shumai/pull/261))
- **e2e**: Add member permission change tests ([#268](https://github.com/shumaiOne/shumai/pull/268))
</Update>
<Update label="v0.3.2" description="July 30, 2026">
### Added
- **agent**: Add output truncation and streaming limits to sandboxed bash tool ([#248](https://github.com/shumaiOne/shumai/pull/248))
### Fixed
- **agent**: Download original document asset instead of pdf proxy ([#247](https://github.com/shumaiOne/shumai/pull/247))
- **webui**: Persist chatbot sidebar input text across route navigation ([#249](https://github.com/shumaiOne/shumai/pull/249))
</Update>
<Update label="v0.3.1" description="July 30, 2026">
### Added
- **transcode**: Trigger ai metadata autofill post transcode ([#234](https://github.com/shumaiOne/shumai/pull/234))
- **dashboard**: Add agent sessions view for team owners ([#237](https://github.com/shumaiOne/shumai/pull/237))
- **db**: Preserve agent sessions on asset deletion by setting onDelete to SetNull ([#240](https://github.com/shumaiOne/shumai/pull/240))
- **agent**: Add download_asset tool and prompt instructions ([#242](https://github.com/shumaiOne/shumai/pull/242))
- **db**: Update Asset.sizeByte and AiUsage token fields to BigInt ([#244](https://github.com/shumaiOne/shumai/pull/244))
### Fixed
- **agent**: Include select option labels and field name in autofill schema ([#235](https://github.com/shumaiOne/shumai/pull/235))
- **agent**: Scope agent comment sessions to thread sessions anchored at root comments ([#239](https://github.com/shumaiOne/shumai/pull/239))
- **agent**: Disable tools for session naming and make naming non-blocking ([#241](https://github.com/shumaiOne/shumai/pull/241))
- **webui**: Update file size formatting to SI decimal standard ([#245](https://github.com/shumaiOne/shumai/pull/245))
- **s3**: Enforce property syntax in S3Service interface and fix ReadableStream handling in S3StorageService ([#246](https://github.com/shumaiOne/shumai/pull/246))
</Update>
<Update label="v0.3.0" description="July 28, 2026">
### Added
- **file-browser**: Add copy name and path option to context menu ([#225](https://github.com/shumaiOne/shumai/pull/225))
- **agent**: Inject user name and role into chat context ([#226](https://github.com/shumaiOne/shumai/pull/226))
- **agent**: Refactor database session storage to normalized DAG entries and lazy thread sync ([#229](https://github.com/shumaiOne/shumai/pull/229))
- **agent**: Support ENABLE_WEAKER_NESTED_SANDBOX environment variable ([#233](https://github.com/shumaiOne/shumai/pull/233))
### Fixed
- **agent**: Ensure atomic appendEntry and persist leaf entries in DatabaseSessionStorage ([#224](https://github.com/shumaiOne/shumai/pull/224))
- Sharp version mismatch bug ([#230](https://github.com/shumaiOne/shumai/pull/230))
- **agent**: Resolve S3 MIME type detection and prompt parameter in image analysis ([#232](https://github.com/shumaiOne/shumai/pull/232))
### Changed
- **agent**: Remove implicit agent mention trigger in comment threads ([#227](https://github.com/shumaiOne/shumai/pull/227))
### Maintenance
- **workflow**: Add docker compose deployment verification job ([#231](https://github.com/shumaiOne/shumai/pull/231))
</Update>
<Update label="v0.2.3" description="July 25, 2026">
### Fixed
- **webui**: Show right sidebar by default on file detail page ([#219](https://github.com/shumaiOne/shumai/pull/219))
- **webui**: Refresh file list and detail when agent executes asset creation tools ([#220](https://github.com/shumaiOne/shumai/pull/220))
- **webui**: Fix space key drag overlay and shift range selection for version stacks ([#221](https://github.com/shumaiOne/shumai/pull/221))
- **transcode**: Handle timestamp rounding tolerance for screenshot annotations ([#223](https://github.com/shumaiOne/shumai/pull/223))
### Changed
- **e2e**: Split transcode workflow E2E tests into per-workflow test files ([#222](https://github.com/shumaiOne/shumai/pull/222))
</Update>
<Update label="v0.2.2" description="July 23, 2026">
### Added
- **webui**: Integrate AI usage API into dashboard page ([#216](https://github.com/shumaiOne/shumai/pull/216))
- **ai-usage**: Add team and member token usage tracking and APIs ([#215](https://github.com/shumaiOne/shumai/pull/215))
- **transcode**: Add PSD support via ImageMagick and enforce sRGB conversion ([#217](https://github.com/shumaiOne/shumai/pull/217))
### Fixed
- **search**: Fix buildSqlCondition date range, numeric metadata, and string parsing bugs ([#213](https://github.com/shumaiOne/shumai/pull/213))
- **webui**: Prevent horizontal overflow in search dialog result rows ([#214](https://github.com/shumaiOne/shumai/pull/214))
- **webui**: Invalidate upload tasks query when upload task starts and completes ([#218](https://github.com/shumaiOne/shumai/pull/218))
</Update>
<Update label="v0.2.1" description="July 22, 2026">
### Added
- **skill**: Add team owner skill permission control ([#209](https://github.com/shumaiOne/shumai/pull/209))
### Fixed
- **agent**: Handle non-builtin models in getModelFromDb and upgrade pi-ai ([#211](https://github.com/shumaiOne/shumai/pull/211))
- **provider**: Preserve model ids on provider update ([#212](https://github.com/shumaiOne/shumai/pull/212))
### Changed
- **core**: Split generated providers into per-provider files ([#210](https://github.com/shumaiOne/shumai/pull/210))
</Update>
<Update label="v0.2.0" description="July 21, 2026">
### Added
- **transcode**: Add PDF preview, sprite generation, and annotation support ([#193](https://github.com/shumaiOne/shumai/pull/193))
- **web**: Register pdf.worker route in production ([#195](https://github.com/shumaiOne/shumai/pull/195))
- **agent**: Add read_pdf_pages tool and PDF page context support ([#196](https://github.com/shumaiOne/shumai/pull/196))
- **transcode**: Split monolithic transcodeMedia into focused workflows ([#197](https://github.com/shumaiOne/shumai/pull/197))
- **transcode**: Add PDF proxy support for TXT and CSV files ([#199](https://github.com/shumaiOne/shumai/pull/199))
- **asset**: Replace mediaType/mimeType logic with proxyType ([#200](https://github.com/shumaiOne/shumai/pull/200))
- **docker**: Install fonts-noto-cjk in runner stage ([#202](https://github.com/shumaiOne/shumai/pull/202))
- **transcode**: Add markdown file to pdf proxy support ([#203](https://github.com/shumaiOne/shumai/pull/203))
- **chat**: Track context asset changes and update agent context ([#204](https://github.com/shumaiOne/shumai/pull/204))
- **agent**: Refactor media tools to static injection with mandatory assetId and authz ([#208](https://github.com/shumaiOne/shumai/pull/208))
### Fixed
- **transcode**: Mark pdfkit as external and extract for docker runtime ([#201](https://github.com/shumaiOne/shumai/pull/201))
- **agent**: Include skill id in formatSkillsForPrompt ([#205](https://github.com/shumaiOne/shumai/pull/205))
- **asset**: Exclude soft-deleted children from latestChildren preview ([#206](https://github.com/shumaiOne/shumai/pull/206))
- **agent**: Pass latest version asset from version stack to prompt builder ([#207](https://github.com/shumaiOne/shumai/pull/207))
</Update>
<Update label="v0.1.10" description="July 16, 2026">
### Added
- **workflow-e2e**: Add E2E tests for agentAutofillMedia workflow ([#188](https://github.com/shumaiOne/shumai/pull/188))
- **comments**: Support comment deletion and video player shortcuts ([#191](https://github.com/shumaiOne/shumai/pull/191))
- **agent**: Support disabling specific tools for agents ([#192](https://github.com/shumaiOne/shumai/pull/192))
### Maintenance
- **e2e**: Add E2E workflow tests for remaining agent and transcode services ([#189](https://github.com/shumaiOne/shumai/pull/189))
</Update>
<Update label="v0.1.9" description="July 14, 2026">
### Added
- **e2e**: Set up fullstack app-level e2e test framework and signup test case ([#184](https://github.com/shumaiOne/shumai/pull/184))
- **chat**: Chatbot UI ([#185](https://github.com/shumaiOne/shumai/pull/185))
- **agent**: Support aborting agent execution ([#186](https://github.com/shumaiOne/shumai/pull/186))
### Changed
- **api/chat**: Remove direct Prisma query from API layer ([#187](https://github.com/shumaiOne/shumai/pull/187))
</Update>
<Update label="v0.1.8" description="July 10, 2026">
### Added
- **chatbot**: Implement type-safe Chat APIs with compaction support ([#180](https://github.com/shumaiOne/shumai/pull/180))
### Fixed
- **webui**: Enable build splitting and code-split all page routes ([#183](https://github.com/shumaiOne/shumai/pull/183))
### Documentation
- **readme**: Clarify displayed file size represents original file size ([#182](https://github.com/shumaiOne/shumai/pull/182))
</Update>
<Update label="v0.1.7" description="July 6, 2026">
### Added
- **audio**: Support frame-accurate audio playback, comments, and AI safeguards ([#175](https://github.com/shumaiOne/shumai/pull/175))
- **i18n**: Localize members dialog, notifications, uploads, user menus, dates, and players ([#178](https://github.com/shumaiOne/shumai/pull/178))
- **comments**: Allow marking comments as complete or incomplete ([#179](https://github.com/shumaiOne/shumai/pull/179))
### Fixed
- **upload**: Resolve empty and generic MIME types in confirmFileUpload ([#176](https://github.com/shumaiOne/shumai/pull/176))
### Changed
- **webui**: Modularize file viewer components into registry-driven architecture ([#174](https://github.com/shumaiOne/shumai/pull/174))
### Documentation
- Improve documentation and examples for S3 compatible storage ([#177](https://github.com/shumaiOne/shumai/pull/177))
</Update>
<Update label="v0.1.6" description="July 4, 2026">
### Added
- **file-browser**: Show video duration on file card preview ([#170](https://github.com/shumaiOne/shumai/pull/170))
- **webui**: Compare versions view for version stacks ([#171](https://github.com/shumaiOne/shumai/pull/171))
### Fixed
- **webui**: Resolve conditional hooks and setState-in-render errors ([#167](https://github.com/shumaiOne/shumai/pull/167))
- **webui**: Resolve video player total frames mismatch ([#172](https://github.com/shumaiOne/shumai/pull/172))
- **version-stack**: Resolve correct latest version ID of version stack ([#173](https://github.com/shumaiOne/shumai/pull/173))
### Maintenance
- **webui**: Video player e2e framework + Safari playhead fix ([#166](https://github.com/shumaiOne/shumai/pull/166))
- **webui**: Add frame-accurate comment seek roundtrip e2e ([#168](https://github.com/shumaiOne/shumai/pull/168))
- **webui**: Verify video player restarts playback after end ([#169](https://github.com/shumaiOne/shumai/pull/169))
</Update>
<Update label="v0.1.5" description="July 2, 2026">
### Changed
- **storage**: Use original filenames for stored files ([#165](https://github.com/shumaiOne/shumai/pull/165))
### Maintenance
- **release**: Add Aliyun ACR push to release workflow ([#164](https://github.com/shumaiOne/shumai/pull/164))
</Update>
<Update label="v0.1.4" description="July 1, 2026">
### Added
- **transcode**: Change video poster resolution to 480p ([#161](https://github.com/shumaiOne/shumai/pull/161))
- **auth**: Allow setting user locale on signup ([#163](https://github.com/shumaiOne/shumai/pull/163))
### Fixed
- **webui**: Preserve video ended state by skipping playhead snap on ended ([#162](https://github.com/shumaiOne/shumai/pull/162))
</Update>
<Update label="v0.1.3" description="June 30, 2026">
### Added
- **webui**: Add i18n support using paraglide-js ([#156](https://github.com/shumaiOne/shumai/pull/156))
- **video**: Add frame-accurate video player, SMPTE timecodes, and format switcher ([#157](https://github.com/shumaiOne/shumai/pull/157))
### Fixed
- **webui**: Align video timeline duration and formatting with frameio ([#158](https://github.com/shumaiOne/shumai/pull/158))
- **webui**: Fix missing left sidebar for nested folders ([#159](https://github.com/shumaiOne/shumai/pull/159))
- **api**: Fix update team settings and make request schema type-safe ([#160](https://github.com/shumaiOne/shumai/pull/160))
</Update>
<Update label="v0.1.2" description="June 25, 2026">
### Changed
- **s3**: Remove automatic port appending to AWS_ENDPOINT_URL_S3 ([#155](https://github.com/shumaiOne/shumai/pull/155))
</Update>
<Update label="v0.1.1" description="June 23, 2026">
### Added
- **docker**: Add root entrypoint with privilege dropping for data volumes ([#151](https://github.com/shumaiOne/shumai/pull/151))
</Update>
<Update label="v0.1.0" description="June 22, 2026">
### Added
- **share**: Secure share info API and fix wrong password feedback ([#150](https://github.com/shumaiOne/shumai/pull/150))
### Fixed
- **webui**: Truncate long folder, collection, and share link names in sidebar ([#149](https://github.com/shumaiOne/shumai/pull/149))
</Update>
<Update label="v0.0.11" description="June 22, 2026">
### Added
- **cli**: Add shumai-cli and token authentication ([#144](https://github.com/shumaiOne/shumai/pull/144))
- **settings**: Use singular headers and remove collapse/counters for single agent types ([#145](https://github.com/shumaiOne/shumai/pull/145))
- **folders**: Auto expand folder tree in left sidebar on navigation ([#146](https://github.com/shumaiOne/shumai/pull/146))
- **metadata**: Add single user and multiple user custom fields ([#147](https://github.com/shumaiOne/shumai/pull/147))
### Maintenance
- **cli**: Rename npm package to @shumai-one/shumai-cli ([#148](https://github.com/shumaiOne/shumai/pull/148))
</Update>
<Update label="v0.0.10" description="June 21, 2026">
### Changed
- **web**: Dynamically register production HTML bundle routes ([#142](https://github.com/shumaiOne/shumai/pull/142))
### Documentation
- **readme**: Polish structure, correct grammar, and add dependencies table ([#143](https://github.com/shumaiOne/shumai/pull/143))
</Update>
<Update label="v0.0.9" description="June 20, 2026">
### Added
- **webui**: Show app version in avatar menu ([#139](https://github.com/shumaiOne/shumai/pull/139))
- **cli**: Add background daemonization and subcommands ([#141](https://github.com/shumaiOne/shumai/pull/141))
### Maintenance
- **release**: Add smoke tests to local release stage ([#140](https://github.com/shumaiOne/shumai/pull/140))
</Update>
<Update label="v0.0.8" description="June 19, 2026">
### Added
- **api**: Implement read-only mode for reviewers ([#122](https://github.com/shumaiOne/shumai/pull/122))
- **server**: Allow customizing server port via SHUMAI_SERVER_PORT ([#124](https://github.com/shumaiOne/shumai/pull/124))
- **embedding**: Defer embedding workflow, use transcoded assets, and execute chunks in separate activities ([#125](https://github.com/shumaiOne/shumai/pull/125))
- **webui**: Add external drag-and-drop file and folder upload support ([#126](https://github.com/shumaiOne/shumai/pull/126))
- **agent**: Implement overlapping video chunks for semantic search ([#127](https://github.com/shumaiOne/shumai/pull/127))
- **webui**: Support jumping to video timestamp from search results ([#128](https://github.com/shumaiOne/shumai/pull/128))
- **auth**: Add demo mode support ([#131](https://github.com/shumaiOne/shumai/pull/131))
- **auth**: Refine demo mode support ([#132](https://github.com/shumaiOne/shumai/pull/132))
- **webui**: Default right sidebar to collapsed for new users ([#133](https://github.com/shumaiOne/shumai/pull/133))
- **webui**: Use Shadcn Switch in toggle field and Rating component in search filter panel ([#137](https://github.com/shumaiOne/shumai/pull/137))
- **upload**: Track byte-level progress with XMLHttpRequest ([#138](https://github.com/shumaiOne/shumai/pull/138))
### Fixed
- **transcode**: Handle high-precision FPS using rational fractions ([#123](https://github.com/shumaiOne/shumai/pull/123))
- **db**: Automatically update project updatedAt on asset modification ([#129](https://github.com/shumaiOne/shumai/pull/129))
- **webui**: Use system colors for fields and improve search filter select options ([#130](https://github.com/shumaiOne/shumai/pull/130))
- **search**: Fix hasAny and hasNone operators on metadata filter ([#134](https://github.com/shumaiOne/shumai/pull/134))
- **webui**: Resolve folder tree sync, search dialog reset, and sidebar actions issues ([#136](https://github.com/shumaiOne/shumai/pull/136))
### Changed
- **webui**: Fix search dialog layout height, scroll areas, and restrict filter toggle click ([#135](https://github.com/shumaiOne/shumai/pull/135))
</Update>
<Update label="v0.0.7" description="June 17, 2026">
### Added
- **workflow**: Configure transcode and agent concurrency via environment variables ([#116](https://github.com/shumaiOne/shumai/pull/116))
- **webui**: Replace hardcoded colors with system tokens ([#119](https://github.com/shumaiOne/shumai/pull/119))
- **webui**: Replace native overflow with shadcn ScrollArea in settings ([#120](https://github.com/shumaiOne/shumai/pull/120))
- **api**: Use enum for API protocol in provider config ([#121](https://github.com/shumaiOne/shumai/pull/121))
### Fixed
- **webui**: Reload video player and reset state when switching assets ([#114](https://github.com/shumaiOne/shumai/pull/114))
### Changed
- **transcode**: Relocate TranscodeService to core and flatten API package ([#115](https://github.com/shumaiOne/shumai/pull/115))
### Documentation
- Improve and restructure shumai documentation ([#118](https://github.com/shumaiOne/shumai/pull/118))
</Update>
<Update label="v0.0.6" description="June 15, 2026">
### Added
- **sandbox**: Add pending domains support for network sandbox ([#109](https://github.com/shumaiOne/shumai/pull/109))
- **webui**: Always show right sidebar and implement left vertical carousel ([#111](https://github.com/shumaiOne/shumai/pull/111))
### Fixed
- **build**: Propagate termination signals to active child process in wrappers ([#102](https://github.com/shumaiOne/shumai/pull/102))
- **transcode**: Make deterministic transcode activity failures non-retryable in Temporal ([#104](https://github.com/shumaiOne/shumai/pull/104))
- **player**: Implement seekbar dragging and match hover highlight color ([#108](https://github.com/shumaiOne/shumai/pull/108))
- **webui**: Avoid refetching all pages on file/folder reorder ([#112](https://github.com/shumaiOne/shumai/pull/112))
- **webui**: Force video-player mime type to video/mp4 ([#113](https://github.com/shumaiOne/shumai/pull/113))
### Changed
- **webui**: Use system color design tokens in video player components ([#106](https://github.com/shumaiOne/shumai/pull/106))
- **webui**: Use requestAnimationFrame for smooth video progress bar updates ([#107](https://github.com/shumaiOne/shumai/pull/107))
- **webui**: Fetch agents in mention input list dynamically ([#110](https://github.com/shumaiOne/shumai/pull/110))
### Documentation
- **readme**: Add comprehensive README.md ([#103](https://github.com/shumaiOne/shumai/pull/103))
- **readme**: Improve remote deployment and temporal execution instructions ([#105](https://github.com/shumaiOne/shumai/pull/105))
</Update>
<Update label="v0.0.5" description="June 13, 2026">
### Added
- **npm**: Auto deploy database migrations on package start ([#101](https://github.com/shumaiOne/shumai/pull/101))
</Update>
<Update label="v0.0.4" description="June 12, 2026">
### Fixed
- **cli/docker**: Resolve global CLI external dependencies and fix Docker 404 error ([#100](https://github.com/shumaiOne/shumai/pull/100))
</Update>
<Update label="v0.0.3" description="June 12, 2026">
### Fixed
- **cli**: Resolve platform binary path resolution under nested node_modules ([#99](https://github.com/shumaiOne/shumai/pull/99))
</Update>
<Update label="v0.0.2" description="June 12, 2026">
### Fixed
- **npm**: Add repository metadata to package.json for provenance verification ([#98](https://github.com/shumaiOne/shumai/pull/98))
### Maintenance
- Add release-npm.yaml workflow ([#97](https://github.com/shumaiOne/shumai/pull/97))
</Update>
<Update label="v0.0.1" description="June 12, 2026">
### Added
- Initial release of Shumai
</Update>
+32 -5
View File
@@ -24,12 +24,13 @@ Shumai is configured via environment variables. You can define these variables i
---
## Authentication Config
## Authentication & Application Config
| Variable | Description | Example / Default |
| :------------------- | :--------------------------------------------------------------------- | :--------------------------------------------------------------- |
| `BETTER_AUTH_SECRET` | A secure, random 32-byte secret used to sign session cookies and JWTs. | Generate with `openssl rand -base64 32` |
| `BETTER_AUTH_URL` | The public URL of your Hono backend API. Used for redirect flows. | `http://localhost:3000` (respects `SHUMAI_SERVER_PORT` fallback) |
| Variable | Description | Example / Default |
| :------------------- | :--------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------- |
| `BETTER_AUTH_SECRET` | A secure, random 32-byte secret used to sign session cookies and JWTs. | Generate with `openssl rand -base64 32` |
| `BETTER_AUTH_URL` | The public URL of your Hono backend API. Used for redirect flows and notification email links fallback. | `http://localhost:3000` (respects `SHUMAI_SERVER_PORT` fallback) |
| `APP_URL` | The public URL of the web application. Used for notification email deep links (falls back to `BETTER_AUTH_URL`). | `https://shumai.example.com` |
---
@@ -98,3 +99,29 @@ API keys to AI providers on startup.
| `GEMINI_API_KEY` | API key for Google Gemini provider. | `AIzaSy...` |
| `OPENAI_API_KEY` | API key for OpenAI provider. | `sk-proj-...` |
| `ANTHROPIC_API_KEY` | API key for Anthropic provider. | `sk-ant-...` |
---
## External Integrations Config
Environment variables can configure external microservices globally. When set, these environment variables take precedence over any team-level settings configured in **Team Settings → Integrations**, and lock the corresponding settings fields in the WebUI to read-only.
### Gotenberg Document Converter
Used to convert Office documents, HTML, Markdown, and CSV files into high-fidelity PDF proxies for in-browser previewing. See the [Gotenberg Guide](/using-shumai/gotenberg) for setup instructions.
| Variable | Description | Example / Default |
| :------------------------------ | :----------------------------------------------------------------------- | :---------------------- |
| `GOTENBERG_URL` | Base URL of the external Gotenberg conversion API. | `http://gotenberg:3000` |
| `GOTENBERG_BASIC_AUTH_USERNAME` | Username when Basic Authentication is enabled on the Gotenberg instance. | `admin` |
| `GOTENBERG_BASIC_AUTH_PASSWORD` | Password when Basic Authentication is enabled on the Gotenberg instance. | `secret` |
### 3D Turntable Renderer
Used to convert 3D model files (GLB, OBJ, FBX, USD, STL, DAE) into interactive 360° turntable video proxies, posters, and hover sprites. See the [3D Asset Support Guide](/using-shumai/3d-asset-support) for setup instructions.
| Variable | Description | Example / Default |
| :--------------------------------------- | :-------------------------------------------------------------------------------------------------------------- | :------------------------------- |
| `TURNTABLE_RENDERER_URL` | Base URL of the external turntable-renderer service. | `http://turntable-renderer:3000` |
| `TURNTABLE_RENDERER_BASIC_AUTH_USERNAME` | Username when Basic Authentication is enabled on the turntable renderer (alias: `TURNTABLE_RENDERER_USERNAME`). | `admin` |
| `TURNTABLE_RENDERER_BASIC_AUTH_PASSWORD` | Password when Basic Authentication is enabled on the turntable renderer (alias: `TURNTABLE_RENDERER_PASSWORD`). | `secret` |
+233
View File
@@ -0,0 +1,233 @@
---
title: Hardware Transcoding
description: Accelerate video transcoding and reduce CPU load with GPU hardware acceleration.
---
High-resolution camera recordings, phone videos, and animation media files require proxy transcoding to play smoothly in web browsers. Shumai transcodes these assets in the background, generating a universal `180p` proxy for instant scrubbing alongside full-resolution preview streams.
Hardware-accelerated transcoding allows you to offload video encoding to a dedicated or integrated GPU, dramatically speeding up processing and freeing host CPU cores for other services.
Shumai includes a built-in usability probe that tests hardware encoders at startup, alongside automatic runtime fallback during video processing. If GPU drivers or device nodes are unavailable, or if a hardware encoder encounters hardware limits (such as resolution or dimension constraints on certain GPUs) or runtime driver errors, Shumai seamlessly falls back to software encoding (`libx264`) without failing user tasks.
---
## Supported Backends
| Backend | Hardware Platform | Container Driver / Devices |
| :-------------- | :--------------------------------- | :----------------------------------------------- |
| **`nvenc`** | NVIDIA GPUs | NVIDIA Container Toolkit (`gpu, compute, video`) |
| **`quicksync`** | Intel Integrated & Arc GPUs | `/dev/dri` render nodes |
| **`vaapi`** | AMD & Intel GPUs | `/dev/dri` render nodes |
| **`rkmpp`** | Rockchip ARM SoCs (e.g. RK3588) | `/dev/rga`, `/dev/dri`, `/dev/mpp_service` |
| **`vaapi-wsl`** | Windows Subsystem for Linux (WSL2) | `/dev/dri`, `/dev/dxg`, `/usr/lib/wsl` |
---
## Limitations
- The instructions on this page focus on **Docker Compose**. Other container orchestrators (such as Kubernetes or Podman) require equivalent device passthrough configurations.
- **Docker Desktop on macOS** runs inside a Linux virtual machine and does not support Apple Silicon VideoToolbox passthrough. (VideoToolbox hardware acceleration is supported when running Shumai natively via NPM or from source).
- Hardware transcoding produces slightly different bitrate characteristics compared to software encoding. Shumai uses adaptive variable bitrate (VBR) rate control tailored to web streaming to maintain visual fidelity.
---
## Prerequisites
### NVENC (NVIDIA)
1. Ensure the official NVIDIA graphics driver is installed on the host:
```bash
nvidia-smi
```
2. Install the [NVIDIA Container Toolkit](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) on the host and restart Docker:
```bash
sudo apt-get install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
```
### QuickSync & VA-API (Intel / AMD)
1. Verify that the Linux kernel has initialized the Direct Rendering Infrastructure (DRI) render node:
```bash
ls -la /dev/dri
```
You should see `card0` and `renderD128` (or similar).
2. Shumai's Docker image automatically adjusts group permissions on container startup so the non-root application user can access host `/dev/dri` devices without permission errors.
#### GPU decoding
With VA-API, Shumai decodes and resizes video on the GPU as well as encoding it, so frames never leave GPU memory. This is much faster than decoding on the CPU, especially for 4K sources on integrated graphics. (Other backends currently decode on the CPU and encode on the GPU.)
Some videos automatically use CPU decoding with GPU encoding instead:
- Codecs your GPU cannot decode, such as HEVC or 10-bit video on older Intel chips. Shumai tries the GPU first and retries on the CPU within a second.
- Rotated videos, such as portrait phone recordings, so they keep the correct orientation.
- Watermarked share links and HDR sources.
If a GPU-decode attempt stops making progress for 2 minutes (some driver bugs make ffmpeg hang instead of failing), Shumai stops it and retries on the CPU. Change the limit with `SHUMAI_HW_DECODE_STALL_TIMEOUT` (in seconds).
To always decode on the CPU, set `SHUMAI_HW_DECODE=false` on the `shumai` service.
### WSL2 (Windows)
- Ensure you are running Windows 11 with WSL2 and have installed the appropriate GPU drivers on the Windows host.
- Use the `vaapi-wsl` preset which maps `/dev/dxg` and `/usr/lib/wsl` into the container.
---
## Setup with Docker Compose
Shumai uses a modular `hwaccel.transcoding.yaml` companion file to configure hardware devices.
### Step 1: Download Configuration Files
In your Shumai deployment directory, download the companion `hwaccel.transcoding.yaml` alongside `docker-compose.yaml`:
```bash
# Global / Official
curl -o hwaccel.transcoding.yaml https://raw.githubusercontent.com/shumaiOne/shumai/main/docker-compose/local/hwaccel.transcoding.yaml
# Accelerated Mirror (Mainland China)
curl -o hwaccel.transcoding.yaml https://gh-proxy.com/https://raw.githubusercontent.com/shumaiOne/shumai/main/docker-compose/local/hwaccel.transcoding.yaml
```
### Step 2: Enable Hardware Acceleration in Docker Compose
Open `docker-compose.yaml` (or `docker-compose-aliyun.yaml`), find the commented `extends` block under the `shumai` service, and uncomment it:
```yaml
services:
shumai:
# ...
# Hardware Acceleration (NVENC / QuickSync / VA-API / RKMPP)
extends:
file: hwaccel.transcoding.yaml
service: nvenc # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl]
```
Replace `nvenc` with your target backend:
- `nvenc` for NVIDIA GPUs
- `quicksync` for Intel Quick Sync
- `vaapi` for AMD or Intel VA-API
- `rkmpp` for Rockchip SoCs
- `vaapi-wsl` for WSL2 on Windows
### Step 3: Start the Stack
Restart or recreate the Shumai container:
```bash
docker compose up -d
```
---
## Single Compose File Setup (Unraid / Portainer)
If your environment or container manager does not support multi-file `extends`, you can inline the hardware configuration directly into the `shumai` service in `docker-compose.yaml`:
<AccordionGroup>
<Accordion title="NVIDIA NVENC">
```yaml
services:
shumai:
# ...
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities:
- gpu
- compute
- video
```
</Accordion>
<Accordion title="Intel QuickSync / AMD VA-API">
```yaml services: shumai: # ... devices: - /dev/dri:/dev/dri ```
</Accordion>
<Accordion title="WSL2 (Windows)">
```yaml services: shumai: # ... devices: - /dev/dri:/dev/dri - /dev/dxg:/dev/dxg volumes: -
/usr/lib/wsl:/usr/lib/wsl environment: - LIBVA_DRIVER_NAME=d3d12 ```
</Accordion>
<Accordion title="Rockchip RKMPP">
```yaml
services:
shumai:
# ...
security_opt:
- systempaths=unconfined
- apparmor=unconfined
group_add:
- video
devices:
- /dev/rga:/dev/rga
- /dev/dri:/dev/dri
- /dev/dma_heap:/dev/dma_heap
- /dev/mpp_service:/dev/mpp_service
```
</Accordion>
</AccordionGroup>
---
## Web UI Settings
In the Shumai Web UI, navigate to **Team Settings** > **Transcoding Settings**.
- **Auto (Recommended)**: Shumai automatically probes candidate hardware encoders in optimal order (`h264_nvenc` &rarr; `h264_vaapi` &rarr; `h264_qsv` &rarr; `h264_amf` &rarr; `libx264`). If hardware acceleration is unavailable, it gracefully uses software encoding.
- **Explicit Encoder**: You can pin the transcode pipeline to a specific encoder (e.g. `NVENC`, `Quick Sync`, `VA-API`).
- **Off**: Forces CPU software encoding (`libx264`) for all video jobs.
---
## Verification & Monitoring
### Check Transcode Logs
When video transcoding begins on an uploaded asset, Shumai writes a structured log indicating the chosen encoder:
```bash
docker compose logs -f shumai
```
Look for the `Starting video transcoding` log entry:
```json
{
"level": 30,
"time": 1790414665096,
"encoder": "h264_nvenc",
"hardwareAcceleration": "auto",
"inputFile": "/tmp/transcode-.../video.mp4",
"outputFile": "/tmp/transcode-.../video-180p.mp4",
"msg": "Starting video transcoding"
}
```
If hardware acceleration was successfully initialized, `encoder` will show `h264_nvenc`, `h264_vaapi`, or `h264_qsv`.
### Monitor GPU Utilization
While transcoding a video, you can observe hardware utilization on the host:
- **NVIDIA**:
```bash
nvidia-smi
# or
nvtop
```
- **Intel**:
```bash
sudo intel_gpu_top
```
- **AMD**:
```bash
sudo radeontop
```
+16 -1
View File
@@ -12,6 +12,14 @@
"light": "#F5B895",
"dark": "#A8384D"
},
"navbar": {
"links": [
{
"label": "Changelog",
"href": "/changelog"
}
]
},
"navigation": {
"groups": [
{
@@ -35,6 +43,8 @@
"using-shumai/metadata",
"using-shumai/collections",
"using-shumai/share-links",
"using-shumai/nle-and-premiere",
"using-shumai/3d-asset-support",
"using-shumai/gotenberg"
]
},
@@ -56,16 +66,21 @@
"pages": [
"using-shumai/transcode-settings",
"using-shumai/quotas-settings",
"using-shumai/email-notifications",
"using-shumai/password-reset"
]
},
{
"group": "Configuration",
"pages": ["configuration/env-variables"]
"pages": ["configuration/env-variables", "configuration/hardware-transcoding"]
},
{
"group": "Temporal Deployment",
"pages": ["configuration/temporal"]
},
{
"group": "Releases",
"pages": ["changelog"]
}
]
}
+8
View File
@@ -12,9 +12,14 @@ We support three installation options. For most administrators, **Docker Compose
Docker Compose automatically configures and spins up all required services (the web application, a database, and local storage).
1. **Download the Configuration**:
```bash
curl -o docker-compose.yaml https://raw.githubusercontent.com/shumaiOne/shumai/main/docker-compose/local/docker-compose.yaml
```
> [!TIP]
> **Hardware Acceleration:** By default, the standard Compose stack uses CPU-based software transcoding. If your server has a dedicated or integrated GPU (NVIDIA, Intel, AMD, or Rockchip), see the [Hardware Transcoding Guide](/configuration/hardware-transcoding) to enable GPU acceleration via the companion `hwaccel.transcoding.yaml`.
2. **Start the Services**:
```bash
docker compose up -d
@@ -39,6 +44,9 @@ To handle media processing and security isolation, the host machine must have th
- **FFmpeg & FFprobe**: Required for video transcoding and metadata extraction.
- _macOS_: `brew install ffmpeg`
- _Linux (Ubuntu/Debian)_: `sudo apt-get install ffmpeg`
- **dcraw_emu (LibRaw)**: Required for camera RAW image decoding and preview generation.
- _macOS_: `brew install libraw`
- _Linux (Ubuntu/Debian)_: `sudo apt-get install libraw-bin`
- **Agent Sandbox Utilities**: Used to run custom automation scripts securely.
- _macOS_: `brew install ripgrep`
- _Linux (Ubuntu/Debian)_: `sudo apt-get install bubblewrap socat ripgrep`
+153
View File
@@ -0,0 +1,153 @@
---
title: 3D Asset Support with Turntable Renderer
description: Render interactive 3D model turntable previews, sprite scrubbing, and video proxies using turntable-renderer.
---
3D models and mesh assets cannot always be rendered consistently or inspected reliably across diverse client web browsers and mobile devices. Shumai integrates with [turntable-renderer](https://github.com/shumaiOne/turntable-renderer) — a standalone service that executes isolated, headless Blender 5.2 LTS subprocesses — to convert 3D model uploads into standardized, high-fidelity turntable previews.
Turntable Renderer automatically produces:
- **1080×1080 Turntable Video (`turntable.mp4`)**: A 4-second, 24-frame, 6 fps video rotating the model 360° (15° per frame) clockwise under dark studio lighting with a pure black background.
- **Poster Image (`poster.webp`)**: A crisp still poster for grid cards and immediate file display.
- **Hover Sprite Sheet (`sprite.webp`)**: A fast scrubbing sheet allowing users to rotate and inspect the model directly from the file browser on hover.
- **Interactive 3D Viewer**: A specialized web viewer featuring 360° ruler scrubbing, rotation angle control (0° to 345°), playback controls, and angle-specific review comments and visual markups.
---
## Supported File Types
When turntable-renderer is configured, Shumai automatically generates 3D turntable proxies for the following formats:
| Format / Standard | Extensions |
| --------------------------- | --------------------------------- |
| Binary glTF | `.glb` |
| Universal Scene Description | `.usd`, `.usda`, `.usdc`, `.usdz` |
| Autodesk FBX | `.fbx` |
| Wavefront OBJ | `.obj` |
| Stereolithography (STL) | `.stl` |
| COLLADA | `.dae` |
---
## Configuration
Shumai supports configuring the turntable renderer either through the **WebUI** or via **Environment Variables**.
### 1. WebUI (Team Settings → Integrations)
Team owners can configure the turntable renderer directly from the web interface:
1. Navigate to **Team Settings** from the sidebar.
2. Select the **Integrations** tab.
3. Under **3D Turntable Renderer**, enter the **Server URL** (e.g. `http://turntable-renderer:3000` or `http://localhost:3003`).
4. Enter the **Username** and **Password** if Basic Authentication is enabled on the service.
5. Click **Test Connection** to verify that Shumai can communicate with the renderer and check the detected Blender version.
6. Click **Save Changes**.
### 2. Environment Variables
You can also configure turntable-renderer globally across the system using environment variables on the machine running Shumai or the transcode workers:
| Variable | Required | Description |
| ---------------------------------------- | --------------- | ------------------------------------------------------------------------------------- |
| `TURNTABLE_RENDERER_URL` | Yes (to enable) | Base URL of the turntable renderer service, e.g. `http://turntable-renderer:3000`. |
| `TURNTABLE_RENDERER_BASIC_AUTH_USERNAME` | No | Username when Basic Authentication is enabled (alias: `TURNTABLE_RENDERER_USERNAME`). |
| `TURNTABLE_RENDERER_BASIC_AUTH_PASSWORD` | No | Password when Basic Authentication is enabled (alias: `TURNTABLE_RENDERER_PASSWORD`). |
### Configuration Priority & Read-Only Mode
> [!IMPORTANT]
> **Environment variables take highest priority.** If `TURNTABLE_RENDERER_URL` is set in your environment, Shumai will always use the environment variable configuration.
>
> When configured via environment variables, the settings in **Team Settings → Integrations** will display a **Configured via environment variables (Read-only)** badge, and the input fields will be locked to prevent accidental changes or configuration drift.
---
## Deploying Turntable Renderer
### Docker Quickstart
The easiest way to run `turntable-renderer` is using the prebuilt Docker image:
```bash
docker run -d --rm \
--name turntable-renderer \
-p 3003:3000 \
-e TURNTABLE_RENDERER_API_BASIC_AUTH_USERNAME=admin \
-e TURNTABLE_RENDERER_API_BASIC_AUTH_PASSWORD=your_password \
shumaione/turntable-renderer:latest
```
> **Note**: Host port `3003` maps to internal container port `3000`.
### Docker Compose Setup
Add a `turntable-renderer` service to your `docker-compose.yaml`:
```yaml
services:
turntable-renderer:
image: shumaione/turntable-renderer:latest
restart: unless-stopped
ports:
- '3003:3000'
environment:
TURNTABLE_RENDERER_API_BASIC_AUTH_USERNAME: admin
TURNTABLE_RENDERER_API_BASIC_AUTH_PASSWORD: your_password
```
Then point Shumai at it:
```bash
TURNTABLE_RENDERER_URL=http://localhost:3003
TURNTABLE_RENDERER_BASIC_AUTH_USERNAME=admin
TURNTABLE_RENDERER_BASIC_AUTH_PASSWORD=your_password
```
_(If both Shumai and turntable-renderer run within the same Docker Compose network, use `http://turntable-renderer:3000` as the URL)._
### GPU Acceleration
A dedicated GPU is optional — turntable-renderer's CPU rendering pipeline is fast enough for modest hardware. When a GPU is passed into the container, it is automatically detected and leveraged.
#### Intel / AMD (Open Source Drivers)
Pass the DRI render node:
```bash
docker run -d --rm \
--name turntable-renderer \
--shm-size=1gb \
-p 3003:3000 \
--device /dev/dri \
-e TURNTABLE_RENDERER_API_BASIC_AUTH_USERNAME=admin \
-e TURNTABLE_RENDERER_API_BASIC_AUTH_PASSWORD=your_password \
shumaione/turntable-renderer:latest
```
#### NVIDIA (Proprietary Drivers)
Requires host driver 580+ and the NVIDIA Container Toolkit (`--runtime nvidia`):
```bash
docker run -d --rm \
--name turntable-renderer \
--shm-size=1gb \
-p 3003:3000 \
--runtime nvidia \
--gpus all \
--device /dev/nvidia-modeset \
-e TURNTABLE_RENDERER_API_BASIC_AUTH_USERNAME=admin \
-e TURNTABLE_RENDERER_API_BASIC_AUTH_PASSWORD=your_password \
shumaione/turntable-renderer:latest
```
---
## Behavior Without Turntable Renderer
If turntable-renderer is not configured or unreachable:
- The 3D model upload completes successfully with status `processed`.
- No turntable video proxy, sprite, or poster is generated.
- The original raw 3D file is safely preserved and can be downloaded by team members.
+127
View File
@@ -0,0 +1,127 @@
---
title: Email Notifications
description: Configure team SMTP settings, deliver batched activity digest emails, and send test emails.
---
Shumai includes a built-in email notification system that delivers updates on team activities—such as comments, mentions, new asset uploads, status changes, and Kanban tasks—directly to team members' inboxes.
To prevent inbox clutter and notification fatigue, Shumai does not send emails for every single action individually. Instead, a background delivery service aggregates pending notifications and sends periodic, batched digest emails with inline thumbnails and deep links.
---
## Configuring SMTP Settings
Email notification settings are managed at the team level by **Team Owners**.
To configure outgoing mail:
1. Click on **Team Settings** in the sidebar.
2. Select the **Email Notifications** tab.
3. Turn on the **Enable Email Notifications** switch.
4. Fill in your SMTP server credentials and sender information.
5. Click **Save** or **Save and Send Test Email**.
### SMTP Server Settings
| Field | Description | Example / Default |
| :---------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------- |
| **SMTP Host** | The hostname or IP address of your outgoing SMTP server. | `smtp.example.com` or `smtp.sendgrid.net` |
| **SMTP Port** | The port used to connect to your SMTP server. | `587` (default, STARTTLS), `465` (SSL/TLS), or `25` |
| **Username** | The username or API key required to authenticate with the SMTP server. | `user@example.com` or `apikey` |
| **Password** | The authentication password or API secret. | `••••••••` |
| **SSL / TLS (SMTPS)** | Connect directly using SSL/TLS encryption. Typically required when connecting over port `465`. | `Disabled` (default) |
| **Ignore Certificate Errors** | Allows connections with self-signed, invalid, or unverified TLS certificates. Useful for local testing (e.g. Mailpit, MailHog) or private corporate relays. | `Disabled` (default) |
> [!TIP]
> **Password Retention**: When updating existing email settings, you can leave the password input blank to keep the currently stored password. For security, stored passwords are never returned in cleartext to the client.
### Sender Information
| Field | Description | Example / Default |
| :----------- | :-------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------- |
| **From** | The sender name and email address that will appear in the `From` header. Ensure your SMTP provider is authorized to send on behalf of this address. | `Shumai <noreply@example.com>` |
| **Reply-To** | _(Optional)_ An email address to receive replies if members respond directly to a notification email. | `support@example.com` |
---
## Testing SMTP Delivery
Before relying on email delivery, you can verify your configuration and credentials directly from the settings page:
1. Click **Save and Send Test Email**.
2. In the **Send Test Email** modal, verify or adjust the sender `From` address.
3. Click **Send Test Email**.
Shumai will perform an active handshake verification (`transport.verify()`) against your SMTP server and dispatch a styled test message to the email address of the currently logged-in administrator.
If the handshake or delivery fails (for example, due to an invalid password, blocked outbound port, or rejected sender address), an error toast is displayed with the exact message returned by the SMTP server.
---
## Delivery Architecture & Digest Batching
Shumai uses an asynchronous, batched architecture for email delivery:
```
[ Team Activity ]
(Comments, Uploads, Mentions, Kanban)
│
▼
[ Database Queue ] (status: pending)
│
▼ (Every 3 minutes)
[ Notification Background Job ]
│
├─ Filter recipients (check user preferences & project scope)
├─ Exclude self-actions and AI agents
├─ Group & collapse items (clusters > 3 summarized)
├─ Fetch avatars & thumbnails as inline CID attachments
│
▼
[ Nodemailer Transport ] ──> SMTP Server ──> [ Member Inboxes ]
```
### 1. Periodic Background Delivery
Notifications are queued in PostgreSQL with a `pending` status. A background job runs periodically every **3 minutes**, acquiring pending notifications using atomic queue locking (`FOR UPDATE SKIP LOCKED`). This ensures safe delivery without duplicate emails even when multiple server instances run concurrently.
### 2. Digest Bundling
Rather than sending an email immediately for each action, all notifications collected for a recipient during the 3-minute window are combined into a single digest email. This keeps team communication organized and eliminates inbox spam during heavy collaboration sessions.
### 3. Smart Activity Collapsing
When an event cluster contains a high volume of items (for example, when an editor uploads dozens of video clips at once), Shumai automatically groups and collapses the items:
- If **3 or fewer** items are in a group, each item is displayed with its individual thumbnail and details.
- If **more than 3** items are uploaded together, Shumai summarizes them into a single concise notification (e.g., _"Alice uploaded 12 new files to Project Alpha"_) with a preview of the first three file names.
### 4. Inline CID Attachments
Avatars and video/image asset thumbnails are retrieved from storage and embedded directly into the email as inline MIME attachments (`cid:...`).
Unlike external image links, inline CID attachments:
- Display immediately in desktop and mobile email clients (such as Apple Mail, Gmail, and Outlook) without being blocked by "show remote content" security warnings.
- Do not require publicly accessible S3 URLs or reverse-proxy authentication to render.
### 5. Deep Linking
Every notification card in the email includes deep-linking action buttons (such as **View Asset**, **View Project**, or **View Task**) that navigate members straight to the corresponding resource in Shumai.
To ensure links point to your public domain instead of `localhost`, configure the `APP_URL` or `BETTER_AUTH_URL` environment variable on your Shumai server:
```bash
APP_URL=https://shumai.example.com
```
---
## Member Preferences & Filtering
Email delivery respects team permissions and member choices:
- **Personal Preferences**: Team members can independently choose which types of activities they receive by opening **Team Settings > Notifications**. If a user disables notifications for a category (e.g. general comments or status updates), Shumai will not include those items in their email digests.
- **Self-Action Suppression**: Members never receive notification emails for their own comments, uploads, or task updates (unless they explicitly enable the **Your Uploads** preference to be notified when their own media transcoding completes).
- **Project Scope**: Members whose access is restricted to specific projects only receive email digests for activities within those assigned projects, unless they are explicitly `@mentioned`.
- **AI Agents**: Automated AI agent accounts are automatically excluded from receiving email notifications.
+25 -1
View File
@@ -32,7 +32,22 @@ When Gotenberg is configured, Shumai automatically generates a PDF proxy for the
## Configuration
Gotenberg support is opt-in and controlled by the following environment variables on the machine running the transcode workers:
Shumai supports configuring Gotenberg either through the **WebUI** or via **Environment Variables**.
### 1. WebUI (Team Settings → Integrations)
Team owners can configure Gotenberg directly from the web interface:
1. Navigate to **Team Settings** from the sidebar.
2. Select the **Integrations** tab.
3. Under **Gotenberg Document Converter**, enter the **Server URL** (e.g. `http://gotenberg:3000` or `http://localhost:3000`).
4. Enter the **Username** and **Password** if Basic Authentication is enabled on the service.
5. Click **Test Connection** to test communication with Gotenberg and verify its health.
6. Click **Save Changes**.
### 2. Environment Variables
Gotenberg can also be configured globally across the system using environment variables on the machine running Shumai or the transcode workers:
| Variable | Required | Description |
| ------------------------------- | --------------- | ---------------------------------------------------------------- |
@@ -40,6 +55,15 @@ Gotenberg support is opt-in and controlled by the following environment variable
| `GOTENBERG_BASIC_AUTH_USERNAME` | No | Username when Basic Authentication is enabled on Gotenberg. |
| `GOTENBERG_BASIC_AUTH_PASSWORD` | No | Password when Basic Authentication is enabled on Gotenberg. |
### Configuration Priority & Read-Only Mode
> [!IMPORTANT]
> **Environment variables take highest priority.** If `GOTENBERG_URL` is set in your environment, Shumai will always use the environment variable configuration.
>
> When configured via environment variables, the settings in **Team Settings → Integrations** will display a **Configured via environment variables (Read-only)** badge, and the input fields will be locked to prevent accidental changes or configuration drift.
### Deploying Gotenberg
### Docker Quickstart
You can start a Gotenberg container with a single command:
+126
View File
@@ -0,0 +1,126 @@
---
title: NLE Export & Premiere Pro Plugin
description: Export timestamped review comments to popular NLE formats or use the native Premiere Pro UXP plugin to import assets and auto-sync timeline markers.
---
Shumai integrates directly into video editing workflows. You can export review comments into industry-standard non-linear editor (NLE) marker formats from the web interface, or use the native Adobe Premiere Pro UXP plugin to import media assets and synchronize comments to timeline markers in real-time.
---
## Comments Export to NLE
Comments left during video and audio reviews can be exported directly from the web interface to external editing software.
### How to Export Comments
1. Open any video or audio asset in the Shumai media viewer.
2. In the right sidebar, navigate to the **Comments** tab.
3. Click the **More Options** (`...`) menu located next to **All Comments**.
4. Hover over **Export Comments** and select your editing software format:
| Format | File Extension | Target Software |
| :----------------- | :------------- | :--------------------------------- |
| **Premiere Pro** | `.xml` | Adobe Premiere Pro marker sequence |
| **Resolve** | `.edl` | DaVinci Resolve timeline markers |
| **FCP 10.4.0+** | `.fiojson` | Apple Final Cut Pro marker data |
| **Media Composer** | `.xml` | Avid Media Composer markers |
Once downloaded, import the marker file into your editing software to overlay all review notes and timestamps onto your timeline.
---
## Premiere Pro UXP Plugin (Experimental)
The official Shumai Premiere Pro UXP plugin provides a native panel inside Adobe Premiere Pro, enabling editors to browse workspace assets, import media or proxies directly into the project bin, and automatically synchronize review comments to sequence markers.
> [!NOTE]
> **Experimental Feature:**
> The Premiere Pro UXP plugin is currently experimental. While functional, it has not yet been tested across all Premiere Pro minor versions and operating system configurations. If you encounter any bugs, unexpected behavior, or have workflow suggestions, please [open an issue on GitHub](https://github.com/shumaiOne/shumai/issues) or join our [Discord community](https://discord.gg/sUzhujK6DD).
### Minimum Version Requirements
| Software | Minimum Version Required |
| :--------------------- | :------------------------------------------------ |
| **Adobe Premiere Pro** | **`25.1.0`** or higher (Premiere Pro 2025 v25.1+) |
| **Shumai Server** | **`0.4.6`** or higher |
---
### Installation
You can install the Shumai Premiere Pro plugin using either the packaged `.ccx` installer or the Adobe UXP Developer Tools.
#### Option 1: Install via Creative Cloud (.ccx)
This is the recommended and quickest installation method for standard users.
> [!IMPORTANT]
> **Prerequisites:**
>
> - You must have **Adobe Premiere Pro** (v25.1.0+) and the **Adobe Creative Cloud desktop application** installed on your system.
> - Adobe Premiere Pro must be recognized and listed in the Creative Cloud desktop app under your installed applications.
1. Download the pre-built plugin package [`shumai-premiere.ccx`](https://github.com/shumaiOne/shumai/raw/main/apps/premiere-uxp/shumai-premiere.ccx) from the repository (located at `apps/premiere-uxp/shumai-premiere.ccx`).
2. Double-click the downloaded `.ccx` file, or drag and drop it directly into the **Adobe Creative Cloud** desktop app.
3. Follow the on-screen prompts in Creative Cloud to approve and install the plugin.
4. Launch or restart Adobe Premiere Pro.
#### Option 2: Install via Adobe UXP Developer Tools (UDT)
This method is intended for developers or users building from source code.
> [!NOTE]
> Refer to the official [Adobe UXP Developer Tools Documentation](https://developer.adobe.com/premiere-pro/uxp/getting-started/quickstart/) for details on installing and setting up the UXP Developer Tool (UDT).
1. Clone the Shumai repository:
```bash
git clone https://github.com/shumaiOne/shumai.git
cd shumai
```
2. Install dependencies and build the UXP plugin:
```bash
bun install
bun run --filter @shumai/premiere-uxp build
```
3. Open the **Adobe UXP Developer Tool** (UDT).
4. Click **Add Plugin** and select the manifest file located at:
```text
apps/premiere-uxp/dist/manifest.json
```
_(Or `apps/premiere-uxp/public/manifest.json` when running in watch mode)._
5. Open Adobe Premiere Pro. In the UDT application, find the Shumai plugin in your list, click the `•••` action menu, and select **Load** (or **Load & Watch**).
---
### Connecting to Your Shumai Server
1. In Premiere Pro, open the plugin panel by navigating to **Window** > **Extensions** > **Shumai** (or **Window** > **Shumai**).
2. Enter your connection credentials:
- **Endpoint URL:** The URL of your Shumai server (e.g. `http://localhost:3000` or `https://shumai.yourdomain.com`).
- **API Key:** A valid API key generated in Shumai. To create one, open Shumai in your browser, go to **Team Settings** > **Developer**, and generate a new API key.
3. Click **Connect**. Once connected, your credentials are saved locally in Premiere Pro.
---
### What the Shumai UXP Plugin Can Do
The plugin integrates two core workflows directly into Premiere Pro:
#### 1. Browse & Import Assets into Premiere Pro
- **Browse & Search:** Navigate through your Shumai projects, folders, and media assets with breadcrumb navigation and instant search.
- **Choose Download Quality:** Select **Import** on any asset to choose between:
- **Original (Raw):** Downloads and imports the full original master media file.
- **Video Proxy:** Downloads and imports an optimized proxy transcode (e.g. 1080p, 720p, 540p, or 360p MP4) for lighter, smoother editing playback.
- **Native Destination Selection:** Prompts a native system folder picker so you can choose exactly where on your local disk the media file should be saved.
- **Automatic Bin Import:** After saving to disk, the file is automatically imported into your active Premiere Pro project bin.
#### 2. Auto-Sync Comments to Sequence Markers
- **Link Sequence:** In the plugin file list, select **Link Sequence** on any video asset to link it with your currently active timeline sequence.
- **Automatic Marker Creation:** The plugin immediately fetches existing comments from Shumai and converts them into native Premiere Pro sequence markers:
- **Accurate Timestamps:** Comments placed at specific timecodes appear at the corresponding timeline frames. Comments without timestamps are placed at the beginning of the sequence (`00:00:00:00`).
- **Author & Content:** The marker name shows the commenter's name, and the marker notes include the comment body along with formatted threaded replies.
- **Continuous Background Sync:** The plugin continuously syncs in the background (every 12 seconds), and triggers an immediate sync whenever you switch focus to the panel or activate a sequence.
- **Sequences Dashboard:** Switch to the **Sequences** tab at any time to see all linked sequences in your project, view the last sync time, trigger an instant manual sync, or unlink sequences.
- **Clean Unlink:** When unlinking an asset from a sequence, Shumai cleanly cleans up the markers it generated without affecting other project markers.
+8
View File
@@ -44,3 +44,11 @@ If you want to mute a specific project entirely (except for direct `@mentions` w
- The **Bell** icon in the navigation bar displays a red badge when you have unread notifications.
- Click the bell to open your notification feed panel.
- Click any notification card to mark it as read and jump directly to the relevant file and comment thread.
---
## Email Notifications
In addition to in-app notifications, Team Owners can configure outgoing SMTP settings to deliver batched activity digest emails to team members. The email delivery engine honors each member's individual notification preferences configured above.
See the [Email Notifications Guide](/using-shumai/email-notifications) for full SMTP setup instructions, test email workflows, and delivery architecture details.
+61 -15
View File
@@ -1,31 +1,77 @@
---
title: Media Transcoding Settings
description: Configure video transcode strategies and preview proxy generation.
title: Video Transcoding
description: Configure video transcode policies, MP4 and HLS streaming resolutions, hardware acceleration, and FFmpeg threads.
---
High-resolution camera formats and raw media files cannot be rendered natively in web browsers. Shumai transcodes these assets into web-friendly streaming formats in the background.
High-resolution camera formats and raw media files cannot be rendered natively in web browsers. Shumai transcodes video assets into web-friendly streaming and preview formats in the background.
Team Owners can customize video transcoding behavior from the **Team Settings > Video Transcoding** page.
Regardless of the selected transcoding strategy, Shumai's pipeline will **always** generate at least one lightweight `180p` proxy version of the raw file to ensure fast scrubbing, thumbnail generation, and instant previews.
---
## Video Transcode Strategies
## Transcode Policy
Team Owners can select how the transcoding engine handles uploaded files. Shumai evaluates the original file's dimensions against its standard target resolutions (2160p, 1080p, 720p, 540p, and 360p) to determine the output.
The **Transcode Policy** card configures both MP4 video transcoding and HLS adaptive streaming.
### 1. Best Match
### Playback and Download Behavior
- **Behavior**: Shumai checks the longest dimension (width or height) of the uploaded file. It then finds the highest standard resolution that is equal to or smaller than the original file, preventing unnecessary upscaling. If the original video is exceptionally small, it defaults to a minimum target of `360p`.
- **Output**: Generates exactly two web-optimized files: the universal `180p` proxy and the single calculated "best match" resolution.
- **Use Case**: This is the recommended option. It ensures web compatibility without wasting processing time and storage space on redundant lower-resolution versions.
Shumai uses a dual-format strategy for video delivery:
### 2. Transcode All
- **When HLS is disabled**: Both in-browser video playback and file downloads will use the generated MP4 file(s).
- **When HLS is enabled**: In-browser video playback uses HLS (HTTP Live Streaming) for smooth, adaptive bitrate playback, while file downloads will use the generated MP4 file(s).
- **Behavior**: Shumai calculates the "best match" resolution exactly as it does in the previous strategy. However, instead of stopping at one version, it processes the video into the best match _and_ every standard resolution smaller than it.
- **Output**: Generates a full cascade of files. For example, if the best match for an upload is `1080p`, Shumai will generate the `180p` proxy, `1080p`, `720p`, `540p`, and `360p` versions.
- **Use Case**: Ideal for environments requiring adaptive bitrate streaming, ensuring consistent playback performance across all client devices regardless of varying network conditions.
<Warning>
**Storage Usage Notice**: Enabling HLS generates multi-bitrate segment files (`.ts` / `.m4s`) and
playlist manifests in addition to standard MP4 proxies. This can significantly increase storage
consumption on your storage bucket.
</Warning>
![Transcode Settings](../transcode.webp)
### MP4 Transcoding
Generate web-compatible MP4 files for file downloads and standard video playback. Team Owners can select how MP4 transcodes are generated for uploaded files:
#### 1. Best Match
- **Behavior**: Shumai checks the longest dimension of the uploaded video and generates a single optimal resolution matching or smaller than the source quality, preventing unnecessary upscaling.
- **Output**: Generates the lightweight `180p` proxy and the calculated best-match MP4 file.
- **Use Case**: Recommended default. Minimizes processing time and storage space while ensuring universal playback and download compatibility.
#### 2. Multi Resolutions
- **Behavior**: Select specific target resolution ladders to generate: `480p`, `720p`, `1080p`, `1440p`, and `2160p`. Resolutions are only generated up to the source video resolution (content is never upscaled).
- **Output**: Generates the `180p` proxy plus all selected resolution ladders that do not exceed the source resolution.
- **Use Case**: Ideal when users need to download multiple specific resolutions (e.g. 720p for fast sharing and 1080p for review).
### HLS Streaming
When **HLS Streaming** is toggled on, Shumai produces an adaptive bitrate HLS package for uploaded videos:
- **Resolution Ladders**: Configure which resolutions to generate for HLS streaming (`480p`, `720p`, `1080p`, `1440p`, `2160p`). Ladders are only generated up to the original video resolution.
- **Player Integration**: The web player will automatically stream via HLS when available, dynamically switching bitrates based on client network bandwidth.
![Video Transcoding](../transcode.webp)
---
## Hardware Acceleration
To offload encoding workloads from CPUs to GPUs, Shumai supports hardware-accelerated video encoding:
- **Disabled (Software)**: Uses the standard CPU `libx264` software encoder with Constant Rate Factor (CRF).
- **Auto Detect**: Automatically probes and leverages available GPU/hardware acceleration (NVIDIA NVENC, Intel QuickSync, AMD/Intel VA-API, Apple VideoToolbox, Rockchip RKMPP).
See the [Hardware Transcoding Guide](/configuration/hardware-transcoding) for Docker Compose configuration, GPU passthrough, and driver prerequisites.
---
## FFmpeg Threads
The **FFmpeg Threads** slider controls the maximum number of CPU threads used by FFmpeg during transcoding tasks:
- **Auto (0)**: FFmpeg automatically selects the optimal thread count based on host CPU core availability.
- **Manual (1 - 32)**: Restricts FFmpeg to a fixed number of threads, useful for throttling CPU consumption on shared worker nodes.
---
@@ -33,4 +79,4 @@ Team Owners can select how the transcoding engine handles uploaded files. Shumai
Transcoding is resource-intensive. Depending on your scaling needs, your administrator can run the transcode engine on the main server (Single-Server mode) or delegate tasks to specialized transcoding worker machines (Temporal Worker mode).
Note: In all modes, the processing machine must have the standard system media utilities (`ffmpeg` and `ffprobe`) installed.
In all modes, the processing machine must have system media utilities (`ffmpeg` and `ffprobe`) installed. See the [Temporal Deployment Guide](/configuration/temporal) for setting up distributed transcoding workers.
+5 -2
View File
@@ -1,6 +1,6 @@
{
"name": "shumai",
"version": "0.4.4",
"version": "0.5.2",
"private": true,
"type": "module",
"repository": {
@@ -38,7 +38,10 @@
"release:local": "bun run scripts/release-local.ts",
"release:patch": "bun run scripts/release.ts patch",
"release:minor": "bun run scripts/release.ts minor",
"release:major": "bun run scripts/release.ts major"
"release:major": "bun run scripts/release.ts major",
"changelog:extract": "bun run scripts/extract-changelog.ts",
"docs:changelog": "bun run scripts/generate-docs-changelog.ts",
"docs:changelog:check": "bun run scripts/generate-docs-changelog.ts --check"
},
"devDependencies": {
"@eslint/js": "10.0.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@shumai/agent",
"version": "0.4.4",
"version": "0.5.2",
"private": true,
"type": "module",
"main": "./src/index.ts",
+132
View File
@@ -662,6 +662,23 @@ describe('Agent Activities', () => {
const pdfPrompt = mockHarness.prompt.mock.calls[1]?.[0] ?? ''
expect(pdfPrompt).toContain('Document pages: 50')
expect(pdfPrompt).not.toContain('Video duration')
// For a 3D asset, should produce 3D Model recommendation
await autofillAiActivity({
teamId: 't1',
assetId: 'model-3',
assetName: 'robot.glb',
mediaType: 'model/gltf-binary',
images: [],
fields: [{ id: 'f1', config: { name: 'F1', type: 'text' } }],
context,
})
const modelPrompt = mockHarness.prompt.mock.calls[2]?.[0] ?? ''
expect(modelPrompt).toContain('3D Model: This asset has an orthogonal 4-view composite image')
expect(modelPrompt).toContain(
'Front view at top-left, Right side view at top-right, Back view at bottom-left, Left side view at bottom-right',
)
})
})
@@ -1170,6 +1187,43 @@ describe('Agent Database Activities Integration', () => {
expect((rootEntry as any)?.details?.thread).toBeUndefined()
})
it('should set media position to degree for 3D asset comments', async () => {
const asset3d = await prisma.asset.create({
data: {
name: 'robot.glb',
type: 'file',
status: 'processed',
mediaType: 'model/gltf-binary',
media: { proxyType: '3d' } as unknown as PrismaJson.MediaInfo,
projectId: project.id,
},
})
const comment3d = await prisma.assetComment.create({
data: {
assetId: asset3d.id,
message: 'Nice angle',
creatorId: user.id,
second: 0.5, // 45°
},
})
const sessionId = await initializeAgentSessionActivity({
teamId: team.id,
agentId: 'test-agent-id',
userCommentId: comment3d.id,
userId: user.id,
})
const storage = new DatabaseSessionStorage(sessionId)
const pathEntries = await storage.getPathToRoot(comment3d.id)
const entry = pathEntries.find((e) => e.id === comment3d.id)
expect(entry).toBeDefined()
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- test entry position parsing
expect((entry as any)?.details?.position).toEqual({ type: 'degree', degree: 45 })
})
it('should return user name and role for team member', async () => {
const info = await getUserTeamInfoActivity({
userId: user.id,
@@ -2105,5 +2159,83 @@ describe('Agent Database Activities Integration', () => {
expect(systemPromptArg).toContain('<thread id="..." reply_count="..." />')
expect(systemPromptArg).toContain('read_thread')
})
it('agentChatActivity injects # 3D Model Inspection into systemPrompt', async () => {
const user = await prisma.user.create({
data: { name: 'User_3d_Prompt', email: `prompt-3d-${Date.now()}@example.com` },
})
const team = await prisma.team.create({
data: { name: 'Team_3d_Prompt_' + Date.now() },
})
const project = await prisma.project.create({
data: { name: 'Project_3d_Prompt', teamId: team.id },
})
const asset = await prisma.asset.create({
data: {
name: 'robot.glb',
type: 'file',
status: 'processed',
mediaType: 'model/gltf-binary',
media: { proxyType: '3d' } as unknown as PrismaJson.MediaInfo,
projectId: project.id,
},
})
const comment = await prisma.assetComment.create({
data: {
assetId: asset.id,
creatorId: user.id,
message: 'Check this 3d model',
},
})
const mockSession = {
id: 'mock-session-id',
subscribe: vi.fn(),
getEntries: vi.fn().mockResolvedValue([]),
getStorage: vi.fn().mockReturnValue({ sessionId: 'mock-session-id' }),
}
const mockHarness = {
subscribe: vi.fn(),
prompt: vi.fn().mockResolvedValue({
content: [{ type: 'text', text: 'Response' }],
usage: { input: 10, output: 20 },
}),
}
vi.mocked(piAgent.createAgentSession).mockResolvedValue({
session: mockSession as unknown as Session<DatabaseSessionMetadata>,
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Mock AgentHarness instance for activity test
harness: mockHarness as unknown as AgentHarness<any, any, any, any>,
})
const context = {
agent: { id: 'agent-1', provider: { name: 'google' }, modelRef: { modelId: 'gemini' } },
dbProviders: [],
teamSkills: [],
allowedDomains: [],
} as unknown as AgentExecutionContext
await agentChatActivity({
teamId: team.id,
agentId: 'agent-1',
message: 'Hello',
imageUrls: [],
projectId: project.id,
folderId: asset.id,
assetId: asset.id,
sessionId: 'mock-session-id',
userCommentId: comment.id,
userId: user.id,
context,
})
const lastCall = vi.mocked(piAgent.createAgentSession).mock.calls.at(-1)
const systemPromptArg = lastCall?.[0].systemPrompt as string
expect(systemPromptArg).toContain('# 3D Model Inspection')
expect(systemPromptArg).toContain('media_type="3d"')
expect(systemPromptArg).toContain('config3d')
expect(systemPromptArg).toContain('<position type="degree" degree="..." />')
})
})
})
+21 -3
View File
@@ -21,6 +21,7 @@ import {
import { aiUsageService } from '@shumai/core/src/ai-usage/ai-usage'
import { quotaService, QuotaExceededError } from '@shumai/core/src/quota/quota-service'
import { getProxyType } from '@shumai/core/src/utils/mime'
import { secondToDegree } from '@shumai/core/src/utils/model3d'
import {
UpdateAssetMetadataRequest,
type ShumaiMessageContext,
@@ -179,6 +180,8 @@ User messages may contain a <context> block detailing the user, active asset loc
systemPrompt += `\n\n# Comment Threads\nWhen operating in comment mode, previous top-level messages in the conversation history may contain a <thread id="..." reply_count="..." /> tag indicating an earlier discussion thread with replies. If a user's question refers to or depends on earlier comments or discussions, you can use the 'read_thread' tool with the thread ID to inspect all replies in that thread.`
}
systemPrompt += `\n\n# 3D Model Inspection\nWhen interacting with 3D model assets (media_type="3d"), you can visually inspect the asset using 'read_asset'. Calling 'read_asset' with config3d: null (or config3d: {}) returns an orthogonal 4-view composite image (Front at top-left, Right side at top-right, Back at bottom-left, Left side at bottom-right). If a <position type="degree" degree="..." /> tag is present or a specific angle is discussed, pass 'config3d: { degree: ... }' (integer 0, 15, 30, ..., 345) to inspect that view angle. If an <annotation id="..." /> tag is present on a 3D asset, pass 'annotationId' to inspect the angle with the user's visual markup drawings overlaid.`
if (agent.type === 'autofill') {
systemPrompt += `\n\n# Autofill Instructions\nWhen performing metadata autofill, inspect the asset content using the 'read_asset' tool. If 'read_asset' fails or returns an error, do not autofill any metadata and report to the user directly. Do not try anything fancy, for example downloading the file or using python/ffmpeg to extract content.`
}
@@ -564,6 +567,7 @@ export async function autofillAiActivity(params: AutofillAiParams) {
const proxyType = getProxyType(params.mediaType, params.assetName)
const isVideoOrAudio = proxyType === 'video' || proxyType === 'audio'
const isPdf = proxyType === 'pdf'
const is3d = proxyType === '3d'
if (params.duration !== undefined && params.duration > 0 && (!proxyType || isVideoOrAudio)) {
promptLines.push(
@@ -575,11 +579,16 @@ export async function autofillAiActivity(params: AutofillAiParams) {
`- Document pages: ${params.pageCount}. Recommended inspection: call read_asset with docConfig: { mode: "pages", startPage: 1, endPage: ${Math.min(params.pageCount, 20)} } or mode: "text".`,
)
}
if (is3d) {
promptLines.push(
'- 3D Model: This asset has an orthogonal 4-view composite image (2x2 grid showing Front view at top-left, Right side view at top-right, Back view at bottom-left, Left side view at bottom-right). Call read_asset to inspect the 4 views.',
)
}
promptLines.push(
'',
'Instructions:',
`1. Call the "read_asset" tool with assetId: "${params.assetId || ''}" to inspect the asset content (use imageConfig, videoConfig, or docConfig according to the media type).`,
`1. Call the "read_asset" tool with assetId: "${params.assetId || ''}" to inspect the asset content (use imageConfig, videoConfig, or docConfig according to the media type; for 3D assets, call read_asset directly to inspect the 4-view composite image).`,
'2. After analyzing the retrieved content, call the "autofill_metadata" tool to provide the extracted metadata values.',
'3. If "read_asset" fails or returns an error, do not autofill any metadata and report to the user directly. Do not try anything fancy, for example downloading the file or using python/ffmpeg to extract content.',
)
@@ -834,7 +843,9 @@ export async function initializeAgentSessionActivity(params: {
let position: ShumaiMediaPosition | undefined = undefined
if (c.second !== null && c.second !== undefined) {
if (proxyType === 'pdf') {
if (proxyType === '3d') {
position = { type: 'degree', degree: secondToDegree(c.second) }
} else if (proxyType === 'pdf') {
position = { type: 'page', page: Math.round(c.second) }
} else {
position = { type: 'time', seconds: c.second }
@@ -852,7 +863,14 @@ export async function initializeAgentSessionActivity(params: {
id: att.asset.id,
name: att.asset.name,
type: att.asset.type,
mediaType: attProxyType as 'image' | 'video' | 'pdf' | 'audio' | 'other' | undefined,
mediaType: attProxyType as
| 'image'
| 'video'
| 'pdf'
| 'audio'
| '3d'
| 'other'
| undefined,
mimeType: att.asset.mediaType || undefined,
})
}
+4
View File
@@ -154,6 +154,10 @@ export async function generateEmbeddingActivity(params: GenerateEmbeddingParams)
start.toString(),
'-i',
inputSource,
'-map',
'0:V:0',
'-map',
'0:a:0?',
'-t',
(end - start).toString(),
'-c',
@@ -350,5 +350,24 @@ describe('serializeContextToXml', () => {
'<context>\n <annotation id="test&lt;id&gt;&amp;&quot;123&quot;" />\n</context>',
)
})
it('serializes position type="degree" with integer degree attribute without seconds', () => {
const context: ShumaiMessageContext = {
currentAsset: {
id: 'ast_3d',
name: 'robot.glb',
type: 'file',
mediaType: '3d',
path: 'robot.glb',
},
position: {
type: 'degree',
degree: 45,
},
}
expect(serializeContextToXml(context)).toBe(
'<context>\n <current_asset id="ast_3d" name="robot.glb" type="file" media_type="3d" path="robot.glb" />\n <position type="degree" degree="45" />\n</context>',
)
})
})
})
@@ -4,6 +4,7 @@ import { setupTestDbHooks } from '@shumai/db/test'
import { resolveAnnotationsById } from './annotation-resolver'
import { DatabaseSessionStorage } from '../database-session-storage'
import type { SessionTreeEntry } from '@earendil-works/pi-agent-core'
import { degreeToSecond } from '@shumai/core/src/utils/model3d'
describe('resolveAnnotationsById', () => {
setupTestDbHooks()
@@ -210,6 +211,89 @@ describe('resolveAnnotationsById', () => {
])
})
it('resolves annotations and degree position timestamp from 1-on-1 chat AgentSessionEntry for 3D assets', async () => {
const user = await prisma.user.create({
data: { name: 'User 3D', email: 'user3d@test.com', password: 'pw' },
})
const team = await prisma.team.create({
data: { name: 'Team 3D' },
})
const project = await prisma.project.create({
data: { name: 'Project 3D', teamId: team.id },
})
const asset = await prisma.asset.create({
data: {
name: 'robot.glb',
type: 'file',
projectId: project.id,
status: 'uploaded',
},
})
const agentUser = await prisma.user.create({
data: { name: 'Agent 3D', email: 'agent3d@example.com', type: 'agent' },
})
const agent = await prisma.agent.create({
data: {
id: agentUser.id,
teamId: team.id,
type: 'chat',
config: { provider: 'test-provider', model: 'test-model' },
},
})
const storage = await DatabaseSessionStorage.create({
agentId: agent.id,
userId: user.id,
assetId: asset.id,
})
storage.currentMessageContext = {
currentAsset: {
id: asset.id,
name: asset.name,
type: 'file',
path: asset.name,
},
position: { type: 'degree', degree: 45 },
annotation: true,
annotations: [
{
type: 'rectangle',
x: 10,
y: 20,
width: 30,
height: 40,
},
],
}
const userEntry: SessionTreeEntry = {
type: 'message',
id: '01JTEST3DENTRY123456789',
parentId: null,
timestamp: new Date().toISOString(),
message: {
role: 'user',
content: 'Check markup at 45 degrees',
timestamp: Date.now(),
},
}
await storage.appendEntry(userEntry)
const result = await resolveAnnotationsById(asset.id, '01JTEST3DENTRY123456789')
expect(result.timestamp).toBeCloseTo(degreeToSecond(45))
expect(result.annotations).toEqual([
{
type: 'rectangle',
x: 10,
y: 20,
width: 30,
height: 40,
},
])
})
it('throws an error when AgentSessionEntry belongs to a different asset', async () => {
const user = await prisma.user.create({
data: { name: 'User', email: 'user3@test.com', password: 'pw' },
@@ -1,5 +1,6 @@
import { prisma } from '@shumai/db'
import type { ShumaiMessageContext } from '@shumai/dtos'
import { degreeToSecond } from '@shumai/core/src/utils/model3d'
export async function resolveAnnotationsById(
assetId: string,
@@ -44,7 +45,14 @@ export async function resolveAnnotationsById(
const list = details?.annotations
const annotations =
Array.isArray(list) && list.length > 0 ? (list as unknown as PrismaJson.AnnotationList) : null
const timestamp = details?.position?.type === 'time' ? details.position.seconds : null
let timestamp: number | null = null
if (details?.position?.type === 'time') {
timestamp = details.position.seconds
} else if (details?.position?.type === 'degree') {
timestamp = degreeToSecond(details.position.degree)
} else if (details?.position?.type === 'page') {
timestamp = details.position.page
}
return { annotations, timestamp }
}
+471
View File
@@ -11,6 +11,7 @@ import { s3Service } from '@shumai/core/src/s3/s3'
import { workflowService } from '@shumai/workflow-core'
import { authzService } from '@shumai/core/src/authz/authz'
import * as annotationResolver from './annotation-resolver'
import { degreeToSecond } from '@shumai/core/src/utils/model3d'
vi.mock('@shumai/db', async (importOriginal) => {
const actual = await importOriginal<typeof import('@shumai/db')>()
@@ -211,6 +212,476 @@ describe('readAssetTool', () => {
})
})
describe('3D Assets', () => {
it('should read 3D asset 4-views image and return image with quadrant layout description', async () => {
vi.mocked(authzService.hasPermission).mockResolvedValue()
vi.mocked(prisma.asset.findUnique).mockResolvedValue({
id: 'model-1',
name: 'robot.glb',
mediaType: 'model/gltf-binary',
storageKey: { key: 'raw/robot.glb' },
media: {
proxyType: '3d',
imageTranscodes: [{ key: 'proxy/views.webp' }],
},
} as unknown as Asset)
vi.mocked(s3Service.getObject).mockResolvedValue({
buffer: Buffer.from('fake-views-bytes'),
contentType: 'image/webp',
} as unknown as { buffer: Buffer; contentType: string })
const tool = createReadAssetTool('user-1')
const result = await tool.execute('call-3d', {
assetId: 'model-1',
annotationId: null,
imageConfig: null,
videoConfig: null,
docConfig: null,
})
expect(authzService.hasPermission).toHaveBeenCalledWith({
user: { id: 'user-1' },
permission: 'Read',
type: 'asset',
id: 'model-1',
})
expect(s3Service.getObject).toHaveBeenCalledWith('shumai', 'proxy/views.webp')
const textItem = result.content[0] as { type: 'text'; text: string }
const imageItem = result.content[1] as { type: 'image'; data: string; mimeType: string }
expect(textItem.text).toContain('Orthogonal 4-view composite image')
expect(textItem.text).toContain('Top-Left quadrant: Front view (0°)')
expect(textItem.text).toContain('Top-Right quadrant: Right side view (90°)')
expect(textItem.text).toContain('Bottom-Left quadrant: Back view (180°)')
expect(textItem.text).toContain('Bottom-Right quadrant: Left side view (270°)')
expect(imageItem.type).toBe('image')
expect(imageItem.data).toBe(Buffer.from('fake-views-bytes').toString('base64'))
expect(result.details.key).toBe('proxy/views.webp')
})
it('should support s3KeyOnly mode for 3D assets', async () => {
vi.mocked(authzService.hasPermission).mockResolvedValue()
vi.mocked(prisma.asset.findUnique).mockResolvedValue({
id: 'model-1',
name: 'robot.glb',
mediaType: 'model/gltf-binary',
media: {
proxyType: '3d',
imageTranscodes: [{ key: 'proxy/views.webp' }],
},
} as unknown as Asset)
const tool = createReadAssetTool('user-1')
const result = await tool.execute('call-3d-s3', {
assetId: 'model-1',
annotationId: null,
s3KeyOnly: true,
imageConfig: null,
videoConfig: null,
docConfig: null,
})
expect(result.content).toHaveLength(1)
const textItem = result.content[0] as { type: 'text'; text: string }
expect(textItem.text).toContain('proxy/views.webp')
expect(textItem.text).toContain('Front view (0°)')
expect(result.details.key).toBe('proxy/views.webp')
})
it('should throw error if videoConfig is passed for 3D assets', async () => {
vi.mocked(authzService.hasPermission).mockResolvedValue()
vi.mocked(prisma.asset.findUnique).mockResolvedValue({
id: 'model-1',
name: 'robot.glb',
mediaType: 'model/gltf-binary',
media: {
proxyType: '3d',
imageTranscodes: [{ key: 'proxy/views.webp' }],
},
} as unknown as Asset)
const tool = createReadAssetTool('user-1')
await expect(
tool.execute('call-3d-err', {
assetId: 'model-1',
annotationId: null,
imageConfig: null,
videoConfig: { start: 0, end: 4, count: 4 },
docConfig: null,
}),
).rejects.toThrow(
"To inspect specific angles pass 'config3d: { degree: ... }'; do not pass videoConfig",
)
})
it('should throw error if 3D asset imageTranscodes is missing when overview is requested', async () => {
vi.mocked(authzService.hasPermission).mockResolvedValue()
vi.mocked(prisma.asset.findUnique).mockResolvedValue({
id: 'model-1',
name: 'robot.glb',
mediaType: 'model/gltf-binary',
media: {
proxyType: '3d',
imageTranscodes: [],
},
} as unknown as Asset)
const tool = createReadAssetTool('user-1')
await expect(
tool.execute('call-3d-err2', {
assetId: 'model-1',
annotationId: null,
imageConfig: null,
videoConfig: null,
docConfig: null,
}),
).rejects.toThrow('4-views image (views.webp) is missing')
})
it('should extract specific turntable frame when config3d.degree is provided', async () => {
vi.mocked(authzService.hasPermission).mockResolvedValue()
vi.mocked(prisma.asset.findUnique).mockResolvedValue({
id: 'model-1',
name: 'robot.glb',
mediaType: 'model/gltf-binary',
projectId: 'proj-1',
media: {
proxyType: '3d',
videoTranscodes: [{ key: 'proxy/turntable.mp4' }],
imageTranscodes: [{ key: 'proxy/views.webp' }],
},
} as unknown as Asset)
vi.mocked(prisma.workflowTask.create).mockResolvedValue({
id: 'task-shot-3d',
} as unknown as WorkflowTask)
vi.mocked(workflowService.executeWait).mockResolvedValue({
id: 'task-shot-3d',
status: WorkflowTaskStatus.completed,
output: {
screenshots: [{ key: 'proxy/shot-45.webp', timestamp: 0.5833 }],
},
} as unknown as WorkflowTask)
vi.mocked(s3Service.getObject).mockResolvedValue({
buffer: Buffer.from('fake-shot-45-bytes'),
contentType: 'image/webp',
} as unknown as { buffer: Buffer; contentType: string })
const tool = createReadAssetTool('user-1')
const result = await tool.execute('call-3d-degree', {
assetId: 'model-1',
annotationId: null,
config3d: { degree: 45 },
imageConfig: null,
videoConfig: null,
docConfig: null,
})
expect(prisma.workflowTask.create).toHaveBeenCalledWith({
data: expect.objectContaining({
type: WorkflowTaskType.transcode_screenshot,
assetId: 'model-1',
payload: {
projectId: 'proj-1',
screenshot: {
start: expect.any(Number),
end: expect.any(Number),
count: 1,
commentTimestamp: expect.any(Number),
annotations: undefined,
},
},
}),
})
const textItem = result.content[0] as { type: 'text'; text: string }
const imageItem = result.content[1] as { type: 'image'; data: string; mimeType: string }
expect(textItem.text).toContain('view at 45°:')
expect(imageItem.data).toBe(Buffer.from('fake-shot-45-bytes').toString('base64'))
expect(result.details.key).toBe('proxy/shot-45.webp')
})
it('should throw error when config3d.degree is not a multiple of 15 or out of range', async () => {
vi.mocked(authzService.hasPermission).mockResolvedValue()
vi.mocked(prisma.asset.findUnique).mockResolvedValue({
id: 'model-1',
name: 'robot.glb',
mediaType: 'model/gltf-binary',
media: {
proxyType: '3d',
videoTranscodes: [{ key: 'proxy/turntable.mp4' }],
},
} as unknown as Asset)
const tool = createReadAssetTool('user-1')
await expect(
tool.execute('call-3d-invalid-deg', {
assetId: 'model-1',
annotationId: null,
config3d: { degree: 40 },
imageConfig: null,
videoConfig: null,
docConfig: null,
}),
).rejects.toThrow('Invalid turntable degree: 40')
await expect(
tool.execute('call-3d-out-of-range', {
assetId: 'model-1',
annotationId: null,
config3d: { degree: 360 },
imageConfig: null,
videoConfig: null,
docConfig: null,
}),
).rejects.toThrow('Invalid turntable degree: 360')
})
it('should extract frame with overlaid markups when annotationId is provided on 3D asset', async () => {
vi.mocked(authzService.hasPermission).mockResolvedValue()
vi.mocked(prisma.asset.findUnique).mockResolvedValue({
id: 'model-1',
name: 'robot.glb',
mediaType: 'model/gltf-binary',
projectId: 'proj-1',
media: {
proxyType: '3d',
videoTranscodes: [{ key: 'proxy/turntable.mp4' }],
},
} as unknown as Asset)
vi.spyOn(annotationResolver, 'resolveAnnotationsById').mockResolvedValue({
annotations: [
{
type: 'freehand',
color: '#ff0000',
points: [
[0, 0],
[10, 10],
],
},
],
timestamp: 0.5, // 0.5s = 45°
})
vi.mocked(prisma.workflowTask.create).mockResolvedValue({
id: 'task-shot-ann',
} as unknown as WorkflowTask)
vi.mocked(workflowService.executeWait).mockResolvedValue({
id: 'task-shot-ann',
status: WorkflowTaskStatus.completed,
output: {
screenshots: [{ key: 'proxy/shot-annotated.webp', timestamp: 0.5 }],
},
} as unknown as WorkflowTask)
vi.mocked(s3Service.getObject).mockResolvedValue({
buffer: Buffer.from('fake-shot-ann-bytes'),
contentType: 'image/webp',
} as unknown as { buffer: Buffer; contentType: string })
const tool = createReadAssetTool('user-1')
const result = await tool.execute('call-3d-ann', {
assetId: 'model-1',
annotationId: 'comm-1',
config3d: null,
imageConfig: null,
videoConfig: null,
docConfig: null,
})
expect(prisma.workflowTask.create).toHaveBeenCalledWith({
data: expect.objectContaining({
type: WorkflowTaskType.transcode_screenshot,
assetId: 'model-1',
payload: {
projectId: 'proj-1',
screenshot: {
start: 0.5,
end: 0.5,
count: 1,
commentTimestamp: 0.5,
annotations: [
{
type: 'freehand',
color: '#ff0000',
points: [
[0, 0],
[10, 10],
],
},
],
},
},
}),
})
const textItem = result.content[0] as { type: 'text'; text: string }
expect(textItem.text).toContain('view at 45° with visual markups overlaid:')
expect(result.details.key).toBe('proxy/shot-annotated.webp')
})
it('should extract turntable frame at resolved degree angle for 3D session annotations', async () => {
vi.mocked(authzService.hasPermission).mockResolvedValue()
vi.mocked(prisma.asset.findUnique).mockResolvedValue({
id: 'model-1',
name: 'robot.glb',
mediaType: 'model/gltf-binary',
projectId: 'proj-1',
media: {
proxyType: '3d',
videoTranscodes: [{ key: 'proxy/turntable.mp4' }],
},
} as unknown as Asset)
const expectedTime = degreeToSecond(90)
vi.spyOn(annotationResolver, 'resolveAnnotationsById').mockResolvedValue({
annotations: [
{
type: 'box',
color: '#00ff00',
points: [
[10, 20],
[40, 60],
],
},
],
timestamp: expectedTime,
})
vi.mocked(prisma.workflowTask.create).mockResolvedValue({
id: 'task-shot-3d-session',
} as unknown as WorkflowTask)
vi.mocked(workflowService.executeWait).mockResolvedValue({
id: 'task-shot-3d-session',
status: WorkflowTaskStatus.completed,
output: {
screenshots: [{ key: 'proxy/shot-annotated-90.webp', timestamp: expectedTime }],
},
} as unknown as WorkflowTask)
vi.mocked(s3Service.getObject).mockResolvedValue({
buffer: Buffer.from('fake-shot-90-bytes'),
contentType: 'image/webp',
} as unknown as { buffer: Buffer; contentType: string })
const tool = createReadAssetTool('user-1')
const result = await tool.execute('call-3d-session-ann', {
assetId: 'model-1',
annotationId: 'session-entry-1',
config3d: null,
imageConfig: null,
videoConfig: null,
docConfig: null,
})
expect(prisma.workflowTask.create).toHaveBeenCalledWith({
data: expect.objectContaining({
type: WorkflowTaskType.transcode_screenshot,
assetId: 'model-1',
payload: {
projectId: 'proj-1',
screenshot: {
start: expectedTime,
end: expectedTime,
count: 1,
commentTimestamp: expectedTime,
annotations: [
{
type: 'box',
color: '#00ff00',
points: [
[10, 20],
[40, 60],
],
},
],
},
},
}),
})
const textItem = result.content[0] as { type: 'text'; text: string }
expect(textItem.text).toContain('view at 90° with visual markups overlaid:')
expect(result.details.key).toBe('proxy/shot-annotated-90.webp')
})
it('should throw error if config3d.degree conflicts with annotation angle', async () => {
vi.mocked(authzService.hasPermission).mockResolvedValue()
vi.mocked(prisma.asset.findUnique).mockResolvedValue({
id: 'model-1',
name: 'robot.glb',
mediaType: 'model/gltf-binary',
projectId: 'proj-1',
media: {
proxyType: '3d',
videoTranscodes: [{ key: 'proxy/turntable.mp4' }],
},
} as unknown as Asset)
vi.spyOn(annotationResolver, 'resolveAnnotationsById').mockResolvedValue({
annotations: [
{
type: 'box',
color: '#ff0000',
points: [
[0, 0],
[10, 10],
],
},
],
timestamp: 0.5, // 45°
})
const tool = createReadAssetTool('user-1')
await expect(
tool.execute('call-3d-conflict', {
assetId: 'model-1',
annotationId: 'comm-1',
config3d: { degree: 90 }, // Conflicts with 45°
imageConfig: null,
videoConfig: null,
docConfig: null,
}),
).rejects.toThrow(
'Annotation "comm-1" was drawn at 45°, but degree 90° was specified. Do not pass a conflicting degree with annotationId.',
)
})
it('should throw error if 3D asset turntable video is missing when angle inspection is requested', async () => {
vi.mocked(authzService.hasPermission).mockResolvedValue()
vi.mocked(prisma.asset.findUnique).mockResolvedValue({
id: 'model-1',
name: 'robot.glb',
mediaType: 'model/gltf-binary',
media: {
proxyType: '3d',
videoTranscodes: [],
},
} as unknown as Asset)
const tool = createReadAssetTool('user-1')
await expect(
tool.execute('call-3d-missing-turntable', {
assetId: 'model-1',
annotationId: null,
config3d: { degree: 45 },
imageConfig: null,
videoConfig: null,
docConfig: null,
}),
).rejects.toThrow('turntable video (turntable.mp4) is missing')
})
})
describe('Video Assets', () => {
it('should throw error if videoConfig is missing for video assets', async () => {
vi.mocked(authzService.hasPermission).mockResolvedValue()
+237 -3
View File
@@ -7,6 +7,12 @@ import { workflowService } from '@shumai/workflow-core'
import { authzService, Permission, ResourceType } from '@shumai/core/src/authz/authz'
import { resolveAnnotationsById } from './annotation-resolver'
import { getFileMimeType } from '@shumai/core/src/utils/file-mime'
import { is3dModel } from '@shumai/core/src/utils/mime'
import {
isValidTurntableDegree,
secondToDegree,
degreeToSecond,
} from '@shumai/core/src/utils/model3d'
export const readAssetSchema = Type.Object(
{
@@ -37,6 +43,31 @@ export const readAssetSchema = Type.Object(
),
Type.Null(),
]),
config3d: Type.Optional(
Type.Union([
Type.Object(
{
degree: Type.Optional(
Type.Union([
Type.Integer({
minimum: 0,
maximum: 345,
description:
'Turntable rotation degree (integer: 0, 15, 30, ..., 345 in 15° increments) to inspect a specific angle of a 3D model. Leave null/omitted to view the 4-view composite overview.',
}),
Type.Null(),
]),
),
},
{
additionalProperties: false,
description:
'Configuration for 3D model assets. Pass null if inspecting another asset type. Optionally pass degree to inspect a specific turntable angle, or leave null/omitted to view the 4-view composite overview.',
},
),
Type.Null(),
]),
),
videoConfig: Type.Union([
Type.Object(
{
@@ -167,12 +198,12 @@ export function createReadAssetTool(
label: 'Read Asset',
description:
'Inspects and reads the content of an asset in the workspace. ' +
'Supports visual analysis for images, video frame extraction, PDF page rendering, and direct text reading for text/markdown files. ' +
'Pass assetId, and provide the specific config (imageConfig, videoConfig, or docConfig) while setting unused configs to null. ' +
'Supports visual analysis for images, 3D models (overview or specific degree angle), video frame extraction, PDF page rendering, and direct text reading for text/markdown files. ' +
'Pass assetId, and provide the specific config (imageConfig, config3d, videoConfig, or docConfig) while setting unused configs to null. ' +
'Optionally provide annotationId to view visual markups drawn on the asset.',
parameters: readAssetSchema,
execute: async (_toolCallId, params) => {
const { assetId, annotationId, s3KeyOnly, videoConfig, docConfig } = params
const { assetId, annotationId, s3KeyOnly, config3d, videoConfig, docConfig } = params
if (agentType === 'autofill' && !userId) {
if (!targetAssetId) {
@@ -243,6 +274,209 @@ export function createReadAssetTool(
const filename = asset.name?.toLowerCase() || ''
const bucket = process.env.S3_BUCKET || 'shumai'
// ----------------------------------------------------------------------
// Branch 0: 3D Assets (Orthogonal 4-View Composite Image or Degree Angle)
// ----------------------------------------------------------------------
const is3d = proxyType === '3d' || is3dModel(mediaType, filename)
if (is3d) {
if (videoConfig) {
throw new Error(
`Asset ${asset.id} is a 3D model. To inspect specific angles pass 'config3d: { degree: ... }'; do not pass videoConfig.`,
)
}
if (config3d?.degree !== undefined && config3d?.degree !== null) {
if (!isValidTurntableDegree(config3d.degree)) {
throw new Error(
`Invalid turntable degree: ${config3d.degree}. Degree must be an integer multiple of 15 between 0 and 345 (e.g. 0, 15, 30, 45, ..., 345).`,
)
}
}
let annotations: PrismaJson.AnnotationList | null = null
let commentTimestamp: number | null = null
if (annotationId) {
const resolved = await resolveAnnotationsById(asset.id, annotationId)
annotations = resolved.annotations
commentTimestamp = resolved.timestamp
if (commentTimestamp !== null && commentTimestamp !== undefined) {
const commentDegree = secondToDegree(commentTimestamp)
if (
config3d?.degree !== undefined &&
config3d?.degree !== null &&
config3d.degree !== commentDegree
) {
throw new Error(
`Annotation "${annotationId}" was drawn at ${commentDegree}°, but degree ${config3d.degree}° was specified. Do not pass a conflicting degree with annotationId.`,
)
}
}
}
if ((config3d?.degree !== undefined && config3d?.degree !== null) || annotationId) {
if (!mediaInfo?.videoTranscodes || mediaInfo.videoTranscodes.length === 0) {
throw new Error(
`Asset ${asset.id} is a 3D model, but its turntable video (turntable.mp4) is missing.`,
)
}
let targetDegree: number
let targetSecond: number
if (config3d?.degree !== undefined && config3d?.degree !== null) {
targetDegree = config3d.degree
targetSecond = degreeToSecond(targetDegree)
} else {
targetSecond =
commentTimestamp !== null && commentTimestamp !== undefined ? commentTimestamp : 0
targetDegree = secondToDegree(targetSecond)
}
const task = await prisma.workflowTask.create({
data: {
assetId: asset.id,
projectId: asset.projectId || 'none',
type: WorkflowTaskType.transcode_screenshot,
status: WorkflowTaskStatus.pending,
payload: {
projectId: asset.projectId || 'none',
screenshot: {
start: targetSecond,
end: targetSecond,
count: 1,
commentTimestamp: targetSecond,
annotations: annotations ?? undefined,
},
},
},
})
const completedTask = await workflowService.executeWait(task)
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- transcode screenshot output
const output = completedTask.output as any
const screenshots = output?.screenshots as
| Array<{ key: string; timestamp: number }>
| undefined
if (!screenshots || screenshots.length === 0) {
throw new Error(
`Failed to extract 3D turntable frame for asset ${asset.id} at ${targetDegree}°.`,
)
}
const shotKey = screenshots[0].key
const downloadUrl = await s3Service.presign(
bucket,
shotKey,
'GET',
true,
asset.name || undefined,
)
const content: Array<TextContent | ImageContent> = []
const hasMarkup = Boolean(annotations && annotations.length > 0)
const textDescription = hasMarkup
? `3D asset "${asset.name}" (ID: ${asset.id}, S3 Key: "${shotKey}") view at ${targetDegree}° with visual markups overlaid:`
: `3D asset "${asset.name}" (ID: ${asset.id}, S3 Key: "${shotKey}") view at ${targetDegree}°:`
if (s3KeyOnly) {
content.push({
type: 'text',
text: textDescription,
})
} else {
const { buffer, contentType } = await s3Service.getObject(bucket, shotKey)
const actualMimeType =
contentType && contentType !== 'application/octet-stream' ? contentType : 'image/webp'
content.push({
type: 'text',
text: textDescription,
})
content.push({
type: 'image',
data: buffer.toString('base64'),
mimeType: actualMimeType,
})
}
return {
content,
details: {
assetId: asset.id,
name: asset.name,
mediaType: asset.mediaType,
key: shotKey,
downloadUrl,
sourceKeys: [shotKey],
},
}
}
if (!mediaInfo?.imageTranscodes || mediaInfo.imageTranscodes.length === 0) {
throw new Error(
`Asset ${asset.id} is a 3D model, but its 4-views image (views.webp) is missing.`,
)
}
const mediaKey = mediaInfo.imageTranscodes[0].key
if (!mediaKey) {
throw new Error(`Asset ${asset.id} is a 3D model, but its 4-views image key is missing.`)
}
const keyToUse = mediaKey
const mimeType = 'image/webp'
const downloadUrl = await s3Service.presign(
bucket,
keyToUse,
'GET',
true,
asset.name || undefined,
)
const content: Array<TextContent | ImageContent> = []
const textDescription = [
`3D asset "${asset.name}" (ID: ${asset.id}, MIME: ${mimeType}, S3 Key: "${keyToUse}"):`,
'Orthogonal 4-view composite image (2x2 grid across 360° rotation):',
'- Top-Left quadrant: Front view (0°)',
'- Top-Right quadrant: Right side view (90°)',
'- Bottom-Left quadrant: Back view (180°)',
'- Bottom-Right quadrant: Left side view (270°)',
].join('\n')
if (s3KeyOnly) {
content.push({
type: 'text',
text: textDescription,
})
} else {
const { buffer, contentType } = await s3Service.getObject(bucket, keyToUse)
const actualMimeType =
contentType && contentType !== 'application/octet-stream' ? contentType : mimeType
content.push({
type: 'text',
text: textDescription,
})
content.push({
type: 'image',
data: buffer.toString('base64'),
mimeType: actualMimeType,
})
}
return {
content,
details: {
assetId: asset.id,
name: asset.name,
mediaType: asset.mediaType,
key: keyToUse,
downloadUrl,
sourceKeys: [keyToUse],
},
}
}
// ----------------------------------------------------------------------
// Branch 1: Image Assets
// ----------------------------------------------------------------------
@@ -129,6 +129,42 @@ describe('createReadThreadTool', () => {
expect(textContent).toContain('- [Ai Agent] (id: reply-1, has_markup: false): Agent answer')
})
it('should format 3d asset comment timestamps as degree: X°', async () => {
vi.mocked(prisma.assetComment.findUnique).mockResolvedValue({
id: 'root-3d',
message: 'Notice this angle',
creator: { name: 'Alice' },
second: 0.5,
annotation: [{ type: 'box' }],
asset: {
media: { proxyType: '3d' },
mediaType: 'model/gltf-binary',
name: 'robot.glb',
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} as any)
vi.mocked(prisma.assetComment.findMany).mockResolvedValue([
{
id: 'reply-3d-1',
message: 'Looking at back side',
creator: { name: 'Bob' },
second: 2.0,
},
// eslint-disable-next-line @typescript-eslint/no-explicit-any
] as any)
const tool = createReadThreadTool()
const result = await tool.execute('call-3d', { threadId: 'root-3d' })
const textContent = (result.content[0] as { text: string }).text
expect(textContent).toContain(
'Thread Root [Alice] (id: root-3d, degree: 45°, has_markup: true): Notice this angle',
)
expect(textContent).toContain(
'- [Bob] (id: reply-3d-1, degree: 180°, has_markup: false): Looking at back side',
)
})
it('should describe threadId parameter as referencing <thread id="..." /> in <context>', () => {
const tool = createReadThreadTool()
// eslint-disable-next-line @typescript-eslint/no-explicit-any
+26 -9
View File
@@ -1,6 +1,8 @@
import { prisma } from '@shumai/db'
import { Type } from 'typebox'
import { type AgentTool } from '@earendil-works/pi-agent-core'
import { secondToDegree } from '@shumai/core/src/utils/model3d'
import { getProxyType } from '@shumai/core/src/utils/mime'
const readThreadSchema = Type.Object({
threadId: Type.String({
@@ -9,14 +11,21 @@ const readThreadSchema = Type.Object({
}),
})
function formatCommentMeta(c: {
id: string
second?: number | null
annotation?: unknown
}): string {
function formatCommentMeta(
c: {
id: string
second?: number | null
annotation?: unknown
},
proxyType?: string,
): string {
const parts = [`id: ${c.id}`]
if (c.second !== null && c.second !== undefined) {
parts.push(`time: ${c.second}s`)
if (proxyType === '3d') {
parts.push(`degree: ${secondToDegree(c.second)}°`)
} else {
parts.push(`time: ${c.second}s`)
}
}
const hasMarkup = Boolean(c.annotation && Array.isArray(c.annotation) && c.annotation.length > 0)
parts.push(`has_markup: ${hasMarkup}`)
@@ -34,7 +43,10 @@ export const createReadThreadTool = (): AgentTool<
execute: async (_toolCallId, params) => {
const rootComment = await prisma.assetComment.findUnique({
where: { id: params.threadId },
include: { creator: true },
include: {
creator: true,
asset: { select: { media: true, mediaType: true, name: true } },
},
})
if (!rootComment) {
@@ -61,9 +73,14 @@ export const createReadThreadTool = (): AgentTool<
include: { creator: true },
})
const proxyType =
(rootComment.asset?.media as PrismaJson.MediaInfo | null)?.proxyType ||
getProxyType(rootComment.asset?.mediaType, rootComment.asset?.name) ||
undefined
const isRootAgent = rootComment.creator?.type === 'agent' || rootComment.sessionId !== null
const rootAuthor = rootComment.creator?.name || (isRootAgent ? 'Ai Agent' : 'User')
const rootMeta = formatCommentMeta(rootComment)
const rootMeta = formatCommentMeta(rootComment, proxyType)
let output = `Thread Root [${rootAuthor}] ${rootMeta}: ${rootComment.message || ''}\n\nReplies (${replies.length}):`
if (replies.length === 0) {
@@ -72,7 +89,7 @@ export const createReadThreadTool = (): AgentTool<
for (const reply of replies) {
const isAgent = reply.creator?.type === 'agent' || reply.sessionId !== null
const author = reply.creator?.name || (isAgent ? 'Ai Agent' : 'User')
const replyMeta = formatCommentMeta(reply)
const replyMeta = formatCommentMeta(reply, proxyType)
output += `\n- [${author}] ${replyMeta}: ${reply.message || ''}`
}
}
@@ -806,4 +806,89 @@ describe('Agent Chat Workflow', () => {
}),
)
})
it('should format mediaPosition as degree for 3D assets in 1-on-1 chat', async () => {
mockActivities.getAssetActivity.mockResolvedValue({
id: 'a-3d',
project: { teamId: 't1' },
type: 'file',
name: 'model.glb',
mediaType: 'model/gltf-binary',
media: { proxyType: '3d' },
parentId: null,
})
const task = await prisma.workflowTask.create({
data: {
type: 'chat',
status: 'pending',
assetId: 'a-3d',
payload: {
projectId: 'p1',
agent: {
agentId: 'b1',
prompt: 'Look at this angle',
sessionId: 'session-3d-1',
second: 0.5, // 0.5s turntable time = 45°
},
},
},
})
await agentChat(task)
expect(mockActivities.agentChatActivity).toHaveBeenCalledWith(
expect.objectContaining({
messageContext: expect.objectContaining({
position: { type: 'degree', degree: 45 },
}),
}),
)
})
it('should format mediaPosition as degree for 3D assets in comment mode', async () => {
mockActivities.getAssetActivity.mockResolvedValue({
id: 'a-3d',
project: { teamId: 't1' },
type: 'file',
name: 'model.glb',
mediaType: 'model/gltf-binary',
media: { proxyType: '3d' },
parentId: null,
})
mockActivities.getCommentActivity.mockResolvedValue({
id: 'comment-3d-1',
creatorId: 'user-c1',
message: 'Look at the back',
replyToId: null,
second: 2.0, // 2.0s = 180°
attachments: [],
})
const task = await prisma.workflowTask.create({
data: {
type: 'chat',
status: 'pending',
assetId: 'a-3d',
payload: {
projectId: 'p1',
agent: {
agentId: 'b1',
userCommentId: 'comment-3d-1',
},
},
},
})
await agentChat(task)
expect(mockActivities.agentChatActivity).toHaveBeenCalledWith(
expect.objectContaining({
messageContext: expect.objectContaining({
position: { type: 'degree', degree: 180 },
}),
}),
)
})
})
+4 -1
View File
@@ -8,6 +8,7 @@ import type {
ShumaiMediaPosition,
} from '@shumai/dtos'
import { getProxyType } from '@shumai/core/src/utils/mime'
import { secondToDegree } from '@shumai/core/src/utils/model3d'
export async function agentChat(task: WorkflowTask): Promise<void> {
const {
@@ -273,7 +274,9 @@ export async function agentChat(task: WorkflowTask): Promise<void> {
// Build position
let mediaPosition: ShumaiMediaPosition | undefined
if (commentTimestamp !== undefined && commentTimestamp !== null) {
if (proxyType === 'pdf') {
if (proxyType === '3d') {
mediaPosition = { type: 'degree', degree: secondToDegree(commentTimestamp) }
} else if (proxyType === 'pdf') {
mediaPosition = { type: 'page', page: Math.round(commentTimestamp) }
} else {
mediaPosition = { type: 'time', seconds: commentTimestamp }
@@ -211,6 +211,68 @@ describe('Agent Embedding Workflow', () => {
})
})
it('should run agent embedding workflow successfully for 3D asset using 4-views image', async () => {
mockActivities.getEmbeddingContextActivity.mockResolvedValue({
agent: { id: 'b1' },
asset: {
id: 'model-1',
mediaType: 'model/gltf-binary',
storageKey: { key: 'raw/model.glb' },
media: {
proxyType: '3d',
imageTranscodes: [{ key: 'files/views.webp', format: 'webp' }],
},
},
chunkDuration: 60.0,
chunkOverlap: 5.0,
})
const task = await prisma.workflowTask.create({
data: {
type: 'ai_embedding',
status: 'pending',
assetId: 'model-1',
teamId: 't1',
},
})
await agentEmbeddingMedia(task)
expect(mockActivities.generateImageEmbeddingActivity).toHaveBeenCalledWith({
teamId: 't1',
assetKey: 'files/views.webp',
mediaType: 'image/webp',
})
})
it('should reject 3D asset for embeddings if imageTranscodes is missing', async () => {
mockActivities.getEmbeddingContextActivity.mockResolvedValue({
agent: { id: 'b1' },
asset: {
id: 'model-1',
mediaType: 'model/gltf-binary',
storageKey: { key: 'raw/model.glb' },
media: {
proxyType: '3d',
imageTranscodes: [],
},
},
})
const task = await prisma.workflowTask.create({
data: {
type: 'ai_embedding',
status: 'pending',
assetId: 'model-1',
teamId: 't1',
},
})
await expect(agentEmbeddingMedia(task)).rejects.toThrow(
'unsupported media type for embeddings: model/gltf-binary',
)
})
it('should run agent embedding workflow successfully for video in chunks', async () => {
mockActivities.getEmbeddingContextActivity.mockResolvedValue({
agent: { id: 'b1' },

Some files were not shown because too many files have changed in this diff Show More