@mindstudio-ai/remy 0.1.166 → 0.1.168
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 +101 -16
- package/dist/index.js +101 -16
- package/package.json +1 -1
package/dist/headless.js
CHANGED
|
@@ -1322,7 +1322,7 @@ var writePlanTool = {
|
|
|
1322
1322
|
clearable: false,
|
|
1323
1323
|
definition: {
|
|
1324
1324
|
name: "writePlan",
|
|
1325
|
-
description: "Write an implementation plan for user approval before making changes. Use this only for large, multi-step changes like new features, new interface types, or when the user explicitly asks to see a plan. Most work should be done autonomously without a plan. Write a clear markdown summary of what you intend to do in plain language \u2014 describe the changes from the user's perspective, not as a list of files and code paths. The plan is displayed standalone in the UI with approve/reject buttons attached
|
|
1325
|
+
description: "Write an implementation plan for user approval before making changes. Use this only for large, multi-step changes like new features, new interface types, or when the user explicitly asks to see a plan. Most work should be done autonomously without a plan. Write a clear markdown summary of what you intend to do in plain language \u2014 describe the changes from the user's perspective, not as a list of files and code paths. The plan is displayed standalone in the UI with approve/reject buttons attached. The plan body ends with its last substantive section \u2014 do not write any closing line addressed to the reader. No 'If this lands, I'll start building,' no 'Let me know what to adjust,' no 'Approve when ready,' no trailing horizontal rule with a sign-off. Wrap-up text belongs in your chat message alongside the plan, not in the plan file. If the user asks for revisions, call this tool again with updated content to overwrite the plan.",
|
|
1326
1326
|
inputSchema: {
|
|
1327
1327
|
type: "object",
|
|
1328
1328
|
properties: {
|
|
@@ -1574,12 +1574,15 @@ var confirmDestructiveActionTool = {
|
|
|
1574
1574
|
|
|
1575
1575
|
// src/subagents/common/runCli.ts
|
|
1576
1576
|
import { spawn } from "child_process";
|
|
1577
|
-
function runCli(
|
|
1577
|
+
function runCli(command, args, options) {
|
|
1578
1578
|
return new Promise((resolve2) => {
|
|
1579
1579
|
const timeout = options?.timeout ?? 6e4;
|
|
1580
1580
|
const maxBuffer = options?.maxBuffer ?? 1024 * 1024;
|
|
1581
|
-
|
|
1582
|
-
|
|
1581
|
+
let finalArgs = args;
|
|
1582
|
+
if (options?.jsonLogs && !args.includes("--json-logs")) {
|
|
1583
|
+
finalArgs = args.length > 0 ? [args[0], "--json-logs", ...args.slice(1)] : ["--json-logs"];
|
|
1584
|
+
}
|
|
1585
|
+
const child = spawn(command, finalArgs, {
|
|
1583
1586
|
stdio: [options?.stdin ? "pipe" : "ignore", "pipe", "pipe"]
|
|
1584
1587
|
});
|
|
1585
1588
|
if (options?.stdin) {
|
|
@@ -1673,7 +1676,7 @@ var askMindStudioSdkTool = {
|
|
|
1673
1676
|
},
|
|
1674
1677
|
async execute(input, context) {
|
|
1675
1678
|
const query = input.query;
|
|
1676
|
-
return runCli(
|
|
1679
|
+
return runCli("mindstudio", ["ask", query], {
|
|
1677
1680
|
timeout: 2e5,
|
|
1678
1681
|
maxBuffer: 512 * 1024,
|
|
1679
1682
|
onLog: context?.onLog
|
|
@@ -1701,7 +1704,17 @@ var searchGoogleTool = {
|
|
|
1701
1704
|
async execute(input, context) {
|
|
1702
1705
|
const query = input.query;
|
|
1703
1706
|
return runCli(
|
|
1704
|
-
|
|
1707
|
+
"mindstudio",
|
|
1708
|
+
[
|
|
1709
|
+
"search-google",
|
|
1710
|
+
"--query",
|
|
1711
|
+
query,
|
|
1712
|
+
"--export-type",
|
|
1713
|
+
"json",
|
|
1714
|
+
"--output-key",
|
|
1715
|
+
"results",
|
|
1716
|
+
"--no-meta"
|
|
1717
|
+
],
|
|
1705
1718
|
{ maxBuffer: 512 * 1024, onLog: context?.onLog }
|
|
1706
1719
|
);
|
|
1707
1720
|
}
|
|
@@ -2649,7 +2662,19 @@ var VISION_MODEL_OVERRIDE = JSON.stringify({
|
|
|
2649
2662
|
async function analyzeImage(params) {
|
|
2650
2663
|
const { prompt, imageUrl, timeout = 2e5, onLog } = params;
|
|
2651
2664
|
return runCli(
|
|
2652
|
-
|
|
2665
|
+
"mindstudio",
|
|
2666
|
+
[
|
|
2667
|
+
"analyze-image",
|
|
2668
|
+
"--prompt",
|
|
2669
|
+
prompt,
|
|
2670
|
+
"--image-url",
|
|
2671
|
+
imageUrl,
|
|
2672
|
+
"--vision-model-override",
|
|
2673
|
+
JSON.stringify(VISION_MODEL_OVERRIDE),
|
|
2674
|
+
"--output-key",
|
|
2675
|
+
"analysis",
|
|
2676
|
+
"--no-meta"
|
|
2677
|
+
],
|
|
2653
2678
|
{ timeout, onLog }
|
|
2654
2679
|
);
|
|
2655
2680
|
}
|
|
@@ -3595,7 +3620,8 @@ var browserAutomationTool = {
|
|
|
3595
3620
|
}
|
|
3596
3621
|
}));
|
|
3597
3622
|
const batchResult = await runCli(
|
|
3598
|
-
|
|
3623
|
+
"mindstudio",
|
|
3624
|
+
["batch", "--no-meta", JSON.stringify(batchInput)],
|
|
3599
3625
|
{ timeout: 2e5 }
|
|
3600
3626
|
);
|
|
3601
3627
|
try {
|
|
@@ -3822,7 +3848,17 @@ var definition = {
|
|
|
3822
3848
|
};
|
|
3823
3849
|
async function execute(input, onLog) {
|
|
3824
3850
|
return runCli(
|
|
3825
|
-
|
|
3851
|
+
"mindstudio",
|
|
3852
|
+
[
|
|
3853
|
+
"search-google",
|
|
3854
|
+
"--query",
|
|
3855
|
+
input.query,
|
|
3856
|
+
"--export-type",
|
|
3857
|
+
"json",
|
|
3858
|
+
"--output-key",
|
|
3859
|
+
"results",
|
|
3860
|
+
"--no-meta"
|
|
3861
|
+
],
|
|
3826
3862
|
{ onLog }
|
|
3827
3863
|
);
|
|
3828
3864
|
}
|
|
@@ -3854,7 +3890,15 @@ async function execute2(input, onLog) {
|
|
|
3854
3890
|
pageOptions.screenshot = true;
|
|
3855
3891
|
}
|
|
3856
3892
|
return runCli(
|
|
3857
|
-
|
|
3893
|
+
"mindstudio",
|
|
3894
|
+
[
|
|
3895
|
+
"scrape-url",
|
|
3896
|
+
"--url",
|
|
3897
|
+
input.url,
|
|
3898
|
+
"--page-options",
|
|
3899
|
+
JSON.stringify(pageOptions),
|
|
3900
|
+
"--no-meta"
|
|
3901
|
+
],
|
|
3858
3902
|
{ onLog }
|
|
3859
3903
|
);
|
|
3860
3904
|
}
|
|
@@ -3914,7 +3958,21 @@ async function execute3(input, onLog) {
|
|
|
3914
3958
|
let imageUrl = url;
|
|
3915
3959
|
if (!isImageUrl) {
|
|
3916
3960
|
const ssUrl = await runCli(
|
|
3917
|
-
|
|
3961
|
+
"mindstudio",
|
|
3962
|
+
[
|
|
3963
|
+
"screenshot-url",
|
|
3964
|
+
"--url",
|
|
3965
|
+
url,
|
|
3966
|
+
"--mode",
|
|
3967
|
+
"viewport",
|
|
3968
|
+
"--width",
|
|
3969
|
+
"1440",
|
|
3970
|
+
"--delay",
|
|
3971
|
+
"2000",
|
|
3972
|
+
"--output-key",
|
|
3973
|
+
"screenshotUrl",
|
|
3974
|
+
"--no-meta"
|
|
3975
|
+
],
|
|
3918
3976
|
{ timeout: 12e4, onLog }
|
|
3919
3977
|
);
|
|
3920
3978
|
if (ssUrl.startsWith("Error")) {
|
|
@@ -4074,7 +4132,17 @@ ${context}
|
|
|
4074
4132
|
${brief}
|
|
4075
4133
|
</brief>`;
|
|
4076
4134
|
const enhanced = await runCli(
|
|
4077
|
-
|
|
4135
|
+
"mindstudio",
|
|
4136
|
+
[
|
|
4137
|
+
"generate-text",
|
|
4138
|
+
"--message",
|
|
4139
|
+
message,
|
|
4140
|
+
"--model-override",
|
|
4141
|
+
JSON.stringify(MODEL_OVERRIDE),
|
|
4142
|
+
"--output-key",
|
|
4143
|
+
"content",
|
|
4144
|
+
"--no-meta"
|
|
4145
|
+
],
|
|
4078
4146
|
{ timeout: 6e4, onLog }
|
|
4079
4147
|
);
|
|
4080
4148
|
return enhanced.trim();
|
|
@@ -4112,7 +4180,8 @@ async function generateImageAssets(opts) {
|
|
|
4112
4180
|
}
|
|
4113
4181
|
});
|
|
4114
4182
|
const url = await runCli(
|
|
4115
|
-
|
|
4183
|
+
"mindstudio",
|
|
4184
|
+
["generate-image", "--output-key", "imageUrl", "--no-meta"],
|
|
4116
4185
|
{ jsonLogs: true, timeout: 2e5, onLog, stdin: step }
|
|
4117
4186
|
);
|
|
4118
4187
|
imageUrls = [url];
|
|
@@ -4127,7 +4196,7 @@ async function generateImageAssets(opts) {
|
|
|
4127
4196
|
}
|
|
4128
4197
|
}
|
|
4129
4198
|
}));
|
|
4130
|
-
const batchResult = await runCli(
|
|
4199
|
+
const batchResult = await runCli("mindstudio", ["batch", "--no-meta"], {
|
|
4131
4200
|
jsonLogs: true,
|
|
4132
4201
|
timeout: 2e5,
|
|
4133
4202
|
onLog,
|
|
@@ -4149,7 +4218,15 @@ async function generateImageAssets(opts) {
|
|
|
4149
4218
|
return url;
|
|
4150
4219
|
}
|
|
4151
4220
|
const result = await runCli(
|
|
4152
|
-
|
|
4221
|
+
"mindstudio",
|
|
4222
|
+
[
|
|
4223
|
+
"remove-background-from-image",
|
|
4224
|
+
"--image-url",
|
|
4225
|
+
url,
|
|
4226
|
+
"--output-key",
|
|
4227
|
+
"imageUrl",
|
|
4228
|
+
"--no-meta"
|
|
4229
|
+
],
|
|
4153
4230
|
{ timeout: 2e5, onLog }
|
|
4154
4231
|
);
|
|
4155
4232
|
return result.startsWith("Error") ? url : result;
|
|
@@ -5116,7 +5193,15 @@ var scrapeWebUrlTool = {
|
|
|
5116
5193
|
pageOptions.screenshot = true;
|
|
5117
5194
|
}
|
|
5118
5195
|
return runCli(
|
|
5119
|
-
|
|
5196
|
+
"mindstudio",
|
|
5197
|
+
[
|
|
5198
|
+
"scrape-url",
|
|
5199
|
+
"--url",
|
|
5200
|
+
url,
|
|
5201
|
+
"--page-options",
|
|
5202
|
+
JSON.stringify(pageOptions),
|
|
5203
|
+
"--no-meta"
|
|
5204
|
+
],
|
|
5120
5205
|
{ onLog: context?.onLog }
|
|
5121
5206
|
);
|
|
5122
5207
|
}
|
package/dist/index.js
CHANGED
|
@@ -837,7 +837,7 @@ var init_writePlan = __esm({
|
|
|
837
837
|
clearable: false,
|
|
838
838
|
definition: {
|
|
839
839
|
name: "writePlan",
|
|
840
|
-
description: "Write an implementation plan for user approval before making changes. Use this only for large, multi-step changes like new features, new interface types, or when the user explicitly asks to see a plan. Most work should be done autonomously without a plan. Write a clear markdown summary of what you intend to do in plain language \u2014 describe the changes from the user's perspective, not as a list of files and code paths. The plan is displayed standalone in the UI with approve/reject buttons attached
|
|
840
|
+
description: "Write an implementation plan for user approval before making changes. Use this only for large, multi-step changes like new features, new interface types, or when the user explicitly asks to see a plan. Most work should be done autonomously without a plan. Write a clear markdown summary of what you intend to do in plain language \u2014 describe the changes from the user's perspective, not as a list of files and code paths. The plan is displayed standalone in the UI with approve/reject buttons attached. The plan body ends with its last substantive section \u2014 do not write any closing line addressed to the reader. No 'If this lands, I'll start building,' no 'Let me know what to adjust,' no 'Approve when ready,' no trailing horizontal rule with a sign-off. Wrap-up text belongs in your chat message alongside the plan, not in the plan file. If the user asks for revisions, call this tool again with updated content to overwrite the plan.",
|
|
841
841
|
inputSchema: {
|
|
842
842
|
type: "object",
|
|
843
843
|
properties: {
|
|
@@ -1115,12 +1115,15 @@ var init_confirmDestructiveAction = __esm({
|
|
|
1115
1115
|
|
|
1116
1116
|
// src/subagents/common/runCli.ts
|
|
1117
1117
|
import { spawn } from "child_process";
|
|
1118
|
-
function runCli(
|
|
1118
|
+
function runCli(command, args2, options) {
|
|
1119
1119
|
return new Promise((resolve2) => {
|
|
1120
1120
|
const timeout = options?.timeout ?? 6e4;
|
|
1121
1121
|
const maxBuffer = options?.maxBuffer ?? 1024 * 1024;
|
|
1122
|
-
|
|
1123
|
-
|
|
1122
|
+
let finalArgs = args2;
|
|
1123
|
+
if (options?.jsonLogs && !args2.includes("--json-logs")) {
|
|
1124
|
+
finalArgs = args2.length > 0 ? [args2[0], "--json-logs", ...args2.slice(1)] : ["--json-logs"];
|
|
1125
|
+
}
|
|
1126
|
+
const child = spawn(command, finalArgs, {
|
|
1124
1127
|
stdio: [options?.stdin ? "pipe" : "ignore", "pipe", "pipe"]
|
|
1125
1128
|
});
|
|
1126
1129
|
if (options?.stdin) {
|
|
@@ -1224,7 +1227,7 @@ var init_sdkConsultant = __esm({
|
|
|
1224
1227
|
},
|
|
1225
1228
|
async execute(input, context) {
|
|
1226
1229
|
const query = input.query;
|
|
1227
|
-
return runCli(
|
|
1230
|
+
return runCli("mindstudio", ["ask", query], {
|
|
1228
1231
|
timeout: 2e5,
|
|
1229
1232
|
maxBuffer: 512 * 1024,
|
|
1230
1233
|
onLog: context?.onLog
|
|
@@ -1259,7 +1262,17 @@ var init_searchGoogle = __esm({
|
|
|
1259
1262
|
async execute(input, context) {
|
|
1260
1263
|
const query = input.query;
|
|
1261
1264
|
return runCli(
|
|
1262
|
-
|
|
1265
|
+
"mindstudio",
|
|
1266
|
+
[
|
|
1267
|
+
"search-google",
|
|
1268
|
+
"--query",
|
|
1269
|
+
query,
|
|
1270
|
+
"--export-type",
|
|
1271
|
+
"json",
|
|
1272
|
+
"--output-key",
|
|
1273
|
+
"results",
|
|
1274
|
+
"--no-meta"
|
|
1275
|
+
],
|
|
1263
1276
|
{ maxBuffer: 512 * 1024, onLog: context?.onLog }
|
|
1264
1277
|
);
|
|
1265
1278
|
}
|
|
@@ -2928,7 +2941,19 @@ var init_queryDatabase = __esm({
|
|
|
2928
2941
|
async function analyzeImage(params) {
|
|
2929
2942
|
const { prompt, imageUrl, timeout = 2e5, onLog } = params;
|
|
2930
2943
|
return runCli(
|
|
2931
|
-
|
|
2944
|
+
"mindstudio",
|
|
2945
|
+
[
|
|
2946
|
+
"analyze-image",
|
|
2947
|
+
"--prompt",
|
|
2948
|
+
prompt,
|
|
2949
|
+
"--image-url",
|
|
2950
|
+
imageUrl,
|
|
2951
|
+
"--vision-model-override",
|
|
2952
|
+
JSON.stringify(VISION_MODEL_OVERRIDE),
|
|
2953
|
+
"--output-key",
|
|
2954
|
+
"analysis",
|
|
2955
|
+
"--no-meta"
|
|
2956
|
+
],
|
|
2932
2957
|
{ timeout, onLog }
|
|
2933
2958
|
);
|
|
2934
2959
|
}
|
|
@@ -3951,7 +3976,8 @@ var init_browserAutomation = __esm({
|
|
|
3951
3976
|
}
|
|
3952
3977
|
}));
|
|
3953
3978
|
const batchResult = await runCli(
|
|
3954
|
-
|
|
3979
|
+
"mindstudio",
|
|
3980
|
+
["batch", "--no-meta", JSON.stringify(batchInput)],
|
|
3955
3981
|
{ timeout: 2e5 }
|
|
3956
3982
|
);
|
|
3957
3983
|
try {
|
|
@@ -4180,7 +4206,17 @@ __export(searchGoogle_exports, {
|
|
|
4180
4206
|
});
|
|
4181
4207
|
async function execute(input, onLog) {
|
|
4182
4208
|
return runCli(
|
|
4183
|
-
|
|
4209
|
+
"mindstudio",
|
|
4210
|
+
[
|
|
4211
|
+
"search-google",
|
|
4212
|
+
"--query",
|
|
4213
|
+
input.query,
|
|
4214
|
+
"--export-type",
|
|
4215
|
+
"json",
|
|
4216
|
+
"--output-key",
|
|
4217
|
+
"results",
|
|
4218
|
+
"--no-meta"
|
|
4219
|
+
],
|
|
4184
4220
|
{ onLog }
|
|
4185
4221
|
);
|
|
4186
4222
|
}
|
|
@@ -4219,7 +4255,15 @@ async function execute2(input, onLog) {
|
|
|
4219
4255
|
pageOptions.screenshot = true;
|
|
4220
4256
|
}
|
|
4221
4257
|
return runCli(
|
|
4222
|
-
|
|
4258
|
+
"mindstudio",
|
|
4259
|
+
[
|
|
4260
|
+
"scrape-url",
|
|
4261
|
+
"--url",
|
|
4262
|
+
input.url,
|
|
4263
|
+
"--page-options",
|
|
4264
|
+
JSON.stringify(pageOptions),
|
|
4265
|
+
"--no-meta"
|
|
4266
|
+
],
|
|
4223
4267
|
{ onLog }
|
|
4224
4268
|
);
|
|
4225
4269
|
}
|
|
@@ -4259,7 +4303,21 @@ async function execute3(input, onLog) {
|
|
|
4259
4303
|
let imageUrl = url;
|
|
4260
4304
|
if (!isImageUrl) {
|
|
4261
4305
|
const ssUrl = await runCli(
|
|
4262
|
-
|
|
4306
|
+
"mindstudio",
|
|
4307
|
+
[
|
|
4308
|
+
"screenshot-url",
|
|
4309
|
+
"--url",
|
|
4310
|
+
url,
|
|
4311
|
+
"--mode",
|
|
4312
|
+
"viewport",
|
|
4313
|
+
"--width",
|
|
4314
|
+
"1440",
|
|
4315
|
+
"--delay",
|
|
4316
|
+
"2000",
|
|
4317
|
+
"--output-key",
|
|
4318
|
+
"screenshotUrl",
|
|
4319
|
+
"--no-meta"
|
|
4320
|
+
],
|
|
4263
4321
|
{ timeout: 12e4, onLog }
|
|
4264
4322
|
);
|
|
4265
4323
|
if (ssUrl.startsWith("Error")) {
|
|
@@ -4471,7 +4529,17 @@ ${context}
|
|
|
4471
4529
|
${brief}
|
|
4472
4530
|
</brief>`;
|
|
4473
4531
|
const enhanced = await runCli(
|
|
4474
|
-
|
|
4532
|
+
"mindstudio",
|
|
4533
|
+
[
|
|
4534
|
+
"generate-text",
|
|
4535
|
+
"--message",
|
|
4536
|
+
message,
|
|
4537
|
+
"--model-override",
|
|
4538
|
+
JSON.stringify(MODEL_OVERRIDE),
|
|
4539
|
+
"--output-key",
|
|
4540
|
+
"content",
|
|
4541
|
+
"--no-meta"
|
|
4542
|
+
],
|
|
4475
4543
|
{ timeout: 6e4, onLog }
|
|
4476
4544
|
);
|
|
4477
4545
|
return enhanced.trim();
|
|
@@ -4524,7 +4592,8 @@ async function generateImageAssets(opts) {
|
|
|
4524
4592
|
}
|
|
4525
4593
|
});
|
|
4526
4594
|
const url = await runCli(
|
|
4527
|
-
|
|
4595
|
+
"mindstudio",
|
|
4596
|
+
["generate-image", "--output-key", "imageUrl", "--no-meta"],
|
|
4528
4597
|
{ jsonLogs: true, timeout: 2e5, onLog, stdin: step }
|
|
4529
4598
|
);
|
|
4530
4599
|
imageUrls = [url];
|
|
@@ -4539,7 +4608,7 @@ async function generateImageAssets(opts) {
|
|
|
4539
4608
|
}
|
|
4540
4609
|
}
|
|
4541
4610
|
}));
|
|
4542
|
-
const batchResult = await runCli(
|
|
4611
|
+
const batchResult = await runCli("mindstudio", ["batch", "--no-meta"], {
|
|
4543
4612
|
jsonLogs: true,
|
|
4544
4613
|
timeout: 2e5,
|
|
4545
4614
|
onLog,
|
|
@@ -4561,7 +4630,15 @@ async function generateImageAssets(opts) {
|
|
|
4561
4630
|
return url;
|
|
4562
4631
|
}
|
|
4563
4632
|
const result = await runCli(
|
|
4564
|
-
|
|
4633
|
+
"mindstudio",
|
|
4634
|
+
[
|
|
4635
|
+
"remove-background-from-image",
|
|
4636
|
+
"--image-url",
|
|
4637
|
+
url,
|
|
4638
|
+
"--output-key",
|
|
4639
|
+
"imageUrl",
|
|
4640
|
+
"--no-meta"
|
|
4641
|
+
],
|
|
4565
4642
|
{ timeout: 2e5, onLog }
|
|
4566
4643
|
);
|
|
4567
4644
|
return result.startsWith("Error") ? url : result;
|
|
@@ -5698,7 +5775,15 @@ var init_scrapeWebUrl2 = __esm({
|
|
|
5698
5775
|
pageOptions.screenshot = true;
|
|
5699
5776
|
}
|
|
5700
5777
|
return runCli(
|
|
5701
|
-
|
|
5778
|
+
"mindstudio",
|
|
5779
|
+
[
|
|
5780
|
+
"scrape-url",
|
|
5781
|
+
"--url",
|
|
5782
|
+
url,
|
|
5783
|
+
"--page-options",
|
|
5784
|
+
JSON.stringify(pageOptions),
|
|
5785
|
+
"--no-meta"
|
|
5786
|
+
],
|
|
5702
5787
|
{ onLog: context?.onLog }
|
|
5703
5788
|
);
|
|
5704
5789
|
}
|