@transloadit/zod 5.0.1 → 7.0.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.
Files changed (199) hide show
  1. package/dist/v3/assemblyStatus.d.ts +682 -682
  2. package/dist/v3/assemblyStatus.d.ts.map +1 -1
  3. package/dist/v3/assemblyStatus.js +23 -14
  4. package/dist/v3/englishInteger.d.ts +3 -0
  5. package/dist/v3/englishInteger.d.ts.map +1 -0
  6. package/dist/v3/englishInteger.js +12 -0
  7. package/dist/v3/lib/zodInputSemantics.d.ts +3 -1
  8. package/dist/v3/lib/zodInputSemantics.d.ts.map +1 -1
  9. package/dist/v3/lib/zodInputSemantics.js +17 -0
  10. package/dist/v3/robots/_ai-models.d.ts.map +1 -1
  11. package/dist/v3/robots/_ai-models.js +2 -0
  12. package/dist/v3/robots/_google-image-seed.d.ts +8 -0
  13. package/dist/v3/robots/_google-image-seed.d.ts.map +1 -0
  14. package/dist/v3/robots/_google-image-seed.js +11 -0
  15. package/dist/v3/robots/_image-describe-output.d.ts +55 -0
  16. package/dist/v3/robots/_image-describe-output.d.ts.map +1 -0
  17. package/dist/v3/robots/_image-describe-output.js +15 -0
  18. package/dist/v3/robots/_image-facedetect-output.d.ts +30 -0
  19. package/dist/v3/robots/_image-facedetect-output.d.ts.map +1 -0
  20. package/dist/v3/robots/_image-facedetect-output.js +14 -0
  21. package/dist/v3/robots/_index.d.ts +582 -48
  22. package/dist/v3/robots/_index.d.ts.map +1 -1
  23. package/dist/v3/robots/_index.js +84 -80
  24. package/dist/v3/robots/_instructions-primitives.d.ts +84 -0
  25. package/dist/v3/robots/_instructions-primitives.d.ts.map +1 -1
  26. package/dist/v3/robots/_instructions-primitives.js +57 -16
  27. package/dist/v3/robots/_ocr-output.d.ts +75 -0
  28. package/dist/v3/robots/_ocr-output.d.ts.map +1 -0
  29. package/dist/v3/robots/_ocr-output.js +14 -0
  30. package/dist/v3/robots/ai-chat.d.ts +13 -13
  31. package/dist/v3/robots/ai-chat.d.ts.map +1 -1
  32. package/dist/v3/robots/audio-encode.d.ts.map +1 -1
  33. package/dist/v3/robots/audio-encode.js +8 -1
  34. package/dist/v3/robots/audio-split.d.ts.map +1 -1
  35. package/dist/v3/robots/audio-split.js +2 -0
  36. package/dist/v3/robots/digitalocean-store.d.ts +4 -4
  37. package/dist/v3/robots/digitalocean-store.js +1 -1
  38. package/dist/v3/robots/document-convert.d.ts +8 -6
  39. package/dist/v3/robots/document-convert.d.ts.map +1 -1
  40. package/dist/v3/robots/document-convert.js +5 -5
  41. package/dist/v3/robots/document-extract.d.ts +4 -4
  42. package/dist/v3/robots/document-ocr.d.ts +8 -8
  43. package/dist/v3/robots/google-import.d.ts +4 -6
  44. package/dist/v3/robots/google-import.d.ts.map +1 -1
  45. package/dist/v3/robots/google-import.js +5 -2
  46. package/dist/v3/robots/google-store.d.ts +32 -8
  47. package/dist/v3/robots/google-store.d.ts.map +1 -1
  48. package/dist/v3/robots/google-store.js +14 -14
  49. package/dist/v3/robots/http-import.d.ts.map +1 -1
  50. package/dist/v3/robots/http-import.js +4 -0
  51. package/dist/v3/robots/image-bgremove.d.ts +16 -16
  52. package/dist/v3/robots/image-describe.d.ts +17 -17
  53. package/dist/v3/robots/image-describe.d.ts.map +1 -1
  54. package/dist/v3/robots/image-describe.js +2 -1
  55. package/dist/v3/robots/image-facedetect.d.ts +9 -35
  56. package/dist/v3/robots/image-facedetect.d.ts.map +1 -1
  57. package/dist/v3/robots/image-facedetect.js +1 -11
  58. package/dist/v3/robots/image-generate.d.ts +20 -20
  59. package/dist/v3/robots/image-generate.d.ts.map +1 -1
  60. package/dist/v3/robots/image-generate.js +7 -2
  61. package/dist/v3/robots/image-ocr.d.ts +8 -8
  62. package/dist/v3/robots/image-resize.d.ts +4 -0
  63. package/dist/v3/robots/image-resize.d.ts.map +1 -1
  64. package/dist/v3/robots/image-resize.js +34 -6
  65. package/dist/v3/robots/image-upscale.d.ts +17 -12
  66. package/dist/v3/robots/image-upscale.d.ts.map +1 -1
  67. package/dist/v3/robots/image-upscale.js +14 -2
  68. package/dist/v3/robots/mega-store.d.ts +4 -4
  69. package/dist/v3/robots/mega-store.js +1 -1
  70. package/dist/v3/robots/s3-store.d.ts +8 -8
  71. package/dist/v3/robots/s3-store.d.ts.map +1 -1
  72. package/dist/v3/robots/s3-store.js +34 -18
  73. package/dist/v3/robots/speech-transcribe.d.ts +12 -12
  74. package/dist/v3/robots/text-speak.d.ts +8 -8
  75. package/dist/v3/robots/text-translate.d.ts +8 -8
  76. package/dist/v3/robots/video-adaptive.d.ts +16 -19
  77. package/dist/v3/robots/video-adaptive.d.ts.map +1 -1
  78. package/dist/v3/robots/video-adaptive.js +37 -3
  79. package/dist/v3/robots/video-concat.d.ts.map +1 -1
  80. package/dist/v3/robots/video-concat.js +7 -3
  81. package/dist/v3/robots/video-encode.d.ts.map +1 -1
  82. package/dist/v3/robots/video-encode.js +6 -0
  83. package/dist/v3/robots/video-generate.d.ts +20 -20
  84. package/dist/v3/robots/video-generate.js +1 -1
  85. package/dist/v3/robots/video-merge.d.ts.map +1 -1
  86. package/dist/v3/robots/video-merge.js +15 -1
  87. package/dist/v3/robots/video-split.d.ts.map +1 -1
  88. package/dist/v3/robots/video-split.js +2 -0
  89. package/dist/v3/robots/video-subtitle.d.ts +47 -4
  90. package/dist/v3/robots/video-subtitle.d.ts.map +1 -1
  91. package/dist/v3/robots/video-subtitle.js +59 -46
  92. package/dist/v3/robots/video-thumbs.d.ts +6 -0
  93. package/dist/v3/robots/video-thumbs.d.ts.map +1 -1
  94. package/dist/v3/robots/video-thumbs.js +15 -5
  95. package/dist/v3/robots/vimeo-import.d.ts.map +1 -1
  96. package/dist/v3/robots/vimeo-import.js +1 -1
  97. package/dist/v3/robots/youtube-store.d.ts +37 -20
  98. package/dist/v3/robots/youtube-store.d.ts.map +1 -1
  99. package/dist/v3/robots/youtube-store.js +17 -29
  100. package/dist/v3/youtubeCategories.d.ts +20 -0
  101. package/dist/v3/youtubeCategories.d.ts.map +1 -0
  102. package/dist/v3/youtubeCategories.js +20 -0
  103. package/dist/v4/assemblyStatus.d.ts +75 -1183
  104. package/dist/v4/assemblyStatus.d.ts.map +1 -1
  105. package/dist/v4/assemblyStatus.js +23 -14
  106. package/dist/v4/englishInteger.d.ts +3 -0
  107. package/dist/v4/englishInteger.d.ts.map +1 -0
  108. package/dist/v4/englishInteger.js +12 -0
  109. package/dist/v4/lib/zodInputSemantics.d.ts +3 -1
  110. package/dist/v4/lib/zodInputSemantics.d.ts.map +1 -1
  111. package/dist/v4/lib/zodInputSemantics.js +6 -0
  112. package/dist/v4/robots/_ai-models.d.ts.map +1 -1
  113. package/dist/v4/robots/_ai-models.js +2 -0
  114. package/dist/v4/robots/_google-image-seed.d.ts +8 -0
  115. package/dist/v4/robots/_google-image-seed.d.ts.map +1 -0
  116. package/dist/v4/robots/_google-image-seed.js +11 -0
  117. package/dist/v4/robots/_image-describe-output.d.ts +23 -0
  118. package/dist/v4/robots/_image-describe-output.d.ts.map +1 -0
  119. package/dist/v4/robots/_image-describe-output.js +15 -0
  120. package/dist/v4/robots/_image-facedetect-output.d.ts +14 -0
  121. package/dist/v4/robots/_image-facedetect-output.d.ts.map +1 -0
  122. package/dist/v4/robots/_image-facedetect-output.js +15 -0
  123. package/dist/v4/robots/_index.d.ts +582 -48
  124. package/dist/v4/robots/_index.d.ts.map +1 -1
  125. package/dist/v4/robots/_index.js +84 -80
  126. package/dist/v4/robots/_instructions-primitives.d.ts +18 -0
  127. package/dist/v4/robots/_instructions-primitives.d.ts.map +1 -1
  128. package/dist/v4/robots/_instructions-primitives.js +56 -15
  129. package/dist/v4/robots/_ocr-output.d.ts +29 -0
  130. package/dist/v4/robots/_ocr-output.d.ts.map +1 -0
  131. package/dist/v4/robots/_ocr-output.js +14 -0
  132. package/dist/v4/robots/ai-chat.d.ts +1 -1
  133. package/dist/v4/robots/ai-chat.d.ts.map +1 -1
  134. package/dist/v4/robots/audio-encode.d.ts.map +1 -1
  135. package/dist/v4/robots/audio-encode.js +8 -1
  136. package/dist/v4/robots/audio-split.d.ts.map +1 -1
  137. package/dist/v4/robots/audio-split.js +2 -0
  138. package/dist/v4/robots/digitalocean-store.d.ts +8 -8
  139. package/dist/v4/robots/digitalocean-store.js +1 -1
  140. package/dist/v4/robots/document-convert.d.ts +22 -8
  141. package/dist/v4/robots/document-convert.d.ts.map +1 -1
  142. package/dist/v4/robots/document-convert.js +5 -5
  143. package/dist/v4/robots/google-import.d.ts +4 -4
  144. package/dist/v4/robots/google-import.d.ts.map +1 -1
  145. package/dist/v4/robots/google-import.js +5 -2
  146. package/dist/v4/robots/google-store.d.ts +16 -4
  147. package/dist/v4/robots/google-store.d.ts.map +1 -1
  148. package/dist/v4/robots/google-store.js +14 -14
  149. package/dist/v4/robots/http-import.d.ts.map +1 -1
  150. package/dist/v4/robots/http-import.js +4 -0
  151. package/dist/v4/robots/image-describe.d.ts +1 -5
  152. package/dist/v4/robots/image-describe.d.ts.map +1 -1
  153. package/dist/v4/robots/image-describe.js +2 -1
  154. package/dist/v4/robots/image-facedetect.d.ts +1 -11
  155. package/dist/v4/robots/image-facedetect.d.ts.map +1 -1
  156. package/dist/v4/robots/image-facedetect.js +1 -12
  157. package/dist/v4/robots/image-generate.d.ts +0 -4
  158. package/dist/v4/robots/image-generate.d.ts.map +1 -1
  159. package/dist/v4/robots/image-generate.js +6 -2
  160. package/dist/v4/robots/image-resize.d.ts +4 -0
  161. package/dist/v4/robots/image-resize.d.ts.map +1 -1
  162. package/dist/v4/robots/image-resize.js +34 -6
  163. package/dist/v4/robots/image-upscale.d.ts +5 -0
  164. package/dist/v4/robots/image-upscale.d.ts.map +1 -1
  165. package/dist/v4/robots/image-upscale.js +14 -2
  166. package/dist/v4/robots/mega-store.d.ts +8 -8
  167. package/dist/v4/robots/mega-store.js +1 -1
  168. package/dist/v4/robots/s3-store.d.ts +20 -0
  169. package/dist/v4/robots/s3-store.d.ts.map +1 -1
  170. package/dist/v4/robots/s3-store.js +34 -18
  171. package/dist/v4/robots/video-adaptive.d.ts +16 -16
  172. package/dist/v4/robots/video-adaptive.d.ts.map +1 -1
  173. package/dist/v4/robots/video-adaptive.js +38 -5
  174. package/dist/v4/robots/video-concat.d.ts.map +1 -1
  175. package/dist/v4/robots/video-concat.js +7 -3
  176. package/dist/v4/robots/video-encode.d.ts.map +1 -1
  177. package/dist/v4/robots/video-encode.js +6 -0
  178. package/dist/v4/robots/video-generate.d.ts +0 -4
  179. package/dist/v4/robots/video-generate.d.ts.map +1 -1
  180. package/dist/v4/robots/video-generate.js +1 -1
  181. package/dist/v4/robots/video-merge.d.ts.map +1 -1
  182. package/dist/v4/robots/video-merge.js +15 -1
  183. package/dist/v4/robots/video-split.d.ts.map +1 -1
  184. package/dist/v4/robots/video-split.js +2 -0
  185. package/dist/v4/robots/video-subtitle.d.ts +31 -4
  186. package/dist/v4/robots/video-subtitle.d.ts.map +1 -1
  187. package/dist/v4/robots/video-subtitle.js +58 -46
  188. package/dist/v4/robots/video-thumbs.d.ts +6 -0
  189. package/dist/v4/robots/video-thumbs.d.ts.map +1 -1
  190. package/dist/v4/robots/video-thumbs.js +15 -5
  191. package/dist/v4/robots/vimeo-import.d.ts.map +1 -1
  192. package/dist/v4/robots/vimeo-import.js +1 -1
  193. package/dist/v4/robots/youtube-store.d.ts +25 -76
  194. package/dist/v4/robots/youtube-store.d.ts.map +1 -1
  195. package/dist/v4/robots/youtube-store.js +18 -29
  196. package/dist/v4/youtubeCategories.d.ts +20 -0
  197. package/dist/v4/youtubeCategories.d.ts.map +1 -0
  198. package/dist/v4/youtubeCategories.js +20 -0
  199. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import { optionalWithV3Semantics } from "../lib/sdkZodOptional.js";
2
2
  import { z } from 'zod/v4';
3
- import { createStorageStoreExample, defineRobot, googleBase, robotBase, robotStoreMeta, robotUse, } from "./_instructions-primitives.js";
3
+ import { createStorageStoreExample, defineRobotWithHiddenFields, getGoogleCredentialsDescription, googleBase, robotBase, robotStoreMeta, robotUse, } from "./_instructions-primitives.js";
4
4
  export const meta = {
5
5
  ...robotStoreMeta,
6
6
  example_code: createStorageStoreExample('/google/store', 'YOUR_GOOGLE_CREDENTIALS'),
@@ -22,19 +22,11 @@ The URL to the exported file in your Google bucket will be presented in the Tran
22
22
  result: optionalWithV3Semantics(z
23
23
  .boolean())
24
24
  .describe('Whether the results of this Step should be present in the Assembly Status JSON'),
25
- credentials: z.string().describe(`
26
- Create a new [Google service account](https://cloud.google.com/storage/docs/authentication). Set its role to "Storage Object Creator". Choose "JSON" for the key file format and download it to your computer. You will need to upload this file when creating your <dfn>Template Credentials</dfn>.
25
+ credentials: z.string().describe(getGoogleCredentialsDescription(`
26
+ Grant the service account \`storage.objects.create\` on the bucket you want to export to. The “Storage Object Creator” role provides this permission for new objects, but does not allow overwriting existing objects. Add \`storage.objects.delete\` only if you need to overwrite existing objects. See [Google’s IAM roles for Cloud Storage](https://docs.cloud.google.com/storage/docs/access-control/iam-roles).
27
27
 
28
- Go back to your Google credentials project and enable the "Google Cloud Storage JSON API" for it. Wait around ten minutes for the action to propagate through the Google network. Grab the project ID from the dropdown menu in the header bar on the Google site. You will also need it later on.
29
-
30
- Now you can set up the \`storage.objects.create\` and \`storage.objects.delete\` permissions. The latter is optional and only required if you intend to overwrite existing paths.
31
-
32
- To do this from the Google Cloud console, navigate to "IAM &amp; Admin" and select "Roles". From here, click "Create Role", enter a name, set the role launch stage to _General availability,_ and set the permissions stated above.
33
-
34
- Next, go to Storage browser and select the ellipsis on your bucket to edit bucket permissions. From here, select "Add Member", enter your service account as a new member, and select your newly created role.
35
-
36
- Then, create your associated [Template Credentials](/c/template-credentials/) in your Transloadit account and use the name of your <dfn>Template Credentials</dfn> as this parameter's value.
37
- `),
28
+ For overwrites, create a custom role in “IAM &amp; Admin” → “Roles” with \`storage.objects.create\` and \`storage.objects.delete\`, then grant it to the service account on your bucket.
29
+ `)),
38
30
  path: z
39
31
  .string()
40
32
  .default('${unique_prefix}/${file.url_name}')
@@ -73,5 +65,13 @@ The SSL URL of the file in the result JSON. The following [Assembly variables](/
73
65
  `),
74
66
  })
75
67
  .strict();
76
- export const robotDefinition = defineRobot(meta, robotGoogleStoreInstructionsSchema);
68
+ // Credential alternatives stay optional while Templates and Assembly overrides are merged.
69
+ // GoogleStoreRobot validates the resolved values after credential injection.
70
+ const hiddenFields = {
71
+ bucket: optionalWithV3Semantics(z.string()),
72
+ credentials: optionalWithV3Semantics(robotGoogleStoreInstructionsSchema.shape.credentials),
73
+ key_file_contents: optionalWithV3Semantics(z.string()),
74
+ project_id: optionalWithV3Semantics(z.string()),
75
+ };
76
+ export const robotDefinition = defineRobotWithHiddenFields(meta, robotGoogleStoreInstructionsSchema, hiddenFields);
77
77
  export const { withHiddenFields: robotGoogleStoreInstructionsWithHiddenFieldsSchema, interpolatable: interpolatableRobotGoogleStoreInstructionsSchema, interpolatableWithHiddenFields: interpolatableRobotGoogleStoreInstructionsWithHiddenFieldsSchema, } = robotDefinition;
@@ -1 +1 @@
1
- {"version":3,"file":"http-import.d.ts","sourceRoot":"","sources":["../../../src/v4/robots/http-import.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAEpF,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAc1B,eAAO,MAAM,IAAI,EAAE,cAkBlB,CAAA;AAED,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsFnC,CAAA;AAEX,eAAO,MAAM,iDAAiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAe1D,CAAA;AAEJ,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAA;AAC3F,MAAM,MAAM,2CAA2C,GAAG,CAAC,CAAC,KAAK,CAC/D,OAAO,iDAAiD,CACzD,CAAA;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A;AACD,MAAM,MAAM,yCAAyC,GACnD,8CAA8C,CAAA;AAEhD,MAAM,MAAM,8CAA8C,GAAG,CAAC,CAAC,KAAK,CAClE,OAAO,+CAA+C,CACvD,CAAA;AAED,eAAO,MAAM,+DAA+D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAE3E,CAAA;AACD,MAAM,MAAM,yDAAyD,GAAG,CAAC,CAAC,KAAK,CAC7E,OAAO,+DAA+D,CACvE,CAAA;AACD,MAAM,MAAM,8DAA8D,GAAG,CAAC,CAAC,KAAK,CAClF,OAAO,+DAA+D,CACvE,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,eAAe,CAC3C,OAAO,+CAA+C,EACtD,OAAO,+DAA+D,CAKvE,CAAA"}
@@ -42,12 +42,16 @@ The URL from which the file to be imported can be retrieved.
42
42
  HTTPS URLs must present a valid certificate trusted by Transloadit and matching the requested hostname. Self-signed, expired, or hostname-mismatched certificates cause \`${httpImportRobotErrors.HTTP_IMPORT_FAILURE.error}\`.
43
43
 
44
44
  You can also specify an array of URLs or a string of \`|\` delimited URLs to import several files at once. Please also check the \`url_delimiter\` parameter for that.
45
+
46
+ Delimited URL lists are split before variables are interpolated. A delimiter introduced by a variable remains part of that URL. To supply several URLs through a variable, have the entire \`url\` value interpolate to an array of URLs.
45
47
  `),
46
48
  url_delimiter: z
47
49
  .string()
48
50
  .default('|')
49
51
  .describe(`
50
52
  Provides the delimiter that is used to split the URLs in your \`url\` parameter value.
53
+
54
+ The delimiter must be literal. Only delimiters outside interpolation expressions in the original \`url\` value separate imports; variable values are never split.
51
55
  `),
52
56
  headers: z
53
57
  .union([
@@ -1,5 +1,6 @@
1
1
  import type { RobotDefinition, RobotMetaInput, RobotSchemaVariantTypes } from './_instructions-primitives.ts';
2
2
  import { z } from 'zod/v4';
3
+ export { imageDescribeFullMetaSchema, imageDescribeFullOutputSchema, imageDescribeLabelSchema, imageDescribeListMetaSchema, } from './_image-describe-output.ts';
3
4
  export declare const meta: RobotMetaInput;
4
5
  export declare const robotImageDescribeInstructionsSchema: z.ZodObject<{
5
6
  interpolate: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
@@ -46,7 +47,6 @@ export declare const robotImageDescribeInstructionsSchema: z.ZodObject<{
46
47
  }>>;
47
48
  format: z.ZodDefault<z.ZodEnum<{
48
49
  json: "json";
49
- text: "text";
50
50
  meta: "meta";
51
51
  }>>;
52
52
  explicit_descriptions: z.ZodDefault<z.ZodBoolean>;
@@ -96,7 +96,6 @@ export declare const robotImageDescribeInstructionsWithHiddenFieldsSchema: z.Zod
96
96
  }>>;
97
97
  format: z.ZodDefault<z.ZodEnum<{
98
98
  json: "json";
99
- text: "text";
100
99
  meta: "meta";
101
100
  }>>;
102
101
  explicit_descriptions: z.ZodDefault<z.ZodBoolean>;
@@ -146,7 +145,6 @@ export declare const robotImageDescribeInstructionsWithHiddenFieldsSchema: z.Zod
146
145
  }>]>>;
147
146
  format: z.ZodPrefault<z.ZodUnion<[z.ZodString, z.ZodEnum<{
148
147
  json: "json";
149
- text: "text";
150
148
  meta: "meta";
151
149
  }>]>>;
152
150
  explicit_descriptions: z.ZodPrefault<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
@@ -194,7 +192,6 @@ export declare const robotImageDescribeInstructionsWithHiddenFieldsSchema: z.Zod
194
192
  }>]>>;
195
193
  format: z.ZodPrefault<z.ZodUnion<[z.ZodString, z.ZodEnum<{
196
194
  json: "json";
197
- text: "text";
198
195
  meta: "meta";
199
196
  }>]>>;
200
197
  explicit_descriptions: z.ZodPrefault<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
@@ -207,5 +204,4 @@ export type InterpolatableRobotImageDescribeInstructions = Instructions['interpo
207
204
  export type InterpolatableRobotImageDescribeInstructionsInput = Instructions['interpolatableInput'];
208
205
  export type InterpolatableRobotImageDescribeInstructionsWithHiddenFields = Instructions['interpolatableHiddenOutput'];
209
206
  export type InterpolatableRobotImageDescribeInstructionsWithHiddenFieldsInput = Instructions['interpolatableHiddenInput'];
210
- export {};
211
207
  //# sourceMappingURL=image-describe.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-describe.d.ts","sourceRoot":"","sources":["../../../src/v4/robots/image-describe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,uBAAuB,EACxB,MAAM,+BAA+B,CAAA;AAEtC,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAa1B,eAAO,MAAM,IAAI,EAAE,cAoBlB,CAAA;AAED,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBA8BtC,CAAA;AAEX,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,OAAO,oCAAoC,CAAC,KAAK,CACtC,CAAA;AAEzD,eAAO,MACa,oDAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBACtD,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAEhE,kEAAkE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBACnD,CAAA;AAEnB,KAAK,YAAY,GAAG,uBAAuB,CAAC,OAAO,eAAe,CAAC,CAAA;AAEnE,MAAM,MAAM,8BAA8B,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;AACnE,MAAM,MAAM,8CAA8C,GAAG,YAAY,CAAC,cAAc,CAAC,CAAA;AACzF,MAAM,MAAM,4CAA4C,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAA;AAC9F,MAAM,MAAM,iDAAiD,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAA;AACnG,MAAM,MAAM,4DAA4D,GACtE,YAAY,CAAC,4BAA4B,CAAC,CAAA;AAC5C,MAAM,MAAM,iEAA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AAiE,GAC3E,YAAY,CAAC,2BAA2B,CAAC,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod/v4';
2
2
  import { awsGcpAiProviderSchema, createProcessingExample, defineRobot, granularitySchema, robotArtificialIntelligenceMeta, robotBase, robotParameterDocs, robotUse, } from "./_instructions-primitives.js";
3
+ export { imageDescribeFullMetaSchema, imageDescribeFullOutputSchema, imageDescribeLabelSchema, imageDescribeListMetaSchema, } from "./_image-describe-output.js";
3
4
  export const meta = {
4
5
  ...robotArtificialIntelligenceMeta,
5
6
  example_code: createProcessingExample('described', '/image/describe', {
@@ -31,7 +32,7 @@ You can use the labels that we return in your application to automatically class
31
32
  Whether to return a full response (\`"full"\`) including confidence percentages for each found label, or just a flat list of labels (\`"list"\`).
32
33
  `),
33
34
  format: z
34
- .enum(['json', 'meta', 'text'])
35
+ .enum(['json', 'meta'])
35
36
  .default('json')
36
37
  .describe(`
37
38
  In what format to return the descriptions.
@@ -7,16 +7,7 @@ export declare const imageFacedetectFaceSelectionModeSchema: z.ZodEnum<{
7
7
  "max-confidence": "max-confidence";
8
8
  "max-size": "max-size";
9
9
  }>;
10
- export declare const imageFacedetectFaceCoordinatesSchema: z.ZodObject<{
11
- confidence: z.ZodOptional<z.ZodNumber>;
12
- height: z.ZodNumber;
13
- width: z.ZodNumber;
14
- x1: z.ZodNumber;
15
- x2: z.ZodOptional<z.ZodNumber>;
16
- y1: z.ZodNumber;
17
- y2: z.ZodOptional<z.ZodNumber>;
18
- }, z.core.$catchall<z.ZodUnknown>>;
19
- export type ImageFacedetectFaceCoordinates = z.infer<typeof imageFacedetectFaceCoordinatesSchema>;
10
+ export { type ImageFacedetectFaceCoordinates, imageFacedetectFaceCoordinatesSchema, } from './_image-facedetect-output.ts';
20
11
  export declare const meta: RobotMetaInput;
21
12
  export declare const robotImageFacedetectInstructionsSchema: z.ZodObject<{
22
13
  interpolate: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
@@ -244,5 +235,4 @@ export type InterpolatableRobotImageFacedetectInstructions = Instructions['inter
244
235
  export type InterpolatableRobotImageFacedetectInstructionsInput = Instructions['interpolatableInput'];
245
236
  export type InterpolatableRobotImageFacedetectInstructionsWithHiddenFields = Instructions['interpolatableHiddenOutput'];
246
237
  export type InterpolatableRobotImageFacedetectInstructionsWithHiddenFieldsInput = Instructions['interpolatableHiddenInput'];
247
- export {};
248
238
  //# sourceMappingURL=image-facedetect.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-facedetect.d.ts","sourceRoot":"","sources":["../../../src/v4/robots/image-facedetect.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,uBAAuB,EACxB,MAAM,+BAA+B,CAAA;AAEtC,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAY1B,eAAO,MAAM,iCAAiC,0DAKpC,CAAA;AAEV,eAAO,MAAM,sCAAsC;;;;;EAA4C,CAAA;AAE/F,eAAO,MAAM,oCAAoC;;;;;;;;kCAUzB,CAAA;AAExB,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAA;AAEjG,eAAO,MAAM,IAAI,EAAE,cAoBlB,CAAA;AAED,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAiGxC,CAAA;AAEX,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,OAAO,sCAAsC,CAAC,KAAK,CACtC,CAAA;AAE3D,eAAO,MACa,sDAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBACxD,oDAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAElE,oEAAoE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;oBAElE,oEAAoE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBACrD,CAAA;AAEnB,KAAK,YAAY,GAAG,uBAAuB,CAAC,OAAO,eAAe,CAAC,CAAA;AAEnE,MAAM,MAAM,gCAAgC,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;AACrE,MAAM,MAAM,gDAAgD,GAAG,YAAY,CAAC,cAAc,CAAC,CAAA;AAC3F,MAAM,MAAM,8CAA8C,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAA;AAChG,MAAM,MAAM,mDAAmD,GAC7D,YAAY,CAAC,qBAAqB,CAAC,CAAA;AACrC,MAAM,MAAM,8DAA8D,GACxE,YAAY,CAAC,4BAA4B,CAAC,CAAA;AAC5C,MAAM,MAAM,mEAAmE,GAC7E,YAAY,CAAC,2BAA2B,CAAC,CAAA"}
@@ -1,4 +1,3 @@
1
- import { optionalWithV3Semantics } from "../lib/sdkZodOptional.js";
2
1
  import { z } from 'zod/v4';
3
2
  import { awsGcpAiProviderSchema, createProcessingExample, defineRobot, robotArtificialIntelligenceMeta, robotBase, robotParameterDocs, robotUse, } from "./_instructions-primitives.js";
4
3
  export const imageFacedetectFaceSelectionModes = [
@@ -8,17 +7,7 @@ export const imageFacedetectFaceSelectionModes = [
8
7
  'max-size',
9
8
  ];
10
9
  export const imageFacedetectFaceSelectionModeSchema = z.enum(imageFacedetectFaceSelectionModes);
11
- export const imageFacedetectFaceCoordinatesSchema = z
12
- .object({
13
- confidence: optionalWithV3Semantics(z.number()),
14
- height: z.number(),
15
- width: z.number(),
16
- x1: z.number(),
17
- x2: optionalWithV3Semantics(z.number()),
18
- y1: z.number(),
19
- y2: optionalWithV3Semantics(z.number()),
20
- })
21
- .catchall(z.unknown());
10
+ export { imageFacedetectFaceCoordinatesSchema, } from "./_image-facedetect-output.js";
22
11
  export const meta = {
23
12
  ...robotArtificialIntelligenceMeta,
24
13
  example_code: createProcessingExample('faces_detected', '/image/facedetect', {
@@ -38,7 +38,6 @@ export declare const robotImageGenerateInstructionsSchema: z.ZodObject<{
38
38
  model: z.ZodOptional<z.ZodString>;
39
39
  prompt: z.ZodString;
40
40
  format: z.ZodOptional<z.ZodEnum<{
41
- gif: "gif";
42
41
  jpeg: "jpeg";
43
42
  jpg: "jpg";
44
43
  png: "png";
@@ -88,7 +87,6 @@ export declare const robotImageGenerateInstructionsWithHiddenFieldsSchema: z.Zod
88
87
  model: z.ZodOptional<z.ZodString>;
89
88
  prompt: z.ZodString;
90
89
  format: z.ZodOptional<z.ZodEnum<{
91
- gif: "gif";
92
90
  jpeg: "jpeg";
93
91
  jpg: "jpg";
94
92
  png: "png";
@@ -143,7 +141,6 @@ export declare const interpolatableRobotImageGenerateInstructionsSchema: z.ZodOb
143
141
  model: z.ZodOptional<z.ZodString>;
144
142
  prompt: z.ZodString;
145
143
  format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEnum<{
146
- gif: "gif";
147
144
  jpeg: "jpeg";
148
145
  jpg: "jpg";
149
146
  png: "png";
@@ -195,7 +192,6 @@ export declare const interpolatableRobotImageGenerateInstructionsWithHiddenField
195
192
  model: z.ZodOptional<z.ZodString>;
196
193
  prompt: z.ZodString;
197
194
  format: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodEnum<{
198
- gif: "gif";
199
195
  jpeg: "jpeg";
200
196
  jpg: "jpg";
201
197
  png: "png";
@@ -1 +1 @@
1
- {"version":3,"file":"image-generate.d.ts","sourceRoot":"","sources":["../../../src/v4/robots/image-generate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAEpF,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAqB1B,eAAO,MAAM,IAAI,EAAE,cA6BlB,CAAA;AASD,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AqEtC,CAAA;AAEX,eAAO,MAAM,oDAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAK7D,CAAA;AAEJ,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAA;AACjG,MAAM,MAAM,8CAA8C,GAAG,CAAC,CAAC,KAAK,CAClE,OAAO,oDAAoD,CAC5D,CAAA;AAED,eAAO,MAAM,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAE9D,CAAA;AACD,MAAM,MAAM,4CAA4C,GACtD,iDAAiD,CAAA;AAEnD,MAAM,MAAM,iDAAiD,GAAG,CAAC,CAAC,KAAK,CACrE,OAAO,kDAAkD,CAC1D,CAAA;AAED,eAAO,MAAM,kEAAkE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAE9E,CAAA;AACD,MAAM,MAAM,4DAA4D,GAAG,CAAC,CAAC,KAAK,CAChF,OAAO,kEAAkE,CAC1E,CAAA;AACD,MAAM,MAAM,iEAAiE,GAAG,CAAC,CAAC,KAAK,CACrF,OAAO,kEAAkE,CAC1E,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,eAAe,CAC3C,OAAO,kDAAkD,EACzD,OAAO,kEAAkE,CAM1E,CAAA"}
@@ -1,6 +1,7 @@
1
1
  import { optionalWithV3Semantics } from "../lib/sdkZodOptional.js";
2
2
  import { z } from 'zod/v4';
3
3
  import { imageGenerateDefaultModelIdentifier, imageGenerateLegacyModelAlias, imageGenerateModelIdentifiers, } from "./_ai-models.js";
4
+ import { googleImageSeedMaximum } from "./_google-image-seed.js";
4
5
  import { autoProviderDescription, interpolateRobot, robotArtificialIntelligenceMeta, robotBase, robotParameterDocs, robotUse, } from "./_instructions-primitives.js";
5
6
  function formatEnglishModelList(values) {
6
7
  const formattedValues = values.map((model) => `\`${model}\``);
@@ -71,9 +72,12 @@ Best practice:
71
72
  .string()
72
73
  .describe('Prompt describing the desired image. For inpainting, describe what should appear in the masked/transparent region and that the rest should stay unchanged.'),
73
74
  format: optionalWithV3Semantics(z
74
- .enum(['jpeg', 'jpg', 'png', 'gif', 'webp', 'svg']))
75
+ .enum(['jpeg', 'jpg', 'png', 'webp', 'svg']))
75
76
  .describe('Output format. Defaults depend on model: png for Google and OpenAI models, svg for recraft-v3, jpeg for others. Google models currently return PNG only.'),
76
- seed: optionalWithV3Semantics(z.number()).describe(robotParameterDocs.seed.description),
77
+ // Provider-specific limits are checked by the Robot so other models retain their seed range.
78
+ seed: optionalWithV3Semantics(z
79
+ .number())
80
+ .describe(`${robotParameterDocs.seed.description} For Google models, use an integer from 0 to ${googleImageSeedMaximum}. Each output increments the seed by 1, so the final output’s seed must also fit this range. A seed does not guarantee identical images.`),
77
81
  aspect_ratio: optionalWithV3Semantics(z
78
82
  .string())
79
83
  .describe('Requested output aspect ratio. For Google models, width/height can also be used and orientation is derived automatically when aspect_ratio is omitted.'),
@@ -1,5 +1,9 @@
1
1
  import type { RobotDefinitionWithHiddenFields, RobotMetaInput, RobotSchemaVariantTypes } from './_instructions-primitives.ts';
2
2
  import { z } from 'zod/v4';
3
+ /** Input MIME types eligible for automatic libvips processing in /image/resize. */
4
+ export declare const imageResizeDaemonInputMimes: readonly string[];
5
+ /** Output formats eligible for automatic libvips processing in /image/resize. */
6
+ export declare const imageResizeDaemonOutputFormats: readonly string[];
3
7
  export declare const meta: RobotMetaInput;
4
8
  export declare const oneTextSchema: z.ZodObject<{
5
9
  text: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"image-resize.d.ts","sourceRoot":"","sources":["../../../src/v4/robots/image-resize.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,+BAA+B,EAC/B,cAAc,EACd,uBAAuB,EACxB,MAAM,+BAA+B,CAAA;AAEtC,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAyB1B,eAA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A;AAC5C,MAAM,MAAM,+DAA+D,GACzE,YAAY,CAAC,2BAA2B,CAAC,CAAA"}
@@ -4,6 +4,32 @@ import { imagemagickDensityPattern } from "../imagemagickDensity.js";
4
4
  import { zodInputPreservingTransform } from "../lib/zodInputSemantics.js";
5
5
  import { color_without_alpha_with_named, colorspaceSchema, complexHeightSchema, complexWidthSchema, createProcessingExample, defineRobotWithHiddenFields, httpUrlSchema, imageAdaptiveFilteringSchema, imageQualitySchema, percentageSchema, positionSchema, robotBase, robotImagemagick, robotImageProcessingMeta, robotUse, unsafeCoordinatesSchema, } from "./_instructions-primitives.js";
6
6
  const imageResizeGravitySchema = z.union([positionSchema, z.enum(['attention', 'entropy'])]);
7
+ /** Input MIME types eligible for automatic libvips processing in /image/resize. */
8
+ export const imageResizeDaemonInputMimes = [
9
+ 'image/jpg',
10
+ 'image/jpeg',
11
+ 'image/jxl',
12
+ 'image/png',
13
+ 'image/tiff',
14
+ 'image/tiff-fx',
15
+ 'image/gif',
16
+ 'image/webp',
17
+ 'image/svg',
18
+ 'image/svg+xml',
19
+ ];
20
+ /** Output formats eligible for automatic libvips processing in /image/resize. */
21
+ export const imageResizeDaemonOutputFormats = [
22
+ 'heic',
23
+ 'heif',
24
+ 'jpeg',
25
+ 'jpg',
26
+ 'jxl',
27
+ 'png',
28
+ 'raw',
29
+ 'tiff',
30
+ 'webp',
31
+ 'avif',
32
+ ];
7
33
  export const meta = {
8
34
  ...robotImageProcessingMeta,
9
35
  example_code: createProcessingExample('resized', '/image/resize', {
@@ -141,14 +167,14 @@ Height of the new image, in pixels. If not specified, will default to the height
141
167
  .union([
142
168
  z
143
169
  .literal('crop')
144
- .describe(`Cuts an area out of an image, discarding any overlapping parts. If the source image is smaller than the crop frame, it will be zoomed. This strategy is implied when you specify coordinates in the \`crop\` parameter, and cannot be used without it.
170
+ .describe(`Cuts an area out of an image. Coordinates in the \`crop\` parameter imply this strategy. With coordinates, ImageMagick crops without resizing; libvips enlarges the image if \`x2\` or \`y2\` exceeds its dimensions, even with \`zoom: false\`. Without coordinates, set both \`width\` and \`height\`; this uses \`fillcrop\`, with \`gravity\` selecting which part is kept. With the default \`zoom\` setting, this coordinate-free path scales the image to cover that rectangle before trimming.
145
171
 
146
172
  To crop around human faces, see [🤖/image/facedetect](https://transloadit.com/docs/robots/image-facedetect/) instead.`),
147
173
  z
148
174
  .literal('fillcrop')
149
175
  .describe(`Scales the image to fit into our 100×100 target while preserving aspect ratio, while trimming away any excess surface. This means both sides will become exactly 100 pixels, at the tradeoff of destroying parts of the image.
150
176
 
151
- By default the resulting image is horizontally/vertically centered to fill the target rectangle. Use the \`gravity\` parameter to change where to crop the image, such as \`"bottom\`" or \`"left\`".`),
177
+ By default the resulting image is horizontally/vertically centered to fill the target rectangle. Use the \`gravity\` parameter to change where to crop the image, such as \`"bottom"\` or \`"left"\`.`),
152
178
  z
153
179
  .literal('fit')
154
180
  .describe(`Uses the larger side of the original image as a base for the resize. Aspect ratio is preserved. Either side will become at most 100 pixels.
@@ -192,7 +218,7 @@ For example:
192
218
  }
193
219
  \`\`\`
194
220
 
195
- This will crop the area from \`(80, 100)\` to \`(600, 800)\` from a 1000×1000 pixels image, which is a square whose width is 520px and height is 700px. If \`crop\` is set, the width and height parameters are ignored, and the \`resize_strategy\` is set to \`crop\` automatically.
221
+ This will crop the area from \`(80, 100)\` to \`(600, 800)\` from a 1000×1000 pixels image, which is a rectangle whose width is 520px and height is 700px. If \`crop\` is set, the width and height parameters are ignored, and the \`resize_strategy\` is set to \`crop\` automatically.
196
222
 
197
223
  You can also use a JSON string of such an object with coordinates in similar fashion:
198
224
 
@@ -203,9 +229,11 @@ You can also use a JSON string of such an object with coordinates in similar fas
203
229
  To crop around human faces, see [🤖/image/facedetect](/docs/robots/image-facedetect/).
204
230
  `),
205
231
  gravity: imageResizeGravitySchema.default('center').describe(`
206
- The direction from which the image is to be cropped when \`"resize_strategy"\` is set to \`"crop"\` or \`"fillcrop"\`, but no crop coordinates are defined.
207
-
208
- You can also use \`"entropy"\` or \`"attention"\` for automatic point-of-interest cropping. \`"entropy"\` keeps the region with the highest Shannon entropy, while \`"attention"\` favors areas with luminance frequency, saturation, and skin-tone cues.
232
+ Sets crop direction for \`crop\` or \`fillcrop\` without explicit coordinates.
233
+ Content-aware \`attention\` and \`entropy\` need libvips, \`fillcrop\`, \`width\` and \`height\`.
234
+ Effects such as \`sepia\` or \`text\`, and inputs such as HEIC, can use ImageMagick.
235
+ It centers these crops and the Assembly reports a warning.
236
+ Crop in a separate /image/resize Step before effects, or convert unsupported inputs to PNG first.
209
237
  `),
210
238
  strip: z
211
239
  .boolean()
@@ -1,6 +1,11 @@
1
1
  import type { RobotDefinitionWithHiddenFields, RobotMetaInput, RobotSchemaVariantTypes } from './_instructions-primitives.ts';
2
2
  import { z } from 'zod/v4';
3
3
  export declare const meta: RobotMetaInput;
4
+ /**
5
+ * Maximum input area accepted by the pinned Real-ESRGAN Replicate predictor.
6
+ * @see https://github.com/replicate/cog-real-esrgan/blob/6cbd5e6ce8bd0fa90db54af899a8a9a85eb3db41/predict.py#L19
7
+ */
8
+ export declare const realEsrganMaxInputPixels: number;
4
9
  export declare const robotImageUpscaleInstructionsSchema: z.ZodObject<{
5
10
  interpolate: z.ZodOptional<z.ZodUnion<readonly [z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
6
11
  true: "true";
@@ -1 +1 @@
1
- {"version":3,"file":"image-upscale.d.ts","sourceRoot":"","sources":["../../../src/v4/robots/image-upscale.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,+BAA+B,EAC/B,cAAc,EACd,uBAAuB,EACxB,MAAM,+BAA+B,CAAA;AAEtC,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAY1B,eAAO,MAAM,IAAI,EAAE,cAelB,CAAA;AAQD,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAgBrC,CAAA;AAEX,QAAA,MA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CAEjB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,+BAA+B,CAC3D,OAAO,mCAAmC,CAAC,KAAK,EAChD,OAAO,YAAY,CACmE,CAAA;AAExF,eAAO,MACa,mDAAmD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBACrD,iDAAiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBACjC,iEAAiE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAChF,CAAA;AAEnB,KAAK,YAAY,GAAG,uBAAuB,CAAC,OAAO,eAAe,CAAC,CAAA;AAEnE,MAAM,MAAM,6BAA6B,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;AAClE,MAAM,MAAM,6CAA6C,GAAG,YAAY,CAAC,cAAc,CAAC,CAAA;AACxF,MAAM,MAAM,2CAA2C,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAA;AAC7F,MAAM,MAAM,gDAAgD,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAA;AAClG,MAAM,MAAM,2DAA2D,GACrE,YAAY,CAAC,4BAA4B,CAAC,CAAA;AAC5C,MAAM,MAAM,gEAAgE,GAC1E,YAAY,CAAC,2BAA2B,CAAC,CAAA"}
@@ -1,5 +1,6 @@
1
1
  import { optionalWithV3Semantics } from "../lib/sdkZodOptional.js";
2
2
  import { z } from 'zod/v4';
3
+ import { formatEnglishInteger } from "../englishInteger.js";
3
4
  import { imageUpscaleDefaultModelIdentifier, imageUpscaleModelIdentifiers } from "./_ai-models.js";
4
5
  import { autoProviderDescription, createProcessingExample, defineRobotWithHiddenFields, robotArtificialIntelligenceMeta, robotBase, robotUse, } from "./_instructions-primitives.js";
5
6
  export const meta = {
@@ -15,7 +16,13 @@ export const meta = {
15
16
  purpose_words: 'Upscale images',
16
17
  title: 'Upscale images',
17
18
  name: 'ImageUpscaleRobot',
19
+ // Preserve the runtime fallback; positive provider costs replace it during usage accounting.
18
20
  minimumChargeUsd: 0.06,
21
+ providerCostPricing: {
22
+ provider: 'replicate',
23
+ model: imageUpscaleDefaultModelIdentifier,
24
+ models: [...imageUpscaleModelIdentifiers],
25
+ },
19
26
  stage: 'beta',
20
27
  };
21
28
  const upscaleModelSchema = z
@@ -23,15 +30,20 @@ const upscaleModelSchema = z
23
30
  .default(imageUpscaleDefaultModelIdentifier);
24
31
  const upscaleScaleSchema = z.union([z.literal(2), z.literal(4)]).default(2);
25
32
  const upscaleFaceEnhanceSchema = z.boolean().default(false);
33
+ /**
34
+ * Maximum input area accepted by the pinned Real-ESRGAN Replicate predictor.
35
+ * @see https://github.com/replicate/cog-real-esrgan/blob/6cbd5e6ce8bd0fa90db54af899a8a9a85eb3db41/predict.py#L19
36
+ */
37
+ export const realEsrganMaxInputPixels = 1448 * 1448;
26
38
  export const robotImageUpscaleInstructionsSchema = robotBase
27
39
  .merge(robotUse)
28
40
  .extend({
29
41
  robot: z.literal('/image/upscale'),
30
42
  // Outer optional preserves parsed input; normalization applies the published inner defaults.
31
43
  model: optionalWithV3Semantics(upscaleModelSchema)
32
- .describe(`The AI model to use for image upscaling. Defaults to ${upscaleModelSchema.parse(undefined)}.`),
44
+ .describe(`The AI model to use for image upscaling. Defaults to ${upscaleModelSchema.parse(undefined)}. Real-ESRGAN inputs exceeding ${formatEnglishInteger(realEsrganMaxInputPixels)} pixels are resized proportionally before upscaling.`),
33
45
  scale: optionalWithV3Semantics(upscaleScaleSchema)
34
- .describe(`Upscale factor. Defaults to ${upscaleScaleSchema.parse(undefined)}.`),
46
+ .describe(`Upscale factor, applied after any input resizing. Defaults to ${upscaleScaleSchema.parse(undefined)}. GFPGAN results are resized after restoration to match this factor.`),
35
47
  face_enhance: optionalWithV3Semantics(upscaleFaceEnhanceSchema)
36
48
  .describe(`Enable face enhancement for better face restoration. Defaults to ${upscaleFaceEnhanceSchema.parse(undefined)}.`),
37
49
  })
@@ -42,10 +42,10 @@ export declare const robotMegaStoreInstructionsSchema: z.ZodObject<{
42
42
  secret: z.ZodOptional<z.ZodString>;
43
43
  robot: z.ZodLiteral<"/mega/store">;
44
44
  path: z.ZodDefault<z.ZodString>;
45
- acl: z.ZodDefault<z.ZodEnum<{
45
+ acl: z.ZodDefault<z.ZodDefault<z.ZodEnum<{
46
46
  private: "private";
47
47
  "public-read": "public-read";
48
- }>>;
48
+ }>>>;
49
49
  headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
50
50
  sign_urls_for: z.ZodOptional<z.ZodNumber>;
51
51
  }, z.core.$strict>;
@@ -90,10 +90,10 @@ export declare const robotMegaStoreInstructionsWithHiddenFieldsSchema: z.ZodObje
90
90
  secret: z.ZodOptional<z.ZodString>;
91
91
  robot: z.ZodLiteral<"/mega/store">;
92
92
  path: z.ZodDefault<z.ZodString>;
93
- acl: z.ZodDefault<z.ZodEnum<{
93
+ acl: z.ZodDefault<z.ZodDefault<z.ZodEnum<{
94
94
  private: "private";
95
95
  "public-read": "public-read";
96
- }>>;
96
+ }>>>;
97
97
  headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
98
98
  sign_urls_for: z.ZodOptional<z.ZodNumber>;
99
99
  result: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"debug">, z.ZodDefault<z.ZodBoolean>]>>;
@@ -138,10 +138,10 @@ export declare const robotMegaStoreInstructionsWithHiddenFieldsSchema: z.ZodObje
138
138
  secret: z.ZodOptional<z.ZodString>;
139
139
  robot: z.ZodLiteral<"/mega/store">;
140
140
  path: z.ZodPrefault<z.ZodString>;
141
- acl: z.ZodPrefault<z.ZodUnion<[z.ZodString, z.ZodEnum<{
141
+ acl: z.ZodPrefault<z.ZodPrefault<z.ZodUnion<[z.ZodString, z.ZodEnum<{
142
142
  private: "private";
143
143
  "public-read": "public-read";
144
- }>]>>;
144
+ }>]>>>;
145
145
  headers: z.ZodPrefault<z.ZodRecord<z.ZodString, z.ZodString>>;
146
146
  sign_urls_for: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
147
147
  }, z.core.$strict>, interpolatableRobotMegaStoreInstructionsWithHiddenFieldsSchema: z.ZodObject<{
@@ -184,10 +184,10 @@ export declare const robotMegaStoreInstructionsWithHiddenFieldsSchema: z.ZodObje
184
184
  secret: z.ZodOptional<z.ZodString>;
185
185
  robot: z.ZodLiteral<"/mega/store">;
186
186
  path: z.ZodPrefault<z.ZodString>;
187
- acl: z.ZodPrefault<z.ZodUnion<[z.ZodString, z.ZodEnum<{
187
+ acl: z.ZodPrefault<z.ZodPrefault<z.ZodUnion<[z.ZodString, z.ZodEnum<{
188
188
  private: "private";
189
189
  "public-read": "public-read";
190
- }>]>>;
190
+ }>]>>>;
191
191
  headers: z.ZodPrefault<z.ZodRecord<z.ZodString, z.ZodString>>;
192
192
  sign_urls_for: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
193
193
  result: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodString, z.ZodLiteral<"debug">]>, z.ZodPrefault<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>]>>;
@@ -19,7 +19,7 @@ export const robotMegaStoreInstructionsSchema = robotBase
19
19
  The URL to the result file will be returned in the <dfn>Assembly Status JSON</dfn>.
20
20
  `),
21
21
  path: storeFilePath,
22
- acl: storageAcl,
22
+ acl: storageAcl.default('private'),
23
23
  headers: z.record(z.string(), z.string())
24
24
  .default({ 'Content-Type': '${file.mime}' })
25
25
  .describe(`
@@ -45,8 +45,13 @@ export declare const robotS3StoreInstructionsSchema: z.ZodObject<{
45
45
  acl: z.ZodDefault<z.ZodEnum<{
46
46
  private: "private";
47
47
  "public-read": "public-read";
48
+ "authenticated-read": "authenticated-read";
49
+ "bucket-owner-full-control": "bucket-owner-full-control";
50
+ "aws-exec-read": "aws-exec-read";
48
51
  "bucket-default": "bucket-default";
52
+ "bucket-owner-read": "bucket-owner-read";
49
53
  public: "public";
54
+ "public-read-write": "public-read-write";
50
55
  }>>;
51
56
  check_integrity: z.ZodDefault<z.ZodBoolean>;
52
57
  headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -103,8 +108,13 @@ export declare const robotS3StoreInstructionsWithHiddenFieldsSchema: z.ZodObject
103
108
  acl: z.ZodDefault<z.ZodEnum<{
104
109
  private: "private";
105
110
  "public-read": "public-read";
111
+ "authenticated-read": "authenticated-read";
112
+ "bucket-owner-full-control": "bucket-owner-full-control";
113
+ "aws-exec-read": "aws-exec-read";
106
114
  "bucket-default": "bucket-default";
115
+ "bucket-owner-read": "bucket-owner-read";
107
116
  public: "public";
117
+ "public-read-write": "public-read-write";
108
118
  }>>;
109
119
  check_integrity: z.ZodDefault<z.ZodBoolean>;
110
120
  headers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -159,8 +169,13 @@ export declare const robotS3StoreInstructionsWithHiddenFieldsSchema: z.ZodObject
159
169
  acl: z.ZodPrefault<z.ZodUnion<[z.ZodString, z.ZodEnum<{
160
170
  private: "private";
161
171
  "public-read": "public-read";
172
+ "authenticated-read": "authenticated-read";
173
+ "bucket-owner-full-control": "bucket-owner-full-control";
174
+ "aws-exec-read": "aws-exec-read";
162
175
  "bucket-default": "bucket-default";
176
+ "bucket-owner-read": "bucket-owner-read";
163
177
  public: "public";
178
+ "public-read-write": "public-read-write";
164
179
  }>]>>;
165
180
  check_integrity: z.ZodPrefault<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
166
181
  headers: z.ZodPrefault<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -212,8 +227,13 @@ export declare const robotS3StoreInstructionsWithHiddenFieldsSchema: z.ZodObject
212
227
  acl: z.ZodPrefault<z.ZodUnion<[z.ZodString, z.ZodEnum<{
213
228
  private: "private";
214
229
  "public-read": "public-read";
230
+ "authenticated-read": "authenticated-read";
231
+ "bucket-owner-full-control": "bucket-owner-full-control";
232
+ "aws-exec-read": "aws-exec-read";
215
233
  "bucket-default": "bucket-default";
234
+ "bucket-owner-read": "bucket-owner-read";
216
235
  public: "public";
236
+ "public-read-write": "public-read-write";
217
237
  }>]>>;
218
238
  check_integrity: z.ZodPrefault<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
219
239
  headers: z.ZodPrefault<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -1 +1 @@
1
- {"version":3,"file":"s3-store.d.ts","sourceRoot":"","sources":["../../../src/v4/robots/s3-store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,+BAA+B,EAC/B,cAAc,EACd,uBAAuB,EACxB,MAAM,+BAA+B,CAAA;AAEtC,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAgB1B,eAAO,MAAM,IAAI,EAAE,cAYlB,CAAA;AAED,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAwGhC,CAAA;AAEX,QAAA,MAAM,YAAY;;CAMjB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,+BAA+B,CAC3D,OAAO,8BAA8B,CAAC,KAAK,EAC3C,OAAO,YAAY,CAC8D,CAAA;AAEnF,eAAO,MACa,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAChD,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAC5B,4DAA4D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAC3E,CAAA;AAEnB,KAAK,YAAY,GAAG,uBAAuB,CAAC,OAAO,eAAe,CAAC,CAAA;AAEnE,MAAM,MAAM,wBAAwB,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;AAC7D,MAAM,MAAM,6BAA6B,GAAG,YAAY,CAAC,OAAO,CAAC,CAAA;AACjE,MAAM,MAAM,wCAAwC,GAAG,YAAY,CAAC,cAAc,CAAC,CAAA;AACn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