@transloadit/zod 5.0.0 → 6.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 (73) 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/index.d.ts +1 -0
  5. package/dist/v3/index.d.ts.map +1 -1
  6. package/dist/v3/index.js +1 -0
  7. package/dist/v3/robots/_ai-models.d.ts.map +1 -1
  8. package/dist/v3/robots/_ai-models.js +2 -0
  9. package/dist/v3/robots/_google-image-seed.d.ts +8 -0
  10. package/dist/v3/robots/_google-image-seed.d.ts.map +1 -0
  11. package/dist/v3/robots/_google-image-seed.js +11 -0
  12. package/dist/v3/robots/_instructions-primitives.d.ts +2 -0
  13. package/dist/v3/robots/_instructions-primitives.d.ts.map +1 -1
  14. package/dist/v3/robots/_instructions-primitives.js +11 -14
  15. package/dist/v3/robots/ai-chat.d.ts +1 -1
  16. package/dist/v3/robots/ai-chat.d.ts.map +1 -1
  17. package/dist/v3/robots/google-import.d.ts +4 -6
  18. package/dist/v3/robots/google-import.d.ts.map +1 -1
  19. package/dist/v3/robots/google-import.js +5 -2
  20. package/dist/v3/robots/google-store.d.ts.map +1 -1
  21. package/dist/v3/robots/google-store.js +5 -13
  22. package/dist/v3/robots/http-import.d.ts.map +1 -1
  23. package/dist/v3/robots/http-import.js +4 -0
  24. package/dist/v3/robots/image-generate.d.ts.map +1 -1
  25. package/dist/v3/robots/image-generate.js +6 -1
  26. package/dist/v3/robots/image-resize.d.ts +4 -0
  27. package/dist/v3/robots/image-resize.d.ts.map +1 -1
  28. package/dist/v3/robots/image-resize.js +34 -6
  29. package/dist/v3/robots/s3-store.d.ts.map +1 -1
  30. package/dist/v3/robots/s3-store.js +21 -17
  31. package/dist/v3/robots/video-thumbs.d.ts +6 -0
  32. package/dist/v3/robots/video-thumbs.d.ts.map +1 -1
  33. package/dist/v3/robots/video-thumbs.js +15 -5
  34. package/dist/v3/storageResults.d.ts +29 -0
  35. package/dist/v3/storageResults.d.ts.map +1 -0
  36. package/dist/v3/storageResults.js +52 -0
  37. package/dist/v4/assemblyStatus.d.ts +75 -1183
  38. package/dist/v4/assemblyStatus.d.ts.map +1 -1
  39. package/dist/v4/assemblyStatus.js +23 -14
  40. package/dist/v4/index.d.ts +1 -0
  41. package/dist/v4/index.d.ts.map +1 -1
  42. package/dist/v4/index.js +1 -0
  43. package/dist/v4/robots/_ai-models.d.ts.map +1 -1
  44. package/dist/v4/robots/_ai-models.js +2 -0
  45. package/dist/v4/robots/_google-image-seed.d.ts +8 -0
  46. package/dist/v4/robots/_google-image-seed.d.ts.map +1 -0
  47. package/dist/v4/robots/_google-image-seed.js +11 -0
  48. package/dist/v4/robots/_instructions-primitives.d.ts +2 -0
  49. package/dist/v4/robots/_instructions-primitives.d.ts.map +1 -1
  50. package/dist/v4/robots/_instructions-primitives.js +11 -13
  51. package/dist/v4/robots/ai-chat.d.ts +1 -1
  52. package/dist/v4/robots/ai-chat.d.ts.map +1 -1
  53. package/dist/v4/robots/google-import.d.ts +4 -4
  54. package/dist/v4/robots/google-import.d.ts.map +1 -1
  55. package/dist/v4/robots/google-import.js +5 -2
  56. package/dist/v4/robots/google-store.d.ts.map +1 -1
  57. package/dist/v4/robots/google-store.js +5 -13
  58. package/dist/v4/robots/http-import.d.ts.map +1 -1
  59. package/dist/v4/robots/http-import.js +4 -0
  60. package/dist/v4/robots/image-generate.d.ts.map +1 -1
  61. package/dist/v4/robots/image-generate.js +5 -1
  62. package/dist/v4/robots/image-resize.d.ts +4 -0
  63. package/dist/v4/robots/image-resize.d.ts.map +1 -1
  64. package/dist/v4/robots/image-resize.js +34 -6
  65. package/dist/v4/robots/s3-store.d.ts.map +1 -1
  66. package/dist/v4/robots/s3-store.js +21 -17
  67. package/dist/v4/robots/video-thumbs.d.ts +6 -0
  68. package/dist/v4/robots/video-thumbs.d.ts.map +1 -1
  69. package/dist/v4/robots/video-thumbs.js +15 -5
  70. package/dist/v4/storageResults.d.ts +23 -0
  71. package/dist/v4/storageResults.d.ts.map +1 -0
  72. package/dist/v4/storageResults.js +53 -0
  73. package/package.json +3 -3
@@ -8,14 +8,12 @@ export declare const robotGoogleImportInstructionsSchema: z.ZodObject<{
8
8
  result: z.ZodDefault<z.ZodBoolean>;
9
9
  queue: z.ZodOptional<z.ZodEnum<["batch"]>>;
10
10
  force_accept: z.ZodDefault<z.ZodBoolean>;
11
- } & {
12
11
  force_name: z.ZodDefault<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
13
12
  ignore_errors: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEnum<["meta", "import", "execute"]>, "many">]>, string[], boolean | ("import" | "meta" | "execute")[]>>;
14
13
  import_on_errors: z.ZodDefault<z.ZodArray<z.ZodEnum<["meta"]>, "many">>;
15
- } & {
16
- credentials: z.ZodOptional<z.ZodString>;
17
14
  } & {
18
15
  robot: z.ZodLiteral<"/google/import">;
16
+ credentials: z.ZodOptional<z.ZodString>;
19
17
  path: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
20
18
  recursive: z.ZodDefault<z.ZodBoolean>;
21
19
  next_page_token: z.ZodDefault<z.ZodString>;
@@ -63,8 +61,8 @@ export declare const robotGoogleImportInstructionsWithHiddenFieldsSchema: z.ZodO
63
61
  force_name: z.ZodDefault<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>>;
64
62
  ignore_errors: z.ZodDefault<z.ZodEffects<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEnum<["meta", "import", "execute"]>, "many">]>, string[], boolean | ("import" | "meta" | "execute")[]>>;
65
63
  import_on_errors: z.ZodDefault<z.ZodArray<z.ZodEnum<["meta"]>, "many">>;
66
- credentials: z.ZodOptional<z.ZodString>;
67
64
  robot: z.ZodLiteral<"/google/import">;
65
+ credentials: z.ZodOptional<z.ZodString>;
68
66
  path: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
69
67
  recursive: z.ZodDefault<z.ZodBoolean>;
70
68
  next_page_token: z.ZodDefault<z.ZodString>;
@@ -113,8 +111,8 @@ export declare const robotGoogleImportInstructionsWithHiddenFieldsSchema: z.ZodO
113
111
  force_name: z.ZodDefault<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>]>>>;
114
112
  ignore_errors: z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEnum<["meta", "import", "execute"]>, "many">]>, string[], boolean | ("import" | "meta" | "execute")[]>]>>;
115
113
  import_on_errors: z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodEnum<["meta"]>]>, "many">]>>;
116
- credentials: z.ZodOptional<z.ZodString>;
117
114
  robot: z.ZodLiteral<"/google/import">;
115
+ credentials: z.ZodOptional<z.ZodString>;
118
116
  path: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>]>;
119
117
  recursive: z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
120
118
  next_page_token: z.ZodDefault<z.ZodString>;
@@ -160,8 +158,8 @@ export declare const robotGoogleImportInstructionsWithHiddenFieldsSchema: z.ZodO
160
158
  force_name: z.ZodDefault<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>]>>>;
161
159
  ignore_errors: z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodEffects<z.ZodUnion<[z.ZodBoolean, z.ZodArray<z.ZodEnum<["meta", "import", "execute"]>, "many">]>, string[], boolean | ("import" | "meta" | "execute")[]>]>>;
162
160
  import_on_errors: z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodEnum<["meta"]>]>, "many">]>>;
163
- credentials: z.ZodOptional<z.ZodString>;
164
161
  robot: z.ZodLiteral<"/google/import">;
162
+ credentials: z.ZodOptional<z.ZodString>;
165
163
  path: z.ZodUnion<[z.ZodString, z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>]>;
166
164
  recursive: z.ZodDefault<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
167
165
  next_page_token: z.ZodDefault<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"google-import.d.ts","sourceRoot":"","sources":["../../../src/v3/robots/google-import.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;AAe1B,eAAO,MAAM,IAAI,EAAE,cAWlB,CAAA;AAED,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BrC,CAAA;AAEX,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,OAAO,mCAAmC,CAAC,KAAK,CACtC,CAAA;AAExD,eAAO,MACa,mDAAmD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACrD,iDAAiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACjC,iEAAiE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAChF,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,GA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,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,5 @@
1
1
  import { z } from 'zod/v3';
2
- import { createStorageImportExample, defineRobot, googleBase, next_page_token, path, recursive, recursiveImportPageSize, robotBase, robotImport, robotImportMeta, } from "./_instructions-primitives.js";
2
+ import { createStorageImportExample, defineRobot, getGoogleCredentialsDescription, googleBase, next_page_token, path, recursive, recursiveImportPageSize, robotBase, robotImport, robotImportMeta, } from "./_instructions-primitives.js";
3
3
  export const meta = {
4
4
  ...robotImportMeta,
5
5
  example_code: createStorageImportExample('/google/import', 'YOUR_GOOGLE_CREDENTIALS'),
@@ -16,6 +16,9 @@ export const robotGoogleImportInstructionsSchema = robotBase
16
16
  .merge(googleBase)
17
17
  .extend({
18
18
  robot: z.literal('/google/import'),
19
+ credentials: googleBase.shape.credentials.describe(getGoogleCredentialsDescription(`
20
+ Grant the service account the “Storage Object Viewer” role on the bucket you want to import from. This provides \`storage.objects.get\` to download objects and \`storage.objects.list\` to list them. Imports do not need permission to create or delete objects. See [Google’s IAM roles for Cloud Storage](https://docs.cloud.google.com/storage/docs/access-control/iam-roles).
21
+ `)),
19
22
  path: path.describe(`
20
23
  The path in your bucket to the specific file or directory. If the path points to a file, only this file will be imported. For example: \`images/avatar.jpg\`.
21
24
 
@@ -30,7 +33,7 @@ You can also use an array of path strings here to import multiple paths in the s
30
33
  recursive: recursive.describe(`
31
34
  Setting this to \`true\` will enable importing files from subdirectories and sub-subdirectories (etc.) of the given path.
32
35
 
33
- Please use the pagination parameters \`start_file_name\` and \`files_per_page\` wisely here.
36
+ Please use the pagination parameters \`next_page_token\` and \`files_per_page\` wisely here.
34
37
  `),
35
38
  next_page_token: next_page_token.describe(`
36
39
  A string token used for pagination. The returned files of one paginated call have the next page token inside of their meta data, which needs to be used for the subsequent paging call.
@@ -1 +1 @@
1
- {"version":3,"file":"google-store.d.ts","sourceRoot":"","sources":["../../../src/v3/robots/google-store.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;AAW1B,eAAO,MAAM,IAAI,EAAE,cAWlB,CAAA;AAED,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8DpC,CAAA;AAEX,eAAO,MAAM,eAAe,EAAE,eAAe,CAAC,OAAO,kCAAkC,CAAC,KAAK,CACtC,CAAA;AAEvD,eAAO,MACa,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IACpD,gDAAgD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAChC,gEAAgE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAC/E,CAAA;AAEnB,KAAK,YAAY,GAAG,uBAAuB,CAAC,OAAO,eAAe,CAAC,CAAA;AAEnE,MAAM,MAAM,4BAA4B,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;AACjE,MAAM,MAAM,4C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAC/E,CAAA;AAEnB,KAAK,YAAY,GAAG,uBAAuB,CAAC,OAAO,eAAe,CAAC,CAAA;AAEnE,MAAM,MAAM,4BAA4B,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;AACjE,MAAM,MAAM,4CAA4C,GAAG,YAAY,CAAC,cAAc,CAAC,CAAA;AACvF,MAAM,MAAM,0CAA0C,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAA;AAC5F,MAAM,MAAM,+CAA+C,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAA;AACjG,MAAM,MAAM,0DAA0D,GACpE,YAAY,CAAC,4BAA4B,CAAC,CAAA;AAC5C,MAAM,MAAM,+DAA+D,GACzE,YAAY,CAAC,2BAA2B,CAAC,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod/v3';
2
- import { createStorageStoreExample, defineRobot, googleBase, robotBase, robotStoreMeta, robotUse, } from "./_instructions-primitives.js";
2
+ import { createStorageStoreExample, defineRobot, getGoogleCredentialsDescription, googleBase, robotBase, robotStoreMeta, robotUse, } from "./_instructions-primitives.js";
3
3
  export const meta = {
4
4
  ...robotStoreMeta,
5
5
  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
  .boolean()
23
23
  .optional()
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}')
@@ -1 +1 @@
1
- {"version":3,"file":"http-import.d.ts","sourceRoot":"","sources":["../../../src/v3/robots/http-import.ts"],"names":[],"mappings":"AAAA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwFnC,CAAA;AAEX,eAAO,MAAM,iDAAiD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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S 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}\`.
42
42
 
43
43
  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.
44
+
45
+ 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.
44
46
  `),
45
47
  url_delimiter: z
46
48
  .string()
47
49
  .default('|')
48
50
  .describe(`
49
51
  Provides the delimiter that is used to split the URLs in your \`url\` parameter value.
52
+
53
+ The delimiter must be literal. Only delimiters outside interpolation expressions in the original \`url\` value separate imports; variable values are never split.
50
54
  `),
51
55
  headers: z
52
56
  .union([
@@ -1 +1 @@
1
- {"version":3,"file":"image-generate.d.ts","sourceRoot":"","sources":["../../../src/v3/robots/image-generate.ts"],"names":[],"mappings":"AAAA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsEtC,CAAA;AAEX,eAAO,MAAM,oDAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAM7D,CAAA;AAEJ,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAA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1,5 +1,6 @@
1
1
  import { z } from 'zod/v3';
2
2
  import { imageGenerateDefaultModelIdentifier, imageGenerateLegacyModelAlias, imageGenerateModelIdentifiers, } from "./_ai-models.js";
3
+ import { googleImageSeedMaximum } from "./_google-image-seed.js";
3
4
  import { autoProviderDescription, interpolateRobot, robotArtificialIntelligenceMeta, robotBase, robotParameterDocs, robotUse, } from "./_instructions-primitives.js";
4
5
  function formatEnglishModelList(values) {
5
6
  const formattedValues = values.map((model) => `\`${model}\``);
@@ -74,7 +75,11 @@ Best practice:
74
75
  .enum(['jpeg', 'jpg', 'png', 'gif', 'webp', 'svg'])
75
76
  .optional()
76
77
  .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.'),
77
- seed: z.number().optional().describe(robotParameterDocs.seed.description),
78
+ // Provider-specific limits are checked by the Robot so other models retain their seed range.
79
+ seed: z
80
+ .number()
81
+ .optional()
82
+ .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.`),
78
83
  aspect_ratio: z
79
84
  .string()
80
85
  .optional()
@@ -1,5 +1,9 @@
1
1
  import type { RobotDefinitionWithHiddenFields, RobotMetaInput, RobotSchemaVariantTypes } from './_instructions-primitives.ts';
2
2
  import { z } from 'zod/v3';
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/v3/robots/image-resize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,+BAA+B,EAC/B,cAAc,EACd,uBA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e,CAAC,CAAA;AAEnE,MAAM,MAAM,4BAA4B,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;AACjE,MAAM,MAAM,iCAAiC,GAAG,YAAY,CAAC,OAAO,CAAC,CAAA;AACrE,MAAM,MAAM,4CAA4C,GAAG,YAAY,CAAC,cAAc,CAAC,CAAA;AACvF,MAAM,MAAM,0CAA0C,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAA;AAC5F,MAAM,MAAM,+CAA+C,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAA;AACjG,MAAM,MAAM,0DAA0D,GACpE,YAAY,CAAC,4BAA4B,CAAC,CAAA;AAC5C,MAAM,MAAM,+DAA+D,GACzE,YAAY,CAAC,2BAA2B,CAAC,CAAA"}
@@ -3,6 +3,32 @@ import { imagemagickDensityPattern } from "../imagemagickDensity.js";
3
3
  import { zodInputPreservingTransform } from "../lib/zodInputSemantics.js";
4
4
  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";
5
5
  const imageResizeGravitySchema = z.union([positionSchema, z.enum(['attention', 'entropy'])]);
6
+ /** Input MIME types eligible for automatic libvips processing in /image/resize. */
7
+ export const imageResizeDaemonInputMimes = [
8
+ 'image/jpg',
9
+ 'image/jpeg',
10
+ 'image/jxl',
11
+ 'image/png',
12
+ 'image/tiff',
13
+ 'image/tiff-fx',
14
+ 'image/gif',
15
+ 'image/webp',
16
+ 'image/svg',
17
+ 'image/svg+xml',
18
+ ];
19
+ /** Output formats eligible for automatic libvips processing in /image/resize. */
20
+ export const imageResizeDaemonOutputFormats = [
21
+ 'heic',
22
+ 'heif',
23
+ 'jpeg',
24
+ 'jpg',
25
+ 'jxl',
26
+ 'png',
27
+ 'raw',
28
+ 'tiff',
29
+ 'webp',
30
+ 'avif',
31
+ ];
6
32
  export const meta = {
7
33
  ...robotImageProcessingMeta,
8
34
  example_code: createProcessingExample('resized', '/image/resize', {
@@ -140,14 +166,14 @@ Height of the new image, in pixels. If not specified, will default to the height
140
166
  .union([
141
167
  z
142
168
  .literal('crop')
143
- .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.
169
+ .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.
144
170
 
145
171
  To crop around human faces, see [🤖/image/facedetect](https://transloadit.com/docs/robots/image-facedetect/) instead.`),
146
172
  z
147
173
  .literal('fillcrop')
148
174
  .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.
149
175
 
150
- 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\`".`),
176
+ 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"\`.`),
151
177
  z
152
178
  .literal('fit')
153
179
  .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.
@@ -191,7 +217,7 @@ For example:
191
217
  }
192
218
  \`\`\`
193
219
 
194
- 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.
220
+ 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.
195
221
 
196
222
  You can also use a JSON string of such an object with coordinates in similar fashion:
197
223
 
@@ -202,9 +228,11 @@ You can also use a JSON string of such an object with coordinates in similar fas
202
228
  To crop around human faces, see [🤖/image/facedetect](/docs/robots/image-facedetect/).
203
229
  `),
204
230
  gravity: imageResizeGravitySchema.default('center').describe(`
205
- 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.
206
-
207
- 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.
231
+ Sets crop direction for \`crop\` or \`fillcrop\` without explicit coordinates.
232
+ Content-aware \`attention\` and \`entropy\` need libvips, \`fillcrop\`, \`width\` and \`height\`.
233
+ Effects such as \`sepia\` or \`text\`, and inputs such as HEIC, can use ImageMagick.
234
+ It centers these crops and the Assembly reports a warning.
235
+ Crop in a separate /image/resize Step before effects, or convert unsupported inputs to PNG first.
208
236
  `),
209
237
  strip: z
210
238
  .boolean()
@@ -1 +1 @@
1
- {"version":3,"file":"s3-store.d.ts","sourceRoot":"","sources":["../../../src/v3/robots/s3-store.ts"],"names":[],"mappings":"AAAA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAC3E,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;AACnF,MAAM,MAAM,sCAAsC,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAA;AACxF,MAAM,MAAM,2CAA2C,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAA;AAC7F,MAAM,MAAM,sDAAsD,GAChE,YAAY,CAAC,4BAA4B,CAAC,CAAA;AAC5C,MAAM,MAAM,2DAA2D,GACrE,YAAY,CAAC,2BAA2B,CAAC,CAAA"}
@@ -20,48 +20,54 @@ export const robotS3StoreInstructionsSchema = robotBase
20
20
  .merge(robotUse)
21
21
  .merge(s3Base)
22
22
  .extend({
23
+ // URL rewriting does not fix bucket addressing, and custom paths need not use file.url_name.
24
+ // Keep the bucket warning separate from the old blanket filename-sanitization claim.
23
25
  robot: z.literal('/s3/store').describe(`
24
26
  If you are new to Amazon S3, see our tutorial on [using your own S3 bucket](/docs/faq/how-to-set-up-an-amazon-s3-bucket/).
25
27
 
26
- The URL to the result file in your S3 bucket will be returned in the <dfn>Assembly Status JSON</dfn>. If your S3 bucket has versioning enabled, the version ID of the file will be returned within \`meta.version_id\`
28
+ The URL to the result file in your S3 bucket will be returned in the <dfn>Assembly Status JSON</dfn>. A returned URL does not make a private object public or grant read access. If your S3 bucket has versioning enabled, the version ID of the file will be returned within \`meta.version_id\`.
27
29
 
28
30
  > [!Warning]
29
- > **Avoid permission errors.** By default, \`acl\` is set to \`"${s3StoreAclSchema.parse(undefined)}"\`. AWS S3 has a bucket setting called \`Block new public ACLs and uploading public objects\`. Set this to <strong>False</strong> in your bucket if you intend to leave \`acl\` as \`"${s3StoreAclSchema.parse(undefined)}"\`. Otherwise, you’ll receive permission errors in your Assemblies despite your S3 credentials being configured correctly.
31
+ > **Configure private buckets explicitly.** The Robot’s default \`acl\` is still \`"${s3StoreAclSchema.parse(undefined)}"\`. For a private bucket, set \`acl: "bucket-default"\` and do not supply ACL or grant headers. This omits the generated ACL header and works with [Bucket owner enforced Object Ownership](https://docs.aws.amazon.com/AmazonS3/latest/userguide/about-object-ownership.html), where ACLs are disabled. Keep S3 Block Public Access enabled. Setting \`acl: "private"\` still sends an ACL and is not equivalent to omitting it.
30
32
 
31
33
  > [!Warning]
32
- > **Use DNS-compliant bucket names.** Your bucket name [must be DNS-compliant](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html) and must not contain uppercase letters. Any non-alphanumeric characters in the file names will be replaced with an underscore, and spaces will be replaced with dashes. If your existing S3 bucket contains uppercase letters or is otherwise not DNS-compliant, rewrite the result URLs using the <dfn>Robot</dfn>’s \`url_prefix\` parameter.
34
+ > **Use DNS-compliant bucket names.** Follow AWS’s [bucket naming rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html). The \`url_prefix\` parameter changes returned URLs; it does not change the bucket or its access permissions.
33
35
 
34
36
  <span id="minimum-s3-iam-permissions" aria-hidden="true"></span>
35
37
 
36
38
  ## Limit access
37
39
 
38
- You will also need to add permissions to your bucket so that Transloadit can access it properly. Here is an example IAM policy that you can use. Following the [principle of least privilege](https://en.wikipedia.org/wiki/Principle_of_least_privilege), it contains the **minimum required permissions** to export a file to your S3 bucket using Transloadit. You may require more permissions (especially viewing permissions) depending on your application.
40
+ Use a dedicated AWS identity with access limited to the destination bucket and object prefix. Do not use [AWS root access keys](https://docs.aws.amazon.com/IAM/latest/UserGuide/root-user-best-practices.html). Store its access key ID, secret access key, bucket name and region as \`key\`, \`secret\`, \`bucket\` and \`bucket_region\` in <dfn>Template Credentials</dfn>, then reference their name with \`credentials\`. Trusted backend integrations can instead supply those parameters directly; do not expose AWS secrets in browser instructions.
39
41
 
40
- Please change \`{BUCKET_NAME}\` in the values for \`Sid\` and \`Resource\` accordingly. Also, this policy will grant the minimum required permissions to all your users. We advise you to create a separate Amazon IAM user, and use its User ARN (can be found in the "Summary" tab of a user [here](https://console.aws.amazon.com/iam/home#users)) for the \`Principal\` value. More information about this can be found [here](https://docs.aws.amazon.com/AmazonS3/latest/dev/AccessPolicyLanguage_UseCases_s3_a.html).
42
+ The following is an [identity-based IAM policy](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html), attached to that dedicated identity, not a bucket policy. It intentionally has no \`Principal\`. Replace \`{BUCKET_NAME}\` and use a Robot \`path\` beginning with \`uploads/\`, or adapt both the policy prefix and the path together.
43
+
44
+ This example covers uploads and failed multipart-upload cleanup with an explicit \`bucket_region\`, \`acl: "bucket-default"\`, no ACL/grant headers, no tags and S3-managed encryption (SSE-S3). Existing bucket policies, organization controls or endpoint policies can still deny access.
41
45
 
42
46
  \`\`\`json
43
47
  {
44
48
  "Version": "2012-10-17",
45
49
  "Statement": [
46
50
  {
47
- "Sid": "AllowTransloaditToStoreFilesIn{BUCKET_NAME}Bucket",
51
+ "Sid": "UploadAndAbortWithinPrefix",
48
52
  "Effect": "Allow",
49
- "Action": ["s3:GetBucketLocation", "s3:ListBucket", "s3:PutObject", "s3:PutObjectAcl"],
50
- "Resource": ["arn:aws:s3:::{BUCKET_NAME}", "arn:aws:s3:::{BUCKET_NAME}/*"]
53
+ "Action": ["s3:PutObject", "s3:AbortMultipartUpload"],
54
+ "Resource": "arn:aws:s3:::{BUCKET_NAME}/uploads/*"
51
55
  }
52
56
  ]
53
57
  }
54
58
  \`\`\`
55
59
 
56
- The \`Sid\` value is just an identifier for you to recognize the rule later. You can name it anything you like.
60
+ The uploader uses either \`PutObject\` or \`CreateMultipartUpload\`, \`UploadPart\` and \`CompleteMultipartUpload\`; failed multipart uploads can trigger \`AbortMultipartUpload\`. AWS maps the successful upload operations to \`s3:PutObject\`. Write access can **overwrite an existing object key**; it is not add-only. Choose unique object paths and consider versioning for recovery.
57
61
 
58
- The policy needs to be separated into two parts, because the \`ListBucket\` action requires permissions on the bucket while the other actions require permissions on the objects in the bucket. When targeting the objects there's a trailing slash and an asterisk in the \`Resource\` parameter, whereas when the policy targets the bucket, the slash and the asterisk are omitted.
62
+ Add permissions only for features you use, following AWS’s [operation permission reference](https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-with-s3-policy-actions.html):
59
63
 
60
- Please note that if you give the <dfn>Robot</dfn>'s \`acl\` parameter a value of \`"bucket-default"\`, then you do not need the \`"s3:PutObjectAcl"\` permission in your bucket policy.
64
+ - Without an explicit \`bucket_region\`, region discovery can require \`s3:GetBucketLocation\` and fallback \`s3:ListBucket\` on the bucket ARN, \`arn:aws:s3:::{BUCKET_NAME}\`, without an object suffix. Supplying the correct region avoids these discovery requests.
65
+ - ACL or grant headers require \`s3:PutObjectAcl\`; tags require \`s3:PutObjectTagging\` on the allowed object prefix. \`bucket-default\` does not remove ACL/grant headers you supply in \`headers\`.
66
+ - Downloading private results requires separate read authorization. Even a URL generated with \`sign_urls_for\` needs the signing identity to have the appropriate read permissions.
61
67
 
62
- In order to build proper result URLs we need to know the region in which your S3 bucket resides. For this we require the \`GetBucketLocation\` permission. Figuring out your bucket's region this way will also slow down your Assemblies. To make this much faster and to also not require the \`GetBucketLocation\` permission, we have added the \`bucket_region\` parameter to the /s3/store and /s3/import Robots. We recommend using them at all times.
68
+ S3 applies its [bucket encryption configuration](https://docs.aws.amazon.com/AmazonS3/latest/userguide/default-bucket-encryption.html) when no encryption override is sent. You can request SSE-KMS through \`headers\`, using \`x-amz-server-side-encryption: aws:kms\` and \`x-amz-server-side-encryption-aws-kms-key-id\`. When either bucket default encryption or request headers select [SSE-KMS](https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingKMSEncryption.html), the uploading identity needs \`kms:GenerateDataKey\` on the relevant key, plus \`kms:Decrypt\` for multipart uploads. For a customer-managed key, grant these permissions with a compatible KMS key policy; the base S3 policy above does not include them. Do not add blanket \`kms:*\` or \`sts:*\` grants.
63
69
 
64
- Please keep in mind that if you use bucket encryption you may also need to add \`"sts:*"\` and \`"kms:*"\` to the bucket policy. Please read [here](https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) and [here](https://aws.amazon.com/blogs/security/how-to-restrict-amazon-s3-bucket-access-to-a-specific-iam-role/) in case you run into trouble with our example bucket policy.
70
+ Short-lived AWS credentials are a matching set of \`key\`, \`secret\` and \`session_token\`. Have a trusted backend obtain and refresh all three, then supply them together when it creates the Assembly. It can pass them directly in Robot instructions or save and update them together through the [Template Credentials API](/docs/api/template-credentials-post/). Keep all three out of browser instructions; replacing only the session token does not refresh expired access keys. This Robot passes the supplied credentials to S3; it does not assume a role or refresh expired credentials. Keep temporary credentials valid for the upload.
65
71
  `),
66
72
  path: storeFilePath,
67
73
  url_prefix: z
@@ -71,9 +77,7 @@ Please keep in mind that if you use bucket encryption you may also need to add \
71
77
  The URL prefix used for the returned URL, such as \`"http://my.cdn.com/some/path/"\`.
72
78
  `),
73
79
  acl: s3StoreAclSchema.describe(`
74
- The permissions used for this file.
75
-
76
- Please keep in mind that the default value \`"${s3StoreAclSchema.parse(undefined)}"\` can lead to permission errors due to the \`"Block all public access"\` checkbox that is checked by default when creating a new Amazon S3 Bucket in the AWS console.
80
+ The ACL used for this file. The default remains \`"${s3StoreAclSchema.parse(undefined)}"\`, which can conflict with S3 Block Public Access and disabled ACLs. For modern private buckets, explicitly set \`"bucket-default"\` to omit the generated ACL header, and do not supply ACL/grant headers in \`headers\`. \`"private"\` still sends an ACL.
77
81
  `),
78
82
  check_integrity: z
79
83
  .boolean()
@@ -121,7 +125,7 @@ This parameter provides signed URLs in the result JSON (in the \`signed_url\` an
121
125
  .string()
122
126
  .optional()
123
127
  .describe(`
124
- The session token to use for the S3 store. This is only used if the credentials are from an IAM user with the \`sts:AssumeRole\` permission.
128
+ The session token belonging to the temporary AWS access key ID and secret access key supplied for this upload. The Robot does not assume a role or refresh these credentials; they must remain valid for the upload.
125
129
  `),
126
130
  })
127
131
  .strict();
@@ -2,6 +2,12 @@ import type { RobotDefinition, RobotMetaInput, RobotSchemaVariantTypes } from '.
2
2
  import { z } from 'zod/v3';
3
3
  /** Markup over the AI provider cost for smart thumbnail selection. */
4
4
  export declare const smartThumbnailMarkupPercent = 50;
5
+ /** Dedicated vision model so /ai/chat default upgrades do not change thumbnail analysis costs. */
6
+ export declare const smartThumbnailModel = "openai/gpt-5.4-mini";
7
+ /** Maximum long-side dimension of scoring previews; returned thumbnails keep their output size. */
8
+ export declare const smartThumbnailAnalysisMaxSize = 512;
9
+ /** Frame ranking needs little reasoning compared with general-purpose chat. */
10
+ export declare const smartThumbnailReasoningEffort = "low";
5
11
  /** Candidate-pool size shared by smart thumbnail execution and its documented default example. */
6
12
  export declare function getSmartThumbnailCandidateCount(count: number, maximumCandidates: number): number;
7
13
  export declare const meta: RobotMetaInput;
@@ -1 +1 @@
1
- {"version":3,"file":"video-thumbs.d.ts","sourceRoot":"","sources":["../../../src/v3/robots/video-thumbs.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;AAe1B,sEAAsE;AACtE,eAAO,MAAM,2BAA2B,KAAK,CAAA;AAO7C,kGAAkG;AAClG,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAEhG;AAED,eAAO,MAAM,IAAI,EAAE,cAmBlB,CAAA;AAED,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,MAAM,MAAM,0CAA0C,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAA;AAC5F,MAAM,MAAM,+CAA+C,GAAG,YAAY,CAAC,qBAAqB,CAAC,CAAA;AACjG,MAAM,MAAM,0DAA0D,GACpE,YAAY,CAAC,4BAA4B,CAAC,CAAA;AAC5C,MAAM,MAAM,+DAA+D,GACzE,YAAY,CAAC,2BAA2B,CAAC,CAAA"}
@@ -3,6 +3,12 @@ import { stackVersions } from "../stackVersions.js";
3
3
  import { color_with_alpha, createProcessingExample, defineRobot, percentageSchema, resize_strategy, robotBase, robotFFmpeg, robotUse, robotVideoEncodingMeta, } from "./_instructions-primitives.js";
4
4
  /** Markup over the AI provider cost for smart thumbnail selection. */
5
5
  export const smartThumbnailMarkupPercent = 50;
6
+ /** Dedicated vision model so /ai/chat default upgrades do not change thumbnail analysis costs. */
7
+ export const smartThumbnailModel = 'openai/gpt-5.4-mini';
8
+ /** Maximum long-side dimension of scoring previews; returned thumbnails keep their output size. */
9
+ export const smartThumbnailAnalysisMaxSize = 512;
10
+ /** Frame ranking needs little reasoning compared with general-purpose chat. */
11
+ export const smartThumbnailReasoningEffort = 'low';
6
12
  const thumbnailCountSchema = z.number().int().min(1).max(999).default(8);
7
13
  const smartMaximumCandidatesSchema = z.number().int().min(2).max(100).default(20);
8
14
  const defaultThumbnailCount = thumbnailCountSchema.parse(undefined);
@@ -35,13 +41,15 @@ export const robotVideoThumbsInstructionsSchema = robotBase
35
41
  .merge(robotFFmpeg)
36
42
  .extend({
37
43
  robot: z.literal('/video/thumbs').describe(`
38
- Set \`smart: true\` to select strong preview images with AI instead of taking frames only at regular intervals. The Robot scores candidate frames for clarity, brightness, composition, faces, expressions, action, and visual interest, then returns the best \`count\` frames in chronological order. Smart results include \`file.meta.smart_score\` and \`file.meta.smart_reasons\`. If AI scoring is unavailable, the Assembly continues with the candidate frames in fallback order. No AI credentials are required.
44
+ Set \`smart: true\` to select strong preview images with AI instead of taking frames only at regular intervals. The Robot scores candidate frames for clarity, brightness, composition, faces, expressions, action, and visual interest, then returns the best \`count\` frames in chronological order. Smart results include \`file.meta.smart_score\` and \`file.meta.smart_reasons\`. If AI scoring is unavailable, the Assembly continues with the candidate frames in fallback order and includes a warning. No AI credentials are required.
39
45
 
40
46
  ## AI pricing
41
47
 
42
- Regular \`/video/thumbs\` processing charges still apply. AI frame analysis is billed separately at the underlying provider cost plus a ${smartThumbnailMarkupPercent}% Transloadit markup. The exact AI charge varies with the number of candidate frames, the internally selected model and provider pricing, and the image payload size.
48
+ Regular \`/video/thumbs\` processing charges still apply. AI frame analysis is billed separately at the underlying provider cost plus a ${smartThumbnailMarkupPercent}% Transloadit markup. Smart selection uses the dedicated \`${smartThumbnailModel}\` vision model with \`${smartThumbnailReasoningEffort}\` reasoning, independently of the \`/ai/chat\` default. The exact AI charge varies with the number of candidate frames and provider pricing.
43
49
 
44
- \`smart_max_candidates\` is the main cost and latency control. The Robot analyzes up to three candidates per requested thumbnail, capped by \`smart_max_candidates\`, but never fewer than \`count\`. With the defaults of \`count: ${defaultThumbnailCount}\` and \`smart_max_candidates: ${defaultSmartMaximumCandidates}\`, it analyzes ${getSmartThumbnailCandidateCount(defaultThumbnailCount, defaultSmartMaximumCandidates)} frames and returns the best ${defaultThumbnailCount}. Lower the candidate limit to reduce AI cost and latency; raise it to give the AI more frames to choose from.
50
+ The AI scores preview copies capped at ${smartThumbnailAnalysisMaxSize} pixels on the long side, preserving aspect ratio and without enlarging smaller images. Returned thumbnails keep the requested output dimensions and format; larger outputs do not increase the scoring preview beyond this limit.
51
+
52
+ \`smart_max_candidates\` is the main cost and latency control. The Robot analyzes up to three candidates per requested thumbnail, capped by \`smart_max_candidates\`, but never fewer than \`count\`. With the defaults of \`count: ${defaultThumbnailCount}\` and \`smart_max_candidates: ${defaultSmartMaximumCandidates}\`, it analyzes ${getSmartThumbnailCandidateCount(defaultThumbnailCount, defaultSmartMaximumCandidates)} frames and returns the best ${defaultThumbnailCount}. Lower the candidate limit to reduce AI cost and latency. Raising it can enlarge the pool up to three times \`count\`; higher limits have no effect.
45
53
 
46
54
  > [!Note]
47
55
  > Use \`count\` with smart selection. To consistently extract exact timestamps with \`offsets\`, set \`smart: false\`.
@@ -123,17 +131,19 @@ The AI evaluates frames based on:
123
131
  - Action and motion (avoiding transition frames)
124
132
  - Overall visual interest
125
133
 
126
- Regular \`/video/thumbs\` processing charges still apply. AI frame analysis is billed separately at the underlying provider cost plus a ${smartThumbnailMarkupPercent}% Transloadit markup. You do not need to provide AI credentials.
134
+ Regular \`/video/thumbs\` processing charges still apply. AI frame analysis uses a dedicated low-cost vision model with \`${smartThumbnailReasoningEffort}\` reasoning and preview copies capped at ${smartThumbnailAnalysisMaxSize} pixels on the long side. Returned thumbnails retain their requested dimensions and format. Analysis is billed separately at the underlying provider cost plus a ${smartThumbnailMarkupPercent}% Transloadit markup. You do not need to provide AI credentials.
127
135
 
128
136
  Smart mode generates its own regularly spaced candidate timestamps; use \`smart: false\` with \`offsets\` when you need specified timestamps. Selected smart thumbnails are returned in chronological order, not score order. Inspect \`meta.thumb_offset\`, \`meta.smart_score\`, and \`meta.smart_reasons\` when evaluating the selection.
129
137
 
130
- If AI scoring fails, the Robot selects from the extracted candidates in chronological order and records a fallback reason. If no candidates can be extracted, it attempts standard thumbnail extraction. A completed Assembly does not guarantee a representative or publication-safe poster; check that outputs exist and apply your application’s review policy.
138
+ If AI scoring fails, the Robot selects extracted candidates in chronological order and records a fallback reason. With no candidates, it attempts standard extraction. Both fallbacks add an Assembly warning. A completed Assembly does not guarantee a representative or publication-safe poster; check that outputs exist and apply your application’s review policy.
131
139
  `),
132
140
  smart_max_candidates: smartMaximumCandidatesSchema.describe(`
133
141
  The maximum size of the candidate pool when \`smart\` is \`true\`. The Robot analyzes up to three candidates per requested thumbnail, capped by this value, but it will never analyze fewer candidates than the requested \`count\`.
134
142
 
135
143
  A higher number may yield better results but increases processing time and AI cost. With the defaults of \`count: ${defaultThumbnailCount}\` and \`smart_max_candidates: ${defaultSmartMaximumCandidates}\`, the Robot analyzes ${getSmartThumbnailCandidateCount(defaultThumbnailCount, defaultSmartMaximumCandidates)} frames and returns the best ${defaultThumbnailCount} in chronological order.
136
144
 
145
+ Raising this limit above three times \`count\` does not enlarge the pool. For example, \`count: 1\` analyzes at most three candidates.
146
+
137
147
  This parameter is only used when \`smart\` is \`true\`.
138
148
  `),
139
149
  })
@@ -0,0 +1,29 @@
1
+ import type { StoredAsset } from './storageAsset.ts';
2
+ import { z } from 'zod/v3';
3
+ /** Server-owned Assembly identity and expected Workspace, never untrusted notification fields. */
4
+ export declare const storedAssemblyResultsOptionsSchema: z.ZodObject<{
5
+ assemblyId: z.ZodString;
6
+ workspace: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ workspace: string;
9
+ assemblyId: string;
10
+ }, {
11
+ workspace: string;
12
+ assemblyId: string;
13
+ }>;
14
+ export type GetStoredAssemblyResultsOptions = z.infer<typeof storedAssemblyResultsOptionsSchema>;
15
+ /** Canonical retained receipt and producing result provenance, for idempotent registration. */
16
+ export interface StoredAssemblyResult {
17
+ assembly_id: string;
18
+ step: string;
19
+ result_id: string;
20
+ original_id?: string | (string | null)[];
21
+ asset: StoredAsset;
22
+ }
23
+ /**
24
+ * Pure extraction from a fetched/verified Assembly bound to an authorized app upload. Validates
25
+ * every retained result atomically; temporary outputs are ignored, partial receipts are rejected.
26
+ * This does not authenticate notifications or check application permissions.
27
+ */
28
+ export declare function extractStoredAssemblyResults(input: unknown, options: GetStoredAssemblyResultsOptions): StoredAssemblyResult[];
29
+ //# sourceMappingURL=storageResults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storageResults.d.ts","sourceRoot":"","sources":["../../src/v3/storageResults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAEpD,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAO1B,kGAAkG;AAClG,eAAO,MAAM,kCAAkC;;;;;;;;;EAG7C,CAAA;AAEF,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAA;AAEhG,+FAA+F;AAC/F,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAA;IACxC,KAAK,EAAE,WAAW,CAAA;CACnB;AAaD;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,+BAA+B,GACvC,oBAAoB,EAAE,CA6BxB"}
@@ -0,0 +1,52 @@
1
+ import { z } from 'zod/v3';
2
+ import { storedAssetSchema } from "./storageAsset.js";
3
+ // SDK-owned extraction is outside alphalib-sync's explicit node-sdk syncIncludes. Co-location
4
+ // reuses canonical schemas and their Types/Zod generation without adding a runtime package.
5
+ /** Server-owned Assembly identity and expected Workspace, never untrusted notification fields. */
6
+ export const storedAssemblyResultsOptionsSchema = z.object({
7
+ assemblyId: z.string().regex(/^[A-Za-z0-9_-]+$/),
8
+ workspace: z.string().min(1),
9
+ });
10
+ const resultSchema = storedAssetSchema.extend({
11
+ id: z.string().min(1),
12
+ original_id: z.union([z.string(), z.array(z.string().nullable())]).optional(),
13
+ });
14
+ const assemblySchema = z.object({
15
+ assembly_id: z.string(),
16
+ ok: z.string().nullable().optional(),
17
+ error: z.string().optional(),
18
+ results: z.record(z.array(z.record(z.unknown()))).optional(),
19
+ });
20
+ /**
21
+ * Pure extraction from a fetched/verified Assembly bound to an authorized app upload. Validates
22
+ * every retained result atomically; temporary outputs are ignored, partial receipts are rejected.
23
+ * This does not authenticate notifications or check application permissions.
24
+ */
25
+ export function extractStoredAssemblyResults(input, options) {
26
+ const { assemblyId, workspace } = storedAssemblyResultsOptionsSchema.parse(options);
27
+ const assembly = assemblySchema.parse(input);
28
+ if (assembly.assembly_id !== assemblyId)
29
+ throw new Error('The response did not match the requested Assembly');
30
+ if (assembly.error !== undefined || assembly.ok !== 'ASSEMBLY_COMPLETED')
31
+ throw new Error(`The Storage Assembly is not complete (${assembly.error ?? assembly.ok})`);
32
+ if (assembly.results === undefined)
33
+ throw new Error('The completed Assembly did not contain results');
34
+ const results = [];
35
+ for (const [step, files] of Object.entries(assembly.results)) {
36
+ for (const file of files) {
37
+ if (file.asset_id === undefined &&
38
+ file.version_id === undefined &&
39
+ file.workspace === undefined)
40
+ continue;
41
+ const parsed = resultSchema.safeParse(file);
42
+ if (!parsed.success || parsed.data.workspace !== workspace) {
43
+ throw new Error('The Assembly returned an invalid or cross-Workspace Storage result', {
44
+ cause: { assemblyId, step },
45
+ });
46
+ }
47
+ const { id, original_id, ...asset } = parsed.data;
48
+ results.push({ assembly_id: assemblyId, step, result_id: id, original_id, asset });
49
+ }
50
+ }
51
+ return results;
52
+ }