@mindstudio-ai/remy 0.1.42 → 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
|
@@ -3044,10 +3044,9 @@ var SYSTEM_PROMPT = readAsset(
|
|
|
3044
3044
|
"subagents/designExpert/tools/images/enhance-image-prompt.md"
|
|
3045
3045
|
);
|
|
3046
3046
|
async function enhanceImagePrompt(params) {
|
|
3047
|
-
const { brief,
|
|
3048
|
-
const orientation = aspectRatio === "1:1" ? "square" : ["16:9", "4:3", "3:2"].includes(aspectRatio) ? "landscape" : "portrait";
|
|
3047
|
+
const { brief, width, height, transparentBackground, onLog } = params;
|
|
3049
3048
|
const contextParts = [
|
|
3050
|
-
`
|
|
3049
|
+
`Dimensions: ${width}x${height}${width > height ? " (landscape)" : width < height ? " (portrait)" : " (square)"}`
|
|
3051
3050
|
];
|
|
3052
3051
|
if (transparentBackground) {
|
|
3053
3052
|
contextParts.push(
|
|
@@ -3072,17 +3071,19 @@ ${brief}
|
|
|
3072
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.";
|
|
3073
3072
|
async function generateImageAssets(opts) {
|
|
3074
3073
|
const { prompts, sourceImages, transparentBackground, onLog } = opts;
|
|
3075
|
-
const
|
|
3076
|
-
const
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
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
|
+
}
|
|
3080
3080
|
const isEdit = !!sourceImages?.length;
|
|
3081
3081
|
const enhancedPrompts = isEdit ? prompts : await Promise.all(
|
|
3082
3082
|
prompts.map(
|
|
3083
3083
|
(brief) => enhanceImagePrompt({
|
|
3084
3084
|
brief,
|
|
3085
|
-
|
|
3085
|
+
width,
|
|
3086
|
+
height,
|
|
3086
3087
|
transparentBackground,
|
|
3087
3088
|
onLog
|
|
3088
3089
|
})
|
|
@@ -3093,7 +3094,7 @@ async function generateImageAssets(opts) {
|
|
|
3093
3094
|
const step = JSON.stringify({
|
|
3094
3095
|
prompt: enhancedPrompts[0],
|
|
3095
3096
|
imageModelOverride: {
|
|
3096
|
-
model: "
|
|
3097
|
+
model: "seedream-4.5",
|
|
3097
3098
|
config
|
|
3098
3099
|
}
|
|
3099
3100
|
});
|
|
@@ -3108,7 +3109,7 @@ async function generateImageAssets(opts) {
|
|
|
3108
3109
|
step: {
|
|
3109
3110
|
prompt,
|
|
3110
3111
|
imageModelOverride: {
|
|
3111
|
-
model: "
|
|
3112
|
+
model: "seedream-4.5",
|
|
3112
3113
|
config
|
|
3113
3114
|
}
|
|
3114
3115
|
}
|
|
@@ -3161,7 +3162,8 @@ async function generateImageAssets(opts) {
|
|
|
3161
3162
|
prompt: prompts[i],
|
|
3162
3163
|
...!isEdit && { enhancedPrompt: enhancedPrompts[i] },
|
|
3163
3164
|
analysis,
|
|
3164
|
-
|
|
3165
|
+
width,
|
|
3166
|
+
height
|
|
3165
3167
|
};
|
|
3166
3168
|
})
|
|
3167
3169
|
);
|
|
@@ -3182,10 +3184,13 @@ var definition6 = {
|
|
|
3182
3184
|
},
|
|
3183
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."
|
|
3184
3186
|
},
|
|
3185
|
-
|
|
3186
|
-
type: "
|
|
3187
|
-
|
|
3188
|
-
|
|
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."
|
|
3189
3194
|
},
|
|
3190
3195
|
transparentBackground: {
|
|
3191
3196
|
type: "boolean",
|
|
@@ -3198,7 +3203,8 @@ var definition6 = {
|
|
|
3198
3203
|
async function execute6(input, onLog) {
|
|
3199
3204
|
return generateImageAssets({
|
|
3200
3205
|
prompts: input.prompts,
|
|
3201
|
-
|
|
3206
|
+
width: input.width,
|
|
3207
|
+
height: input.height,
|
|
3202
3208
|
transparentBackground: input.transparentBackground,
|
|
3203
3209
|
onLog
|
|
3204
3210
|
});
|
|
@@ -3230,10 +3236,13 @@ var definition7 = {
|
|
|
3230
3236
|
},
|
|
3231
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."
|
|
3232
3238
|
},
|
|
3233
|
-
|
|
3234
|
-
type: "
|
|
3235
|
-
|
|
3236
|
-
|
|
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."
|
|
3237
3246
|
},
|
|
3238
3247
|
transparentBackground: {
|
|
3239
3248
|
type: "boolean",
|
|
@@ -3247,7 +3256,8 @@ async function execute7(input, onLog) {
|
|
|
3247
3256
|
return generateImageAssets({
|
|
3248
3257
|
prompts: input.prompts,
|
|
3249
3258
|
sourceImages: input.sourceImages,
|
|
3250
|
-
|
|
3259
|
+
width: input.width,
|
|
3260
|
+
height: input.height,
|
|
3251
3261
|
transparentBackground: input.transparentBackground,
|
|
3252
3262
|
onLog
|
|
3253
3263
|
});
|
package/dist/index.js
CHANGED
|
@@ -3097,10 +3097,9 @@ var init_screenshot3 = __esm({
|
|
|
3097
3097
|
|
|
3098
3098
|
// src/subagents/designExpert/tools/images/enhancePrompt.ts
|
|
3099
3099
|
async function enhanceImagePrompt(params) {
|
|
3100
|
-
const { brief,
|
|
3101
|
-
const orientation = aspectRatio === "1:1" ? "square" : ["16:9", "4:3", "3:2"].includes(aspectRatio) ? "landscape" : "portrait";
|
|
3100
|
+
const { brief, width, height, transparentBackground, onLog } = params;
|
|
3102
3101
|
const contextParts = [
|
|
3103
|
-
`
|
|
3102
|
+
`Dimensions: ${width}x${height}${width > height ? " (landscape)" : width < height ? " (portrait)" : " (square)"}`
|
|
3104
3103
|
];
|
|
3105
3104
|
if (transparentBackground) {
|
|
3106
3105
|
contextParts.push(
|
|
@@ -3135,17 +3134,19 @@ var init_enhancePrompt = __esm({
|
|
|
3135
3134
|
// src/subagents/designExpert/tools/images/imageGenerator.ts
|
|
3136
3135
|
async function generateImageAssets(opts) {
|
|
3137
3136
|
const { prompts, sourceImages, transparentBackground, onLog } = opts;
|
|
3138
|
-
const
|
|
3139
|
-
const
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
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
|
+
}
|
|
3143
3143
|
const isEdit = !!sourceImages?.length;
|
|
3144
3144
|
const enhancedPrompts = isEdit ? prompts : await Promise.all(
|
|
3145
3145
|
prompts.map(
|
|
3146
3146
|
(brief) => enhanceImagePrompt({
|
|
3147
3147
|
brief,
|
|
3148
|
-
|
|
3148
|
+
width,
|
|
3149
|
+
height,
|
|
3149
3150
|
transparentBackground,
|
|
3150
3151
|
onLog
|
|
3151
3152
|
})
|
|
@@ -3156,7 +3157,7 @@ async function generateImageAssets(opts) {
|
|
|
3156
3157
|
const step = JSON.stringify({
|
|
3157
3158
|
prompt: enhancedPrompts[0],
|
|
3158
3159
|
imageModelOverride: {
|
|
3159
|
-
model: "
|
|
3160
|
+
model: "seedream-4.5",
|
|
3160
3161
|
config
|
|
3161
3162
|
}
|
|
3162
3163
|
});
|
|
@@ -3171,7 +3172,7 @@ async function generateImageAssets(opts) {
|
|
|
3171
3172
|
step: {
|
|
3172
3173
|
prompt,
|
|
3173
3174
|
imageModelOverride: {
|
|
3174
|
-
model: "
|
|
3175
|
+
model: "seedream-4.5",
|
|
3175
3176
|
config
|
|
3176
3177
|
}
|
|
3177
3178
|
}
|
|
@@ -3224,7 +3225,8 @@ async function generateImageAssets(opts) {
|
|
|
3224
3225
|
prompt: prompts[i],
|
|
3225
3226
|
...!isEdit && { enhancedPrompt: enhancedPrompts[i] },
|
|
3226
3227
|
analysis,
|
|
3227
|
-
|
|
3228
|
+
width,
|
|
3229
|
+
height
|
|
3228
3230
|
};
|
|
3229
3231
|
})
|
|
3230
3232
|
);
|
|
@@ -3250,7 +3252,8 @@ __export(generateImages_exports, {
|
|
|
3250
3252
|
async function execute6(input, onLog) {
|
|
3251
3253
|
return generateImageAssets({
|
|
3252
3254
|
prompts: input.prompts,
|
|
3253
|
-
|
|
3255
|
+
width: input.width,
|
|
3256
|
+
height: input.height,
|
|
3254
3257
|
transparentBackground: input.transparentBackground,
|
|
3255
3258
|
onLog
|
|
3256
3259
|
});
|
|
@@ -3273,10 +3276,13 @@ var init_generateImages = __esm({
|
|
|
3273
3276
|
},
|
|
3274
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."
|
|
3275
3278
|
},
|
|
3276
|
-
|
|
3277
|
-
type: "
|
|
3278
|
-
|
|
3279
|
-
|
|
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."
|
|
3280
3286
|
},
|
|
3281
3287
|
transparentBackground: {
|
|
3282
3288
|
type: "boolean",
|
|
@@ -3299,7 +3305,8 @@ async function execute7(input, onLog) {
|
|
|
3299
3305
|
return generateImageAssets({
|
|
3300
3306
|
prompts: input.prompts,
|
|
3301
3307
|
sourceImages: input.sourceImages,
|
|
3302
|
-
|
|
3308
|
+
width: input.width,
|
|
3309
|
+
height: input.height,
|
|
3303
3310
|
transparentBackground: input.transparentBackground,
|
|
3304
3311
|
onLog
|
|
3305
3312
|
});
|
|
@@ -3329,10 +3336,13 @@ var init_editImages = __esm({
|
|
|
3329
3336
|
},
|
|
3330
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."
|
|
3331
3338
|
},
|
|
3332
|
-
|
|
3333
|
-
type: "
|
|
3334
|
-
|
|
3335
|
-
|
|
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."
|
|
3336
3346
|
},
|
|
3337
3347
|
transparentBackground: {
|
|
3338
3348
|
type: "boolean",
|
|
@@ -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.
|
|
@@ -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
|