@mindstudio-ai/remy 0.1.31 → 0.1.33
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
|
@@ -1331,6 +1331,7 @@ var askMindStudioSdkTool = {
|
|
|
1331
1331
|
async execute(input) {
|
|
1332
1332
|
const query = input.query;
|
|
1333
1333
|
return runCli(`mindstudio ask ${JSON.stringify(query)}`, {
|
|
1334
|
+
timeout: 2e5,
|
|
1334
1335
|
maxBuffer: 512 * 1024
|
|
1335
1336
|
});
|
|
1336
1337
|
}
|
|
@@ -2100,7 +2101,8 @@ async function captureAndAnalyzeScreenshot(promptOrOptions) {
|
|
|
2100
2101
|
}
|
|
2101
2102
|
const analysisPrompt = prompt || SCREENSHOT_ANALYSIS_PROMPT;
|
|
2102
2103
|
const analysis = await runCli(
|
|
2103
|
-
`mindstudio analyze-image --prompt ${JSON.stringify(analysisPrompt)} --image-url ${JSON.stringify(url)} --output-key analysis --no-meta
|
|
2104
|
+
`mindstudio analyze-image --prompt ${JSON.stringify(analysisPrompt)} --image-url ${JSON.stringify(url)} --output-key analysis --no-meta`,
|
|
2105
|
+
{ timeout: 2e5 }
|
|
2104
2106
|
);
|
|
2105
2107
|
return JSON.stringify({ url, analysis });
|
|
2106
2108
|
}
|
|
@@ -2192,14 +2194,15 @@ async function runSubAgent(config) {
|
|
|
2192
2194
|
const contentBlocks = [];
|
|
2193
2195
|
let thinkingStartedAt = 0;
|
|
2194
2196
|
let stopReason = "end_turn";
|
|
2197
|
+
const fullSystem = `${system}
|
|
2198
|
+
|
|
2199
|
+
Current date/time: ${(/* @__PURE__ */ new Date()).toISOString().replace("T", " ").replace(/\.\d+Z$/, " UTC")}`;
|
|
2195
2200
|
try {
|
|
2196
2201
|
for await (const event of streamChatWithRetry({
|
|
2197
2202
|
...apiConfig,
|
|
2198
2203
|
model,
|
|
2199
2204
|
subAgentId,
|
|
2200
|
-
system:
|
|
2201
|
-
|
|
2202
|
-
Current date/time: ${(/* @__PURE__ */ new Date()).toISOString().replace("T", " ").replace(/\.\d+Z$/, " UTC")}`,
|
|
2205
|
+
system: fullSystem,
|
|
2203
2206
|
messages: cleanMessagesForApi(messages),
|
|
2204
2207
|
tools,
|
|
2205
2208
|
signal
|
|
@@ -2538,7 +2541,7 @@ var browserAutomationTool = {
|
|
|
2538
2541
|
}));
|
|
2539
2542
|
const batchResult = await runCli(
|
|
2540
2543
|
`mindstudio batch --no-meta ${JSON.stringify(JSON.stringify(batchInput))}`,
|
|
2541
|
-
{ timeout:
|
|
2544
|
+
{ timeout: 2e5 }
|
|
2542
2545
|
);
|
|
2543
2546
|
try {
|
|
2544
2547
|
const analyses = JSON.parse(batchResult);
|
|
@@ -2716,7 +2719,8 @@ async function executeDesignExpertTool(name, input, context, toolCallId) {
|
|
|
2716
2719
|
let imageUrl = url;
|
|
2717
2720
|
if (!isImageUrl) {
|
|
2718
2721
|
const ssUrl = await runCli(
|
|
2719
|
-
`mindstudio screenshot-url --url ${JSON.stringify(url)} --mode viewport --width 1440 --delay 2000 --output-key screenshotUrl --no-meta
|
|
2722
|
+
`mindstudio screenshot-url --url ${JSON.stringify(url)} --mode viewport --width 1440 --delay 2000 --output-key screenshotUrl --no-meta`,
|
|
2723
|
+
{ timeout: 12e4 }
|
|
2720
2724
|
);
|
|
2721
2725
|
if (ssUrl.startsWith("Error")) {
|
|
2722
2726
|
return `Could not screenshot ${url}: ${ssUrl}`;
|
|
@@ -2724,7 +2728,8 @@ async function executeDesignExpertTool(name, input, context, toolCallId) {
|
|
|
2724
2728
|
imageUrl = ssUrl;
|
|
2725
2729
|
}
|
|
2726
2730
|
const analysis = await runCli(
|
|
2727
|
-
`mindstudio analyze-image --prompt ${JSON.stringify(analysisPrompt)} --image-url ${JSON.stringify(imageUrl)} --output-key analysis --no-meta
|
|
2731
|
+
`mindstudio analyze-image --prompt ${JSON.stringify(analysisPrompt)} --image-url ${JSON.stringify(imageUrl)} --output-key analysis --no-meta`,
|
|
2732
|
+
{ timeout: 2e5 }
|
|
2728
2733
|
);
|
|
2729
2734
|
return isImageUrl ? analysis : `Screenshot: ${imageUrl}
|
|
2730
2735
|
|
|
@@ -2746,7 +2751,7 @@ ${analysis}`;
|
|
|
2746
2751
|
});
|
|
2747
2752
|
const url = await runCli(
|
|
2748
2753
|
`mindstudio generate-image '${step}' --output-key imageUrl --no-meta`,
|
|
2749
|
-
{ jsonLogs: true }
|
|
2754
|
+
{ jsonLogs: true, timeout: 2e5 }
|
|
2750
2755
|
);
|
|
2751
2756
|
imageUrls = [url];
|
|
2752
2757
|
} else {
|
|
@@ -2762,7 +2767,7 @@ ${analysis}`;
|
|
|
2762
2767
|
}));
|
|
2763
2768
|
const batchResult = await runCli(
|
|
2764
2769
|
`mindstudio batch '${JSON.stringify(steps)}' --no-meta`,
|
|
2765
|
-
{ jsonLogs: true }
|
|
2770
|
+
{ jsonLogs: true, timeout: 2e5 }
|
|
2766
2771
|
);
|
|
2767
2772
|
try {
|
|
2768
2773
|
const parsed = JSON.parse(batchResult);
|
|
@@ -2779,7 +2784,8 @@ ${analysis}`;
|
|
|
2779
2784
|
return { prompt: prompts[i], error: url };
|
|
2780
2785
|
}
|
|
2781
2786
|
const analysis = await runCli(
|
|
2782
|
-
`mindstudio analyze-image --prompt ${JSON.stringify(ANALYZE_PROMPT)} --image-url ${JSON.stringify(url)} --output-key analysis --no-meta
|
|
2787
|
+
`mindstudio analyze-image --prompt ${JSON.stringify(ANALYZE_PROMPT)} --image-url ${JSON.stringify(url)} --output-key analysis --no-meta`,
|
|
2788
|
+
{ timeout: 2e5 }
|
|
2783
2789
|
);
|
|
2784
2790
|
return { url, prompt: prompts[i], analysis, width, height };
|
|
2785
2791
|
})
|
package/dist/index.js
CHANGED
|
@@ -1114,6 +1114,7 @@ var init_sdkConsultant = __esm({
|
|
|
1114
1114
|
async execute(input) {
|
|
1115
1115
|
const query = input.query;
|
|
1116
1116
|
return runCli(`mindstudio ask ${JSON.stringify(query)}`, {
|
|
1117
|
+
timeout: 2e5,
|
|
1117
1118
|
maxBuffer: 512 * 1024
|
|
1118
1119
|
});
|
|
1119
1120
|
}
|
|
@@ -2041,7 +2042,8 @@ async function captureAndAnalyzeScreenshot(promptOrOptions) {
|
|
|
2041
2042
|
}
|
|
2042
2043
|
const analysisPrompt = prompt || SCREENSHOT_ANALYSIS_PROMPT;
|
|
2043
2044
|
const analysis = await runCli(
|
|
2044
|
-
`mindstudio analyze-image --prompt ${JSON.stringify(analysisPrompt)} --image-url ${JSON.stringify(url)} --output-key analysis --no-meta
|
|
2045
|
+
`mindstudio analyze-image --prompt ${JSON.stringify(analysisPrompt)} --image-url ${JSON.stringify(url)} --output-key analysis --no-meta`,
|
|
2046
|
+
{ timeout: 2e5 }
|
|
2045
2047
|
);
|
|
2046
2048
|
return JSON.stringify({ url, analysis });
|
|
2047
2049
|
}
|
|
@@ -2155,14 +2157,15 @@ async function runSubAgent(config) {
|
|
|
2155
2157
|
const contentBlocks = [];
|
|
2156
2158
|
let thinkingStartedAt = 0;
|
|
2157
2159
|
let stopReason = "end_turn";
|
|
2160
|
+
const fullSystem = `${system}
|
|
2161
|
+
|
|
2162
|
+
Current date/time: ${(/* @__PURE__ */ new Date()).toISOString().replace("T", " ").replace(/\.\d+Z$/, " UTC")}`;
|
|
2158
2163
|
try {
|
|
2159
2164
|
for await (const event of streamChatWithRetry({
|
|
2160
2165
|
...apiConfig,
|
|
2161
2166
|
model,
|
|
2162
2167
|
subAgentId,
|
|
2163
|
-
system:
|
|
2164
|
-
|
|
2165
|
-
Current date/time: ${(/* @__PURE__ */ new Date()).toISOString().replace("T", " ").replace(/\.\d+Z$/, " UTC")}`,
|
|
2168
|
+
system: fullSystem,
|
|
2166
2169
|
messages: cleanMessagesForApi(messages),
|
|
2167
2170
|
tools,
|
|
2168
2171
|
signal
|
|
@@ -2532,7 +2535,7 @@ var init_browserAutomation = __esm({
|
|
|
2532
2535
|
}));
|
|
2533
2536
|
const batchResult = await runCli(
|
|
2534
2537
|
`mindstudio batch --no-meta ${JSON.stringify(JSON.stringify(batchInput))}`,
|
|
2535
|
-
{ timeout:
|
|
2538
|
+
{ timeout: 2e5 }
|
|
2536
2539
|
);
|
|
2537
2540
|
try {
|
|
2538
2541
|
const analyses = JSON.parse(batchResult);
|
|
@@ -2602,7 +2605,8 @@ async function executeDesignExpertTool(name, input, context, toolCallId) {
|
|
|
2602
2605
|
let imageUrl = url;
|
|
2603
2606
|
if (!isImageUrl) {
|
|
2604
2607
|
const ssUrl = await runCli(
|
|
2605
|
-
`mindstudio screenshot-url --url ${JSON.stringify(url)} --mode viewport --width 1440 --delay 2000 --output-key screenshotUrl --no-meta
|
|
2608
|
+
`mindstudio screenshot-url --url ${JSON.stringify(url)} --mode viewport --width 1440 --delay 2000 --output-key screenshotUrl --no-meta`,
|
|
2609
|
+
{ timeout: 12e4 }
|
|
2606
2610
|
);
|
|
2607
2611
|
if (ssUrl.startsWith("Error")) {
|
|
2608
2612
|
return `Could not screenshot ${url}: ${ssUrl}`;
|
|
@@ -2610,7 +2614,8 @@ async function executeDesignExpertTool(name, input, context, toolCallId) {
|
|
|
2610
2614
|
imageUrl = ssUrl;
|
|
2611
2615
|
}
|
|
2612
2616
|
const analysis = await runCli(
|
|
2613
|
-
`mindstudio analyze-image --prompt ${JSON.stringify(analysisPrompt)} --image-url ${JSON.stringify(imageUrl)} --output-key analysis --no-meta
|
|
2617
|
+
`mindstudio analyze-image --prompt ${JSON.stringify(analysisPrompt)} --image-url ${JSON.stringify(imageUrl)} --output-key analysis --no-meta`,
|
|
2618
|
+
{ timeout: 2e5 }
|
|
2614
2619
|
);
|
|
2615
2620
|
return isImageUrl ? analysis : `Screenshot: ${imageUrl}
|
|
2616
2621
|
|
|
@@ -2632,7 +2637,7 @@ ${analysis}`;
|
|
|
2632
2637
|
});
|
|
2633
2638
|
const url = await runCli(
|
|
2634
2639
|
`mindstudio generate-image '${step}' --output-key imageUrl --no-meta`,
|
|
2635
|
-
{ jsonLogs: true }
|
|
2640
|
+
{ jsonLogs: true, timeout: 2e5 }
|
|
2636
2641
|
);
|
|
2637
2642
|
imageUrls = [url];
|
|
2638
2643
|
} else {
|
|
@@ -2648,7 +2653,7 @@ ${analysis}`;
|
|
|
2648
2653
|
}));
|
|
2649
2654
|
const batchResult = await runCli(
|
|
2650
2655
|
`mindstudio batch '${JSON.stringify(steps)}' --no-meta`,
|
|
2651
|
-
{ jsonLogs: true }
|
|
2656
|
+
{ jsonLogs: true, timeout: 2e5 }
|
|
2652
2657
|
);
|
|
2653
2658
|
try {
|
|
2654
2659
|
const parsed = JSON.parse(batchResult);
|
|
@@ -2665,7 +2670,8 @@ ${analysis}`;
|
|
|
2665
2670
|
return { prompt: prompts[i], error: url };
|
|
2666
2671
|
}
|
|
2667
2672
|
const analysis = await runCli(
|
|
2668
|
-
`mindstudio analyze-image --prompt ${JSON.stringify(ANALYZE_PROMPT)} --image-url ${JSON.stringify(url)} --output-key analysis --no-meta
|
|
2673
|
+
`mindstudio analyze-image --prompt ${JSON.stringify(ANALYZE_PROMPT)} --image-url ${JSON.stringify(url)} --output-key analysis --no-meta`,
|
|
2674
|
+
{ timeout: 2e5 }
|
|
2669
2675
|
);
|
|
2670
2676
|
return { url, prompt: prompts[i], analysis, width, height };
|
|
2671
2677
|
})
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
{{prompts/identity.md}}
|
|
2
2
|
|
|
3
|
+
<inspiration_and_reference>
|
|
4
|
+
{{fonts_to_consider}}
|
|
5
|
+
{{inspiration_images}}
|
|
6
|
+
</inspiration_and_reference>
|
|
7
|
+
|
|
3
8
|
<frontend_design_standards>
|
|
4
9
|
{{prompts/frontend-design-notes.md}}
|
|
5
10
|
</frontend_design_standards>
|
|
@@ -12,8 +17,4 @@
|
|
|
12
17
|
{{prompts/layout.md}}
|
|
13
18
|
</design_guidelines>
|
|
14
19
|
|
|
15
|
-
{{fonts_to_consider}}
|
|
16
|
-
|
|
17
|
-
{{inspiration_images}}
|
|
18
|
-
|
|
19
20
|
{{prompts/instructions.md}}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
- Use `analyzeReferenceImageOrUrl` to analyze any image URL or website URL. Websites are automatically screenshotted. Omit the prompt for a standard design analysis, or provide a custom prompt for specific questions. Do not screenshot font specimen pages, documentation, or other text-heavy pages — use `fetchUrl` for those instead.
|
|
4
4
|
- Use `screenshot` to see the current state of the app preview. This is your primary tool for visual review. Use `fullPage: true` to see the entire page at once. Remember, the screenshot analysis is not overly precise - for example, it cannot reliably identify specific fonts by name — it can only describe what letterforms look like.
|
|
5
|
-
- Use `runBrowserTest`
|
|
6
|
-
- **screenshot vs runBrowserTest**: Screenshot to *see* the page. Browser test to *measure* specific
|
|
5
|
+
- Use `runBrowserTest` to smoke test and spot check the things most likely to be wrong — missing elements, colors that look off in the screenshot, transforms or animations that are hard to judge visually. Don't use it to verify every property in the spec. Trust that if the spec says something, like specifying fonts or layout sections, the coding agent probably implemented it - it's very good at following instructions. Reserve the browser agent for things you genuinely can't tell from looking.
|
|
6
|
+
- **screenshot vs runBrowserTest**: Screenshot to *see* the page. Browser test to *measure* specific values you're unsure about. Start with a screenshot — only reach for the browser agent if something looks off or can't be judged visually. The browser agent is not a screenshot tool — don't ask it to scroll around taking screenshots of sections. Your `screenshot` tool with `fullPage: true` captures the entire page in one call.
|
|
7
7
|
Use `searchGoogle` for research: modern design trends in industries or verticals, "best [domain] apps 2026", ui patterns, etc. Prioritize authoritative sources like Figma and other design leaders, avoid random blog spam. Pick one or more URLs and use `fetchUrl` to get their text content to read and inform your inspiration.
|
|
8
8
|
- Use `fetchUrl` when you need to get the text content of a site.
|
|
9
9
|
- Use `searchGoogle` and `fetchUrl` only when the user references something specific: a particular website to match, a brand to look up, a company whose identity you need to research. You already have curated fonts, inspiration references, and strong internal knowledge — don't search the web for generic inspiration or "best X apps." The web is for specific lookups, not creative direction.
|