@browserbasehq/stagehand 1.2.0 → 1.3.0
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.d.ts +17 -14
- package/dist/index.js +1176 -332
- package/package.json +2 -3
- package/dist/dom/build/debug.js +0 -128
- package/dist/dom/build/global.d.js +0 -2
- package/dist/dom/build/index.js +0 -623
- package/dist/dom/build/process.js +0 -478
- package/dist/dom/build/utils.js +0 -19
- package/dist/dom/build/xpathUtils.js +0 -478
package/dist/index.d.ts
CHANGED
|
@@ -37,16 +37,27 @@ interface LLMClient {
|
|
|
37
37
|
}) => void;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
type LogLine = {
|
|
41
|
+
id?: string;
|
|
42
|
+
category?: string;
|
|
43
|
+
message: string;
|
|
44
|
+
level?: 0 | 1 | 2;
|
|
45
|
+
timestamp?: string;
|
|
46
|
+
auxiliary?: {
|
|
47
|
+
[key: string]: {
|
|
48
|
+
value: string;
|
|
49
|
+
type: "object" | "string" | "html" | "integer" | "float" | "boolean";
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
|
|
40
54
|
type AvailableModel = "gpt-4o" | "gpt-4o-mini" | "gpt-4o-2024-08-06" | "claude-3-5-sonnet-latest" | "claude-3-5-sonnet-20241022" | "claude-3-5-sonnet-20240620";
|
|
41
55
|
declare class LLMProvider {
|
|
42
56
|
private modelToProviderMap;
|
|
43
57
|
private logger;
|
|
44
58
|
private enableCaching;
|
|
45
59
|
private cache;
|
|
46
|
-
constructor(logger: (message:
|
|
47
|
-
category?: string;
|
|
48
|
-
message: string;
|
|
49
|
-
}) => void, enableCaching: boolean);
|
|
60
|
+
constructor(logger: (message: LogLine) => void, enableCaching: boolean);
|
|
50
61
|
cleanRequestCache(requestId: string): void;
|
|
51
62
|
getClient(modelName: AvailableModel, requestId: string): LLMClient;
|
|
52
63
|
}
|
|
@@ -79,11 +90,7 @@ declare class Stagehand {
|
|
|
79
90
|
debugDom?: boolean;
|
|
80
91
|
llmProvider?: LLMProvider;
|
|
81
92
|
headless?: boolean;
|
|
82
|
-
logger?: (message:
|
|
83
|
-
category?: string;
|
|
84
|
-
message: string;
|
|
85
|
-
level?: 0 | 1 | 2;
|
|
86
|
-
}) => void;
|
|
93
|
+
logger?: (message: LogLine) => void;
|
|
87
94
|
domSettleTimeoutMs?: number;
|
|
88
95
|
browserBaseSessionCreateParams?: Browserbase.Sessions.SessionCreateParams;
|
|
89
96
|
enableCaching?: boolean;
|
|
@@ -101,11 +108,7 @@ declare class Stagehand {
|
|
|
101
108
|
}>;
|
|
102
109
|
private pending_logs_to_send_to_browserbase;
|
|
103
110
|
private is_processing_browserbase_logs;
|
|
104
|
-
log(
|
|
105
|
-
category?: string;
|
|
106
|
-
message: string;
|
|
107
|
-
level?: 0 | 1 | 2;
|
|
108
|
-
}): void;
|
|
111
|
+
log(logObj: LogLine): void;
|
|
109
112
|
private _run_browserbase_log_processing_cycle;
|
|
110
113
|
private _log_to_browserbase;
|
|
111
114
|
private _waitForSettledDom;
|