opensteer 0.6.13 → 0.7.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/README.md +256 -184
- package/dist/chunk-PQYA6IX2.js +32571 -0
- package/dist/chunk-PQYA6IX2.js.map +1 -0
- package/dist/cli/bin.cjs +38201 -0
- package/dist/cli/bin.cjs.map +1 -0
- package/dist/cli/bin.d.cts +1 -0
- package/dist/cli/bin.d.ts +1 -0
- package/dist/cli/bin.js +5612 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/index.cjs +31309 -16009
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4440 -670
- package/dist/index.d.ts +4440 -670
- package/dist/index.js +438 -378
- package/dist/index.js.map +1 -0
- package/package.json +56 -62
- package/skills/README.md +21 -20
- package/skills/opensteer/SKILL.md +60 -194
- package/skills/opensteer/references/cli-reference.md +69 -113
- package/skills/opensteer/references/request-workflow.md +81 -0
- package/skills/opensteer/references/sdk-reference.md +101 -154
- package/CHANGELOG.md +0 -75
- package/bin/opensteer.mjs +0 -1423
- package/dist/browser-profile-client-CGXc0-P9.d.cts +0 -228
- package/dist/browser-profile-client-DHLzMf-K.d.ts +0 -228
- package/dist/chunk-2ES46WCO.js +0 -1437
- package/dist/chunk-3H5RRIMZ.js +0 -69
- package/dist/chunk-AVXUMEDG.js +0 -62
- package/dist/chunk-DN3GI5CH.js +0 -57
- package/dist/chunk-FAHE5DB2.js +0 -190
- package/dist/chunk-HBTSQ2V4.js +0 -15259
- package/dist/chunk-K5CL76MG.js +0 -81
- package/dist/chunk-U724TBY6.js +0 -1262
- package/dist/chunk-ZRCFF546.js +0 -77
- package/dist/cli/auth.cjs +0 -2022
- package/dist/cli/auth.d.cts +0 -114
- package/dist/cli/auth.d.ts +0 -114
- package/dist/cli/auth.js +0 -15
- package/dist/cli/local-profile.cjs +0 -197
- package/dist/cli/local-profile.d.cts +0 -18
- package/dist/cli/local-profile.d.ts +0 -18
- package/dist/cli/local-profile.js +0 -97
- package/dist/cli/profile.cjs +0 -18548
- package/dist/cli/profile.d.cts +0 -79
- package/dist/cli/profile.d.ts +0 -79
- package/dist/cli/profile.js +0 -1328
- package/dist/cli/server.cjs +0 -17232
- package/dist/cli/server.d.cts +0 -2
- package/dist/cli/server.d.ts +0 -2
- package/dist/cli/server.js +0 -977
- package/dist/cli/skills-installer.cjs +0 -230
- package/dist/cli/skills-installer.d.cts +0 -28
- package/dist/cli/skills-installer.d.ts +0 -28
- package/dist/cli/skills-installer.js +0 -201
- package/dist/extractor-4Q3TFZJB.js +0 -8
- package/dist/resolver-MGN64KCP.js +0 -7
- package/dist/types-Cr10igF3.d.cts +0 -345
- package/dist/types-Cr10igF3.d.ts +0 -345
- package/skills/electron/SKILL.md +0 -87
- package/skills/electron/references/opensteer-electron-recipes.md +0 -88
- package/skills/electron/references/opensteer-electron-workflow.md +0 -85
- package/skills/opensteer/references/examples.md +0 -118
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
import { BrowserContextOptions } from 'playwright';
|
|
2
|
-
|
|
3
|
-
type MatchOperator = 'exact' | 'startsWith' | 'contains';
|
|
4
|
-
interface AttributeMatchClause {
|
|
5
|
-
kind: 'attr';
|
|
6
|
-
key: string;
|
|
7
|
-
op?: MatchOperator;
|
|
8
|
-
value?: string;
|
|
9
|
-
}
|
|
10
|
-
interface PositionMatchClause {
|
|
11
|
-
kind: 'position';
|
|
12
|
-
axis: 'nthOfType' | 'nthChild';
|
|
13
|
-
}
|
|
14
|
-
type MatchClause = AttributeMatchClause | PositionMatchClause;
|
|
15
|
-
interface PathNodePosition {
|
|
16
|
-
nthChild: number;
|
|
17
|
-
nthOfType: number;
|
|
18
|
-
}
|
|
19
|
-
interface PathNode {
|
|
20
|
-
tag: string;
|
|
21
|
-
attrs: Record<string, string>;
|
|
22
|
-
position: PathNodePosition;
|
|
23
|
-
match: MatchClause[];
|
|
24
|
-
}
|
|
25
|
-
type DomPath = PathNode[];
|
|
26
|
-
interface ContextHop {
|
|
27
|
-
kind: 'iframe' | 'shadow';
|
|
28
|
-
host: DomPath;
|
|
29
|
-
}
|
|
30
|
-
interface ElementPath {
|
|
31
|
-
context: ContextHop[];
|
|
32
|
-
nodes: DomPath;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
type SnapshotMode = 'action' | 'extraction' | 'clickable' | 'scrollable' | 'full';
|
|
36
|
-
interface SnapshotOptions {
|
|
37
|
-
mode?: SnapshotMode;
|
|
38
|
-
withCounters?: boolean;
|
|
39
|
-
markInteractive?: boolean;
|
|
40
|
-
}
|
|
41
|
-
interface ScreenshotOptions {
|
|
42
|
-
fullPage?: boolean;
|
|
43
|
-
type?: 'png' | 'jpeg';
|
|
44
|
-
/** Ignored for PNG. */
|
|
45
|
-
quality?: number;
|
|
46
|
-
omitBackground?: boolean;
|
|
47
|
-
}
|
|
48
|
-
interface AiResolveArgs {
|
|
49
|
-
html: string;
|
|
50
|
-
action: string;
|
|
51
|
-
description: string;
|
|
52
|
-
url: string | null;
|
|
53
|
-
}
|
|
54
|
-
interface AiResolveResult {
|
|
55
|
-
element?: number;
|
|
56
|
-
selector?: string;
|
|
57
|
-
path?: ElementPath;
|
|
58
|
-
}
|
|
59
|
-
type AiResolveCallbackResult = AiResolveResult | number | string | null | undefined;
|
|
60
|
-
type AiResolveCallback = (args: AiResolveArgs) => Promise<AiResolveCallbackResult>;
|
|
61
|
-
interface AiExtractArgs<TSchema = ExtractSchema> {
|
|
62
|
-
html: string;
|
|
63
|
-
schema: TSchema;
|
|
64
|
-
description?: string;
|
|
65
|
-
prompt?: string;
|
|
66
|
-
url: string | null;
|
|
67
|
-
}
|
|
68
|
-
type AiExtractResult<TData = unknown> = TData | ExtractionPlan | string;
|
|
69
|
-
type AiExtractCallback = <TSchema = ExtractSchema, TData = unknown>(args: AiExtractArgs<TSchema>) => Promise<AiExtractResult<TData>>;
|
|
70
|
-
interface GotoOptions {
|
|
71
|
-
timeout?: number;
|
|
72
|
-
waitUntil?: 'commit' | 'domcontentloaded' | 'load' | 'networkidle';
|
|
73
|
-
settleMs?: number;
|
|
74
|
-
}
|
|
75
|
-
type OpensteerLocalBrowserMode = 'chromium' | 'real';
|
|
76
|
-
interface OpensteerLocalProfileDescriptor {
|
|
77
|
-
directory: string;
|
|
78
|
-
name: string;
|
|
79
|
-
}
|
|
80
|
-
interface OpensteerRealBrowserOptions {
|
|
81
|
-
headless?: boolean;
|
|
82
|
-
executablePath?: string;
|
|
83
|
-
userDataDir?: string;
|
|
84
|
-
profileDirectory?: string;
|
|
85
|
-
}
|
|
86
|
-
interface LaunchOptions {
|
|
87
|
-
headless?: boolean;
|
|
88
|
-
executablePath?: string;
|
|
89
|
-
slowMo?: number;
|
|
90
|
-
/** Sandbox-only context options. Not supported with cdpUrl or mode "real". */
|
|
91
|
-
context?: BrowserContextOptions;
|
|
92
|
-
/** Initial URL to open as part of owned real-browser startup. */
|
|
93
|
-
initialUrl?: string;
|
|
94
|
-
/** Local browser mode. Defaults to "chromium". */
|
|
95
|
-
mode?: OpensteerLocalBrowserMode;
|
|
96
|
-
/** Connect to a running CDP-enabled browser. Example: "http://localhost:9222" */
|
|
97
|
-
cdpUrl?: string;
|
|
98
|
-
/** Browser user-data root directory for real-browser mode. */
|
|
99
|
-
userDataDir?: string;
|
|
100
|
-
/** Browser profile directory name for real-browser mode. */
|
|
101
|
-
profileDirectory?: string;
|
|
102
|
-
/** Cloud browser profile preference. Applies only when cloud mode is enabled. */
|
|
103
|
-
cloudBrowserProfile?: OpensteerCloudBrowserProfileOptions;
|
|
104
|
-
/** Connection timeout in milliseconds. */
|
|
105
|
-
timeout?: number;
|
|
106
|
-
}
|
|
107
|
-
interface OpensteerBrowserConfig {
|
|
108
|
-
headless?: boolean;
|
|
109
|
-
executablePath?: string;
|
|
110
|
-
slowMo?: number;
|
|
111
|
-
/** Local browser mode. Defaults to "chromium". */
|
|
112
|
-
mode?: OpensteerLocalBrowserMode;
|
|
113
|
-
/** Connect to a running CDP-enabled browser. Example: "http://localhost:9222" */
|
|
114
|
-
cdpUrl?: string;
|
|
115
|
-
/** Browser user-data root directory for real-browser mode. */
|
|
116
|
-
userDataDir?: string;
|
|
117
|
-
/** Browser profile directory name for real-browser mode. */
|
|
118
|
-
profileDirectory?: string;
|
|
119
|
-
}
|
|
120
|
-
interface OpensteerStorageConfig {
|
|
121
|
-
rootDir?: string;
|
|
122
|
-
}
|
|
123
|
-
interface OpensteerCursorColor {
|
|
124
|
-
r: number;
|
|
125
|
-
g: number;
|
|
126
|
-
b: number;
|
|
127
|
-
a: number;
|
|
128
|
-
}
|
|
129
|
-
interface OpensteerCursorStyle {
|
|
130
|
-
size?: number;
|
|
131
|
-
fillColor?: OpensteerCursorColor;
|
|
132
|
-
outlineColor?: OpensteerCursorColor;
|
|
133
|
-
haloColor?: OpensteerCursorColor;
|
|
134
|
-
pulseScale?: number;
|
|
135
|
-
}
|
|
136
|
-
type OpensteerCursorProfile = 'snappy';
|
|
137
|
-
interface OpensteerCursorConfig {
|
|
138
|
-
enabled?: boolean;
|
|
139
|
-
profile?: OpensteerCursorProfile;
|
|
140
|
-
style?: OpensteerCursorStyle;
|
|
141
|
-
}
|
|
142
|
-
type OpensteerAuthScheme = 'api-key' | 'bearer';
|
|
143
|
-
type OpensteerCloudAnnouncePolicy = 'always' | 'off' | 'tty';
|
|
144
|
-
interface OpensteerCloudBrowserProfileOptions {
|
|
145
|
-
profileId: string;
|
|
146
|
-
reuseIfActive?: boolean;
|
|
147
|
-
}
|
|
148
|
-
interface OpensteerCloudOptions {
|
|
149
|
-
apiKey?: string;
|
|
150
|
-
accessToken?: string;
|
|
151
|
-
baseUrl?: string;
|
|
152
|
-
authScheme?: OpensteerAuthScheme;
|
|
153
|
-
announce?: OpensteerCloudAnnouncePolicy;
|
|
154
|
-
browserProfile?: OpensteerCloudBrowserProfileOptions;
|
|
155
|
-
}
|
|
156
|
-
type OpensteerCloudConfig = boolean | OpensteerCloudOptions;
|
|
157
|
-
interface OpensteerConfig {
|
|
158
|
-
name?: string;
|
|
159
|
-
browser?: OpensteerBrowserConfig;
|
|
160
|
-
storage?: OpensteerStorageConfig;
|
|
161
|
-
cursor?: OpensteerCursorConfig;
|
|
162
|
-
cloud?: OpensteerCloudConfig;
|
|
163
|
-
model?: string;
|
|
164
|
-
debug?: boolean;
|
|
165
|
-
}
|
|
166
|
-
interface ActionWaitOptions {
|
|
167
|
-
enabled?: boolean;
|
|
168
|
-
timeout?: number;
|
|
169
|
-
settleMs?: number;
|
|
170
|
-
networkQuietMs?: number;
|
|
171
|
-
includeNetwork?: boolean;
|
|
172
|
-
}
|
|
173
|
-
interface BaseActionOptions {
|
|
174
|
-
description?: string;
|
|
175
|
-
element?: number;
|
|
176
|
-
selector?: string;
|
|
177
|
-
wait?: false | ActionWaitOptions;
|
|
178
|
-
}
|
|
179
|
-
interface ClickOptions extends BaseActionOptions {
|
|
180
|
-
button?: 'left' | 'right' | 'middle';
|
|
181
|
-
clickCount?: number;
|
|
182
|
-
modifiers?: Array<'Alt' | 'Control' | 'Meta' | 'Shift'>;
|
|
183
|
-
}
|
|
184
|
-
interface HoverOptions extends BaseActionOptions {
|
|
185
|
-
force?: boolean;
|
|
186
|
-
position?: {
|
|
187
|
-
x: number;
|
|
188
|
-
y: number;
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
interface InputOptions extends BaseActionOptions {
|
|
192
|
-
text: string;
|
|
193
|
-
clear?: boolean;
|
|
194
|
-
pressEnter?: boolean;
|
|
195
|
-
}
|
|
196
|
-
interface SelectOptions extends BaseActionOptions {
|
|
197
|
-
value?: string;
|
|
198
|
-
label?: string;
|
|
199
|
-
index?: number;
|
|
200
|
-
}
|
|
201
|
-
interface ScrollOptions extends BaseActionOptions {
|
|
202
|
-
direction?: 'up' | 'down' | 'left' | 'right';
|
|
203
|
-
amount?: number;
|
|
204
|
-
}
|
|
205
|
-
interface ExtractSchemaField {
|
|
206
|
-
element?: number;
|
|
207
|
-
selector?: string;
|
|
208
|
-
attribute?: string;
|
|
209
|
-
source?: 'current_url';
|
|
210
|
-
}
|
|
211
|
-
type ExtractSchemaValue = ExtractSchemaField | string | number | boolean | null | ExtractSchema | ExtractSchema[];
|
|
212
|
-
interface ExtractSchema {
|
|
213
|
-
[key: string]: ExtractSchemaValue;
|
|
214
|
-
}
|
|
215
|
-
interface ExtractOptions<TSchema = ExtractSchema> extends BaseActionOptions {
|
|
216
|
-
schema?: TSchema;
|
|
217
|
-
prompt?: string;
|
|
218
|
-
snapshot?: SnapshotOptions;
|
|
219
|
-
}
|
|
220
|
-
interface ExtractionFieldPlan {
|
|
221
|
-
element?: number;
|
|
222
|
-
selector?: string;
|
|
223
|
-
attribute?: string;
|
|
224
|
-
source?: 'current_url';
|
|
225
|
-
}
|
|
226
|
-
interface ExtractionPlan {
|
|
227
|
-
fields?: Record<string, ExtractionFieldPlan>;
|
|
228
|
-
paths?: Record<string, ElementPath>;
|
|
229
|
-
data?: unknown;
|
|
230
|
-
}
|
|
231
|
-
interface ExtractFromPlanOptions<TSchema = ExtractSchema> {
|
|
232
|
-
description?: string;
|
|
233
|
-
schema: TSchema;
|
|
234
|
-
plan: ExtractionPlan;
|
|
235
|
-
}
|
|
236
|
-
interface ActionResult {
|
|
237
|
-
method: string;
|
|
238
|
-
namespace: string;
|
|
239
|
-
persisted: boolean;
|
|
240
|
-
pathFile: string | null;
|
|
241
|
-
selectorUsed?: string | null;
|
|
242
|
-
}
|
|
243
|
-
interface OpensteerCursorState {
|
|
244
|
-
enabled: boolean;
|
|
245
|
-
active: boolean;
|
|
246
|
-
reason?: string;
|
|
247
|
-
}
|
|
248
|
-
interface ExtractionRunResult<T = unknown> {
|
|
249
|
-
namespace: string;
|
|
250
|
-
persisted: boolean;
|
|
251
|
-
pathFile: string | null;
|
|
252
|
-
data: T;
|
|
253
|
-
paths: Record<string, ElementPath>;
|
|
254
|
-
}
|
|
255
|
-
interface StateResult {
|
|
256
|
-
url: string;
|
|
257
|
-
title: string;
|
|
258
|
-
html: string;
|
|
259
|
-
}
|
|
260
|
-
interface TabInfo {
|
|
261
|
-
index: number;
|
|
262
|
-
url: string;
|
|
263
|
-
title: string;
|
|
264
|
-
active: boolean;
|
|
265
|
-
}
|
|
266
|
-
interface CookieParam {
|
|
267
|
-
name: string;
|
|
268
|
-
value: string;
|
|
269
|
-
url?: string;
|
|
270
|
-
domain?: string;
|
|
271
|
-
path?: string;
|
|
272
|
-
expires?: number;
|
|
273
|
-
httpOnly?: boolean;
|
|
274
|
-
secure?: boolean;
|
|
275
|
-
sameSite?: 'Strict' | 'Lax' | 'None';
|
|
276
|
-
}
|
|
277
|
-
interface FileUploadOptions extends BaseActionOptions {
|
|
278
|
-
paths: string[];
|
|
279
|
-
}
|
|
280
|
-
interface BoundingBox {
|
|
281
|
-
x: number;
|
|
282
|
-
y: number;
|
|
283
|
-
width: number;
|
|
284
|
-
height: number;
|
|
285
|
-
}
|
|
286
|
-
type OpensteerAgentMode = 'cua';
|
|
287
|
-
type OpensteerAgentProvider = 'openai' | 'anthropic' | 'google';
|
|
288
|
-
interface OpensteerAgentModelConfig {
|
|
289
|
-
modelName: string;
|
|
290
|
-
apiKey?: string;
|
|
291
|
-
baseUrl?: string;
|
|
292
|
-
organization?: string;
|
|
293
|
-
thinkingBudget?: number;
|
|
294
|
-
environment?: string;
|
|
295
|
-
}
|
|
296
|
-
interface OpensteerAgentConfig {
|
|
297
|
-
mode: OpensteerAgentMode;
|
|
298
|
-
model?: string | OpensteerAgentModelConfig;
|
|
299
|
-
systemPrompt?: string;
|
|
300
|
-
waitBetweenActionsMs?: number;
|
|
301
|
-
}
|
|
302
|
-
interface OpensteerAgentExecuteOptions {
|
|
303
|
-
instruction: string;
|
|
304
|
-
maxSteps?: number;
|
|
305
|
-
highlightCursor?: boolean;
|
|
306
|
-
}
|
|
307
|
-
interface OpensteerAgentUsage {
|
|
308
|
-
inputTokens: number;
|
|
309
|
-
outputTokens: number;
|
|
310
|
-
reasoningTokens?: number;
|
|
311
|
-
inferenceTimeMs: number;
|
|
312
|
-
}
|
|
313
|
-
interface OpensteerAgentAction {
|
|
314
|
-
type: string;
|
|
315
|
-
reasoning?: string;
|
|
316
|
-
button?: string;
|
|
317
|
-
clickCount?: number;
|
|
318
|
-
x?: number;
|
|
319
|
-
y?: number;
|
|
320
|
-
text?: string;
|
|
321
|
-
keys?: string[];
|
|
322
|
-
scrollX?: number;
|
|
323
|
-
scrollY?: number;
|
|
324
|
-
timeMs?: number;
|
|
325
|
-
url?: string;
|
|
326
|
-
path?: Array<{
|
|
327
|
-
x: number;
|
|
328
|
-
y: number;
|
|
329
|
-
}>;
|
|
330
|
-
[key: string]: unknown;
|
|
331
|
-
}
|
|
332
|
-
interface OpensteerAgentResult {
|
|
333
|
-
success: boolean;
|
|
334
|
-
completed: boolean;
|
|
335
|
-
message: string;
|
|
336
|
-
actions: OpensteerAgentAction[];
|
|
337
|
-
usage?: OpensteerAgentUsage;
|
|
338
|
-
provider: OpensteerAgentProvider;
|
|
339
|
-
model: string;
|
|
340
|
-
}
|
|
341
|
-
interface OpensteerAgentInstance {
|
|
342
|
-
execute(instructionOrOptions: string | OpensteerAgentExecuteOptions): Promise<OpensteerAgentResult>;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
export type { MatchOperator as $, ActionResult as A, BaseActionOptions as B, CookieParam as C, ActionWaitOptions as D, ExtractOptions as E, FileUploadOptions as F, GotoOptions as G, HoverOptions as H, InputOptions as I, AiExtractArgs as J, AiExtractResult as K, LaunchOptions as L, AiResolveArgs as M, AiResolveCallbackResult as N, OpensteerAuthScheme as O, AiResolveResult as P, AttributeMatchClause as Q, ContextHop as R, SnapshotOptions as S, TabInfo as T, DomPath as U, ExtractSchema as V, ExtractSchemaField as W, ExtractSchemaValue as X, ExtractionFieldPlan as Y, ExtractionPlan as Z, MatchClause as _, OpensteerConfig as a, OpensteerAgentMode as a0, OpensteerAgentModelConfig as a1, OpensteerCloudAnnouncePolicy as a2, OpensteerCloudBrowserProfileOptions as a3, OpensteerCloudConfig as a4, OpensteerCloudOptions as a5, OpensteerCursorColor as a6, OpensteerCursorProfile as a7, OpensteerLocalBrowserMode as a8, OpensteerStorageConfig as a9, PathNode as aa, PathNodePosition as ab, PositionMatchClause as ac, OpensteerLocalProfileDescriptor as b, OpensteerRealBrowserOptions as c, StateResult as d, ScreenshotOptions as e, ClickOptions as f, SelectOptions as g, ScrollOptions as h, BoundingBox as i, ExtractFromPlanOptions as j, ExtractionRunResult as k, OpensteerCursorState as l, OpensteerAgentConfig as m, OpensteerAgentInstance as n, ElementPath as o, SnapshotMode as p, AiResolveCallback as q, AiExtractCallback as r, OpensteerAgentProvider as s, OpensteerAgentAction as t, OpensteerAgentResult as u, OpensteerAgentUsage as v, OpensteerCursorStyle as w, OpensteerCursorConfig as x, OpensteerAgentExecuteOptions as y, OpensteerBrowserConfig as z };
|
package/dist/types-Cr10igF3.d.ts
DELETED
|
@@ -1,345 +0,0 @@
|
|
|
1
|
-
import { BrowserContextOptions } from 'playwright';
|
|
2
|
-
|
|
3
|
-
type MatchOperator = 'exact' | 'startsWith' | 'contains';
|
|
4
|
-
interface AttributeMatchClause {
|
|
5
|
-
kind: 'attr';
|
|
6
|
-
key: string;
|
|
7
|
-
op?: MatchOperator;
|
|
8
|
-
value?: string;
|
|
9
|
-
}
|
|
10
|
-
interface PositionMatchClause {
|
|
11
|
-
kind: 'position';
|
|
12
|
-
axis: 'nthOfType' | 'nthChild';
|
|
13
|
-
}
|
|
14
|
-
type MatchClause = AttributeMatchClause | PositionMatchClause;
|
|
15
|
-
interface PathNodePosition {
|
|
16
|
-
nthChild: number;
|
|
17
|
-
nthOfType: number;
|
|
18
|
-
}
|
|
19
|
-
interface PathNode {
|
|
20
|
-
tag: string;
|
|
21
|
-
attrs: Record<string, string>;
|
|
22
|
-
position: PathNodePosition;
|
|
23
|
-
match: MatchClause[];
|
|
24
|
-
}
|
|
25
|
-
type DomPath = PathNode[];
|
|
26
|
-
interface ContextHop {
|
|
27
|
-
kind: 'iframe' | 'shadow';
|
|
28
|
-
host: DomPath;
|
|
29
|
-
}
|
|
30
|
-
interface ElementPath {
|
|
31
|
-
context: ContextHop[];
|
|
32
|
-
nodes: DomPath;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
type SnapshotMode = 'action' | 'extraction' | 'clickable' | 'scrollable' | 'full';
|
|
36
|
-
interface SnapshotOptions {
|
|
37
|
-
mode?: SnapshotMode;
|
|
38
|
-
withCounters?: boolean;
|
|
39
|
-
markInteractive?: boolean;
|
|
40
|
-
}
|
|
41
|
-
interface ScreenshotOptions {
|
|
42
|
-
fullPage?: boolean;
|
|
43
|
-
type?: 'png' | 'jpeg';
|
|
44
|
-
/** Ignored for PNG. */
|
|
45
|
-
quality?: number;
|
|
46
|
-
omitBackground?: boolean;
|
|
47
|
-
}
|
|
48
|
-
interface AiResolveArgs {
|
|
49
|
-
html: string;
|
|
50
|
-
action: string;
|
|
51
|
-
description: string;
|
|
52
|
-
url: string | null;
|
|
53
|
-
}
|
|
54
|
-
interface AiResolveResult {
|
|
55
|
-
element?: number;
|
|
56
|
-
selector?: string;
|
|
57
|
-
path?: ElementPath;
|
|
58
|
-
}
|
|
59
|
-
type AiResolveCallbackResult = AiResolveResult | number | string | null | undefined;
|
|
60
|
-
type AiResolveCallback = (args: AiResolveArgs) => Promise<AiResolveCallbackResult>;
|
|
61
|
-
interface AiExtractArgs<TSchema = ExtractSchema> {
|
|
62
|
-
html: string;
|
|
63
|
-
schema: TSchema;
|
|
64
|
-
description?: string;
|
|
65
|
-
prompt?: string;
|
|
66
|
-
url: string | null;
|
|
67
|
-
}
|
|
68
|
-
type AiExtractResult<TData = unknown> = TData | ExtractionPlan | string;
|
|
69
|
-
type AiExtractCallback = <TSchema = ExtractSchema, TData = unknown>(args: AiExtractArgs<TSchema>) => Promise<AiExtractResult<TData>>;
|
|
70
|
-
interface GotoOptions {
|
|
71
|
-
timeout?: number;
|
|
72
|
-
waitUntil?: 'commit' | 'domcontentloaded' | 'load' | 'networkidle';
|
|
73
|
-
settleMs?: number;
|
|
74
|
-
}
|
|
75
|
-
type OpensteerLocalBrowserMode = 'chromium' | 'real';
|
|
76
|
-
interface OpensteerLocalProfileDescriptor {
|
|
77
|
-
directory: string;
|
|
78
|
-
name: string;
|
|
79
|
-
}
|
|
80
|
-
interface OpensteerRealBrowserOptions {
|
|
81
|
-
headless?: boolean;
|
|
82
|
-
executablePath?: string;
|
|
83
|
-
userDataDir?: string;
|
|
84
|
-
profileDirectory?: string;
|
|
85
|
-
}
|
|
86
|
-
interface LaunchOptions {
|
|
87
|
-
headless?: boolean;
|
|
88
|
-
executablePath?: string;
|
|
89
|
-
slowMo?: number;
|
|
90
|
-
/** Sandbox-only context options. Not supported with cdpUrl or mode "real". */
|
|
91
|
-
context?: BrowserContextOptions;
|
|
92
|
-
/** Initial URL to open as part of owned real-browser startup. */
|
|
93
|
-
initialUrl?: string;
|
|
94
|
-
/** Local browser mode. Defaults to "chromium". */
|
|
95
|
-
mode?: OpensteerLocalBrowserMode;
|
|
96
|
-
/** Connect to a running CDP-enabled browser. Example: "http://localhost:9222" */
|
|
97
|
-
cdpUrl?: string;
|
|
98
|
-
/** Browser user-data root directory for real-browser mode. */
|
|
99
|
-
userDataDir?: string;
|
|
100
|
-
/** Browser profile directory name for real-browser mode. */
|
|
101
|
-
profileDirectory?: string;
|
|
102
|
-
/** Cloud browser profile preference. Applies only when cloud mode is enabled. */
|
|
103
|
-
cloudBrowserProfile?: OpensteerCloudBrowserProfileOptions;
|
|
104
|
-
/** Connection timeout in milliseconds. */
|
|
105
|
-
timeout?: number;
|
|
106
|
-
}
|
|
107
|
-
interface OpensteerBrowserConfig {
|
|
108
|
-
headless?: boolean;
|
|
109
|
-
executablePath?: string;
|
|
110
|
-
slowMo?: number;
|
|
111
|
-
/** Local browser mode. Defaults to "chromium". */
|
|
112
|
-
mode?: OpensteerLocalBrowserMode;
|
|
113
|
-
/** Connect to a running CDP-enabled browser. Example: "http://localhost:9222" */
|
|
114
|
-
cdpUrl?: string;
|
|
115
|
-
/** Browser user-data root directory for real-browser mode. */
|
|
116
|
-
userDataDir?: string;
|
|
117
|
-
/** Browser profile directory name for real-browser mode. */
|
|
118
|
-
profileDirectory?: string;
|
|
119
|
-
}
|
|
120
|
-
interface OpensteerStorageConfig {
|
|
121
|
-
rootDir?: string;
|
|
122
|
-
}
|
|
123
|
-
interface OpensteerCursorColor {
|
|
124
|
-
r: number;
|
|
125
|
-
g: number;
|
|
126
|
-
b: number;
|
|
127
|
-
a: number;
|
|
128
|
-
}
|
|
129
|
-
interface OpensteerCursorStyle {
|
|
130
|
-
size?: number;
|
|
131
|
-
fillColor?: OpensteerCursorColor;
|
|
132
|
-
outlineColor?: OpensteerCursorColor;
|
|
133
|
-
haloColor?: OpensteerCursorColor;
|
|
134
|
-
pulseScale?: number;
|
|
135
|
-
}
|
|
136
|
-
type OpensteerCursorProfile = 'snappy';
|
|
137
|
-
interface OpensteerCursorConfig {
|
|
138
|
-
enabled?: boolean;
|
|
139
|
-
profile?: OpensteerCursorProfile;
|
|
140
|
-
style?: OpensteerCursorStyle;
|
|
141
|
-
}
|
|
142
|
-
type OpensteerAuthScheme = 'api-key' | 'bearer';
|
|
143
|
-
type OpensteerCloudAnnouncePolicy = 'always' | 'off' | 'tty';
|
|
144
|
-
interface OpensteerCloudBrowserProfileOptions {
|
|
145
|
-
profileId: string;
|
|
146
|
-
reuseIfActive?: boolean;
|
|
147
|
-
}
|
|
148
|
-
interface OpensteerCloudOptions {
|
|
149
|
-
apiKey?: string;
|
|
150
|
-
accessToken?: string;
|
|
151
|
-
baseUrl?: string;
|
|
152
|
-
authScheme?: OpensteerAuthScheme;
|
|
153
|
-
announce?: OpensteerCloudAnnouncePolicy;
|
|
154
|
-
browserProfile?: OpensteerCloudBrowserProfileOptions;
|
|
155
|
-
}
|
|
156
|
-
type OpensteerCloudConfig = boolean | OpensteerCloudOptions;
|
|
157
|
-
interface OpensteerConfig {
|
|
158
|
-
name?: string;
|
|
159
|
-
browser?: OpensteerBrowserConfig;
|
|
160
|
-
storage?: OpensteerStorageConfig;
|
|
161
|
-
cursor?: OpensteerCursorConfig;
|
|
162
|
-
cloud?: OpensteerCloudConfig;
|
|
163
|
-
model?: string;
|
|
164
|
-
debug?: boolean;
|
|
165
|
-
}
|
|
166
|
-
interface ActionWaitOptions {
|
|
167
|
-
enabled?: boolean;
|
|
168
|
-
timeout?: number;
|
|
169
|
-
settleMs?: number;
|
|
170
|
-
networkQuietMs?: number;
|
|
171
|
-
includeNetwork?: boolean;
|
|
172
|
-
}
|
|
173
|
-
interface BaseActionOptions {
|
|
174
|
-
description?: string;
|
|
175
|
-
element?: number;
|
|
176
|
-
selector?: string;
|
|
177
|
-
wait?: false | ActionWaitOptions;
|
|
178
|
-
}
|
|
179
|
-
interface ClickOptions extends BaseActionOptions {
|
|
180
|
-
button?: 'left' | 'right' | 'middle';
|
|
181
|
-
clickCount?: number;
|
|
182
|
-
modifiers?: Array<'Alt' | 'Control' | 'Meta' | 'Shift'>;
|
|
183
|
-
}
|
|
184
|
-
interface HoverOptions extends BaseActionOptions {
|
|
185
|
-
force?: boolean;
|
|
186
|
-
position?: {
|
|
187
|
-
x: number;
|
|
188
|
-
y: number;
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
interface InputOptions extends BaseActionOptions {
|
|
192
|
-
text: string;
|
|
193
|
-
clear?: boolean;
|
|
194
|
-
pressEnter?: boolean;
|
|
195
|
-
}
|
|
196
|
-
interface SelectOptions extends BaseActionOptions {
|
|
197
|
-
value?: string;
|
|
198
|
-
label?: string;
|
|
199
|
-
index?: number;
|
|
200
|
-
}
|
|
201
|
-
interface ScrollOptions extends BaseActionOptions {
|
|
202
|
-
direction?: 'up' | 'down' | 'left' | 'right';
|
|
203
|
-
amount?: number;
|
|
204
|
-
}
|
|
205
|
-
interface ExtractSchemaField {
|
|
206
|
-
element?: number;
|
|
207
|
-
selector?: string;
|
|
208
|
-
attribute?: string;
|
|
209
|
-
source?: 'current_url';
|
|
210
|
-
}
|
|
211
|
-
type ExtractSchemaValue = ExtractSchemaField | string | number | boolean | null | ExtractSchema | ExtractSchema[];
|
|
212
|
-
interface ExtractSchema {
|
|
213
|
-
[key: string]: ExtractSchemaValue;
|
|
214
|
-
}
|
|
215
|
-
interface ExtractOptions<TSchema = ExtractSchema> extends BaseActionOptions {
|
|
216
|
-
schema?: TSchema;
|
|
217
|
-
prompt?: string;
|
|
218
|
-
snapshot?: SnapshotOptions;
|
|
219
|
-
}
|
|
220
|
-
interface ExtractionFieldPlan {
|
|
221
|
-
element?: number;
|
|
222
|
-
selector?: string;
|
|
223
|
-
attribute?: string;
|
|
224
|
-
source?: 'current_url';
|
|
225
|
-
}
|
|
226
|
-
interface ExtractionPlan {
|
|
227
|
-
fields?: Record<string, ExtractionFieldPlan>;
|
|
228
|
-
paths?: Record<string, ElementPath>;
|
|
229
|
-
data?: unknown;
|
|
230
|
-
}
|
|
231
|
-
interface ExtractFromPlanOptions<TSchema = ExtractSchema> {
|
|
232
|
-
description?: string;
|
|
233
|
-
schema: TSchema;
|
|
234
|
-
plan: ExtractionPlan;
|
|
235
|
-
}
|
|
236
|
-
interface ActionResult {
|
|
237
|
-
method: string;
|
|
238
|
-
namespace: string;
|
|
239
|
-
persisted: boolean;
|
|
240
|
-
pathFile: string | null;
|
|
241
|
-
selectorUsed?: string | null;
|
|
242
|
-
}
|
|
243
|
-
interface OpensteerCursorState {
|
|
244
|
-
enabled: boolean;
|
|
245
|
-
active: boolean;
|
|
246
|
-
reason?: string;
|
|
247
|
-
}
|
|
248
|
-
interface ExtractionRunResult<T = unknown> {
|
|
249
|
-
namespace: string;
|
|
250
|
-
persisted: boolean;
|
|
251
|
-
pathFile: string | null;
|
|
252
|
-
data: T;
|
|
253
|
-
paths: Record<string, ElementPath>;
|
|
254
|
-
}
|
|
255
|
-
interface StateResult {
|
|
256
|
-
url: string;
|
|
257
|
-
title: string;
|
|
258
|
-
html: string;
|
|
259
|
-
}
|
|
260
|
-
interface TabInfo {
|
|
261
|
-
index: number;
|
|
262
|
-
url: string;
|
|
263
|
-
title: string;
|
|
264
|
-
active: boolean;
|
|
265
|
-
}
|
|
266
|
-
interface CookieParam {
|
|
267
|
-
name: string;
|
|
268
|
-
value: string;
|
|
269
|
-
url?: string;
|
|
270
|
-
domain?: string;
|
|
271
|
-
path?: string;
|
|
272
|
-
expires?: number;
|
|
273
|
-
httpOnly?: boolean;
|
|
274
|
-
secure?: boolean;
|
|
275
|
-
sameSite?: 'Strict' | 'Lax' | 'None';
|
|
276
|
-
}
|
|
277
|
-
interface FileUploadOptions extends BaseActionOptions {
|
|
278
|
-
paths: string[];
|
|
279
|
-
}
|
|
280
|
-
interface BoundingBox {
|
|
281
|
-
x: number;
|
|
282
|
-
y: number;
|
|
283
|
-
width: number;
|
|
284
|
-
height: number;
|
|
285
|
-
}
|
|
286
|
-
type OpensteerAgentMode = 'cua';
|
|
287
|
-
type OpensteerAgentProvider = 'openai' | 'anthropic' | 'google';
|
|
288
|
-
interface OpensteerAgentModelConfig {
|
|
289
|
-
modelName: string;
|
|
290
|
-
apiKey?: string;
|
|
291
|
-
baseUrl?: string;
|
|
292
|
-
organization?: string;
|
|
293
|
-
thinkingBudget?: number;
|
|
294
|
-
environment?: string;
|
|
295
|
-
}
|
|
296
|
-
interface OpensteerAgentConfig {
|
|
297
|
-
mode: OpensteerAgentMode;
|
|
298
|
-
model?: string | OpensteerAgentModelConfig;
|
|
299
|
-
systemPrompt?: string;
|
|
300
|
-
waitBetweenActionsMs?: number;
|
|
301
|
-
}
|
|
302
|
-
interface OpensteerAgentExecuteOptions {
|
|
303
|
-
instruction: string;
|
|
304
|
-
maxSteps?: number;
|
|
305
|
-
highlightCursor?: boolean;
|
|
306
|
-
}
|
|
307
|
-
interface OpensteerAgentUsage {
|
|
308
|
-
inputTokens: number;
|
|
309
|
-
outputTokens: number;
|
|
310
|
-
reasoningTokens?: number;
|
|
311
|
-
inferenceTimeMs: number;
|
|
312
|
-
}
|
|
313
|
-
interface OpensteerAgentAction {
|
|
314
|
-
type: string;
|
|
315
|
-
reasoning?: string;
|
|
316
|
-
button?: string;
|
|
317
|
-
clickCount?: number;
|
|
318
|
-
x?: number;
|
|
319
|
-
y?: number;
|
|
320
|
-
text?: string;
|
|
321
|
-
keys?: string[];
|
|
322
|
-
scrollX?: number;
|
|
323
|
-
scrollY?: number;
|
|
324
|
-
timeMs?: number;
|
|
325
|
-
url?: string;
|
|
326
|
-
path?: Array<{
|
|
327
|
-
x: number;
|
|
328
|
-
y: number;
|
|
329
|
-
}>;
|
|
330
|
-
[key: string]: unknown;
|
|
331
|
-
}
|
|
332
|
-
interface OpensteerAgentResult {
|
|
333
|
-
success: boolean;
|
|
334
|
-
completed: boolean;
|
|
335
|
-
message: string;
|
|
336
|
-
actions: OpensteerAgentAction[];
|
|
337
|
-
usage?: OpensteerAgentUsage;
|
|
338
|
-
provider: OpensteerAgentProvider;
|
|
339
|
-
model: string;
|
|
340
|
-
}
|
|
341
|
-
interface OpensteerAgentInstance {
|
|
342
|
-
execute(instructionOrOptions: string | OpensteerAgentExecuteOptions): Promise<OpensteerAgentResult>;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
export type { MatchOperator as $, ActionResult as A, BaseActionOptions as B, CookieParam as C, ActionWaitOptions as D, ExtractOptions as E, FileUploadOptions as F, GotoOptions as G, HoverOptions as H, InputOptions as I, AiExtractArgs as J, AiExtractResult as K, LaunchOptions as L, AiResolveArgs as M, AiResolveCallbackResult as N, OpensteerAuthScheme as O, AiResolveResult as P, AttributeMatchClause as Q, ContextHop as R, SnapshotOptions as S, TabInfo as T, DomPath as U, ExtractSchema as V, ExtractSchemaField as W, ExtractSchemaValue as X, ExtractionFieldPlan as Y, ExtractionPlan as Z, MatchClause as _, OpensteerConfig as a, OpensteerAgentMode as a0, OpensteerAgentModelConfig as a1, OpensteerCloudAnnouncePolicy as a2, OpensteerCloudBrowserProfileOptions as a3, OpensteerCloudConfig as a4, OpensteerCloudOptions as a5, OpensteerCursorColor as a6, OpensteerCursorProfile as a7, OpensteerLocalBrowserMode as a8, OpensteerStorageConfig as a9, PathNode as aa, PathNodePosition as ab, PositionMatchClause as ac, OpensteerLocalProfileDescriptor as b, OpensteerRealBrowserOptions as c, StateResult as d, ScreenshotOptions as e, ClickOptions as f, SelectOptions as g, ScrollOptions as h, BoundingBox as i, ExtractFromPlanOptions as j, ExtractionRunResult as k, OpensteerCursorState as l, OpensteerAgentConfig as m, OpensteerAgentInstance as n, ElementPath as o, SnapshotMode as p, AiResolveCallback as q, AiExtractCallback as r, OpensteerAgentProvider as s, OpensteerAgentAction as t, OpensteerAgentResult as u, OpensteerAgentUsage as v, OpensteerCursorStyle as w, OpensteerCursorConfig as x, OpensteerAgentExecuteOptions as y, OpensteerBrowserConfig as z };
|