@mindstudio-ai/remy 0.1.59 → 0.1.61
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 +16 -2
- package/dist/index.js +16 -2
- package/package.json +1 -1
package/dist/headless.js
CHANGED
|
@@ -2523,6 +2523,16 @@ ${summaryBlock.text}
|
|
|
2523
2523
|
startIdx = checkpointIdx + 1;
|
|
2524
2524
|
}
|
|
2525
2525
|
const messagesToProcess = messages.slice(startIdx);
|
|
2526
|
+
const toolUseIds = /* @__PURE__ */ new Set();
|
|
2527
|
+
for (const msg of messagesToProcess) {
|
|
2528
|
+
if (msg.role === "assistant" && Array.isArray(msg.content)) {
|
|
2529
|
+
for (const block of msg.content) {
|
|
2530
|
+
if (block.type === "tool") {
|
|
2531
|
+
toolUseIds.add(block.id);
|
|
2532
|
+
}
|
|
2533
|
+
}
|
|
2534
|
+
}
|
|
2535
|
+
}
|
|
2526
2536
|
const cleaned = messagesToProcess.filter((msg) => {
|
|
2527
2537
|
if (Array.isArray(msg.content)) {
|
|
2528
2538
|
const blocks = msg.content;
|
|
@@ -2530,6 +2540,9 @@ ${summaryBlock.text}
|
|
|
2530
2540
|
return false;
|
|
2531
2541
|
}
|
|
2532
2542
|
}
|
|
2543
|
+
if (msg.role === "user" && msg.toolCallId && !toolUseIds.has(msg.toolCallId)) {
|
|
2544
|
+
return false;
|
|
2545
|
+
}
|
|
2533
2546
|
return true;
|
|
2534
2547
|
}).map((msg) => {
|
|
2535
2548
|
if (msg.role === "user" && typeof msg.content === "string" && msg.content.startsWith("@@automated::")) {
|
|
@@ -2932,9 +2945,10 @@ var BROWSER_TOOLS = [
|
|
|
2932
2945
|
"navigate",
|
|
2933
2946
|
"evaluate",
|
|
2934
2947
|
"styles",
|
|
2935
|
-
"
|
|
2948
|
+
"screenshotFullPage",
|
|
2949
|
+
"screenshotViewport"
|
|
2936
2950
|
],
|
|
2937
|
-
description: "snapshot: accessibility tree of the page (waits for network to settle). click: click an element (animated cursor, full event sequence). type: type text into input (one char at a time, works with React/Vue/Svelte). select: select a dropdown option by text. wait: wait for an element to appear (polls 100ms, waits for network). navigate: navigate to a URL within the app (waits for load, subsequent steps run on new page). evaluate: run JS in the page. styles: read computed CSS styles from elements (pass properties array with camelCase names, or omit for defaults).
|
|
2951
|
+
description: "snapshot: accessibility tree of the page (waits for network to settle). click: click an element (animated cursor, full event sequence). type: type text into input (one char at a time, works with React/Vue/Svelte). select: select a dropdown option by text. wait: wait for an element to appear (polls 100ms, waits for network). navigate: navigate to a URL within the app (waits for load, subsequent steps run on new page). evaluate: run JS in the page. styles: read computed CSS styles from elements (pass properties array with camelCase names, or omit for defaults). screenshotFullPage: full-page viewport-stitched screenshot (returns CDN url with dimensions). screenshotViewport: screenshot of just the visible viewport."
|
|
2938
2952
|
},
|
|
2939
2953
|
ref: {
|
|
2940
2954
|
type: "string",
|
package/dist/index.js
CHANGED
|
@@ -2250,6 +2250,16 @@ ${summaryBlock.text}
|
|
|
2250
2250
|
startIdx = checkpointIdx + 1;
|
|
2251
2251
|
}
|
|
2252
2252
|
const messagesToProcess = messages.slice(startIdx);
|
|
2253
|
+
const toolUseIds = /* @__PURE__ */ new Set();
|
|
2254
|
+
for (const msg of messagesToProcess) {
|
|
2255
|
+
if (msg.role === "assistant" && Array.isArray(msg.content)) {
|
|
2256
|
+
for (const block of msg.content) {
|
|
2257
|
+
if (block.type === "tool") {
|
|
2258
|
+
toolUseIds.add(block.id);
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
}
|
|
2253
2263
|
const cleaned = messagesToProcess.filter((msg) => {
|
|
2254
2264
|
if (Array.isArray(msg.content)) {
|
|
2255
2265
|
const blocks = msg.content;
|
|
@@ -2257,6 +2267,9 @@ ${summaryBlock.text}
|
|
|
2257
2267
|
return false;
|
|
2258
2268
|
}
|
|
2259
2269
|
}
|
|
2270
|
+
if (msg.role === "user" && msg.toolCallId && !toolUseIds.has(msg.toolCallId)) {
|
|
2271
|
+
return false;
|
|
2272
|
+
}
|
|
2260
2273
|
return true;
|
|
2261
2274
|
}).map((msg) => {
|
|
2262
2275
|
if (msg.role === "user" && typeof msg.content === "string" && msg.content.startsWith("@@automated::")) {
|
|
@@ -2678,9 +2691,10 @@ var init_tools = __esm({
|
|
|
2678
2691
|
"navigate",
|
|
2679
2692
|
"evaluate",
|
|
2680
2693
|
"styles",
|
|
2681
|
-
"
|
|
2694
|
+
"screenshotFullPage",
|
|
2695
|
+
"screenshotViewport"
|
|
2682
2696
|
],
|
|
2683
|
-
description: "snapshot: accessibility tree of the page (waits for network to settle). click: click an element (animated cursor, full event sequence). type: type text into input (one char at a time, works with React/Vue/Svelte). select: select a dropdown option by text. wait: wait for an element to appear (polls 100ms, waits for network). navigate: navigate to a URL within the app (waits for load, subsequent steps run on new page). evaluate: run JS in the page. styles: read computed CSS styles from elements (pass properties array with camelCase names, or omit for defaults).
|
|
2697
|
+
description: "snapshot: accessibility tree of the page (waits for network to settle). click: click an element (animated cursor, full event sequence). type: type text into input (one char at a time, works with React/Vue/Svelte). select: select a dropdown option by text. wait: wait for an element to appear (polls 100ms, waits for network). navigate: navigate to a URL within the app (waits for load, subsequent steps run on new page). evaluate: run JS in the page. styles: read computed CSS styles from elements (pass properties array with camelCase names, or omit for defaults). screenshotFullPage: full-page viewport-stitched screenshot (returns CDN url with dimensions). screenshotViewport: screenshot of just the visible viewport."
|
|
2684
2698
|
},
|
|
2685
2699
|
ref: {
|
|
2686
2700
|
type: "string",
|