@browserbasehq/stagehand 3.0.8-alpha-16d72fb4c4081dd33bf45605d75c27644ea4c00e → 3.0.8-alpha-d6b2847998f73d706464ac88a5d87dcfee073331
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/index.js +27 -22
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31551,8 +31551,8 @@ var clickTool = (v3, provider) => (0, import_ai11.tool)({
|
|
|
31551
31551
|
level: 1,
|
|
31552
31552
|
auxiliary: {
|
|
31553
31553
|
arguments: {
|
|
31554
|
-
value: JSON.stringify({ describe
|
|
31555
|
-
type: "
|
|
31554
|
+
value: JSON.stringify({ describe }),
|
|
31555
|
+
type: "object"
|
|
31556
31556
|
}
|
|
31557
31557
|
}
|
|
31558
31558
|
});
|
|
@@ -31657,8 +31657,8 @@ var typeTool = (v3, provider) => (0, import_ai12.tool)({
|
|
|
31657
31657
|
level: 1,
|
|
31658
31658
|
auxiliary: {
|
|
31659
31659
|
arguments: {
|
|
31660
|
-
value: JSON.stringify({ describe,
|
|
31661
|
-
type: "
|
|
31660
|
+
value: JSON.stringify({ describe, text }),
|
|
31661
|
+
type: "object"
|
|
31662
31662
|
}
|
|
31663
31663
|
}
|
|
31664
31664
|
});
|
|
@@ -31768,13 +31768,9 @@ var dragAndDropTool = (v3, provider) => (0, import_ai13.tool)({
|
|
|
31768
31768
|
auxiliary: {
|
|
31769
31769
|
arguments: {
|
|
31770
31770
|
value: JSON.stringify({
|
|
31771
|
-
describe
|
|
31772
|
-
startCoordinates,
|
|
31773
|
-
endCoordinates,
|
|
31774
|
-
processedStart,
|
|
31775
|
-
processedEnd
|
|
31771
|
+
describe
|
|
31776
31772
|
}),
|
|
31777
|
-
type: "
|
|
31773
|
+
type: "object"
|
|
31778
31774
|
}
|
|
31779
31775
|
}
|
|
31780
31776
|
});
|
|
@@ -31880,11 +31876,9 @@ var clickAndHoldTool = (v3, provider) => (0, import_ai14.tool)({
|
|
|
31880
31876
|
arguments: {
|
|
31881
31877
|
value: JSON.stringify({
|
|
31882
31878
|
describe,
|
|
31883
|
-
coordinates,
|
|
31884
|
-
processed,
|
|
31885
31879
|
duration
|
|
31886
31880
|
}),
|
|
31887
|
-
type: "
|
|
31881
|
+
type: "object"
|
|
31888
31882
|
}
|
|
31889
31883
|
}
|
|
31890
31884
|
});
|
|
@@ -31949,7 +31943,7 @@ Use method="press" for navigation keys (Enter, Tab, Escape, Backspace, arrows) a
|
|
|
31949
31943
|
auxiliary: {
|
|
31950
31944
|
arguments: {
|
|
31951
31945
|
value: JSON.stringify({ method, value, repeat }),
|
|
31952
|
-
type: "
|
|
31946
|
+
type: "object"
|
|
31953
31947
|
}
|
|
31954
31948
|
}
|
|
31955
31949
|
});
|
|
@@ -32038,7 +32032,7 @@ MANDATORY USE CASES (always use fillFormVision for these):
|
|
|
32038
32032
|
auxiliary: {
|
|
32039
32033
|
arguments: {
|
|
32040
32034
|
value: JSON.stringify({ fields, processedFields }),
|
|
32041
|
-
type: "
|
|
32035
|
+
type: "object"
|
|
32042
32036
|
}
|
|
32043
32037
|
}
|
|
32044
32038
|
});
|
|
@@ -32210,7 +32204,7 @@ var searchTool = (v3) => (0, import_ai18.tool)({
|
|
|
32210
32204
|
auxiliary: {
|
|
32211
32205
|
arguments: {
|
|
32212
32206
|
value: JSON.stringify({ query }),
|
|
32213
|
-
type: "
|
|
32207
|
+
type: "object"
|
|
32214
32208
|
}
|
|
32215
32209
|
}
|
|
32216
32210
|
});
|
|
@@ -32874,7 +32868,8 @@ var V3AgentHandler = class {
|
|
|
32874
32868
|
startTime,
|
|
32875
32869
|
state,
|
|
32876
32870
|
messages,
|
|
32877
|
-
result
|
|
32871
|
+
result,
|
|
32872
|
+
maxSteps
|
|
32878
32873
|
);
|
|
32879
32874
|
} catch (error) {
|
|
32880
32875
|
if (error instanceof StreamingCallbacksInNonStreamingModeError) {
|
|
@@ -32968,7 +32963,8 @@ var V3AgentHandler = class {
|
|
|
32968
32963
|
startTime,
|
|
32969
32964
|
state,
|
|
32970
32965
|
messages,
|
|
32971
|
-
event
|
|
32966
|
+
event,
|
|
32967
|
+
maxSteps
|
|
32972
32968
|
);
|
|
32973
32969
|
resolveResult(result);
|
|
32974
32970
|
},
|
|
@@ -32992,11 +32988,20 @@ var V3AgentHandler = class {
|
|
|
32992
32988
|
return agentStreamResult;
|
|
32993
32989
|
});
|
|
32994
32990
|
}
|
|
32995
|
-
consolidateMetricsAndResult(startTime, state, inputMessages, result) {
|
|
32996
|
-
var _a4;
|
|
32991
|
+
consolidateMetricsAndResult(startTime, state, inputMessages, result, maxSteps) {
|
|
32992
|
+
var _a4, _b;
|
|
32997
32993
|
if (!state.finalMessage) {
|
|
32998
32994
|
const allReasoning = state.collectedReasoning.join(" ").trim();
|
|
32999
|
-
state.
|
|
32995
|
+
if (!state.completed && maxSteps && ((_a4 = result.steps) == null ? void 0 : _a4.length) >= maxSteps) {
|
|
32996
|
+
this.logger({
|
|
32997
|
+
category: "agent",
|
|
32998
|
+
message: `Agent stopped: reached maximum steps (${maxSteps})`,
|
|
32999
|
+
level: 1
|
|
33000
|
+
});
|
|
33001
|
+
state.finalMessage = `Agent stopped: reached maximum steps (${maxSteps})`;
|
|
33002
|
+
} else {
|
|
33003
|
+
state.finalMessage = allReasoning || result.text || "";
|
|
33004
|
+
}
|
|
33000
33005
|
}
|
|
33001
33006
|
const endTime = Date.now();
|
|
33002
33007
|
const inferenceTimeMs = endTime - startTime;
|
|
@@ -33010,7 +33015,7 @@ var V3AgentHandler = class {
|
|
|
33010
33015
|
inferenceTimeMs
|
|
33011
33016
|
);
|
|
33012
33017
|
}
|
|
33013
|
-
const responseMessages = ((
|
|
33018
|
+
const responseMessages = ((_b = result.response) == null ? void 0 : _b.messages) || [];
|
|
33014
33019
|
const fullMessages = [
|
|
33015
33020
|
...inputMessages,
|
|
33016
33021
|
...responseMessages
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@browserbasehq/stagehand",
|
|
3
|
-
"version": "3.0.8-alpha-
|
|
3
|
+
"version": "3.0.8-alpha-d6b2847998f73d706464ac88a5d87dcfee073331",
|
|
4
4
|
"description": "An AI web browsing framework focused on simplicity and extensibility.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|