@mindstudio-ai/remy 0.1.41 → 0.1.42
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 +31 -16
- package/dist/index.js +44 -20
- package/dist/subagents/codeSanityCheck/prompt.md +2 -0
- package/package.json +1 -1
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
|
|
|
@@ -3137,10 +3151,11 @@ async function generateImageAssets(opts) {
|
|
|
3137
3151
|
error: url
|
|
3138
3152
|
};
|
|
3139
3153
|
}
|
|
3140
|
-
const analysis = await
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3154
|
+
const analysis = await analyzeImage({
|
|
3155
|
+
prompt: ANALYZE_PROMPT,
|
|
3156
|
+
imageUrl: url,
|
|
3157
|
+
onLog
|
|
3158
|
+
});
|
|
3144
3159
|
return {
|
|
3145
3160
|
url,
|
|
3146
3161
|
prompt: prompts[i],
|
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",
|
|
@@ -3192,10 +3214,11 @@ async function generateImageAssets(opts) {
|
|
|
3192
3214
|
error: url
|
|
3193
3215
|
};
|
|
3194
3216
|
}
|
|
3195
|
-
const analysis = await
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3217
|
+
const analysis = await analyzeImage({
|
|
3218
|
+
prompt: ANALYZE_PROMPT,
|
|
3219
|
+
imageUrl: url,
|
|
3220
|
+
onLog
|
|
3221
|
+
});
|
|
3199
3222
|
return {
|
|
3200
3223
|
url,
|
|
3201
3224
|
prompt: prompts[i],
|
|
@@ -3212,6 +3235,7 @@ var init_imageGenerator = __esm({
|
|
|
3212
3235
|
"src/subagents/designExpert/tools/images/imageGenerator.ts"() {
|
|
3213
3236
|
"use strict";
|
|
3214
3237
|
init_runCli();
|
|
3238
|
+
init_analyzeImage();
|
|
3215
3239
|
init_enhancePrompt();
|
|
3216
3240
|
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
3241
|
}
|
|
@@ -3336,7 +3360,7 @@ var init_tools2 = __esm({
|
|
|
3336
3360
|
init_searchGoogle2();
|
|
3337
3361
|
init_fetchUrl2();
|
|
3338
3362
|
init_analyzeDesign();
|
|
3339
|
-
|
|
3363
|
+
init_analyzeImage2();
|
|
3340
3364
|
init_screenshot3();
|
|
3341
3365
|
init_generateImages();
|
|
3342
3366
|
init_editImages();
|
|
@@ -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
|
|