@mindstudio-ai/remy 0.1.41 → 0.1.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/headless.js
CHANGED
|
@@ -2141,6 +2141,17 @@ var runMethodTool = {
|
|
|
2141
2141
|
}
|
|
2142
2142
|
};
|
|
2143
2143
|
|
|
2144
|
+
// src/subagents/common/analyzeImage.ts
|
|
2145
|
+
var VISION_MODEL = "gemini-3-flash";
|
|
2146
|
+
var VISION_MODEL_OVERRIDE = JSON.stringify({ model: VISION_MODEL });
|
|
2147
|
+
async function analyzeImage(params) {
|
|
2148
|
+
const { prompt, imageUrl, timeout = 2e5, onLog } = params;
|
|
2149
|
+
return runCli(
|
|
2150
|
+
`mindstudio analyze-image --prompt ${JSON.stringify(prompt)} --image-url ${JSON.stringify(imageUrl)} --vision-model-override ${JSON.stringify(VISION_MODEL_OVERRIDE)} --output-key analysis --no-meta`,
|
|
2151
|
+
{ timeout, onLog }
|
|
2152
|
+
);
|
|
2153
|
+
}
|
|
2154
|
+
|
|
2144
2155
|
// src/tools/_helpers/screenshot.ts
|
|
2145
2156
|
var SCREENSHOT_ANALYSIS_PROMPT = "Describe everything visible on screen from top to bottom \u2014 every element, its position, its size relative to the viewport, its colors, its content. Be comprehensive, thorough, and spatial. After the inventory, note anything that looks visually broken (overlapping elements, clipped text, misaligned components). Respond only with your analysis as Markdown and absolutely no other text. Do not use emojis - use unicode if you need symbols.";
|
|
2146
2157
|
async function captureAndAnalyzeScreenshot(promptOrOptions) {
|
|
@@ -2165,10 +2176,11 @@ async function captureAndAnalyzeScreenshot(promptOrOptions) {
|
|
|
2165
2176
|
return url;
|
|
2166
2177
|
}
|
|
2167
2178
|
const analysisPrompt = prompt || SCREENSHOT_ANALYSIS_PROMPT;
|
|
2168
|
-
const analysis = await
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2179
|
+
const analysis = await analyzeImage({
|
|
2180
|
+
prompt: analysisPrompt,
|
|
2181
|
+
imageUrl: url,
|
|
2182
|
+
onLog
|
|
2183
|
+
});
|
|
2172
2184
|
return JSON.stringify({ url, analysis });
|
|
2173
2185
|
}
|
|
2174
2186
|
|
|
@@ -2946,10 +2958,11 @@ async function execute3(input, onLog) {
|
|
|
2946
2958
|
}
|
|
2947
2959
|
imageUrl = ssUrl;
|
|
2948
2960
|
}
|
|
2949
|
-
const analysis = await
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2961
|
+
const analysis = await analyzeImage({
|
|
2962
|
+
prompt: analysisPrompt,
|
|
2963
|
+
imageUrl,
|
|
2964
|
+
onLog
|
|
2965
|
+
});
|
|
2953
2966
|
return JSON.stringify({ url: imageUrl, analysis });
|
|
2954
2967
|
}
|
|
2955
2968
|
|
|
@@ -2981,10 +2994,11 @@ var definition4 = {
|
|
|
2981
2994
|
async function execute4(input, onLog) {
|
|
2982
2995
|
const imageUrl = input.imageUrl;
|
|
2983
2996
|
const prompt = input.prompt || DEFAULT_PROMPT;
|
|
2984
|
-
const analysis = await
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2997
|
+
const analysis = await analyzeImage({
|
|
2998
|
+
prompt,
|
|
2999
|
+
imageUrl,
|
|
3000
|
+
onLog
|
|
3001
|
+
});
|
|
2988
3002
|
return JSON.stringify({ url: imageUrl, analysis });
|
|
2989
3003
|
}
|
|
2990
3004
|
|
|
@@ -3030,10 +3044,9 @@ var SYSTEM_PROMPT = readAsset(
|
|
|
3030
3044
|
"subagents/designExpert/tools/images/enhance-image-prompt.md"
|
|
3031
3045
|
);
|
|
3032
3046
|
async function enhanceImagePrompt(params) {
|
|
3033
|
-
const { brief,
|
|
3034
|
-
const orientation = aspectRatio === "1:1" ? "square" : ["16:9", "4:3", "3:2"].includes(aspectRatio) ? "landscape" : "portrait";
|
|
3047
|
+
const { brief, width, height, transparentBackground, onLog } = params;
|
|
3035
3048
|
const contextParts = [
|
|
3036
|
-
`
|
|
3049
|
+
`Dimensions: ${width}x${height}${width > height ? " (landscape)" : width < height ? " (portrait)" : " (square)"}`
|
|
3037
3050
|
];
|
|
3038
3051
|
if (transparentBackground) {
|
|
3039
3052
|
contextParts.push(
|
|
@@ -3058,17 +3071,19 @@ ${brief}
|
|
|
3058
3071
|
var ANALYZE_PROMPT = "You are reviewing this image for a visual designer sourcing assets for a project. Describe: what the image depicts, the mood and color palette, how the lighting and composition work, any text present in the image, whether there are any issues (artifacts, distortions), and how it could be used in a layout for an app or website. Be concise and practical. Respond only with your analysis as Markdown and absolutely no other text. Do not use emojis - use unicode if you need symbols.";
|
|
3059
3072
|
async function generateImageAssets(opts) {
|
|
3060
3073
|
const { prompts, sourceImages, transparentBackground, onLog } = opts;
|
|
3061
|
-
const
|
|
3062
|
-
const
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3074
|
+
const width = opts.width || 2048;
|
|
3075
|
+
const height = opts.height || 2048;
|
|
3076
|
+
const config = { width, height };
|
|
3077
|
+
if (sourceImages?.length) {
|
|
3078
|
+
config.images = sourceImages;
|
|
3079
|
+
}
|
|
3066
3080
|
const isEdit = !!sourceImages?.length;
|
|
3067
3081
|
const enhancedPrompts = isEdit ? prompts : await Promise.all(
|
|
3068
3082
|
prompts.map(
|
|
3069
3083
|
(brief) => enhanceImagePrompt({
|
|
3070
3084
|
brief,
|
|
3071
|
-
|
|
3085
|
+
width,
|
|
3086
|
+
height,
|
|
3072
3087
|
transparentBackground,
|
|
3073
3088
|
onLog
|
|
3074
3089
|
})
|
|
@@ -3079,7 +3094,7 @@ async function generateImageAssets(opts) {
|
|
|
3079
3094
|
const step = JSON.stringify({
|
|
3080
3095
|
prompt: enhancedPrompts[0],
|
|
3081
3096
|
imageModelOverride: {
|
|
3082
|
-
model: "
|
|
3097
|
+
model: "seedream-4.5",
|
|
3083
3098
|
config
|
|
3084
3099
|
}
|
|
3085
3100
|
});
|
|
@@ -3094,7 +3109,7 @@ async function generateImageAssets(opts) {
|
|
|
3094
3109
|
step: {
|
|
3095
3110
|
prompt,
|
|
3096
3111
|
imageModelOverride: {
|
|
3097
|
-
model: "
|
|
3112
|
+
model: "seedream-4.5",
|
|
3098
3113
|
config
|
|
3099
3114
|
}
|
|
3100
3115
|
}
|
|
@@ -3137,16 +3152,18 @@ async function generateImageAssets(opts) {
|
|
|
3137
3152
|
error: url
|
|
3138
3153
|
};
|
|
3139
3154
|
}
|
|
3140
|
-
const analysis = await
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3155
|
+
const analysis = await analyzeImage({
|
|
3156
|
+
prompt: ANALYZE_PROMPT,
|
|
3157
|
+
imageUrl: url,
|
|
3158
|
+
onLog
|
|
3159
|
+
});
|
|
3144
3160
|
return {
|
|
3145
3161
|
url,
|
|
3146
3162
|
prompt: prompts[i],
|
|
3147
3163
|
...!isEdit && { enhancedPrompt: enhancedPrompts[i] },
|
|
3148
3164
|
analysis,
|
|
3149
|
-
|
|
3165
|
+
width,
|
|
3166
|
+
height
|
|
3150
3167
|
};
|
|
3151
3168
|
})
|
|
3152
3169
|
);
|
|
@@ -3167,10 +3184,13 @@ var definition6 = {
|
|
|
3167
3184
|
},
|
|
3168
3185
|
description: "One or more image briefs describing what you want. Focus on subject, mood, style, and intended use \u2014 the tool optimizes your brief into a model-ready prompt automatically. Multiple briefs run in parallel."
|
|
3169
3186
|
},
|
|
3170
|
-
|
|
3171
|
-
type: "
|
|
3172
|
-
|
|
3173
|
-
|
|
3187
|
+
width: {
|
|
3188
|
+
type: "number",
|
|
3189
|
+
description: "Image width in pixels. Default 2048. Range: 2048-4096."
|
|
3190
|
+
},
|
|
3191
|
+
height: {
|
|
3192
|
+
type: "number",
|
|
3193
|
+
description: "Image height in pixels. Default 2048. Range: 2048-4096."
|
|
3174
3194
|
},
|
|
3175
3195
|
transparentBackground: {
|
|
3176
3196
|
type: "boolean",
|
|
@@ -3183,7 +3203,8 @@ var definition6 = {
|
|
|
3183
3203
|
async function execute6(input, onLog) {
|
|
3184
3204
|
return generateImageAssets({
|
|
3185
3205
|
prompts: input.prompts,
|
|
3186
|
-
|
|
3206
|
+
width: input.width,
|
|
3207
|
+
height: input.height,
|
|
3187
3208
|
transparentBackground: input.transparentBackground,
|
|
3188
3209
|
onLog
|
|
3189
3210
|
});
|
|
@@ -3215,10 +3236,13 @@ var definition7 = {
|
|
|
3215
3236
|
},
|
|
3216
3237
|
description: "One or more source/reference image URLs. These are used as the basis for the edit \u2014 the AI will use them as reference for style, subject, or composition."
|
|
3217
3238
|
},
|
|
3218
|
-
|
|
3219
|
-
type: "
|
|
3220
|
-
|
|
3221
|
-
|
|
3239
|
+
width: {
|
|
3240
|
+
type: "number",
|
|
3241
|
+
description: "Output width in pixels. Default 2048. Range: 2048-4096."
|
|
3242
|
+
},
|
|
3243
|
+
height: {
|
|
3244
|
+
type: "number",
|
|
3245
|
+
description: "Output height in pixels. Default 2048. Range: 2048-4096."
|
|
3222
3246
|
},
|
|
3223
3247
|
transparentBackground: {
|
|
3224
3248
|
type: "boolean",
|
|
@@ -3232,7 +3256,8 @@ async function execute7(input, onLog) {
|
|
|
3232
3256
|
return generateImageAssets({
|
|
3233
3257
|
prompts: input.prompts,
|
|
3234
3258
|
sourceImages: input.sourceImages,
|
|
3235
|
-
|
|
3259
|
+
width: input.width,
|
|
3260
|
+
height: input.height,
|
|
3236
3261
|
transparentBackground: input.transparentBackground,
|
|
3237
3262
|
onLog
|
|
3238
3263
|
});
|
package/dist/index.js
CHANGED
|
@@ -2057,6 +2057,24 @@ var init_runMethod = __esm({
|
|
|
2057
2057
|
}
|
|
2058
2058
|
});
|
|
2059
2059
|
|
|
2060
|
+
// src/subagents/common/analyzeImage.ts
|
|
2061
|
+
async function analyzeImage(params) {
|
|
2062
|
+
const { prompt, imageUrl, timeout = 2e5, onLog } = params;
|
|
2063
|
+
return runCli(
|
|
2064
|
+
`mindstudio analyze-image --prompt ${JSON.stringify(prompt)} --image-url ${JSON.stringify(imageUrl)} --vision-model-override ${JSON.stringify(VISION_MODEL_OVERRIDE)} --output-key analysis --no-meta`,
|
|
2065
|
+
{ timeout, onLog }
|
|
2066
|
+
);
|
|
2067
|
+
}
|
|
2068
|
+
var VISION_MODEL, VISION_MODEL_OVERRIDE;
|
|
2069
|
+
var init_analyzeImage = __esm({
|
|
2070
|
+
"src/subagents/common/analyzeImage.ts"() {
|
|
2071
|
+
"use strict";
|
|
2072
|
+
init_runCli();
|
|
2073
|
+
VISION_MODEL = "gemini-3-flash";
|
|
2074
|
+
VISION_MODEL_OVERRIDE = JSON.stringify({ model: VISION_MODEL });
|
|
2075
|
+
}
|
|
2076
|
+
});
|
|
2077
|
+
|
|
2060
2078
|
// src/tools/_helpers/screenshot.ts
|
|
2061
2079
|
async function captureAndAnalyzeScreenshot(promptOrOptions) {
|
|
2062
2080
|
let prompt;
|
|
@@ -2080,10 +2098,11 @@ async function captureAndAnalyzeScreenshot(promptOrOptions) {
|
|
|
2080
2098
|
return url;
|
|
2081
2099
|
}
|
|
2082
2100
|
const analysisPrompt = prompt || SCREENSHOT_ANALYSIS_PROMPT;
|
|
2083
|
-
const analysis = await
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2101
|
+
const analysis = await analyzeImage({
|
|
2102
|
+
prompt: analysisPrompt,
|
|
2103
|
+
imageUrl: url,
|
|
2104
|
+
onLog
|
|
2105
|
+
});
|
|
2087
2106
|
return JSON.stringify({ url, analysis });
|
|
2088
2107
|
}
|
|
2089
2108
|
var SCREENSHOT_ANALYSIS_PROMPT;
|
|
@@ -2091,7 +2110,7 @@ var init_screenshot = __esm({
|
|
|
2091
2110
|
"src/tools/_helpers/screenshot.ts"() {
|
|
2092
2111
|
"use strict";
|
|
2093
2112
|
init_sidecar();
|
|
2094
|
-
|
|
2113
|
+
init_analyzeImage();
|
|
2095
2114
|
SCREENSHOT_ANALYSIS_PROMPT = "Describe everything visible on screen from top to bottom \u2014 every element, its position, its size relative to the viewport, its colors, its content. Be comprehensive, thorough, and spatial. After the inventory, note anything that looks visually broken (overlapping elements, clipped text, misaligned components). Respond only with your analysis as Markdown and absolutely no other text. Do not use emojis - use unicode if you need symbols.";
|
|
2096
2115
|
}
|
|
2097
2116
|
});
|
|
@@ -2939,10 +2958,11 @@ async function execute3(input, onLog) {
|
|
|
2939
2958
|
}
|
|
2940
2959
|
imageUrl = ssUrl;
|
|
2941
2960
|
}
|
|
2942
|
-
const analysis = await
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2961
|
+
const analysis = await analyzeImage({
|
|
2962
|
+
prompt: analysisPrompt,
|
|
2963
|
+
imageUrl,
|
|
2964
|
+
onLog
|
|
2965
|
+
});
|
|
2946
2966
|
return JSON.stringify({ url: imageUrl, analysis });
|
|
2947
2967
|
}
|
|
2948
2968
|
var DESIGN_REFERENCE_PROMPT, definition3;
|
|
@@ -2950,6 +2970,7 @@ var init_analyzeDesign = __esm({
|
|
|
2950
2970
|
"src/subagents/designExpert/tools/analyzeDesign.ts"() {
|
|
2951
2971
|
"use strict";
|
|
2952
2972
|
init_runCli();
|
|
2973
|
+
init_analyzeImage();
|
|
2953
2974
|
DESIGN_REFERENCE_PROMPT = `
|
|
2954
2975
|
You are analyzing a screenshot of a real website or app for a designer's personal technique/inspiration reference notes.
|
|
2955
2976
|
|
|
@@ -3003,17 +3024,18 @@ __export(analyzeImage_exports, {
|
|
|
3003
3024
|
async function execute4(input, onLog) {
|
|
3004
3025
|
const imageUrl = input.imageUrl;
|
|
3005
3026
|
const prompt = input.prompt || DEFAULT_PROMPT;
|
|
3006
|
-
const analysis = await
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3027
|
+
const analysis = await analyzeImage({
|
|
3028
|
+
prompt,
|
|
3029
|
+
imageUrl,
|
|
3030
|
+
onLog
|
|
3031
|
+
});
|
|
3010
3032
|
return JSON.stringify({ url: imageUrl, analysis });
|
|
3011
3033
|
}
|
|
3012
3034
|
var DEFAULT_PROMPT, definition4;
|
|
3013
|
-
var
|
|
3035
|
+
var init_analyzeImage2 = __esm({
|
|
3014
3036
|
"src/subagents/designExpert/tools/analyzeImage.ts"() {
|
|
3015
3037
|
"use strict";
|
|
3016
|
-
|
|
3038
|
+
init_analyzeImage();
|
|
3017
3039
|
DEFAULT_PROMPT = "Describe everything visible in this image \u2014 every element, its position, its size relative to the frame, its colors, its content. Be comprhensive, thorough and spatial. After the inventory, note anything that looks visually broken (overlapping elements, clipped text, misaligned components). Respond only with your analysis as Markdown and absolutely no other text. Do not use emojis - use unicode if you need symbols.";
|
|
3018
3040
|
definition4 = {
|
|
3019
3041
|
name: "analyzeImage",
|
|
@@ -3075,10 +3097,9 @@ var init_screenshot3 = __esm({
|
|
|
3075
3097
|
|
|
3076
3098
|
// src/subagents/designExpert/tools/images/enhancePrompt.ts
|
|
3077
3099
|
async function enhanceImagePrompt(params) {
|
|
3078
|
-
const { brief,
|
|
3079
|
-
const orientation = aspectRatio === "1:1" ? "square" : ["16:9", "4:3", "3:2"].includes(aspectRatio) ? "landscape" : "portrait";
|
|
3100
|
+
const { brief, width, height, transparentBackground, onLog } = params;
|
|
3080
3101
|
const contextParts = [
|
|
3081
|
-
`
|
|
3102
|
+
`Dimensions: ${width}x${height}${width > height ? " (landscape)" : width < height ? " (portrait)" : " (square)"}`
|
|
3082
3103
|
];
|
|
3083
3104
|
if (transparentBackground) {
|
|
3084
3105
|
contextParts.push(
|
|
@@ -3113,17 +3134,19 @@ var init_enhancePrompt = __esm({
|
|
|
3113
3134
|
// src/subagents/designExpert/tools/images/imageGenerator.ts
|
|
3114
3135
|
async function generateImageAssets(opts) {
|
|
3115
3136
|
const { prompts, sourceImages, transparentBackground, onLog } = opts;
|
|
3116
|
-
const
|
|
3117
|
-
const
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3137
|
+
const width = opts.width || 2048;
|
|
3138
|
+
const height = opts.height || 2048;
|
|
3139
|
+
const config = { width, height };
|
|
3140
|
+
if (sourceImages?.length) {
|
|
3141
|
+
config.images = sourceImages;
|
|
3142
|
+
}
|
|
3121
3143
|
const isEdit = !!sourceImages?.length;
|
|
3122
3144
|
const enhancedPrompts = isEdit ? prompts : await Promise.all(
|
|
3123
3145
|
prompts.map(
|
|
3124
3146
|
(brief) => enhanceImagePrompt({
|
|
3125
3147
|
brief,
|
|
3126
|
-
|
|
3148
|
+
width,
|
|
3149
|
+
height,
|
|
3127
3150
|
transparentBackground,
|
|
3128
3151
|
onLog
|
|
3129
3152
|
})
|
|
@@ -3134,7 +3157,7 @@ async function generateImageAssets(opts) {
|
|
|
3134
3157
|
const step = JSON.stringify({
|
|
3135
3158
|
prompt: enhancedPrompts[0],
|
|
3136
3159
|
imageModelOverride: {
|
|
3137
|
-
model: "
|
|
3160
|
+
model: "seedream-4.5",
|
|
3138
3161
|
config
|
|
3139
3162
|
}
|
|
3140
3163
|
});
|
|
@@ -3149,7 +3172,7 @@ async function generateImageAssets(opts) {
|
|
|
3149
3172
|
step: {
|
|
3150
3173
|
prompt,
|
|
3151
3174
|
imageModelOverride: {
|
|
3152
|
-
model: "
|
|
3175
|
+
model: "seedream-4.5",
|
|
3153
3176
|
config
|
|
3154
3177
|
}
|
|
3155
3178
|
}
|
|
@@ -3192,16 +3215,18 @@ async function generateImageAssets(opts) {
|
|
|
3192
3215
|
error: url
|
|
3193
3216
|
};
|
|
3194
3217
|
}
|
|
3195
|
-
const analysis = await
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3218
|
+
const analysis = await analyzeImage({
|
|
3219
|
+
prompt: ANALYZE_PROMPT,
|
|
3220
|
+
imageUrl: url,
|
|
3221
|
+
onLog
|
|
3222
|
+
});
|
|
3199
3223
|
return {
|
|
3200
3224
|
url,
|
|
3201
3225
|
prompt: prompts[i],
|
|
3202
3226
|
...!isEdit && { enhancedPrompt: enhancedPrompts[i] },
|
|
3203
3227
|
analysis,
|
|
3204
|
-
|
|
3228
|
+
width,
|
|
3229
|
+
height
|
|
3205
3230
|
};
|
|
3206
3231
|
})
|
|
3207
3232
|
);
|
|
@@ -3212,6 +3237,7 @@ var init_imageGenerator = __esm({
|
|
|
3212
3237
|
"src/subagents/designExpert/tools/images/imageGenerator.ts"() {
|
|
3213
3238
|
"use strict";
|
|
3214
3239
|
init_runCli();
|
|
3240
|
+
init_analyzeImage();
|
|
3215
3241
|
init_enhancePrompt();
|
|
3216
3242
|
ANALYZE_PROMPT = "You are reviewing this image for a visual designer sourcing assets for a project. Describe: what the image depicts, the mood and color palette, how the lighting and composition work, any text present in the image, whether there are any issues (artifacts, distortions), and how it could be used in a layout for an app or website. Be concise and practical. Respond only with your analysis as Markdown and absolutely no other text. Do not use emojis - use unicode if you need symbols.";
|
|
3217
3243
|
}
|
|
@@ -3226,7 +3252,8 @@ __export(generateImages_exports, {
|
|
|
3226
3252
|
async function execute6(input, onLog) {
|
|
3227
3253
|
return generateImageAssets({
|
|
3228
3254
|
prompts: input.prompts,
|
|
3229
|
-
|
|
3255
|
+
width: input.width,
|
|
3256
|
+
height: input.height,
|
|
3230
3257
|
transparentBackground: input.transparentBackground,
|
|
3231
3258
|
onLog
|
|
3232
3259
|
});
|
|
@@ -3249,10 +3276,13 @@ var init_generateImages = __esm({
|
|
|
3249
3276
|
},
|
|
3250
3277
|
description: "One or more image briefs describing what you want. Focus on subject, mood, style, and intended use \u2014 the tool optimizes your brief into a model-ready prompt automatically. Multiple briefs run in parallel."
|
|
3251
3278
|
},
|
|
3252
|
-
|
|
3253
|
-
type: "
|
|
3254
|
-
|
|
3255
|
-
|
|
3279
|
+
width: {
|
|
3280
|
+
type: "number",
|
|
3281
|
+
description: "Image width in pixels. Default 2048. Range: 2048-4096."
|
|
3282
|
+
},
|
|
3283
|
+
height: {
|
|
3284
|
+
type: "number",
|
|
3285
|
+
description: "Image height in pixels. Default 2048. Range: 2048-4096."
|
|
3256
3286
|
},
|
|
3257
3287
|
transparentBackground: {
|
|
3258
3288
|
type: "boolean",
|
|
@@ -3275,7 +3305,8 @@ async function execute7(input, onLog) {
|
|
|
3275
3305
|
return generateImageAssets({
|
|
3276
3306
|
prompts: input.prompts,
|
|
3277
3307
|
sourceImages: input.sourceImages,
|
|
3278
|
-
|
|
3308
|
+
width: input.width,
|
|
3309
|
+
height: input.height,
|
|
3279
3310
|
transparentBackground: input.transparentBackground,
|
|
3280
3311
|
onLog
|
|
3281
3312
|
});
|
|
@@ -3305,10 +3336,13 @@ var init_editImages = __esm({
|
|
|
3305
3336
|
},
|
|
3306
3337
|
description: "One or more source/reference image URLs. These are used as the basis for the edit \u2014 the AI will use them as reference for style, subject, or composition."
|
|
3307
3338
|
},
|
|
3308
|
-
|
|
3309
|
-
type: "
|
|
3310
|
-
|
|
3311
|
-
|
|
3339
|
+
width: {
|
|
3340
|
+
type: "number",
|
|
3341
|
+
description: "Output width in pixels. Default 2048. Range: 2048-4096."
|
|
3342
|
+
},
|
|
3343
|
+
height: {
|
|
3344
|
+
type: "number",
|
|
3345
|
+
description: "Output height in pixels. Default 2048. Range: 2048-4096."
|
|
3312
3346
|
},
|
|
3313
3347
|
transparentBackground: {
|
|
3314
3348
|
type: "boolean",
|
|
@@ -3336,7 +3370,7 @@ var init_tools2 = __esm({
|
|
|
3336
3370
|
init_searchGoogle2();
|
|
3337
3371
|
init_fetchUrl2();
|
|
3338
3372
|
init_analyzeDesign();
|
|
3339
|
-
|
|
3373
|
+
init_analyzeImage2();
|
|
3340
3374
|
init_screenshot3();
|
|
3341
3375
|
init_generateImages();
|
|
3342
3376
|
init_editImages();
|
|
@@ -41,7 +41,6 @@ result.$billingCost; // cost in credits (if applicable)
|
|
|
41
41
|
| `generateMusic` | Music from text description | `prompt` | `audioUrl` |
|
|
42
42
|
| `generateLipsync` | Animate face to match audio | `imageUrl`, `audioUrl` | `videoUrl` |
|
|
43
43
|
| `generateAsset` | HTML/PDF/PNG/video output | `prompt` | `assetUrl` |
|
|
44
|
-
| `generateChart` | Chart from data | `data`, `chartType` | `imageUrl` |
|
|
45
44
|
|
|
46
45
|
### AI Analysis
|
|
47
46
|
|
|
@@ -133,6 +132,8 @@ const { content } = await agent.generateText({
|
|
|
133
132
|
});
|
|
134
133
|
```
|
|
135
134
|
|
|
135
|
+
Make sure to prioritize new, popular models. MindStudio has a ton of models available - most of them are historical/legacy. Always choose latest generation models from leading providers - Anthropic Claude 4 family, Google Gemini 3, OpenAI GPT 5 to start - the user can adjust later.
|
|
136
|
+
|
|
136
137
|
### Batch Execution
|
|
137
138
|
|
|
138
139
|
Run up to 50 actions in parallel:
|
|
@@ -144,3 +145,15 @@ const result = await agent.executeStepBatch([
|
|
|
144
145
|
]);
|
|
145
146
|
// result.results[0].output, result.results[1].output
|
|
146
147
|
```
|
|
148
|
+
|
|
149
|
+
### AI Generation
|
|
150
|
+
|
|
151
|
+
MindStudio SDK allows us to build all kinds of amazing AI experiences in apps, including:
|
|
152
|
+
- Text generation
|
|
153
|
+
- Image generation (including images with text - AI has gotten good at that now)
|
|
154
|
+
- Image "remixing" (e.g., user uploads an image, use it as the source image to an image generation model to remix it, or add multiple to generate a collage, etc)
|
|
155
|
+
- Video generation (including generating video from reference images, start frame images, with audio including voice, etc)
|
|
156
|
+
- TTS/audio generation
|
|
157
|
+
- Detailed image and video analysis
|
|
158
|
+
|
|
159
|
+
Consider the ways in which AI can be incorporated into backend methods to solve problems and be creative.
|
|
@@ -22,6 +22,8 @@ These are things we already know about and have decided to accept:
|
|
|
22
22
|
- swr
|
|
23
23
|
- framer-motion
|
|
24
24
|
- styled-components
|
|
25
|
+
- Preferences:
|
|
26
|
+
- use [wouter](https://github.com/molefrog/wouter) for React routing instead of reaching for react-router
|
|
25
27
|
|
|
26
28
|
### Common pitfalls (always flag these)
|
|
27
29
|
|
|
@@ -32,7 +32,7 @@ These are non-negotiable. Violating them produces bad output.
|
|
|
32
32
|
|
|
33
33
|
You'll receive context about the generation parameters. Use them:
|
|
34
34
|
|
|
35
|
-
- **
|
|
35
|
+
- **Dimensions**: If the image is wide (landscape), compose horizontally. If tall (portrait), compose vertically. If square, center the subject.
|
|
36
36
|
- **Transparent background**: The background will be removed after generation. Don't describe elaborate backgrounds — focus on the subject. Describe it as an isolated element.
|
|
37
37
|
|
|
38
38
|
## Photography prompts
|