transloadit 4.7.4 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +915 -5
- package/dist/Transloadit.d.ts +3 -3
- package/dist/Transloadit.d.ts.map +1 -1
- package/dist/Transloadit.js +2 -2
- package/dist/Transloadit.js.map +1 -1
- package/dist/alphalib/assembly-linter.js +1 -1
- package/dist/alphalib/assembly-linter.js.map +1 -1
- package/dist/alphalib/stepParsing.js +2 -2
- package/dist/alphalib/stepParsing.js.map +1 -1
- package/dist/alphalib/types/assembliesGet.d.ts +5 -0
- package/dist/alphalib/types/assembliesGet.d.ts.map +1 -1
- package/dist/alphalib/types/assemblyReplay.d.ts +7 -7860
- package/dist/alphalib/types/assemblyReplay.d.ts.map +1 -1
- package/dist/alphalib/types/assemblyReplayNotification.d.ts +7 -7860
- package/dist/alphalib/types/assemblyReplayNotification.d.ts.map +1 -1
- package/dist/alphalib/types/assemblyStatus.d.ts +4822 -313
- package/dist/alphalib/types/assemblyStatus.d.ts.map +1 -1
- package/dist/alphalib/types/assemblyStatus.js +40 -2
- package/dist/alphalib/types/assemblyStatus.js.map +1 -1
- package/dist/alphalib/types/bill.d.ts +5 -0
- package/dist/alphalib/types/bill.d.ts.map +1 -1
- package/dist/alphalib/types/builtinTemplates.d.ts +83 -0
- package/dist/alphalib/types/builtinTemplates.d.ts.map +1 -0
- package/dist/alphalib/types/builtinTemplates.js +19 -0
- package/dist/alphalib/types/builtinTemplates.js.map +1 -0
- package/dist/alphalib/types/robots/_index.d.ts +903 -72620
- package/dist/alphalib/types/robots/_index.d.ts.map +1 -1
- package/dist/alphalib/types/robots/_index.js +62 -11
- package/dist/alphalib/types/robots/_index.js.map +1 -1
- package/dist/alphalib/types/robots/_instructions-primitives.d.ts +41 -10
- package/dist/alphalib/types/robots/_instructions-primitives.d.ts.map +1 -1
- package/dist/alphalib/types/robots/_instructions-primitives.js +89 -3
- package/dist/alphalib/types/robots/_instructions-primitives.js.map +1 -1
- package/dist/alphalib/types/robots/ai-chat.d.ts +33 -0
- package/dist/alphalib/types/robots/ai-chat.d.ts.map +1 -1
- package/dist/alphalib/types/robots/ai-chat.js +28 -4
- package/dist/alphalib/types/robots/ai-chat.js.map +1 -1
- package/dist/alphalib/types/robots/assembly-savejson.d.ts.map +1 -1
- package/dist/alphalib/types/robots/assembly-savejson.js +8 -0
- package/dist/alphalib/types/robots/assembly-savejson.js.map +1 -1
- package/dist/alphalib/types/robots/audio-artwork.d.ts.map +1 -1
- package/dist/alphalib/types/robots/audio-artwork.js +4 -5
- package/dist/alphalib/types/robots/audio-artwork.js.map +1 -1
- package/dist/alphalib/types/robots/audio-concat.d.ts.map +1 -1
- package/dist/alphalib/types/robots/audio-concat.js +1 -2
- package/dist/alphalib/types/robots/audio-concat.js.map +1 -1
- package/dist/alphalib/types/robots/audio-encode.d.ts.map +1 -1
- package/dist/alphalib/types/robots/audio-encode.js +1 -2
- package/dist/alphalib/types/robots/audio-encode.js.map +1 -1
- package/dist/alphalib/types/robots/audio-loop.d.ts.map +1 -1
- package/dist/alphalib/types/robots/audio-loop.js +1 -2
- package/dist/alphalib/types/robots/audio-loop.js.map +1 -1
- package/dist/alphalib/types/robots/audio-merge.d.ts.map +1 -1
- package/dist/alphalib/types/robots/audio-merge.js +1 -2
- package/dist/alphalib/types/robots/audio-merge.js.map +1 -1
- package/dist/alphalib/types/robots/audio-split.d.ts +2936 -0
- package/dist/alphalib/types/robots/audio-split.d.ts.map +1 -0
- package/dist/alphalib/types/robots/audio-split.js +88 -0
- package/dist/alphalib/types/robots/audio-split.js.map +1 -0
- package/dist/alphalib/types/robots/audio-waveform.d.ts +92 -6
- package/dist/alphalib/types/robots/audio-waveform.d.ts.map +1 -1
- package/dist/alphalib/types/robots/audio-waveform.js +72 -6
- package/dist/alphalib/types/robots/audio-waveform.js.map +1 -1
- package/dist/alphalib/types/robots/azure-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/azure-import.js +0 -1
- package/dist/alphalib/types/robots/azure-import.js.map +1 -1
- package/dist/alphalib/types/robots/azure-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/azure-store.js +0 -1
- package/dist/alphalib/types/robots/azure-store.js.map +1 -1
- package/dist/alphalib/types/robots/backblaze-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/backblaze-import.js +0 -1
- package/dist/alphalib/types/robots/backblaze-import.js.map +1 -1
- package/dist/alphalib/types/robots/backblaze-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/backblaze-store.js +0 -1
- package/dist/alphalib/types/robots/backblaze-store.js.map +1 -1
- package/dist/alphalib/types/robots/box-import.d.ts +150 -0
- package/dist/alphalib/types/robots/box-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/box-import.js +63 -0
- package/dist/alphalib/types/robots/box-import.js.map +1 -0
- package/dist/alphalib/types/robots/box-store.d.ts +455 -0
- package/dist/alphalib/types/robots/box-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/box-store.js +66 -0
- package/dist/alphalib/types/robots/box-store.js.map +1 -0
- package/dist/alphalib/types/robots/cloudfiles-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/cloudfiles-import.js +0 -1
- package/dist/alphalib/types/robots/cloudfiles-import.js.map +1 -1
- package/dist/alphalib/types/robots/cloudfiles-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/cloudfiles-store.js +0 -1
- package/dist/alphalib/types/robots/cloudfiles-store.js.map +1 -1
- package/dist/alphalib/types/robots/cloudflare-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/cloudflare-import.js +0 -1
- package/dist/alphalib/types/robots/cloudflare-import.js.map +1 -1
- package/dist/alphalib/types/robots/cloudflare-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/cloudflare-store.js +0 -1
- package/dist/alphalib/types/robots/cloudflare-store.js.map +1 -1
- package/dist/alphalib/types/robots/digitalocean-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/digitalocean-import.js +0 -1
- package/dist/alphalib/types/robots/digitalocean-import.js.map +1 -1
- package/dist/alphalib/types/robots/digitalocean-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/digitalocean-store.js +0 -1
- package/dist/alphalib/types/robots/digitalocean-store.js.map +1 -1
- package/dist/alphalib/types/robots/document-autorotate.d.ts.map +1 -1
- package/dist/alphalib/types/robots/document-autorotate.js +8 -1
- package/dist/alphalib/types/robots/document-autorotate.js.map +1 -1
- package/dist/alphalib/types/robots/document-convert.d.ts +8 -8
- package/dist/alphalib/types/robots/document-convert.d.ts.map +1 -1
- package/dist/alphalib/types/robots/document-convert.js +9 -3
- package/dist/alphalib/types/robots/document-convert.js.map +1 -1
- package/dist/alphalib/types/robots/document-merge.d.ts.map +1 -1
- package/dist/alphalib/types/robots/document-merge.js +0 -1
- package/dist/alphalib/types/robots/document-merge.js.map +1 -1
- package/dist/alphalib/types/robots/document-ocr.d.ts.map +1 -1
- package/dist/alphalib/types/robots/document-ocr.js +0 -1
- package/dist/alphalib/types/robots/document-ocr.js.map +1 -1
- package/dist/alphalib/types/robots/document-optimize.d.ts.map +1 -1
- package/dist/alphalib/types/robots/document-optimize.js +0 -1
- package/dist/alphalib/types/robots/document-optimize.js.map +1 -1
- package/dist/alphalib/types/robots/document-split.d.ts.map +1 -1
- package/dist/alphalib/types/robots/document-split.js +9 -1
- package/dist/alphalib/types/robots/document-split.js.map +1 -1
- package/dist/alphalib/types/robots/document-thumbs.d.ts +12 -0
- package/dist/alphalib/types/robots/document-thumbs.d.ts.map +1 -1
- package/dist/alphalib/types/robots/document-thumbs.js +23 -4
- package/dist/alphalib/types/robots/document-thumbs.js.map +1 -1
- package/dist/alphalib/types/robots/dropbox-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/dropbox-import.js +0 -1
- package/dist/alphalib/types/robots/dropbox-import.js.map +1 -1
- package/dist/alphalib/types/robots/dropbox-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/dropbox-store.js +0 -1
- package/dist/alphalib/types/robots/dropbox-store.js.map +1 -1
- package/dist/alphalib/types/robots/edgly-deliver.d.ts.map +1 -1
- package/dist/alphalib/types/robots/edgly-deliver.js +8 -1
- package/dist/alphalib/types/robots/edgly-deliver.js.map +1 -1
- package/dist/alphalib/types/robots/file-compress.d.ts +12 -0
- package/dist/alphalib/types/robots/file-compress.d.ts.map +1 -1
- package/dist/alphalib/types/robots/file-compress.js +8 -1
- package/dist/alphalib/types/robots/file-compress.js.map +1 -1
- package/dist/alphalib/types/robots/file-decompress.d.ts +24 -0
- package/dist/alphalib/types/robots/file-decompress.d.ts.map +1 -1
- package/dist/alphalib/types/robots/file-decompress.js +30 -5
- package/dist/alphalib/types/robots/file-decompress.js.map +1 -1
- package/dist/alphalib/types/robots/file-filter.d.ts.map +1 -1
- package/dist/alphalib/types/robots/file-filter.js +23 -6
- package/dist/alphalib/types/robots/file-filter.js.map +1 -1
- package/dist/alphalib/types/robots/file-hash.d.ts +24 -0
- package/dist/alphalib/types/robots/file-hash.d.ts.map +1 -1
- package/dist/alphalib/types/robots/file-hash.js +23 -1
- package/dist/alphalib/types/robots/file-hash.js.map +1 -1
- package/dist/alphalib/types/robots/file-preview.d.ts +12 -0
- package/dist/alphalib/types/robots/file-preview.d.ts.map +1 -1
- package/dist/alphalib/types/robots/file-preview.js +8 -1
- package/dist/alphalib/types/robots/file-preview.js.map +1 -1
- package/dist/alphalib/types/robots/file-read.d.ts.map +1 -1
- package/dist/alphalib/types/robots/file-read.js +9 -1
- package/dist/alphalib/types/robots/file-read.js.map +1 -1
- package/dist/alphalib/types/robots/file-serve.d.ts +12 -0
- package/dist/alphalib/types/robots/file-serve.d.ts.map +1 -1
- package/dist/alphalib/types/robots/file-serve.js +38 -7
- package/dist/alphalib/types/robots/file-serve.js.map +1 -1
- package/dist/alphalib/types/robots/file-verify.d.ts.map +1 -1
- package/dist/alphalib/types/robots/file-verify.js +0 -1
- package/dist/alphalib/types/robots/file-verify.js.map +1 -1
- package/dist/alphalib/types/robots/file-virusscan.d.ts.map +1 -1
- package/dist/alphalib/types/robots/file-virusscan.js +5 -4
- package/dist/alphalib/types/robots/file-virusscan.js.map +1 -1
- package/dist/alphalib/types/robots/file-watermark.d.ts.map +1 -1
- package/dist/alphalib/types/robots/file-watermark.js +10 -0
- package/dist/alphalib/types/robots/file-watermark.js.map +1 -1
- package/dist/alphalib/types/robots/ftp-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/ftp-import.js +0 -1
- package/dist/alphalib/types/robots/ftp-import.js.map +1 -1
- package/dist/alphalib/types/robots/ftp-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/ftp-store.js +0 -1
- package/dist/alphalib/types/robots/ftp-store.js.map +1 -1
- package/dist/alphalib/types/robots/google-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/google-import.js +0 -1
- package/dist/alphalib/types/robots/google-import.js.map +1 -1
- package/dist/alphalib/types/robots/google-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/google-store.js +0 -1
- package/dist/alphalib/types/robots/google-store.js.map +1 -1
- package/dist/alphalib/types/robots/html-convert.d.ts.map +1 -1
- package/dist/alphalib/types/robots/html-convert.js +0 -1
- package/dist/alphalib/types/robots/html-convert.js.map +1 -1
- package/dist/alphalib/types/robots/http-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/http-import.js +0 -1
- package/dist/alphalib/types/robots/http-import.js.map +1 -1
- package/dist/alphalib/types/robots/image-bgremove.d.ts +8 -8
- package/dist/alphalib/types/robots/image-bgremove.d.ts.map +1 -1
- package/dist/alphalib/types/robots/image-bgremove.js +4 -2
- package/dist/alphalib/types/robots/image-bgremove.js.map +1 -1
- package/dist/alphalib/types/robots/image-copyrightdetect.d.ts +465 -0
- package/dist/alphalib/types/robots/image-copyrightdetect.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-copyrightdetect.js +136 -0
- package/dist/alphalib/types/robots/image-copyrightdetect.js.map +1 -0
- package/dist/alphalib/types/robots/image-describe.d.ts.map +1 -1
- package/dist/alphalib/types/robots/image-describe.js +0 -1
- package/dist/alphalib/types/robots/image-describe.js.map +1 -1
- package/dist/alphalib/types/robots/image-enhance.d.ts +502 -0
- package/dist/alphalib/types/robots/image-enhance.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-enhance.js +146 -0
- package/dist/alphalib/types/robots/image-enhance.js.map +1 -0
- package/dist/alphalib/types/robots/image-facedetect.d.ts.map +1 -1
- package/dist/alphalib/types/robots/image-facedetect.js +0 -1
- package/dist/alphalib/types/robots/image-facedetect.js.map +1 -1
- package/dist/alphalib/types/robots/image-generate.d.ts +4 -5
- package/dist/alphalib/types/robots/image-generate.d.ts.map +1 -1
- package/dist/alphalib/types/robots/image-generate.js +62 -8
- package/dist/alphalib/types/robots/image-generate.js.map +1 -1
- package/dist/alphalib/types/robots/image-merge.d.ts +12 -12
- package/dist/alphalib/types/robots/image-merge.d.ts.map +1 -1
- package/dist/alphalib/types/robots/image-merge.js +0 -1
- package/dist/alphalib/types/robots/image-merge.js.map +1 -1
- package/dist/alphalib/types/robots/image-ocr.d.ts.map +1 -1
- package/dist/alphalib/types/robots/image-ocr.js +0 -1
- package/dist/alphalib/types/robots/image-ocr.js.map +1 -1
- package/dist/alphalib/types/robots/image-optimize.d.ts +12 -0
- package/dist/alphalib/types/robots/image-optimize.d.ts.map +1 -1
- package/dist/alphalib/types/robots/image-optimize.js +16 -3
- package/dist/alphalib/types/robots/image-optimize.js.map +1 -1
- package/dist/alphalib/types/robots/image-resize.d.ts +20 -8
- package/dist/alphalib/types/robots/image-resize.d.ts.map +1 -1
- package/dist/alphalib/types/robots/image-resize.js +37 -1
- package/dist/alphalib/types/robots/image-resize.js.map +1 -1
- package/dist/alphalib/types/robots/image-upscale.d.ts +447 -0
- package/dist/alphalib/types/robots/image-upscale.d.ts.map +1 -0
- package/dist/alphalib/types/robots/image-upscale.js +65 -0
- package/dist/alphalib/types/robots/image-upscale.js.map +1 -0
- package/dist/alphalib/types/robots/mega-import.d.ts +244 -0
- package/dist/alphalib/types/robots/mega-import.d.ts.map +1 -0
- package/dist/alphalib/types/robots/mega-import.js +84 -0
- package/dist/alphalib/types/robots/mega-import.js.map +1 -0
- package/dist/alphalib/types/robots/mega-store.d.ts +526 -0
- package/dist/alphalib/types/robots/mega-store.d.ts.map +1 -0
- package/dist/alphalib/types/robots/mega-store.js +82 -0
- package/dist/alphalib/types/robots/mega-store.js.map +1 -0
- package/dist/alphalib/types/robots/meta-read.d.ts.map +1 -1
- package/dist/alphalib/types/robots/meta-read.js +8 -0
- package/dist/alphalib/types/robots/meta-read.js.map +1 -1
- package/dist/alphalib/types/robots/meta-write.d.ts.map +1 -1
- package/dist/alphalib/types/robots/meta-write.js +0 -1
- package/dist/alphalib/types/robots/meta-write.js.map +1 -1
- package/dist/alphalib/types/robots/minio-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/minio-import.js +0 -1
- package/dist/alphalib/types/robots/minio-import.js.map +1 -1
- package/dist/alphalib/types/robots/minio-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/minio-store.js +0 -1
- package/dist/alphalib/types/robots/minio-store.js.map +1 -1
- package/dist/alphalib/types/robots/progress-simulate.d.ts.map +1 -1
- package/dist/alphalib/types/robots/progress-simulate.js +13 -0
- package/dist/alphalib/types/robots/progress-simulate.js.map +1 -1
- package/dist/alphalib/types/robots/s3-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/s3-import.js +0 -1
- package/dist/alphalib/types/robots/s3-import.js.map +1 -1
- package/dist/alphalib/types/robots/s3-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/s3-store.js +0 -1
- package/dist/alphalib/types/robots/s3-store.js.map +1 -1
- package/dist/alphalib/types/robots/script-run.d.ts.map +1 -1
- package/dist/alphalib/types/robots/script-run.js +10 -1
- package/dist/alphalib/types/robots/script-run.js.map +1 -1
- package/dist/alphalib/types/robots/sftp-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/sftp-import.js +0 -1
- package/dist/alphalib/types/robots/sftp-import.js.map +1 -1
- package/dist/alphalib/types/robots/sftp-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/sftp-store.js +0 -1
- package/dist/alphalib/types/robots/sftp-store.js.map +1 -1
- package/dist/alphalib/types/robots/speech-transcribe.d.ts.map +1 -1
- package/dist/alphalib/types/robots/speech-transcribe.js +0 -1
- package/dist/alphalib/types/robots/speech-transcribe.js.map +1 -1
- package/dist/alphalib/types/robots/supabase-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/supabase-import.js +0 -1
- package/dist/alphalib/types/robots/supabase-import.js.map +1 -1
- package/dist/alphalib/types/robots/supabase-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/supabase-store.js +0 -1
- package/dist/alphalib/types/robots/supabase-store.js.map +1 -1
- package/dist/alphalib/types/robots/swift-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/swift-import.js +0 -1
- package/dist/alphalib/types/robots/swift-import.js.map +1 -1
- package/dist/alphalib/types/robots/swift-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/swift-store.js +0 -1
- package/dist/alphalib/types/robots/swift-store.js.map +1 -1
- package/dist/alphalib/types/robots/text-speak.d.ts.map +1 -1
- package/dist/alphalib/types/robots/text-speak.js +0 -1
- package/dist/alphalib/types/robots/text-speak.js.map +1 -1
- package/dist/alphalib/types/robots/text-translate.d.ts.map +1 -1
- package/dist/alphalib/types/robots/text-translate.js +0 -1
- package/dist/alphalib/types/robots/text-translate.js.map +1 -1
- package/dist/alphalib/types/robots/tigris-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/tigris-import.js +0 -1
- package/dist/alphalib/types/robots/tigris-import.js.map +1 -1
- package/dist/alphalib/types/robots/tigris-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/tigris-store.js +0 -1
- package/dist/alphalib/types/robots/tigris-store.js.map +1 -1
- package/dist/alphalib/types/robots/tlcdn-deliver.d.ts.map +1 -1
- package/dist/alphalib/types/robots/tlcdn-deliver.js +8 -1
- package/dist/alphalib/types/robots/tlcdn-deliver.js.map +1 -1
- package/dist/alphalib/types/robots/tus-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/tus-store.js +1 -14
- package/dist/alphalib/types/robots/tus-store.js.map +1 -1
- package/dist/alphalib/types/robots/upload-handle.d.ts.map +1 -1
- package/dist/alphalib/types/robots/upload-handle.js +0 -1
- package/dist/alphalib/types/robots/upload-handle.js.map +1 -1
- package/dist/alphalib/types/robots/video-adaptive.d.ts +32 -8
- package/dist/alphalib/types/robots/video-adaptive.d.ts.map +1 -1
- package/dist/alphalib/types/robots/video-adaptive.js +22 -6
- package/dist/alphalib/types/robots/video-adaptive.js.map +1 -1
- package/dist/alphalib/types/robots/video-artwork.d.ts +2855 -0
- package/dist/alphalib/types/robots/video-artwork.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-artwork.js +66 -0
- package/dist/alphalib/types/robots/video-artwork.js.map +1 -0
- package/dist/alphalib/types/robots/video-concat.d.ts +36 -0
- package/dist/alphalib/types/robots/video-concat.d.ts.map +1 -1
- package/dist/alphalib/types/robots/video-concat.js +30 -1
- package/dist/alphalib/types/robots/video-concat.js.map +1 -1
- package/dist/alphalib/types/robots/video-encode.d.ts.map +1 -1
- package/dist/alphalib/types/robots/video-encode.js +0 -1
- package/dist/alphalib/types/robots/video-encode.js.map +1 -1
- package/dist/alphalib/types/robots/video-generate.d.ts +594 -0
- package/dist/alphalib/types/robots/video-generate.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-generate.js +90 -0
- package/dist/alphalib/types/robots/video-generate.js.map +1 -0
- package/dist/alphalib/types/robots/video-merge.d.ts +24 -0
- package/dist/alphalib/types/robots/video-merge.d.ts.map +1 -1
- package/dist/alphalib/types/robots/video-merge.js +33 -1
- package/dist/alphalib/types/robots/video-merge.js.map +1 -1
- package/dist/alphalib/types/robots/video-ondemand.d.ts.map +1 -1
- package/dist/alphalib/types/robots/video-ondemand.js +3 -4
- package/dist/alphalib/types/robots/video-ondemand.js.map +1 -1
- package/dist/alphalib/types/robots/video-split.d.ts +2939 -0
- package/dist/alphalib/types/robots/video-split.d.ts.map +1 -0
- package/dist/alphalib/types/robots/video-split.js +78 -0
- package/dist/alphalib/types/robots/video-split.js.map +1 -0
- package/dist/alphalib/types/robots/video-subtitle.d.ts +52 -4
- package/dist/alphalib/types/robots/video-subtitle.d.ts.map +1 -1
- package/dist/alphalib/types/robots/video-subtitle.js +61 -8
- package/dist/alphalib/types/robots/video-subtitle.js.map +1 -1
- package/dist/alphalib/types/robots/video-thumbs.d.ts.map +1 -1
- package/dist/alphalib/types/robots/video-thumbs.js +0 -1
- package/dist/alphalib/types/robots/video-thumbs.js.map +1 -1
- package/dist/alphalib/types/robots/vimeo-import.d.ts +4 -4
- package/dist/alphalib/types/robots/vimeo-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/vimeo-import.js +0 -1
- package/dist/alphalib/types/robots/vimeo-import.js.map +1 -1
- package/dist/alphalib/types/robots/vimeo-store.d.ts +2 -2
- package/dist/alphalib/types/robots/vimeo-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/vimeo-store.js +14 -3
- package/dist/alphalib/types/robots/vimeo-store.js.map +1 -1
- package/dist/alphalib/types/robots/wasabi-import.d.ts.map +1 -1
- package/dist/alphalib/types/robots/wasabi-import.js +0 -1
- package/dist/alphalib/types/robots/wasabi-import.js.map +1 -1
- package/dist/alphalib/types/robots/wasabi-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/wasabi-store.js +0 -1
- package/dist/alphalib/types/robots/wasabi-store.js.map +1 -1
- package/dist/alphalib/types/robots/youtube-store.d.ts.map +1 -1
- package/dist/alphalib/types/robots/youtube-store.js +4 -5
- package/dist/alphalib/types/robots/youtube-store.js.map +1 -1
- package/dist/alphalib/types/skillFrontmatter.d.ts +29 -0
- package/dist/alphalib/types/skillFrontmatter.d.ts.map +1 -0
- package/dist/alphalib/types/skillFrontmatter.js +19 -0
- package/dist/alphalib/types/skillFrontmatter.js.map +1 -0
- package/dist/alphalib/types/template.d.ts +77 -132175
- package/dist/alphalib/types/template.d.ts.map +1 -1
- package/dist/alphalib/types/template.js +26 -3
- package/dist/alphalib/types/template.js.map +1 -1
- package/dist/alphalib/types/templateCredential.d.ts +13 -3
- package/dist/alphalib/types/templateCredential.d.ts.map +1 -1
- package/dist/alphalib/types/templateCredential.js +1 -0
- package/dist/alphalib/types/templateCredential.js.map +1 -1
- package/dist/alphalib/zodParseWithContext.d.ts.map +1 -1
- package/dist/alphalib/zodParseWithContext.js +15 -11
- package/dist/alphalib/zodParseWithContext.js.map +1 -1
- package/dist/cli/commands/assemblies.d.ts +8 -2
- package/dist/cli/commands/assemblies.d.ts.map +1 -1
- package/dist/cli/commands/assemblies.js +566 -411
- package/dist/cli/commands/assemblies.js.map +1 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +5 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/templates.d.ts.map +1 -1
- package/dist/cli/commands/templates.js +4 -14
- package/dist/cli/commands/templates.js.map +1 -1
- package/dist/cli/fileProcessingOptions.d.ts +35 -0
- package/dist/cli/fileProcessingOptions.d.ts.map +1 -0
- package/dist/cli/fileProcessingOptions.js +182 -0
- package/dist/cli/fileProcessingOptions.js.map +1 -0
- package/dist/cli/generateIntentDocs.d.ts +6 -0
- package/dist/cli/generateIntentDocs.d.ts.map +1 -0
- package/dist/cli/generateIntentDocs.js +337 -0
- package/dist/cli/generateIntentDocs.js.map +1 -0
- package/dist/cli/intentCommandSpecs.d.ts +36 -0
- package/dist/cli/intentCommandSpecs.d.ts.map +1 -0
- package/dist/cli/intentCommandSpecs.js +179 -0
- package/dist/cli/intentCommandSpecs.js.map +1 -0
- package/dist/cli/intentCommands.d.ts +13 -0
- package/dist/cli/intentCommands.d.ts.map +1 -0
- package/dist/cli/intentCommands.js +368 -0
- package/dist/cli/intentCommands.js.map +1 -0
- package/dist/cli/intentFields.d.ts +25 -0
- package/dist/cli/intentFields.d.ts.map +1 -0
- package/dist/cli/intentFields.js +298 -0
- package/dist/cli/intentFields.js.map +1 -0
- package/dist/cli/intentInputPolicy.d.ts +10 -0
- package/dist/cli/intentInputPolicy.d.ts.map +1 -0
- package/dist/cli/intentInputPolicy.js +2 -0
- package/dist/cli/intentInputPolicy.js.map +1 -0
- package/dist/cli/intentRuntime.d.ts +114 -0
- package/dist/cli/intentRuntime.d.ts.map +1 -0
- package/dist/cli/intentRuntime.js +464 -0
- package/dist/cli/intentRuntime.js.map +1 -0
- package/dist/cli/resultFiles.d.ts +19 -0
- package/dist/cli/resultFiles.d.ts.map +1 -0
- package/dist/cli/resultFiles.js +66 -0
- package/dist/cli/resultFiles.js.map +1 -0
- package/dist/cli/resultUrls.d.ts +19 -0
- package/dist/cli/resultUrls.d.ts.map +1 -0
- package/dist/cli/resultUrls.js +36 -0
- package/dist/cli/resultUrls.js.map +1 -0
- package/dist/cli/semanticIntents/imageDescribe.d.ts +45 -0
- package/dist/cli/semanticIntents/imageDescribe.d.ts.map +1 -0
- package/dist/cli/semanticIntents/imageDescribe.js +188 -0
- package/dist/cli/semanticIntents/imageDescribe.js.map +1 -0
- package/dist/cli/semanticIntents/imageGenerate.d.ts +94 -0
- package/dist/cli/semanticIntents/imageGenerate.d.ts.map +1 -0
- package/dist/cli/semanticIntents/imageGenerate.js +215 -0
- package/dist/cli/semanticIntents/imageGenerate.js.map +1 -0
- package/dist/cli/semanticIntents/index.d.ts +20 -0
- package/dist/cli/semanticIntents/index.d.ts.map +1 -0
- package/dist/cli/semanticIntents/index.js +20 -0
- package/dist/cli/semanticIntents/index.js.map +1 -0
- package/dist/cli/semanticIntents/markdownPdf.d.ts +4 -0
- package/dist/cli/semanticIntents/markdownPdf.d.ts.map +1 -0
- package/dist/cli/semanticIntents/markdownPdf.js +93 -0
- package/dist/cli/semanticIntents/markdownPdf.js.map +1 -0
- package/dist/cli/semanticIntents/parsing.d.ts +11 -0
- package/dist/cli/semanticIntents/parsing.d.ts.map +1 -0
- package/dist/cli/semanticIntents/parsing.js +29 -0
- package/dist/cli/semanticIntents/parsing.js.map +1 -0
- package/dist/cli/stepsInput.d.ts +4 -0
- package/dist/cli/stepsInput.d.ts.map +1 -0
- package/dist/cli/stepsInput.js +23 -0
- package/dist/cli/stepsInput.js.map +1 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +5 -4
- package/dist/cli.js.map +1 -1
- package/dist/ensureUniqueCounter.d.ts +8 -0
- package/dist/ensureUniqueCounter.d.ts.map +1 -0
- package/dist/ensureUniqueCounter.js +48 -0
- package/dist/ensureUniqueCounter.js.map +1 -0
- package/dist/inputFiles.d.ts +9 -0
- package/dist/inputFiles.d.ts.map +1 -1
- package/dist/inputFiles.js +177 -26
- package/dist/inputFiles.js.map +1 -1
- package/dist/robots.js +3 -3
- package/dist/robots.js.map +1 -1
- package/package.json +9 -7
- package/src/Transloadit.ts +3 -3
- package/src/alphalib/assembly-linter.ts +1 -1
- package/src/alphalib/stepParsing.ts +2 -2
- package/src/alphalib/types/assemblyStatus.ts +45 -3
- package/src/alphalib/types/builtinTemplates.ts +24 -0
- package/src/alphalib/types/robots/_index.ts +211 -20
- package/src/alphalib/types/robots/_instructions-primitives.ts +93 -3
- package/src/alphalib/types/robots/ai-chat.ts +35 -4
- package/src/alphalib/types/robots/assembly-savejson.ts +8 -0
- package/src/alphalib/types/robots/audio-artwork.ts +4 -5
- package/src/alphalib/types/robots/audio-concat.ts +1 -2
- package/src/alphalib/types/robots/audio-encode.ts +1 -2
- package/src/alphalib/types/robots/audio-loop.ts +1 -2
- package/src/alphalib/types/robots/audio-merge.ts +1 -2
- package/src/alphalib/types/robots/audio-split.ts +130 -0
- package/src/alphalib/types/robots/audio-waveform.ts +90 -6
- package/src/alphalib/types/robots/azure-import.ts +0 -1
- package/src/alphalib/types/robots/azure-store.ts +0 -1
- package/src/alphalib/types/robots/backblaze-import.ts +0 -1
- package/src/alphalib/types/robots/backblaze-store.ts +0 -1
- package/src/alphalib/types/robots/box-import.ts +97 -0
- package/src/alphalib/types/robots/box-store.ts +94 -0
- package/src/alphalib/types/robots/cloudfiles-import.ts +0 -1
- package/src/alphalib/types/robots/cloudfiles-store.ts +0 -1
- package/src/alphalib/types/robots/cloudflare-import.ts +0 -1
- package/src/alphalib/types/robots/cloudflare-store.ts +0 -1
- package/src/alphalib/types/robots/digitalocean-import.ts +0 -1
- package/src/alphalib/types/robots/digitalocean-store.ts +0 -1
- package/src/alphalib/types/robots/document-autorotate.ts +8 -1
- package/src/alphalib/types/robots/document-convert.ts +10 -3
- package/src/alphalib/types/robots/document-merge.ts +0 -1
- package/src/alphalib/types/robots/document-ocr.ts +0 -1
- package/src/alphalib/types/robots/document-optimize.ts +0 -1
- package/src/alphalib/types/robots/document-split.ts +9 -1
- package/src/alphalib/types/robots/document-thumbs.ts +26 -4
- package/src/alphalib/types/robots/dropbox-import.ts +0 -1
- package/src/alphalib/types/robots/dropbox-store.ts +0 -1
- package/src/alphalib/types/robots/edgly-deliver.ts +8 -1
- package/src/alphalib/types/robots/file-compress.ts +8 -1
- package/src/alphalib/types/robots/file-decompress.ts +30 -5
- package/src/alphalib/types/robots/file-filter.ts +23 -6
- package/src/alphalib/types/robots/file-hash.ts +23 -1
- package/src/alphalib/types/robots/file-preview.ts +8 -1
- package/src/alphalib/types/robots/file-read.ts +9 -1
- package/src/alphalib/types/robots/file-serve.ts +39 -7
- package/src/alphalib/types/robots/file-verify.ts +0 -1
- package/src/alphalib/types/robots/file-virusscan.ts +6 -4
- package/src/alphalib/types/robots/file-watermark.ts +10 -0
- package/src/alphalib/types/robots/ftp-import.ts +0 -1
- package/src/alphalib/types/robots/ftp-store.ts +0 -1
- package/src/alphalib/types/robots/google-import.ts +0 -1
- package/src/alphalib/types/robots/google-store.ts +0 -1
- package/src/alphalib/types/robots/html-convert.ts +0 -1
- package/src/alphalib/types/robots/http-import.ts +0 -1
- package/src/alphalib/types/robots/image-bgremove.ts +4 -2
- package/src/alphalib/types/robots/image-copyrightdetect.ts +167 -0
- package/src/alphalib/types/robots/image-describe.ts +0 -1
- package/src/alphalib/types/robots/image-enhance.ts +185 -0
- package/src/alphalib/types/robots/image-facedetect.ts +0 -1
- package/src/alphalib/types/robots/image-generate.ts +74 -8
- package/src/alphalib/types/robots/image-merge.ts +0 -1
- package/src/alphalib/types/robots/image-ocr.ts +0 -1
- package/src/alphalib/types/robots/image-optimize.ts +16 -3
- package/src/alphalib/types/robots/image-resize.ts +37 -1
- package/src/alphalib/types/robots/image-upscale.ts +93 -0
- package/src/alphalib/types/robots/mega-import.ts +123 -0
- package/src/alphalib/types/robots/mega-store.ts +109 -0
- package/src/alphalib/types/robots/meta-read.ts +8 -0
- package/src/alphalib/types/robots/meta-write.ts +0 -1
- package/src/alphalib/types/robots/minio-import.ts +0 -1
- package/src/alphalib/types/robots/minio-store.ts +0 -1
- package/src/alphalib/types/robots/progress-simulate.ts +13 -0
- package/src/alphalib/types/robots/s3-import.ts +0 -1
- package/src/alphalib/types/robots/s3-store.ts +0 -1
- package/src/alphalib/types/robots/script-run.ts +11 -1
- package/src/alphalib/types/robots/sftp-import.ts +0 -1
- package/src/alphalib/types/robots/sftp-store.ts +0 -1
- package/src/alphalib/types/robots/speech-transcribe.ts +0 -1
- package/src/alphalib/types/robots/supabase-import.ts +0 -1
- package/src/alphalib/types/robots/supabase-store.ts +0 -1
- package/src/alphalib/types/robots/swift-import.ts +0 -1
- package/src/alphalib/types/robots/swift-store.ts +0 -1
- package/src/alphalib/types/robots/text-speak.ts +0 -1
- package/src/alphalib/types/robots/text-translate.ts +0 -1
- package/src/alphalib/types/robots/tigris-import.ts +0 -1
- package/src/alphalib/types/robots/tigris-store.ts +0 -1
- package/src/alphalib/types/robots/tlcdn-deliver.ts +8 -1
- package/src/alphalib/types/robots/tus-store.ts +1 -14
- package/src/alphalib/types/robots/upload-handle.ts +0 -1
- package/src/alphalib/types/robots/video-adaptive.ts +22 -6
- package/src/alphalib/types/robots/video-artwork.ts +100 -0
- package/src/alphalib/types/robots/video-concat.ts +30 -1
- package/src/alphalib/types/robots/video-encode.ts +0 -1
- package/src/alphalib/types/robots/video-generate.ts +120 -0
- package/src/alphalib/types/robots/video-merge.ts +33 -1
- package/src/alphalib/types/robots/video-ondemand.ts +3 -4
- package/src/alphalib/types/robots/video-split.ts +117 -0
- package/src/alphalib/types/robots/video-subtitle.ts +61 -8
- package/src/alphalib/types/robots/video-thumbs.ts +0 -1
- package/src/alphalib/types/robots/vimeo-import.ts +0 -1
- package/src/alphalib/types/robots/vimeo-store.ts +14 -3
- package/src/alphalib/types/robots/wasabi-import.ts +0 -1
- package/src/alphalib/types/robots/wasabi-store.ts +0 -1
- package/src/alphalib/types/robots/youtube-store.ts +4 -5
- package/src/alphalib/types/skillFrontmatter.ts +24 -0
- package/src/alphalib/types/template.ts +61 -15
- package/src/alphalib/types/templateCredential.ts +1 -0
- package/src/alphalib/zodParseWithContext.ts +19 -12
- package/src/cli/commands/assemblies.ts +825 -505
- package/src/cli/commands/index.ts +6 -3
- package/src/cli/commands/templates.ts +6 -17
- package/src/cli/fileProcessingOptions.ts +294 -0
- package/src/cli/generateIntentDocs.ts +438 -0
- package/src/cli/intentCommandSpecs.ts +277 -0
- package/src/cli/intentCommands.ts +525 -0
- package/src/cli/intentFields.ts +403 -0
- package/src/cli/intentInputPolicy.ts +11 -0
- package/src/cli/intentRuntime.ts +739 -0
- package/src/cli/resultFiles.ts +105 -0
- package/src/cli/resultUrls.ts +72 -0
- package/src/cli/semanticIntents/imageDescribe.ts +257 -0
- package/src/cli/semanticIntents/imageGenerate.ts +254 -0
- package/src/cli/semanticIntents/index.ts +53 -0
- package/src/cli/semanticIntents/markdownPdf.ts +120 -0
- package/src/cli/semanticIntents/parsing.ts +56 -0
- package/src/cli/stepsInput.ts +32 -0
- package/src/cli.ts +5 -4
- package/src/ensureUniqueCounter.ts +75 -0
- package/src/inputFiles.ts +277 -26
- package/src/robots.ts +3 -3
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises'
|
|
2
|
+
import { dirname } from 'node:path'
|
|
3
|
+
import { pathToFileURL } from 'node:url'
|
|
4
|
+
import {
|
|
5
|
+
getConcurrencyOptionDocumentation,
|
|
6
|
+
getDeleteAfterProcessingOptionDocumentation,
|
|
7
|
+
getInputPathsOptionDocumentation,
|
|
8
|
+
getPrintUrlsOptionDocumentation,
|
|
9
|
+
getRecursiveOptionDocumentation,
|
|
10
|
+
getReprocessStaleOptionDocumentation,
|
|
11
|
+
getSingleAssemblyOptionDocumentation,
|
|
12
|
+
getWatchOptionDocumentation,
|
|
13
|
+
} from './fileProcessingOptions.ts'
|
|
14
|
+
import type { IntentDefinition } from './intentCommandSpecs.ts'
|
|
15
|
+
import type { ResolvedIntentCommandDefinition } from './intentCommands.ts'
|
|
16
|
+
import { resolveIntentCommandDefinitions } from './intentCommands.ts'
|
|
17
|
+
import type { IntentOptionDefinition } from './intentRuntime.ts'
|
|
18
|
+
import { getInputBase64OptionDocumentation, getIntentOptionDefinitions } from './intentRuntime.ts'
|
|
19
|
+
|
|
20
|
+
interface DocOptionRow {
|
|
21
|
+
description: string
|
|
22
|
+
example: string
|
|
23
|
+
flags: string
|
|
24
|
+
required: string
|
|
25
|
+
type: string
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const MAX_OPTION_DESCRIPTION_LENGTH = 180
|
|
29
|
+
|
|
30
|
+
function inlineCode(value: string): string {
|
|
31
|
+
return `\`${value.replaceAll('`', '\\`')}\``
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function escapeTableCell(value: string): string {
|
|
35
|
+
return value.replaceAll('\n', ' ').replaceAll('|', '\\|')
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function renderTable(headers: string[], rows: string[][]): string {
|
|
39
|
+
const renderedRows = rows.map((row) => `| ${row.map(escapeTableCell).join(' | ')} |`)
|
|
40
|
+
return [
|
|
41
|
+
`| ${headers.join(' | ')} |`,
|
|
42
|
+
`| ${headers.map(() => '---').join(' | ')} |`,
|
|
43
|
+
...renderedRows,
|
|
44
|
+
].join('\n')
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function sanitizeDocsMarkdown(value: string): string {
|
|
48
|
+
return value
|
|
49
|
+
.replace(/!?\[([^\]]+)\]\([^)]+\)/g, '$1')
|
|
50
|
+
.replace(/<[^>]+>/g, ' ')
|
|
51
|
+
.replace(/```[\s\S]*?```/g, ' ')
|
|
52
|
+
.replace(/\{\{[\s\S]*?\}\}/g, ' ')
|
|
53
|
+
.replaceAll('`', '')
|
|
54
|
+
.replace(/\s+/g, ' ')
|
|
55
|
+
.trim()
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function truncateAtSentenceBoundary(value: string, maxLength: number): string {
|
|
59
|
+
if (value.length <= maxLength) {
|
|
60
|
+
return value
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const sentenceMatch = value.match(/^(.{1,180}?[.!?])(?:\s|$)/)
|
|
64
|
+
if (sentenceMatch?.[1] != null && sentenceMatch[1].length >= 60) {
|
|
65
|
+
return sentenceMatch[1]
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const truncated = value.slice(0, maxLength).trimEnd()
|
|
69
|
+
const lastSpace = truncated.lastIndexOf(' ')
|
|
70
|
+
if (lastSpace > 40) {
|
|
71
|
+
return `${truncated.slice(0, lastSpace)}…`
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return `${truncated}…`
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function summarizeDescription(value: string | undefined): string {
|
|
78
|
+
if (value == null || value.trim().length === 0) {
|
|
79
|
+
return '—'
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const sanitized = sanitizeDocsMarkdown(value)
|
|
83
|
+
|
|
84
|
+
if (sanitized.length === 0) {
|
|
85
|
+
return '—'
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return truncateAtSentenceBoundary(sanitized, MAX_OPTION_DESCRIPTION_LENGTH)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function getInputSummary(definition: ResolvedIntentCommandDefinition): string {
|
|
92
|
+
if (definition.runnerKind === 'no-input') {
|
|
93
|
+
return 'none'
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return 'file, dir, URL, base64'
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function getOutputSummary(definition: ResolvedIntentCommandDefinition): string {
|
|
100
|
+
return definition.intentDefinition.outputMode === 'directory' ? 'directory' : 'file'
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function getExecutionSummary(definition: ResolvedIntentCommandDefinition): string {
|
|
104
|
+
switch (definition.runnerKind) {
|
|
105
|
+
case 'bundled':
|
|
106
|
+
return 'single assembly'
|
|
107
|
+
case 'no-input':
|
|
108
|
+
return 'no input'
|
|
109
|
+
case 'standard':
|
|
110
|
+
return 'per-file; supports `--single-assembly` and `--watch`'
|
|
111
|
+
case 'watchable':
|
|
112
|
+
return 'per-file; supports `--watch`'
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function getBackendSummary(catalogDefinition: IntentDefinition): string {
|
|
117
|
+
if (catalogDefinition.kind === 'robot') {
|
|
118
|
+
return inlineCode(catalogDefinition.robot)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (catalogDefinition.kind === 'template') {
|
|
122
|
+
return inlineCode(catalogDefinition.templateId)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return `semantic alias ${inlineCode(catalogDefinition.semantic)}`
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function getUsage(definition: ResolvedIntentCommandDefinition): string {
|
|
129
|
+
const parts = ['npx transloadit', ...definition.paths]
|
|
130
|
+
if (definition.runnerKind !== 'no-input') {
|
|
131
|
+
if (
|
|
132
|
+
'inputPolicy' in definition.intentDefinition &&
|
|
133
|
+
definition.intentDefinition.inputPolicy.kind === 'optional'
|
|
134
|
+
) {
|
|
135
|
+
parts.push('[--input', '<path|dir|url|->]')
|
|
136
|
+
} else {
|
|
137
|
+
parts.push('--input', '<path|dir|url|->')
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
parts.push('[options]')
|
|
141
|
+
return parts.join(' ')
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function formatOptionType(kind: IntentOptionDefinition['kind']): string {
|
|
145
|
+
switch (kind) {
|
|
146
|
+
case 'auto':
|
|
147
|
+
return 'auto'
|
|
148
|
+
case 'boolean':
|
|
149
|
+
return 'boolean'
|
|
150
|
+
case 'json':
|
|
151
|
+
return 'json'
|
|
152
|
+
case 'number':
|
|
153
|
+
return 'number'
|
|
154
|
+
case 'string':
|
|
155
|
+
return 'string'
|
|
156
|
+
case 'string-array':
|
|
157
|
+
return 'string[]'
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function getExampleValue(field: IntentOptionDefinition): string {
|
|
162
|
+
const candidate = field.exampleValue
|
|
163
|
+
if (typeof candidate === 'string' && candidate.length > 0) {
|
|
164
|
+
return candidate
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return '—'
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function getCommandOptionRows(definition: ResolvedIntentCommandDefinition): DocOptionRow[] {
|
|
171
|
+
return getIntentOptionDefinitions(definition.intentDefinition).map((field) => ({
|
|
172
|
+
flags: field.optionFlags,
|
|
173
|
+
type: formatOptionType(field.kind),
|
|
174
|
+
required: field.required ? 'yes' : 'no',
|
|
175
|
+
example: getExampleValue(field),
|
|
176
|
+
description: summarizeDescription(field.description),
|
|
177
|
+
}))
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
function getSharedFileInputOutputRows(): DocOptionRow[] {
|
|
181
|
+
return [
|
|
182
|
+
getInputPathsOptionDocumentation(),
|
|
183
|
+
getInputBase64OptionDocumentation(),
|
|
184
|
+
{
|
|
185
|
+
flags: '--out, -o',
|
|
186
|
+
type: 'path',
|
|
187
|
+
required: 'yes*',
|
|
188
|
+
example: 'output.file',
|
|
189
|
+
description: 'Write the result to this path or directory',
|
|
190
|
+
},
|
|
191
|
+
getPrintUrlsOptionDocumentation(),
|
|
192
|
+
]
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function getSharedNoInputOutputRows(): DocOptionRow[] {
|
|
196
|
+
return [
|
|
197
|
+
{
|
|
198
|
+
flags: '--out, -o',
|
|
199
|
+
type: 'path',
|
|
200
|
+
required: 'yes*',
|
|
201
|
+
example: 'output.file',
|
|
202
|
+
description: 'Write the result to this path',
|
|
203
|
+
},
|
|
204
|
+
getPrintUrlsOptionDocumentation(),
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
function getSharedProcessingRows(): DocOptionRow[] {
|
|
209
|
+
return [
|
|
210
|
+
getRecursiveOptionDocumentation(),
|
|
211
|
+
getDeleteAfterProcessingOptionDocumentation(),
|
|
212
|
+
getReprocessStaleOptionDocumentation(),
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
function getSharedWatchRows(): DocOptionRow[] {
|
|
217
|
+
return [getWatchOptionDocumentation(), getConcurrencyOptionDocumentation()]
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
function getSharedBundlingRows(): DocOptionRow[] {
|
|
221
|
+
return [getSingleAssemblyOptionDocumentation()]
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
function getSharedFlagSupportNotes(definition: ResolvedIntentCommandDefinition): string[] {
|
|
225
|
+
if (definition.runnerKind === 'no-input') {
|
|
226
|
+
return ['Uses the shared output flags listed above.']
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
const notes = ['Uses the shared file input and output flags listed above.']
|
|
230
|
+
const processingGroups = ['base processing flags']
|
|
231
|
+
|
|
232
|
+
if (definition.runnerKind === 'standard' || definition.runnerKind === 'watchable') {
|
|
233
|
+
processingGroups.push('watch flags')
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
if (definition.runnerKind === 'standard') {
|
|
237
|
+
processingGroups.push('bundling flags')
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
notes.push(`Also supports the shared ${processingGroups.join(', ')} listed above.`)
|
|
241
|
+
|
|
242
|
+
return notes
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
function renderOptionSection(title: string, rows: DocOptionRow[]): string[] {
|
|
246
|
+
if (rows.length === 0) {
|
|
247
|
+
return []
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return [
|
|
251
|
+
`**${title}**`,
|
|
252
|
+
'',
|
|
253
|
+
renderTable(
|
|
254
|
+
['Flag', 'Type', 'Required', 'Example', 'Description'],
|
|
255
|
+
rows.map((row) => [
|
|
256
|
+
inlineCode(row.flags),
|
|
257
|
+
inlineCode(row.type),
|
|
258
|
+
row.required,
|
|
259
|
+
row.example === '—' ? row.example : inlineCode(row.example),
|
|
260
|
+
row.description,
|
|
261
|
+
]),
|
|
262
|
+
),
|
|
263
|
+
'',
|
|
264
|
+
]
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
function renderExamples(examples: Array<[string, string]>): string {
|
|
268
|
+
const lines: string[] = ['```bash']
|
|
269
|
+
|
|
270
|
+
for (const [label, command] of examples) {
|
|
271
|
+
if (examples.length > 1 || label !== 'Run the command') {
|
|
272
|
+
lines.push(`# ${label}`)
|
|
273
|
+
}
|
|
274
|
+
lines.push(command)
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
lines.push('```')
|
|
278
|
+
return lines.join('\n')
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
function renderIntentSection(
|
|
282
|
+
definition: ResolvedIntentCommandDefinition,
|
|
283
|
+
headingLevel: number,
|
|
284
|
+
): string {
|
|
285
|
+
const heading = '#'.repeat(headingLevel)
|
|
286
|
+
const commandLabel = definition.paths.join(' ')
|
|
287
|
+
const lines: string[] = [
|
|
288
|
+
`${heading} ${inlineCode(commandLabel)}`,
|
|
289
|
+
'',
|
|
290
|
+
definition.description,
|
|
291
|
+
'',
|
|
292
|
+
definition.details,
|
|
293
|
+
'',
|
|
294
|
+
'**Usage**',
|
|
295
|
+
'',
|
|
296
|
+
'```bash',
|
|
297
|
+
getUsage(definition),
|
|
298
|
+
'```',
|
|
299
|
+
'',
|
|
300
|
+
'**Quick facts**',
|
|
301
|
+
'',
|
|
302
|
+
`- Input: ${getInputSummary(definition)}`,
|
|
303
|
+
`- Output: ${getOutputSummary(definition)}`,
|
|
304
|
+
`- Execution: ${getExecutionSummary(definition)}`,
|
|
305
|
+
`- Backend: ${getBackendSummary(definition.catalogDefinition)}`,
|
|
306
|
+
'',
|
|
307
|
+
'**Shared flags**',
|
|
308
|
+
'',
|
|
309
|
+
...getSharedFlagSupportNotes(definition).map((note) => `- ${note}`),
|
|
310
|
+
'',
|
|
311
|
+
...renderOptionSection('Command options', getCommandOptionRows(definition)),
|
|
312
|
+
'**Examples**',
|
|
313
|
+
'',
|
|
314
|
+
renderExamples(definition.examples),
|
|
315
|
+
'',
|
|
316
|
+
]
|
|
317
|
+
|
|
318
|
+
return lines.join('\n')
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
function renderAtAGlanceTable(definitions: ResolvedIntentCommandDefinition[]): string {
|
|
322
|
+
return renderTable(
|
|
323
|
+
['Command', 'What it does', 'Input', 'Output'],
|
|
324
|
+
definitions.map((definition) => [
|
|
325
|
+
inlineCode(definition.paths.join(' ')),
|
|
326
|
+
definition.description,
|
|
327
|
+
getInputSummary(definition),
|
|
328
|
+
getOutputSummary(definition),
|
|
329
|
+
]),
|
|
330
|
+
)
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export function renderIntentDocsBody({
|
|
334
|
+
definitions,
|
|
335
|
+
headingLevel,
|
|
336
|
+
}: {
|
|
337
|
+
definitions: ResolvedIntentCommandDefinition[]
|
|
338
|
+
headingLevel: number
|
|
339
|
+
}): string {
|
|
340
|
+
const heading = '#'.repeat(headingLevel)
|
|
341
|
+
const lines: string[] = [
|
|
342
|
+
`${heading} At a glance`,
|
|
343
|
+
'',
|
|
344
|
+
'Intent commands are the fastest path to common one-off tasks from the CLI.',
|
|
345
|
+
'Use `--print-urls` when you want temporary result URLs without downloading locally.',
|
|
346
|
+
'All intent commands also support the global CLI flags `--json`, `--log-level`, `--endpoint`, and `--help`.',
|
|
347
|
+
'',
|
|
348
|
+
renderAtAGlanceTable(definitions),
|
|
349
|
+
'',
|
|
350
|
+
'> At least one of `--out` or `--print-urls` is required on every intent command.',
|
|
351
|
+
'',
|
|
352
|
+
`${heading} Shared flags`,
|
|
353
|
+
'',
|
|
354
|
+
'These flags are available across many intent commands, so the per-command sections below focus on differences.',
|
|
355
|
+
'',
|
|
356
|
+
...renderOptionSection('Shared file input & output flags', getSharedFileInputOutputRows()),
|
|
357
|
+
...renderOptionSection('Shared no-input output flags', getSharedNoInputOutputRows()),
|
|
358
|
+
...renderOptionSection('Shared processing flags', getSharedProcessingRows()),
|
|
359
|
+
...renderOptionSection('Shared watch flags', getSharedWatchRows()),
|
|
360
|
+
...renderOptionSection('Shared bundling flags', getSharedBundlingRows()),
|
|
361
|
+
]
|
|
362
|
+
|
|
363
|
+
for (const definition of definitions) {
|
|
364
|
+
lines.push(renderIntentSection(definition, headingLevel))
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
return lines.join('\n').trim()
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
function isEntrypoint(): boolean {
|
|
371
|
+
const entrypoint = process.argv[1]
|
|
372
|
+
if (entrypoint == null) {
|
|
373
|
+
return false
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
return import.meta.url === pathToFileURL(entrypoint).href
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
function replaceGeneratedBlock({
|
|
380
|
+
endMarker,
|
|
381
|
+
markdown,
|
|
382
|
+
readme,
|
|
383
|
+
startMarker,
|
|
384
|
+
}: {
|
|
385
|
+
endMarker: string
|
|
386
|
+
markdown: string
|
|
387
|
+
readme: string
|
|
388
|
+
startMarker: string
|
|
389
|
+
}): string {
|
|
390
|
+
const startIndex = readme.indexOf(startMarker)
|
|
391
|
+
const endIndex = readme.indexOf(endMarker)
|
|
392
|
+
if (startIndex === -1 || endIndex === -1 || endIndex < startIndex) {
|
|
393
|
+
throw new Error('README intent docs markers are missing or malformed')
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
const before = readme.slice(0, startIndex + startMarker.length)
|
|
397
|
+
const after = readme.slice(endIndex)
|
|
398
|
+
return `${before}\n\n${markdown}\n\n${after}`
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
async function main(): Promise<void> {
|
|
402
|
+
const definitions = resolveIntentCommandDefinitions()
|
|
403
|
+
const readmeUrl = new URL('../../README.md', import.meta.url)
|
|
404
|
+
const docsUrl = new URL('../../docs/intent-commands.md', import.meta.url)
|
|
405
|
+
const startMarker = '<!-- GENERATED_INTENT_DOCS:START -->'
|
|
406
|
+
const endMarker = '<!-- GENERATED_INTENT_DOCS:END -->'
|
|
407
|
+
|
|
408
|
+
const readme = await readFile(readmeUrl, 'utf8')
|
|
409
|
+
const readmeFragment = renderIntentDocsBody({ definitions, headingLevel: 4 })
|
|
410
|
+
const fullDoc = [
|
|
411
|
+
'# Intent Command Reference',
|
|
412
|
+
'',
|
|
413
|
+
'> Generated by `yarn workspace @transloadit/node sync:intent-docs`. Do not edit by hand.',
|
|
414
|
+
'',
|
|
415
|
+
renderIntentDocsBody({ definitions, headingLevel: 2 }),
|
|
416
|
+
].join('\n')
|
|
417
|
+
|
|
418
|
+
const nextReadme = replaceGeneratedBlock({
|
|
419
|
+
endMarker,
|
|
420
|
+
markdown: readmeFragment,
|
|
421
|
+
readme,
|
|
422
|
+
startMarker,
|
|
423
|
+
})
|
|
424
|
+
|
|
425
|
+
await mkdir(dirname(docsUrl.pathname), { recursive: true })
|
|
426
|
+
await writeFile(docsUrl, `${fullDoc}\n`)
|
|
427
|
+
await writeFile(readmeUrl, `${nextReadme}\n`)
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
if (isEntrypoint()) {
|
|
431
|
+
main().catch((error) => {
|
|
432
|
+
if (!(error instanceof Error)) {
|
|
433
|
+
throw new Error(`Was thrown a non-error: ${String(error)}`)
|
|
434
|
+
}
|
|
435
|
+
console.error(error)
|
|
436
|
+
process.exit(1)
|
|
437
|
+
})
|
|
438
|
+
}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import type { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
import type { RobotMetaInput } from '../alphalib/types/robots/_instructions-primitives.ts'
|
|
4
|
+
import {
|
|
5
|
+
robotAudioWaveformInstructionsSchema,
|
|
6
|
+
meta as robotAudioWaveformMeta,
|
|
7
|
+
} from '../alphalib/types/robots/audio-waveform.ts'
|
|
8
|
+
import {
|
|
9
|
+
robotDocumentAutorotateInstructionsSchema,
|
|
10
|
+
meta as robotDocumentAutorotateMeta,
|
|
11
|
+
} from '../alphalib/types/robots/document-autorotate.ts'
|
|
12
|
+
import {
|
|
13
|
+
robotDocumentConvertInstructionsSchema,
|
|
14
|
+
meta as robotDocumentConvertMeta,
|
|
15
|
+
} from '../alphalib/types/robots/document-convert.ts'
|
|
16
|
+
import {
|
|
17
|
+
robotDocumentOptimizeInstructionsSchema,
|
|
18
|
+
meta as robotDocumentOptimizeMeta,
|
|
19
|
+
} from '../alphalib/types/robots/document-optimize.ts'
|
|
20
|
+
import {
|
|
21
|
+
robotDocumentThumbsInstructionsSchema,
|
|
22
|
+
meta as robotDocumentThumbsMeta,
|
|
23
|
+
} from '../alphalib/types/robots/document-thumbs.ts'
|
|
24
|
+
import {
|
|
25
|
+
robotFileCompressInstructionsSchema,
|
|
26
|
+
meta as robotFileCompressMeta,
|
|
27
|
+
} from '../alphalib/types/robots/file-compress.ts'
|
|
28
|
+
import {
|
|
29
|
+
robotFileDecompressInstructionsSchema,
|
|
30
|
+
meta as robotFileDecompressMeta,
|
|
31
|
+
} from '../alphalib/types/robots/file-decompress.ts'
|
|
32
|
+
import {
|
|
33
|
+
robotFilePreviewInstructionsSchema,
|
|
34
|
+
meta as robotFilePreviewMeta,
|
|
35
|
+
} from '../alphalib/types/robots/file-preview.ts'
|
|
36
|
+
import {
|
|
37
|
+
robotImageBgremoveInstructionsSchema,
|
|
38
|
+
meta as robotImageBgremoveMeta,
|
|
39
|
+
} from '../alphalib/types/robots/image-bgremove.ts'
|
|
40
|
+
import {
|
|
41
|
+
robotImageOptimizeInstructionsSchema,
|
|
42
|
+
meta as robotImageOptimizeMeta,
|
|
43
|
+
} from '../alphalib/types/robots/image-optimize.ts'
|
|
44
|
+
import {
|
|
45
|
+
robotImageResizeInstructionsSchema,
|
|
46
|
+
meta as robotImageResizeMeta,
|
|
47
|
+
} from '../alphalib/types/robots/image-resize.ts'
|
|
48
|
+
import {
|
|
49
|
+
robotTextSpeakInstructionsSchema,
|
|
50
|
+
meta as robotTextSpeakMeta,
|
|
51
|
+
} from '../alphalib/types/robots/text-speak.ts'
|
|
52
|
+
import {
|
|
53
|
+
robotVideoThumbsInstructionsSchema,
|
|
54
|
+
meta as robotVideoThumbsMeta,
|
|
55
|
+
} from '../alphalib/types/robots/video-thumbs.ts'
|
|
56
|
+
|
|
57
|
+
export type IntentInputMode = 'local-files' | 'none'
|
|
58
|
+
export type IntentOutputMode = 'directory' | 'file'
|
|
59
|
+
|
|
60
|
+
interface IntentSchemaDefinition {
|
|
61
|
+
meta: RobotMetaInput
|
|
62
|
+
schema: z.AnyZodObject
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
interface IntentBaseDefinition {
|
|
66
|
+
outputMode?: IntentOutputMode
|
|
67
|
+
paths?: string[]
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface RobotIntentDefinition extends IntentBaseDefinition, IntentSchemaDefinition {
|
|
71
|
+
defaultSingleAssembly?: boolean
|
|
72
|
+
inputMode?: IntentInputMode
|
|
73
|
+
kind: 'robot'
|
|
74
|
+
robot: string
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface TemplateIntentDefinition extends IntentBaseDefinition {
|
|
78
|
+
kind: 'template'
|
|
79
|
+
paths: string[]
|
|
80
|
+
templateId: string
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export interface SemanticIntentDefinition extends IntentBaseDefinition {
|
|
84
|
+
kind: 'semantic'
|
|
85
|
+
paths: string[]
|
|
86
|
+
semantic: string
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export type IntentDefinition =
|
|
90
|
+
| RobotIntentDefinition
|
|
91
|
+
| TemplateIntentDefinition
|
|
92
|
+
| SemanticIntentDefinition
|
|
93
|
+
|
|
94
|
+
const commandPathAliases = new Map([
|
|
95
|
+
['autorotate', 'auto-rotate'],
|
|
96
|
+
['bgremove', 'remove-background'],
|
|
97
|
+
])
|
|
98
|
+
|
|
99
|
+
function defineRobotIntent(definition: RobotIntentDefinition): RobotIntentDefinition {
|
|
100
|
+
return definition
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function defineTemplateIntent(definition: TemplateIntentDefinition): TemplateIntentDefinition {
|
|
104
|
+
return definition
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function defineSemanticIntent(definition: SemanticIntentDefinition): SemanticIntentDefinition {
|
|
108
|
+
return definition
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function getIntentCatalogKey(definition: IntentDefinition): string {
|
|
112
|
+
if (definition.kind === 'robot') {
|
|
113
|
+
return definition.robot
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (definition.kind === 'template') {
|
|
117
|
+
return definition.templateId
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return `${definition.semantic}:${definition.paths.join('/')}`
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function getIntentPaths(definition: IntentDefinition): string[] {
|
|
124
|
+
if (definition.paths != null) {
|
|
125
|
+
return definition.paths
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (definition.kind !== 'robot') {
|
|
129
|
+
throw new Error(`Intent definition ${getIntentCatalogKey(definition)} is missing paths`)
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const segments = definition.robot.split('/').filter(Boolean)
|
|
133
|
+
const [group, action] = segments
|
|
134
|
+
if (group == null || action == null) {
|
|
135
|
+
throw new Error(`Could not infer command path from robot "${definition.robot}"`)
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return [group, commandPathAliases.get(action) ?? action]
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function getIntentResultStepName(definition: IntentDefinition): string | null {
|
|
142
|
+
if (definition.kind !== 'robot') {
|
|
143
|
+
return null
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const paths = getIntentPaths(definition)
|
|
147
|
+
const action = paths[paths.length - 1]
|
|
148
|
+
if (action == null) {
|
|
149
|
+
throw new Error(`Intent definition ${definition.robot} has no action path`)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return action.replaceAll('-', '_')
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function findIntentDefinitionByPaths(
|
|
156
|
+
paths: readonly string[],
|
|
157
|
+
): IntentDefinition | undefined {
|
|
158
|
+
return intentCatalog.find((definition) => {
|
|
159
|
+
const definitionPaths = getIntentPaths(definition)
|
|
160
|
+
return (
|
|
161
|
+
definitionPaths.length === paths.length &&
|
|
162
|
+
definitionPaths.every((part, index) => part === paths[index])
|
|
163
|
+
)
|
|
164
|
+
})
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export const intentCatalog = [
|
|
168
|
+
defineSemanticIntent({
|
|
169
|
+
kind: 'semantic',
|
|
170
|
+
paths: ['image', 'generate'],
|
|
171
|
+
semantic: 'image-generate',
|
|
172
|
+
}),
|
|
173
|
+
defineRobotIntent({
|
|
174
|
+
kind: 'robot',
|
|
175
|
+
robot: '/file/preview',
|
|
176
|
+
paths: ['preview', 'generate'],
|
|
177
|
+
meta: robotFilePreviewMeta,
|
|
178
|
+
schema: robotFilePreviewInstructionsSchema,
|
|
179
|
+
}),
|
|
180
|
+
defineRobotIntent({
|
|
181
|
+
kind: 'robot',
|
|
182
|
+
robot: '/image/bgremove',
|
|
183
|
+
meta: robotImageBgremoveMeta,
|
|
184
|
+
schema: robotImageBgremoveInstructionsSchema,
|
|
185
|
+
}),
|
|
186
|
+
defineRobotIntent({
|
|
187
|
+
kind: 'robot',
|
|
188
|
+
robot: '/image/optimize',
|
|
189
|
+
meta: robotImageOptimizeMeta,
|
|
190
|
+
schema: robotImageOptimizeInstructionsSchema,
|
|
191
|
+
}),
|
|
192
|
+
defineRobotIntent({
|
|
193
|
+
kind: 'robot',
|
|
194
|
+
robot: '/image/resize',
|
|
195
|
+
meta: robotImageResizeMeta,
|
|
196
|
+
schema: robotImageResizeInstructionsSchema,
|
|
197
|
+
}),
|
|
198
|
+
defineRobotIntent({
|
|
199
|
+
kind: 'robot',
|
|
200
|
+
robot: '/document/convert',
|
|
201
|
+
meta: robotDocumentConvertMeta,
|
|
202
|
+
schema: robotDocumentConvertInstructionsSchema,
|
|
203
|
+
}),
|
|
204
|
+
defineRobotIntent({
|
|
205
|
+
kind: 'robot',
|
|
206
|
+
robot: '/document/optimize',
|
|
207
|
+
meta: robotDocumentOptimizeMeta,
|
|
208
|
+
schema: robotDocumentOptimizeInstructionsSchema,
|
|
209
|
+
}),
|
|
210
|
+
defineRobotIntent({
|
|
211
|
+
kind: 'robot',
|
|
212
|
+
robot: '/document/autorotate',
|
|
213
|
+
meta: robotDocumentAutorotateMeta,
|
|
214
|
+
schema: robotDocumentAutorotateInstructionsSchema,
|
|
215
|
+
}),
|
|
216
|
+
defineRobotIntent({
|
|
217
|
+
kind: 'robot',
|
|
218
|
+
robot: '/document/thumbs',
|
|
219
|
+
outputMode: 'directory',
|
|
220
|
+
meta: robotDocumentThumbsMeta,
|
|
221
|
+
schema: robotDocumentThumbsInstructionsSchema,
|
|
222
|
+
}),
|
|
223
|
+
defineRobotIntent({
|
|
224
|
+
kind: 'robot',
|
|
225
|
+
robot: '/audio/waveform',
|
|
226
|
+
meta: robotAudioWaveformMeta,
|
|
227
|
+
schema: robotAudioWaveformInstructionsSchema,
|
|
228
|
+
}),
|
|
229
|
+
defineRobotIntent({
|
|
230
|
+
kind: 'robot',
|
|
231
|
+
robot: '/text/speak',
|
|
232
|
+
meta: robotTextSpeakMeta,
|
|
233
|
+
schema: robotTextSpeakInstructionsSchema,
|
|
234
|
+
}),
|
|
235
|
+
defineRobotIntent({
|
|
236
|
+
kind: 'robot',
|
|
237
|
+
robot: '/video/thumbs',
|
|
238
|
+
outputMode: 'directory',
|
|
239
|
+
meta: robotVideoThumbsMeta,
|
|
240
|
+
schema: robotVideoThumbsInstructionsSchema,
|
|
241
|
+
}),
|
|
242
|
+
defineTemplateIntent({
|
|
243
|
+
kind: 'template',
|
|
244
|
+
templateId: 'builtin/encode-hls-video@latest',
|
|
245
|
+
paths: ['video', 'encode-hls'],
|
|
246
|
+
outputMode: 'directory',
|
|
247
|
+
}),
|
|
248
|
+
defineSemanticIntent({
|
|
249
|
+
kind: 'semantic',
|
|
250
|
+
semantic: 'image-describe',
|
|
251
|
+
paths: ['image', 'describe'],
|
|
252
|
+
}),
|
|
253
|
+
defineSemanticIntent({
|
|
254
|
+
kind: 'semantic',
|
|
255
|
+
semantic: 'markdown-pdf',
|
|
256
|
+
paths: ['markdown', 'pdf'],
|
|
257
|
+
}),
|
|
258
|
+
defineSemanticIntent({
|
|
259
|
+
kind: 'semantic',
|
|
260
|
+
semantic: 'markdown-docx',
|
|
261
|
+
paths: ['markdown', 'docx'],
|
|
262
|
+
}),
|
|
263
|
+
defineRobotIntent({
|
|
264
|
+
kind: 'robot',
|
|
265
|
+
robot: '/file/compress',
|
|
266
|
+
defaultSingleAssembly: true,
|
|
267
|
+
meta: robotFileCompressMeta,
|
|
268
|
+
schema: robotFileCompressInstructionsSchema,
|
|
269
|
+
}),
|
|
270
|
+
defineRobotIntent({
|
|
271
|
+
kind: 'robot',
|
|
272
|
+
robot: '/file/decompress',
|
|
273
|
+
outputMode: 'directory',
|
|
274
|
+
meta: robotFileDecompressMeta,
|
|
275
|
+
schema: robotFileDecompressInstructionsSchema,
|
|
276
|
+
}),
|
|
277
|
+
] satisfies IntentDefinition[]
|