Skip to content

Commit 0ae6735

Browse files
committed
Sync alphalib
1 parent 3f608b0 commit 0ae6735

20 files changed

+2879
-75
lines changed

src/alphalib/assembly-linter.ts

Lines changed: 1203 additions & 0 deletions
Large diffs are not rendered by default.

src/alphalib/stepParsing.ts

Lines changed: 1407 additions & 0 deletions
Large diffs are not rendered by default.

src/alphalib/types/robots/_index.ts

Lines changed: 231 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,169 @@
11
import { z } from 'zod'
22

3-
import { robotAudioArtworkInstructionsSchema } from './audio-artwork.ts'
4-
import { robotAudioConcatInstructionsSchema } from './audio-concat.ts'
5-
import { robotAudioEncodeInstructionsSchema } from './audio-encode.ts'
6-
import { robotAudioLoopInstructionsSchema } from './audio-loop.ts'
7-
import { robotAudioMergeInstructionsSchema } from './audio-merge.ts'
8-
import { robotAudioWaveformInstructionsSchema } from './audio-waveform.ts'
9-
import { robotAzureImportInstructionsSchema } from './azure-import.ts'
10-
import { robotAzureStoreInstructionsSchema } from './azure-store.ts'
11-
import { robotBackblazeImportInstructionsSchema } from './backblaze-import.ts'
12-
import { robotBackblazeStoreInstructionsSchema } from './backblaze-store.ts'
13-
import { robotCloudfilesImportInstructionsSchema } from './cloudfiles-import.ts'
14-
import { robotCloudfilesStoreInstructionsSchema } from './cloudfiles-store.ts'
15-
import { robotCloudflareImportInstructionsSchema } from './cloudflare-import.ts'
16-
import { robotCloudflareStoreInstructionsSchema } from './cloudflare-store.ts'
17-
import { robotDigitaloceanImportInstructionsSchema } from './digitalocean-import.ts'
18-
import { robotDigitaloceanStoreInstructionsSchema } from './digitalocean-store.ts'
19-
import { robotDocumentAutorotateInstructionsSchema } from './document-autorotate.ts'
20-
import { robotDocumentConvertInstructionsSchema } from './document-convert.ts'
21-
import { robotDocumentMergeInstructionsSchema } from './document-merge.ts'
22-
import { robotDocumentOcrInstructionsSchema } from './document-ocr.ts'
23-
import { robotDocumentSplitInstructionsSchema } from './document-split.ts'
24-
import { robotDocumentThumbsInstructionsSchema } from './document-thumbs.ts'
25-
import { robotDropboxImportInstructionsSchema } from './dropbox-import.ts'
26-
import { robotDropboxStoreInstructionsSchema } from './dropbox-store.ts'
27-
import { robotEdglyDeliverInstructionsSchema } from './edgly-deliver.ts'
28-
import { robotFileCompressInstructionsSchema } from './file-compress.ts'
29-
import { robotFileDecompressInstructionsSchema } from './file-decompress.ts'
30-
import { robotFileFilterInstructionsSchema } from './file-filter.ts'
31-
import { robotFileHashInstructionsSchema } from './file-hash.ts'
32-
import { robotFilePreviewInstructionsSchema } from './file-preview.ts'
33-
import { robotFileReadInstructionsSchema } from './file-read.ts'
34-
import { robotFileServeInstructionsSchema } from './file-serve.ts'
35-
import { robotFileVerifyInstructionsSchema } from './file-verify.ts'
36-
import { robotFileVirusscanInstructionsSchema } from './file-virusscan.ts'
3+
import { robotAudioArtworkInstructionsSchema, meta as audioArtworkMeta } from './audio-artwork.ts'
4+
import { robotAudioConcatInstructionsSchema, meta as audioConcatMeta } from './audio-concat.ts'
5+
import { robotAudioEncodeInstructionsSchema, meta as audioEncodeMeta } from './audio-encode.ts'
6+
import { robotAudioLoopInstructionsSchema, meta as audioLoopMeta } from './audio-loop.ts'
7+
import { robotAudioMergeInstructionsSchema, meta as audioMergeMeta } from './audio-merge.ts'
8+
import {
9+
robotAudioWaveformInstructionsSchema,
10+
meta as audioWaveformMeta,
11+
} from './audio-waveform.ts'
12+
import { robotAzureImportInstructionsSchema, meta as azureImportMeta } from './azure-import.ts'
13+
import { robotAzureStoreInstructionsSchema, meta as azureStoreMeta } from './azure-store.ts'
14+
import {
15+
robotBackblazeImportInstructionsSchema,
16+
meta as backblazeImportMeta,
17+
} from './backblaze-import.ts'
18+
import {
19+
robotBackblazeStoreInstructionsSchema,
20+
meta as backblazeStoreMeta,
21+
} from './backblaze-store.ts'
22+
import {
23+
robotCloudfilesImportInstructionsSchema,
24+
meta as cloudfilesImportMeta,
25+
} from './cloudfiles-import.ts'
26+
import {
27+
robotCloudfilesStoreInstructionsSchema,
28+
meta as cloudfilesStoreMeta,
29+
} from './cloudfiles-store.ts'
30+
import {
31+
robotCloudflareImportInstructionsSchema,
32+
meta as cloudflareImportMeta,
33+
} from './cloudflare-import.ts'
34+
import {
35+
robotCloudflareStoreInstructionsSchema,
36+
meta as cloudflareStoreMeta,
37+
} from './cloudflare-store.ts'
38+
import {
39+
robotDigitaloceanImportInstructionsSchema,
40+
meta as digitaloceanImportMeta,
41+
} from './digitalocean-import.ts'
42+
import {
43+
robotDigitaloceanStoreInstructionsSchema,
44+
meta as digitaloceanStoreMeta,
45+
} from './digitalocean-store.ts'
46+
import {
47+
robotDocumentAutorotateInstructionsSchema,
48+
meta as documentAutorotateMeta,
49+
} from './document-autorotate.ts'
50+
import {
51+
robotDocumentConvertInstructionsSchema,
52+
meta as documentConvertMeta,
53+
} from './document-convert.ts'
54+
import {
55+
robotDocumentMergeInstructionsSchema,
56+
meta as documentMergeMeta,
57+
} from './document-merge.ts'
58+
import { robotDocumentOcrInstructionsSchema, meta as documentOcrMeta } from './document-ocr.ts'
59+
import {
60+
robotDocumentSplitInstructionsSchema,
61+
meta as documentSplitMeta,
62+
} from './document-split.ts'
63+
import {
64+
robotDocumentThumbsInstructionsSchema,
65+
meta as documentThumbsMeta,
66+
} from './document-thumbs.ts'
67+
import {
68+
robotDropboxImportInstructionsSchema,
69+
meta as dropboxImportMeta,
70+
} from './dropbox-import.ts'
71+
import { robotDropboxStoreInstructionsSchema, meta as dropboxStoreMeta } from './dropbox-store.ts'
72+
import { robotEdglyDeliverInstructionsSchema, meta as edglyDeliverMeta } from './edgly-deliver.ts'
73+
import { robotFileCompressInstructionsSchema, meta as fileCompressMeta } from './file-compress.ts'
74+
import {
75+
robotFileDecompressInstructionsSchema,
76+
meta as fileDecompressMeta,
77+
} from './file-decompress.ts'
78+
import { robotFileFilterInstructionsSchema, meta as fileFilterMeta } from './file-filter.ts'
79+
import { robotFileHashInstructionsSchema, meta as fileHashMeta } from './file-hash.ts'
80+
import { robotFilePreviewInstructionsSchema, meta as filePreviewMeta } from './file-preview.ts'
81+
import { robotFileReadInstructionsSchema, meta as fileReadMeta } from './file-read.ts'
82+
import { robotFileServeInstructionsSchema, meta as fileServeMeta } from './file-serve.ts'
83+
import { robotFileVerifyInstructionsSchema, meta as fileVerifyMeta } from './file-verify.ts'
84+
import {
85+
robotFileVirusscanInstructionsSchema,
86+
meta as fileVirusscanMeta,
87+
} from './file-virusscan.ts'
3788
import { robotFileWatermarkInstructionsSchema } from './file-watermark.ts'
38-
import { robotFtpImportInstructionsSchema } from './ftp-import.ts'
39-
import { robotFtpStoreInstructionsSchema } from './ftp-store.ts'
40-
import { robotGoogleImportInstructionsSchema } from './google-import.ts'
41-
import { robotGoogleStoreInstructionsSchema } from './google-store.ts'
42-
import { robotHtmlConvertInstructionsSchema } from './html-convert.ts'
43-
import { robotHttpImportInstructionsSchema } from './http-import.ts'
44-
import { robotImageDescribeInstructionsSchema } from './image-describe.ts'
45-
import { robotImageFacedetectInstructionsSchema } from './image-facedetect.ts'
89+
import { robotFtpImportInstructionsSchema, meta as ftpImportMeta } from './ftp-import.ts'
90+
import { robotFtpStoreInstructionsSchema, meta as ftpStoreMeta } from './ftp-store.ts'
91+
import { robotGoogleImportInstructionsSchema, meta as googleImportMeta } from './google-import.ts'
92+
import { robotGoogleStoreInstructionsSchema, meta as googleStoreMeta } from './google-store.ts'
93+
import { robotHtmlConvertInstructionsSchema, meta as htmlConvertMeta } from './html-convert.ts'
94+
import { robotHttpImportInstructionsSchema, meta as httpImportMeta } from './http-import.ts'
95+
import {
96+
robotImageDescribeInstructionsSchema,
97+
meta as imageDescribeMeta,
98+
} from './image-describe.ts'
99+
import {
100+
robotImageFacedetectInstructionsSchema,
101+
meta as imageFacedetectMeta,
102+
} from './image-facedetect.ts'
46103
import {
47104
robotImageGenerateInstructionsSchema,
48105
robotImageGenerateInstructionsWithHiddenFieldsSchema,
49106
} from './image-generate.ts'
50-
import { robotImageMergeInstructionsSchema } from './image-merge.ts'
51-
import { robotImageOcrInstructionsSchema } from './image-ocr.ts'
52-
import { robotImageOptimizeInstructionsSchema } from './image-optimize.ts'
107+
import { robotImageMergeInstructionsSchema, meta as imageMergeMeta } from './image-merge.ts'
108+
import { robotImageOcrInstructionsSchema, meta as imageOcrMeta } from './image-ocr.ts'
109+
import {
110+
robotImageOptimizeInstructionsSchema,
111+
meta as imageOptimizeMeta,
112+
} from './image-optimize.ts'
53113
import { robotImageRemoveBackgroundInstructionsSchema } from './image-remove-background.ts'
54-
import { robotImageResizeInstructionsSchema } from './image-resize.ts'
55-
import { robotMediaPlaylistInstructionsSchema } from './media-playlist.ts'
56-
import { robotMetaWriteInstructionsSchema } from './meta-write.ts'
57-
import { robotMinioImportInstructionsSchema } from './minio-import.ts'
58-
import { robotMinioStoreInstructionsSchema } from './minio-store.ts'
114+
import { robotImageResizeInstructionsSchema, meta as imageResizeMeta } from './image-resize.ts'
115+
import {
116+
robotMediaPlaylistInstructionsSchema,
117+
meta as mediaPlaylistMeta,
118+
} from './media-playlist.ts'
119+
import { robotMetaWriteInstructionsSchema, meta as metaWriteMeta } from './meta-write.ts'
120+
import { robotMinioImportInstructionsSchema, meta as minioImportMeta } from './minio-import.ts'
121+
import { robotMinioStoreInstructionsSchema, meta as minioStoreMeta } from './minio-store.ts'
59122
import { robotProgressSimulateInstructionsSchema } from './progress-simulate.ts'
60-
import { robotS3ImportInstructionsSchema } from './s3-import.ts'
61-
import { robotS3StoreInstructionsSchema } from './s3-store.ts'
62-
import { robotScriptRunInstructionsSchema } from './script-run.ts'
63-
import { robotSftpImportInstructionsSchema } from './sftp-import.ts'
64-
import { robotSftpStoreInstructionsSchema } from './sftp-store.ts'
123+
import { robotS3ImportInstructionsSchema, meta as s3ImportMeta } from './s3-import.ts'
124+
import { robotS3StoreInstructionsSchema, meta as s3StoreMeta } from './s3-store.ts'
125+
import { robotScriptRunInstructionsSchema, meta as scriptRunMeta } from './script-run.ts'
126+
import { robotSftpImportInstructionsSchema, meta as sftpImportMeta } from './sftp-import.ts'
127+
import { robotSftpStoreInstructionsSchema, meta as sftpStoreMeta } from './sftp-store.ts'
65128
import {
66129
robotSpeechTranscribeInstructionsSchema,
67130
robotSpeechTranscribeInstructionsWithHiddenFieldsSchema,
131+
meta as speechTranscribeMeta,
68132
} from './speech-transcribe.ts'
69-
import { robotSupabaseImportInstructionsSchema } from './supabase-import.ts'
70-
import { robotSupabaseStoreInstructionsSchema } from './supabase-store.ts'
71-
import { robotSwiftImportInstructionsSchema } from './swift-import.ts'
72-
import { robotSwiftStoreInstructionsSchema } from './swift-store.ts'
73-
import { robotTextSpeakInstructionsSchema } from './text-speak.ts'
74-
import { robotTextTranslateInstructionsSchema } from './text-translate.ts'
75-
import { robotTlcdnDeliverInstructionsSchema } from './tlcdn-deliver.ts'
76-
import { robotTusStoreInstructionsSchema } from './tus-store.ts'
77-
import { robotUploadHandleInstructionsSchema } from './upload-handle.ts'
78-
import { robotVideoAdaptiveInstructionsSchema } from './video-adaptive.ts'
79-
import { robotVideoConcatInstructionsSchema } from './video-concat.ts'
80-
import { robotVideoEncodeInstructionsSchema } from './video-encode.ts'
81-
import { robotVideoMergeInstructionsSchema } from './video-merge.ts'
82-
import { robotVideoSubtitleInstructionsSchema } from './video-subtitle.ts'
83-
import { robotVideoThumbsInstructionsSchema } from './video-thumbs.ts'
84-
import { robotVimeoStoreInstructionsSchema } from './vimeo-store.ts'
85-
import { robotWasabiImportInstructionsSchema } from './wasabi-import.ts'
86-
import { robotWasabiStoreInstructionsSchema } from './wasabi-store.ts'
87-
import { robotYoutubeStoreInstructionsSchema } from './youtube-store.ts'
133+
import {
134+
robotSupabaseImportInstructionsSchema,
135+
meta as supabaseImportMeta,
136+
} from './supabase-import.ts'
137+
import {
138+
robotSupabaseStoreInstructionsSchema,
139+
meta as supabaseStoreMeta,
140+
} from './supabase-store.ts'
141+
import { robotSwiftImportInstructionsSchema, meta as swiftImportMeta } from './swift-import.ts'
142+
import { robotSwiftStoreInstructionsSchema, meta as swiftStoreMeta } from './swift-store.ts'
143+
import { robotTextSpeakInstructionsSchema, meta as textSpeakMeta } from './text-speak.ts'
144+
import {
145+
robotTextTranslateInstructionsSchema,
146+
meta as textTranslateMeta,
147+
} from './text-translate.ts'
148+
import { robotTlcdnDeliverInstructionsSchema, meta as tlcdnDeliverMeta } from './tlcdn-deliver.ts'
149+
import { robotTusStoreInstructionsSchema, meta as tusStoreMeta } from './tus-store.ts'
150+
import { robotUploadHandleInstructionsSchema, meta as uploadHandleMeta } from './upload-handle.ts'
151+
import {
152+
robotVideoAdaptiveInstructionsSchema,
153+
meta as videoAdaptiveMeta,
154+
} from './video-adaptive.ts'
155+
import { robotVideoConcatInstructionsSchema, meta as videoConcatMeta } from './video-concat.ts'
156+
import { robotVideoEncodeInstructionsSchema, meta as videoEncodeMeta } from './video-encode.ts'
157+
import { robotVideoMergeInstructionsSchema, meta as videoMergeMeta } from './video-merge.ts'
158+
import {
159+
robotVideoSubtitleInstructionsSchema,
160+
meta as videoSubtitleMeta,
161+
} from './video-subtitle.ts'
162+
import { robotVideoThumbsInstructionsSchema, meta as videoThumbsMeta } from './video-thumbs.ts'
163+
import { robotVimeoStoreInstructionsSchema, meta as vimeoStoreMeta } from './vimeo-store.ts'
164+
import { robotWasabiImportInstructionsSchema, meta as wasabiImportMeta } from './wasabi-import.ts'
165+
import { robotWasabiStoreInstructionsSchema, meta as wasabiStoreMeta } from './wasabi-store.ts'
166+
import { robotYoutubeStoreInstructionsSchema, meta as youtubeStoreMeta } from './youtube-store.ts'
88167

89168
const robotStepsInstructions = [
90169
robotAudioArtworkInstructionsSchema,
@@ -270,3 +349,81 @@ export const robotsWithHiddenBotsAndFieldsSchema = z.discriminatedUnion('robot',
270349

271350
export type RobotsWithHiddenBots = z.infer<typeof robotsWithHiddenBotsSchema>
272351
export type RobotsWithHiddenBotsAndFields = z.infer<typeof robotsWithHiddenBotsAndFieldsSchema>
352+
353+
export const robotsMeta = {
354+
audioArtworkMeta,
355+
audioConcatMeta,
356+
audioEncodeMeta,
357+
audioLoopMeta,
358+
audioMergeMeta,
359+
audioWaveformMeta,
360+
azureImportMeta,
361+
azureStoreMeta,
362+
backblazeImportMeta,
363+
backblazeStoreMeta,
364+
cloudfilesImportMeta,
365+
cloudfilesStoreMeta,
366+
cloudflareImportMeta,
367+
cloudflareStoreMeta,
368+
digitaloceanImportMeta,
369+
digitaloceanStoreMeta,
370+
documentAutorotateMeta,
371+
documentConvertMeta,
372+
documentMergeMeta,
373+
documentOcrMeta,
374+
documentSplitMeta,
375+
documentThumbsMeta,
376+
dropboxImportMeta,
377+
dropboxStoreMeta,
378+
edglyDeliverMeta,
379+
fileCompressMeta,
380+
fileDecompressMeta,
381+
fileFilterMeta,
382+
fileHashMeta,
383+
filePreviewMeta,
384+
fileReadMeta,
385+
fileServeMeta,
386+
fileVerifyMeta,
387+
fileVirusscanMeta,
388+
ftpImportMeta,
389+
ftpStoreMeta,
390+
googleImportMeta,
391+
googleStoreMeta,
392+
htmlConvertMeta,
393+
httpImportMeta,
394+
imageDescribeMeta,
395+
imageFacedetectMeta,
396+
imageMergeMeta,
397+
imageOcrMeta,
398+
imageOptimizeMeta,
399+
imageResizeMeta,
400+
mediaPlaylistMeta,
401+
metaWriteMeta,
402+
minioImportMeta,
403+
minioStoreMeta,
404+
s3ImportMeta,
405+
s3StoreMeta,
406+
scriptRunMeta,
407+
sftpImportMeta,
408+
sftpStoreMeta,
409+
speechTranscribeMeta,
410+
supabaseImportMeta,
411+
supabaseStoreMeta,
412+
swiftImportMeta,
413+
swiftStoreMeta,
414+
textSpeakMeta,
415+
textTranslateMeta,
416+
tlcdnDeliverMeta,
417+
tusStoreMeta,
418+
uploadHandleMeta,
419+
videoAdaptiveMeta,
420+
videoConcatMeta,
421+
videoEncodeMeta,
422+
videoMergeMeta,
423+
videoSubtitleMeta,
424+
videoThumbsMeta,
425+
vimeoStoreMeta,
426+
wasabiImportMeta,
427+
wasabiStoreMeta,
428+
youtubeStoreMeta,
429+
}

src/alphalib/types/robots/_instructions-primitives.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ export interface RobotMeta {
8686
| 'image'
8787
| 'video'
8888
| 'webpage'
89+
90+
uses_tools?: ('ffmpeg' | 'imagemagick')[]
8991
}
9092

9193
/**

src/alphalib/types/robots/audio-artwork.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export const meta: RobotMeta = {
3131
title: 'Extract or insert audio artwork',
3232
typical_file_size_mb: 3.8,
3333
typical_file_type: 'audio file',
34+
uses_tools: ['ffmpeg'],
3435
}
3536

3637
export const robotAudioArtworkInstructionsSchema = robotBase

src/alphalib/types/robots/audio-concat.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export const meta: RobotMeta = {
4444
title: 'Concatenate audio',
4545
typical_file_size_mb: 3.8,
4646
typical_file_type: 'audio file',
47+
uses_tools: ['ffmpeg'],
4748
}
4849

4950
export const robotAudioConcatInstructionsSchema = robotBase

src/alphalib/types/robots/audio-encode.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const meta: RobotMeta = {
4040
title: 'Encode audio',
4141
typical_file_size_mb: 3.8,
4242
typical_file_type: 'audio file',
43+
uses_tools: ['ffmpeg'],
4344
}
4445

4546
export const robotAudioEncodeInstructionsSchema = robotBase

src/alphalib/types/robots/audio-loop.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const meta: RobotMeta = {
4040
title: 'Loop audio',
4141
typical_file_size_mb: 3.8,
4242
typical_file_type: 'audio file',
43+
uses_tools: ['ffmpeg'],
4344
}
4445

4546
export const robotAudioLoopInstructionsSchema = robotBase

src/alphalib/types/robots/audio-merge.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export const meta: RobotMeta = {
4545
title: 'Merge audio files into one',
4646
typical_file_size_mb: 3.8,
4747
typical_file_type: 'audio file',
48+
uses_tools: ['ffmpeg'],
4849
}
4950

5051
export const robotAudioMergeInstructionsSchema = robotBase

src/alphalib/types/robots/document-thumbs.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export const meta: RobotMeta = {
3939
title: 'Extract thumbnail images from documents',
4040
typical_file_size_mb: 0.8,
4141
typical_file_type: 'document',
42+
uses_tools: ['imagemagick'],
4243
}
4344

4445
export const robotDocumentThumbsInstructionsSchema = robotBase

0 commit comments

Comments
 (0)