* feat(operations): add create_project operation across agent, mcp, and cli
* fix(api): remove legacy team creation endpoint
* fix(api): preserve ProjectInfo response on POST /teams/:teamId/projects
* feat(operations): move MCP to /mcp and add search, comment, metadata, version, and upload operations
- Serve the MCP server at /mcp instead of /api/mcp
- Add search_assets, copy_assets, get_folder_instructions, list_comments,
create_comment, resolve_comment, list_metadata_fields,
update_asset_metadata, create_version_stack, list_versions, and
remove_version on the agent, MCP, and CLI
- Add create_file and create_version (agent, MCP) with Creation Context
metadata, and complete_upload (MCP) for presigned two-step uploads
- Replace the native agent create_file/create_version tools with
Operation-backed ones
- Route the comment-complete, metadata, copy, version stack, and
AGENTS.md read REST endpoints through their Operations
* docs(readme): add built-in MCP server and CLI to features list
* feat(asset-read): expose read_asset on MCP and the CLI
Enable the mcp and cli surfaces for read_asset and get_asset_render.
- MCP: add per-Operation tool extensions. The read presenter attaches up
to 8 images (2 MB each) inline, lists image links, supports
inlineImages: false, and tells the model to call get_asset_render when
a render is pending. Storage keys are stripped from the result.
- CLI: generated commands can flatten object inputs into prefixed flags
(cli.flatten) and omit fields (cli.omit); add per-command extensions.
New `read` and `render` commands print image links, download them with
--out, and support --no-wait with a printed `render <taskId>` hint.
- Round frame timestamps in labels to 3 decimals.
* fix(mcp): make tool input schemas portable to single-type dialects
Nullable inputs were emitted as `type: ["number", "null"]` (or a `null`
anyOf branch), which clients that map tool schemas onto an OpenAPI-style
subset (e.g. Gemini function declarations) may reject.
- Make read_asset's startPage, endPage, and degree optional instead of
nullable.
- Move null handling into a shared dropNullOptionals helper in
@shumai/operations that also strips nulls inside nested config
objects. The agent uses it, and the MCP server applies it before the
SDK validates arguments, so models that send null keep working.
- Test that no Operation input schema (and no listed MCP tool) uses a
nullable type.
* feat(asset-download): share download_asset across agent, MCP and CLI
Turn the agent-only download_asset tool into an Operation on all three
surfaces.
- download_asset takes up to 50 file or version stack IDs and returns
presigned links. proxy (default true) picks the web preview when there
is one, as the agent always did; proxy: false returns the original.
Folders are rejected. Read is checked on every ID before anything runs.
- Agent: an extension saves the files into the .pi sandbox and keeps the
agent-only storage key mode (e.g. frames from read_asset). Agent tool
extensions gain description, parameterOverrides and intercept.
- CLI: `shumai-cli download <assetId...> [--out <dir>] [--original]`
streams files to disk without overwriting existing names.
- read_asset's unsupported-type error now names the right way to
download on each surface (download_asset, or `shumai-cli download`).
- Add the Download Asset toggle to agent settings.
Replace the monolithic agent read_asset tool with a reader registry in
@shumai/core/src/asset-read (model3d, image, video, document) behind a
shared pipeline that handles access checks, version stacks, annotations,
render tasks, and waiting.
- Add read_asset and get_asset_render Operations (agent surface only).
Renders that outlast the caller's wait budget return "pending" with the
workflow task ID; the read request is stored on the task payload so
get_asset_render works across restarts and instances (requester only).
- Add workflowService.waitFor and presign expiry support.
- Keep agent output compatible via an agent tool extension (s3KeyOnly,
image blocks, session image details); autofill keeps its team-scoped tool.
- Cap video frames at 20 per call; add the get_asset_render agent toggle.
Introduce @shumai/operations (pure definitions: Zod schemas, metadata,
CLI hints) and @shumai/core/src/operations (implementOperation and the
runOperation pipeline: validate, authorize, prepare, execute, validate
output, audit).
Migrate list_assets, create_folder, rename_asset, move_assets and
delete_asset to Operations, and add list_projects. The agent now builds
these tools from the registry, and the folder create/rename, file
rename and reparent routes call the same Operations.
Audit logs gain a nullable via column recording the surface. A lint
rule keeps the Prisma client out of Operation implementations.
- Upgrade Bun to 1.4.4 across Dockerfiles, CI workflows, and release configurations.
- Update @types/bun and bun-types.
- Remove eslint-plugin-prettier and update format script to use native bun fmt.
- Configure .prettierignore to exclude packages/webui/public and minified files.
* fix(transcode): ensure durable file exchange and crash recovery across workflow steps
* fix(transcode): recognize AWS SDK NoSuchKey by name and add workflow E2E recovery test
* feat(workflow): migrate workflow engine from temporal to dbos
Replace Temporal and LocalExecutor with DBOS Transact (@dbos-inc/dbos-sdk) as the unified workflow engine. Background tasks, media transcoding, and AI agent workflows now execute with durable steps and task queues directly against PostgreSQL, eliminating the need for an external Temporal cluster and separate polling executors.
* fix(workflow): submit tasks via DBOSClient to allow enqueueing from steps
Enqueuing workflows using DBOS.enqueueWorkflowWithOptions threw a
DBOSInvalidWorkflowTransitionError when triggered from within a running
step or activity (e.g. creating embedding or autofill tasks during
video transcoding).
Use DBOSClient to submit and cancel workflow tasks directly against the
system database, detaching execution from the ambient workflow/step
context.
* feat(web): support SHUMAI_WORKERS environment variable
* fix(workflow): ensure CLI tasks are enqueued to DBOS and run DBOS migrations in global setup
- Initialize workflows and wait for pending DBOS submissions in shumai regenerate-embeddings CLI
- Remove no-op submit bypass and enqueue tasks via DBOSClient in producer and CLI contexts
- Add DBOS migration runner in test global setup to avoid concurrent migration deadlocks across test forks
- Update changelog and add regression tests
* fix(workflow): ensure unique per-instance executor identity for worker replicas
- Derive unique per-instance DBOS executor IDs across worker replicas
- Support SHUMAI_WORKER_ID, DBOS__VMID, and POD_NAME (Kubernetes Downward API)
- Disambiguate multi-replica bare metal/container deployments with host, PID, and instance suffix
- Prevent startup recovery from re-enqueueing workflows actively executed by other live workers
- Add multi-instance startup recovery tests and update deployment documentation
* fix(workflow): only register listened queues and update concurrency on change
- Only register queues that the executor instance actively listens to
- Use always_update conflict resolution so environment variable changes take effect on restart
- Prevent dedicated workers from overwriting unmanaged queue concurrency configurations
- Add tests verifying concurrency updates and queue isolation across worker roles
* refactor(workflow): simplify activities to use defineStep and direct calls (#482)
* refactor(workflow): simplify activities to use defineStep and direct calls
- Wrap activities using defineStep from @shumai/workflow-core
- Remove obsolete getActivities, registerActivities, dynamic activity proxies, and workerQueue arguments
- Remove executor.ts and registry.ts, consolidating workflow registration into workflow.ts
- Call activities directly across transcode and agent workflows
- Update all corresponding workflow tests and developer guide documentation
* fix(workflow): properly detect DBOSWorkflowCancelledError in runOnCancel fallback
- DBOSWorkflowCancelledError in DBOS SDK does not set name, inheriting 'Error'
- Implement isDbosWorkflowCancelledError checking instanceof, constructor.name, and dbosErrorCode
- Update unit tests to verify real DBOS SDK cancellation error instances
* docs(workflow): update documentation and readme for dbos migration
- Rename docs/configuration/temporal.mdx to docs/configuration/distributed.mdx
- Document DBOS-based distributed worker architecture and task queues
- Remove obsolete docker-compose/temporal/
- Update environment variables documentation in docs/configuration/env-variables.mdx
- Update references in README.md, README_CN.md, docs/docs.json, and related guides
* feat(deploy): implement KEDA ScaledJob and scale-to-zero On-Demand transcoding (#483)
* feat(deploy): add shumai-transcode docker image and k8s autoscaling example with garage s3
* docs(k8s): document port-forwarding and in-cluster s3 domain mapping
* feat(storage): support public s3 endpoint for browser uploads and update k8s example
* fix(k8s): configure s3 bucket cors rules in garage initialization
* fix(k8s): increase transcode worker memory limit to 4Gi for 4K video encoding
* feat(deploy): add AWS EKS deployment with Graviton3 Spot nodegroups and autoscaling
* docs(deploy): redesign EKS documentation, rename k8s to eks, and add scalable deployment feature
* docs: rephrase DBOS feature bullet to Durable Workflows via DBOS
* docs(eks): upgrade default instances to Graviton5 c9g.large and c9g.xlarge
* feat(eks): use On-Demand for general nodegroup and add spot capacity diversification
* docs(eks): fix Architecture diagram to locate all transcode worker pods in Transcode Compute Pool
* feat(deploy): implement KEDA ScaledJob and scale-to-zero On-Demand transcoding
* feat(transcode): support idle-timeout auto-drain for KEDA scaled jobs
* fix(deploy): fix EKS deployment manifests and documentation based on cluster verification
* feat(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
* 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
Split the monolithic test:e2e script into:
- test:e2e:app: fullstack web app e2e (playwright --project=app-chromium)
- test:e2e:webui: harness UI integration tests
(E2E_SKIP_APP_SERVER=true --project=harness-chromium)
Remove the now-unused test:e2e:ui and test:e2e:report scripts, and update
the AGENTS.md submission rules and e2e README to reference the new
commands.
* feat(webui): remove original-file display fallbacks, use proxies only
WebUI now never uses the raw original file for display. All viewers
(image, video, compare, pdf) render exclusively from transcoded proxies;
when no proxy exists the viewer shows an unavailable placeholder instead
of falling back to media.original.
- getBestTranscode: drop the isRaw fallback candidates
- video-viewer / compare-video-pane: remove the synthetic 'Original'
resolution entry and the original.downloadUrl hasMedia gate
- image-viewer / compare-image-pane: remove original.downloadUrl default
- pdf-viewer: require pdfTranscode.url (no original fallback)
- download menus (video-control-bar, breadcrumb-nav): use
media.original.key for the 'Original' download option instead of the
isRaw transcode marker entry
Backend:
- transcode-video workflow no longer pushes the isRaw:true marker entry
into videoTranscodes (it pointed at the original file key)
- remove media.original.downloadUrl from the DTO, asset service mapping,
MediaInfo DB type, and transcode workflows/activities (it was only
consumed by the removed display fallbacks; downloads already use key
via the download-url endpoints)
Tests/fixtures updated; docs updated to state the proxy-only display
policy.
* refactor: remove isRaw field via data migration, clean legacy media JSON
Add a Prisma data migration that cleans legacy media JSONB on both
assets and watermark_files:
- drop the raw-original marker entries (isRaw: true) from
videoTranscodes / imageTranscodes — they pointed at the original file
key and were only used by the removed display fallbacks / download
menus, which now use media.original.key directly
- strip the isRaw field from remaining transcode entries
- drop original.downloadUrl (removed from the AssetInfo DTO)
The migration is generated via prisma migrate dev --create-only and
applied automatically by migrate deploy in production. It is guarded by
a test (packages/db/src/clean-media-migration.test.ts) that seeds legacy
media JSON, runs the migration SQL, and asserts the transform on both
tables.
With the data cleaned, remove the isRaw field entirely from the codebase:
- DTO schemas + ImageTranscode/VideoTranscode interfaces
- PrismaJson MediaInfo transcode types
- watermark activity isRaw skip (and its test), watermark proxy mapping,
agent-embedding transcode selection, webui transcode filters, and all
test fixtures
AGENTS.md: clarify that the no-manual-migration rule applies to DDL;
data migrations (pure SQL transforms, no schema change) are allowed
inside a --create-only generated migration and must be tested.
Add six domain-level web app e2e tests covering team member removal,
file upload/delete/restore, share link creation and password protection,
and collection creation. Introduce a parametrized 'file' fixture with
configurable media types (text/binary/image/video/pdf) for future
type-scoped tests, plus helpers for share APIs and team member seeding.
Also document all web app e2e test cases in apps/web/e2e/README.md and
require this documentation in AGENTS.md.
Add a Compare Versions mode to the file detail page (authenticated and
public share) that splits the viewer into two 50/50 panes showing two
versions side by side.
- Breadcrumb file menu gains a Compare Versions entry (version stacks
with >=2 versions); the file segment is hidden in compare mode.
- URL-driven state (compare/cmpLeft/cmpRight/cmpActive) on both file
routes so the view is refresh/share-safe.
- Per-side topbar with filename, version, version-switch dropdown, an
active-side highlight, and an X exit button.
- Shared control bar reflects the active pane; for same-type media it
coordinates both panes (play/pause, seek, frame-step, zoom, pan sync),
seekbar length matches the active side while the shorter side holds its
last frame; only the active side plays audio; resolution/download apply
to the active side; fullscreen covers the whole compare view.
- Right sidebar (comments/fields) binds to the active side; comment
selection seeks the active pane and annotations/comments can be created.
- Reuses useFramePlayer + DrawingCanvas without modifying the existing
single-file video player.
- Unit tests for compare selection/clamp logic.