maravilla-media-transforms
Installation
SKILL.md
Maravilla media transforms
Async media + document processing jobs that derive new storage objects from existing ones — video transcode, image resize, OCR, document → PDF / HTML / Markdown / thumbnails, image-replacement templating, QR injection. The runtime exposes two equivalent paths:
- Declarative — list patterns in
maravilla.config.tsundertransforms. The adapter compiles each entry into a syntheticonStorage({ keyPattern, op: 'put' })handler that fires every transform inPromise.allwhenever a matching key lands. Default for all "every upload of type X gets these renditions" cases. - Imperative — call
platform.media.transforms.transcode/thumbnail/resize/ocr/probe(...)from a route or event handler. For one-off jobs, on-demand re-derivation, or when the source key isn't predictable from a pattern.
Both paths return a JobHandle whose output_key is deterministic — content-addressed via keyFor(srcKey, spec). Clients can render placeholder UI for the derived asset before the worker even starts.
Declarative: transforms in maravilla.config.ts
import { defineConfig } from '@maravilla-labs/platform/config';