opensteer 0.6.7 → 0.6.8
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/browser-profile-client-CGXc0-P9.d.cts +228 -0
- package/dist/browser-profile-client-DHLzMf-K.d.ts +228 -0
- package/dist/{chunk-ACRSRDRN.js → chunk-C6AJL5XU.js} +4 -11
- package/dist/{chunk-KPPOTU3D.js → chunk-LTREUXLO.js} +140 -12
- package/dist/{chunk-6B6LOYU3.js → chunk-O4HVMKX2.js} +1 -1
- package/dist/{chunk-54KNQTOL.js → chunk-UQYVMJOZ.js} +27 -12
- package/dist/cli/auth.cjs +108 -11
- package/dist/cli/auth.js +2 -2
- package/dist/cli/profile.cjs +123 -18
- package/dist/cli/profile.d.cts +1 -1
- package/dist/cli/profile.d.ts +1 -1
- package/dist/cli/profile.js +4 -4
- package/dist/cli/server.cjs +123 -18
- package/dist/cli/server.js +2 -2
- package/dist/index.cjs +142 -18
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +20 -4
- package/package.json +1 -1
- package/dist/browser-profile-client-AGTsLQxT.d.ts +0 -168
- package/dist/browser-profile-client-Biu6DyT6.d.cts +0 -168
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { O as OpensteerAuthScheme } from './types-Cr10igF3.cjs';
|
|
2
|
+
|
|
3
|
+
type ActionFailureCode = 'TARGET_NOT_FOUND' | 'TARGET_UNAVAILABLE' | 'TARGET_STALE' | 'TARGET_AMBIGUOUS' | 'BLOCKED_BY_INTERCEPTOR' | 'NOT_VISIBLE' | 'NOT_ENABLED' | 'NOT_EDITABLE' | 'INVALID_TARGET' | 'INVALID_OPTIONS' | 'ACTION_TIMEOUT' | 'UNKNOWN';
|
|
4
|
+
type ActionFailureClassificationSource = 'typed_error' | 'playwright_call_log' | 'dom_probe' | 'message_heuristic' | 'unknown';
|
|
5
|
+
interface ActionFailureBlocker {
|
|
6
|
+
tag: string;
|
|
7
|
+
id: string | null;
|
|
8
|
+
classes: string[];
|
|
9
|
+
role: string | null;
|
|
10
|
+
text: string | null;
|
|
11
|
+
}
|
|
12
|
+
interface ActionFailureDetails {
|
|
13
|
+
blocker?: ActionFailureBlocker;
|
|
14
|
+
observation?: string;
|
|
15
|
+
}
|
|
16
|
+
interface ActionFailure {
|
|
17
|
+
code: ActionFailureCode;
|
|
18
|
+
message: string;
|
|
19
|
+
retryable: boolean;
|
|
20
|
+
classificationSource: ActionFailureClassificationSource;
|
|
21
|
+
details?: ActionFailureDetails;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare const cloudActionMethods: readonly ["goto", "snapshot", "screenshot", "state", "click", "dblclick", "rightclick", "hover", "input", "select", "scroll", "tabs", "newTab", "switchTab", "closeTab", "getCookies", "setCookie", "clearCookies", "pressKey", "type", "getElementText", "getElementValue", "getElementAttributes", "getElementBoundingBox", "getHtml", "getTitle", "uploadFile", "exportCookies", "importCookies", "waitForText", "extract", "extractFromPlan", "clearCache"];
|
|
25
|
+
type CloudActionMethod = (typeof cloudActionMethods)[number];
|
|
26
|
+
declare const cloudErrorCodes: readonly ["CLOUD_AUTH_FAILED", "CLOUD_SESSION_NOT_FOUND", "CLOUD_SESSION_CLOSED", "CLOUD_UNSUPPORTED_METHOD", "CLOUD_INVALID_REQUEST", "CLOUD_MODEL_NOT_ALLOWED", "CLOUD_ACTION_FAILED", "CLOUD_CAPACITY_EXHAUSTED", "CLOUD_RUNTIME_UNAVAILABLE", "CLOUD_RUNTIME_MISMATCH", "CLOUD_SESSION_STALE", "CLOUD_CONTROL_PLANE_ERROR", "CLOUD_CONTRACT_MISMATCH", "CLOUD_PROXY_UNAVAILABLE", "CLOUD_PROXY_REQUIRED", "CLOUD_BILLING_LIMIT_REACHED", "CLOUD_RATE_LIMITED", "CLOUD_BROWSER_PROFILE_NOT_FOUND", "CLOUD_BROWSER_PROFILE_BUSY", "CLOUD_BROWSER_PROFILE_DISABLED", "CLOUD_BROWSER_PROFILE_PROXY_UNAVAILABLE", "CLOUD_BROWSER_PROFILE_SYNC_FAILED", "CLOUD_INTERNAL"];
|
|
27
|
+
type CloudErrorCode = (typeof cloudErrorCodes)[number];
|
|
28
|
+
declare const cloudSessionStatuses: readonly ["provisioning", "active", "closing", "closed", "failed"];
|
|
29
|
+
type CloudSessionStatus = (typeof cloudSessionStatuses)[number];
|
|
30
|
+
declare const cloudSessionContractVersion: "v3";
|
|
31
|
+
type CloudSessionContractVersion = typeof cloudSessionContractVersion;
|
|
32
|
+
declare const cloudSessionSourceTypes: readonly ["agent-thread", "agent-run", "project-agent-run", "local-cloud", "manual"];
|
|
33
|
+
type CloudSessionSourceType = (typeof cloudSessionSourceTypes)[number];
|
|
34
|
+
type CloudSessionVisibilityScope = 'team' | 'owner';
|
|
35
|
+
type CloudProxyMode = 'disabled' | 'optional' | 'required';
|
|
36
|
+
type CloudProxyProtocol = 'http' | 'https' | 'socks5';
|
|
37
|
+
type CloudFingerprintMode = 'off' | 'auto';
|
|
38
|
+
type BrowserProfileStatus = 'active' | 'archived' | 'error';
|
|
39
|
+
type BrowserProfileProxyPolicy = 'strict_sticky';
|
|
40
|
+
type BrowserProfileArchiveFormat = 'tar.gz';
|
|
41
|
+
interface CloudViewport {
|
|
42
|
+
width: number;
|
|
43
|
+
height: number;
|
|
44
|
+
}
|
|
45
|
+
interface CloudGeolocation {
|
|
46
|
+
latitude: number;
|
|
47
|
+
longitude: number;
|
|
48
|
+
accuracy?: number;
|
|
49
|
+
}
|
|
50
|
+
interface CloudBrowserContextConfig {
|
|
51
|
+
viewport?: CloudViewport;
|
|
52
|
+
locale?: string;
|
|
53
|
+
timezoneId?: string;
|
|
54
|
+
geolocation?: CloudGeolocation;
|
|
55
|
+
colorScheme?: 'light' | 'dark' | 'no-preference';
|
|
56
|
+
userAgent?: string;
|
|
57
|
+
javaScriptEnabled?: boolean;
|
|
58
|
+
ignoreHTTPSErrors?: boolean;
|
|
59
|
+
}
|
|
60
|
+
interface CloudBrowserExtensionConfig {
|
|
61
|
+
includeDefaults?: boolean;
|
|
62
|
+
extensionKeys?: string[];
|
|
63
|
+
}
|
|
64
|
+
interface CloudBrowserLaunchConfig {
|
|
65
|
+
headless?: boolean;
|
|
66
|
+
context?: CloudBrowserContextConfig;
|
|
67
|
+
chromeArgs?: string[];
|
|
68
|
+
extensions?: CloudBrowserExtensionConfig;
|
|
69
|
+
}
|
|
70
|
+
interface CloudProxyPreference {
|
|
71
|
+
mode?: CloudProxyMode;
|
|
72
|
+
countryCode?: string;
|
|
73
|
+
region?: string;
|
|
74
|
+
city?: string;
|
|
75
|
+
proxyId?: string;
|
|
76
|
+
}
|
|
77
|
+
interface CloudFingerprintPreference {
|
|
78
|
+
mode?: CloudFingerprintMode;
|
|
79
|
+
locales?: string[];
|
|
80
|
+
minWidth?: number;
|
|
81
|
+
maxWidth?: number;
|
|
82
|
+
minHeight?: number;
|
|
83
|
+
maxHeight?: number;
|
|
84
|
+
slim?: boolean;
|
|
85
|
+
}
|
|
86
|
+
interface CloudBrowserProfileLaunchPreference {
|
|
87
|
+
profileId: string;
|
|
88
|
+
reuseIfActive?: boolean;
|
|
89
|
+
}
|
|
90
|
+
interface CloudSessionLaunchConfig {
|
|
91
|
+
browser?: CloudBrowserLaunchConfig;
|
|
92
|
+
proxy?: CloudProxyPreference;
|
|
93
|
+
fingerprint?: CloudFingerprintPreference;
|
|
94
|
+
browserProfile?: CloudBrowserProfileLaunchPreference;
|
|
95
|
+
}
|
|
96
|
+
interface CloudSessionCreateRequest {
|
|
97
|
+
cloudSessionContractVersion: CloudSessionContractVersion;
|
|
98
|
+
sourceType: 'local-cloud';
|
|
99
|
+
clientSessionHint: string;
|
|
100
|
+
localRunId: string;
|
|
101
|
+
name?: string;
|
|
102
|
+
model?: string;
|
|
103
|
+
launchContext?: Record<string, unknown>;
|
|
104
|
+
launchConfig?: CloudSessionLaunchConfig;
|
|
105
|
+
}
|
|
106
|
+
interface CloudSessionSummary {
|
|
107
|
+
sessionId: string;
|
|
108
|
+
workspaceId: string;
|
|
109
|
+
state: CloudSessionStatus;
|
|
110
|
+
createdAt: number;
|
|
111
|
+
sourceType: CloudSessionSourceType;
|
|
112
|
+
sourceRef?: string;
|
|
113
|
+
label?: string;
|
|
114
|
+
}
|
|
115
|
+
interface CloudSessionCreateResponse {
|
|
116
|
+
sessionId: string;
|
|
117
|
+
actionWsUrl: string;
|
|
118
|
+
cdpWsUrl: string;
|
|
119
|
+
actionToken: string;
|
|
120
|
+
cdpToken: string;
|
|
121
|
+
expiresAt?: number;
|
|
122
|
+
cloudSessionUrl: string;
|
|
123
|
+
cloudSession: CloudSessionSummary;
|
|
124
|
+
}
|
|
125
|
+
interface CloudSelectorCacheImportEntry {
|
|
126
|
+
namespace: string;
|
|
127
|
+
siteOrigin: string;
|
|
128
|
+
method: string;
|
|
129
|
+
descriptionHash: string;
|
|
130
|
+
path: unknown;
|
|
131
|
+
schemaHash?: string;
|
|
132
|
+
createdAt: number;
|
|
133
|
+
updatedAt: number;
|
|
134
|
+
}
|
|
135
|
+
interface CloudSelectorCacheImportRequest {
|
|
136
|
+
entries: CloudSelectorCacheImportEntry[];
|
|
137
|
+
}
|
|
138
|
+
interface CloudSelectorCacheImportResponse {
|
|
139
|
+
imported: number;
|
|
140
|
+
inserted: number;
|
|
141
|
+
updated: number;
|
|
142
|
+
skipped: number;
|
|
143
|
+
}
|
|
144
|
+
interface CloudActionRequest {
|
|
145
|
+
id: number;
|
|
146
|
+
method: CloudActionMethod;
|
|
147
|
+
args: Record<string, unknown>;
|
|
148
|
+
sessionId: string;
|
|
149
|
+
token: string;
|
|
150
|
+
}
|
|
151
|
+
interface CloudActionSuccess {
|
|
152
|
+
id: number;
|
|
153
|
+
ok: true;
|
|
154
|
+
result: unknown;
|
|
155
|
+
}
|
|
156
|
+
interface CloudActionFailure {
|
|
157
|
+
id: number;
|
|
158
|
+
ok: false;
|
|
159
|
+
error: string;
|
|
160
|
+
code: CloudErrorCode;
|
|
161
|
+
details?: CloudActionFailureDetails;
|
|
162
|
+
}
|
|
163
|
+
type CloudActionResponse = CloudActionSuccess | CloudActionFailure;
|
|
164
|
+
interface CloudActionFailureDetails {
|
|
165
|
+
actionFailure?: ActionFailure;
|
|
166
|
+
}
|
|
167
|
+
interface BrowserProfileDescriptor {
|
|
168
|
+
profileId: string;
|
|
169
|
+
teamId: string;
|
|
170
|
+
ownerUserId: string;
|
|
171
|
+
name: string;
|
|
172
|
+
status: BrowserProfileStatus;
|
|
173
|
+
proxyPolicy: BrowserProfileProxyPolicy;
|
|
174
|
+
stickyProxyId?: string;
|
|
175
|
+
proxyCountryCode?: string;
|
|
176
|
+
proxyRegion?: string;
|
|
177
|
+
proxyCity?: string;
|
|
178
|
+
fingerprintMode: CloudFingerprintMode;
|
|
179
|
+
fingerprintHash?: string;
|
|
180
|
+
activeSessionId?: string;
|
|
181
|
+
lastSessionId?: string;
|
|
182
|
+
lastLaunchedAt?: number;
|
|
183
|
+
latestRevision?: number;
|
|
184
|
+
latestStorageId?: string;
|
|
185
|
+
latestSizeBytes?: number;
|
|
186
|
+
latestArchiveSha256?: string;
|
|
187
|
+
latestArchiveFormat?: BrowserProfileArchiveFormat;
|
|
188
|
+
createdAt: number;
|
|
189
|
+
updatedAt: number;
|
|
190
|
+
lastError?: string;
|
|
191
|
+
}
|
|
192
|
+
interface BrowserProfileListResponse {
|
|
193
|
+
profiles: BrowserProfileDescriptor[];
|
|
194
|
+
nextCursor?: string;
|
|
195
|
+
}
|
|
196
|
+
interface BrowserProfileCreateRequest {
|
|
197
|
+
name: string;
|
|
198
|
+
proxy?: {
|
|
199
|
+
proxyId?: string;
|
|
200
|
+
countryCode?: string;
|
|
201
|
+
region?: string;
|
|
202
|
+
city?: string;
|
|
203
|
+
};
|
|
204
|
+
fingerprint?: {
|
|
205
|
+
mode?: CloudFingerprintMode;
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
declare function isCloudActionMethod(value: unknown): value is CloudActionMethod;
|
|
209
|
+
declare function isCloudErrorCode(value: unknown): value is CloudErrorCode;
|
|
210
|
+
declare function isCloudSessionSourceType(value: unknown): value is CloudSessionSourceType;
|
|
211
|
+
declare function isCloudSessionStatus(value: unknown): value is CloudSessionStatus;
|
|
212
|
+
|
|
213
|
+
interface BrowserProfileListRequest {
|
|
214
|
+
cursor?: string;
|
|
215
|
+
limit?: number;
|
|
216
|
+
status?: BrowserProfileStatus;
|
|
217
|
+
}
|
|
218
|
+
declare class BrowserProfileClient {
|
|
219
|
+
private readonly baseUrl;
|
|
220
|
+
private readonly key;
|
|
221
|
+
private readonly authScheme;
|
|
222
|
+
constructor(baseUrl: string, key: string, authScheme?: OpensteerAuthScheme);
|
|
223
|
+
list(request?: BrowserProfileListRequest): Promise<BrowserProfileListResponse>;
|
|
224
|
+
get(profileId: string): Promise<BrowserProfileDescriptor>;
|
|
225
|
+
create(request: BrowserProfileCreateRequest): Promise<BrowserProfileDescriptor>;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export { type ActionFailure as A, type BrowserProfileStatus as B, type CloudErrorCode as C, type CloudFingerprintMode as D, type CloudFingerprintPreference as E, type CloudGeolocation as F, type CloudProxyMode as G, type CloudProxyPreference as H, type CloudProxyProtocol as I, type CloudSessionContractVersion as J, type CloudSessionLaunchConfig as K, type CloudSessionSourceType as L, type CloudSessionStatus as M, type CloudSessionSummary as N, type CloudSessionVisibilityScope as O, type CloudViewport as P, cloudActionMethods as Q, cloudErrorCodes as R, cloudSessionContractVersion as S, cloudSessionSourceTypes as T, cloudSessionStatuses as U, isCloudActionMethod as V, isCloudErrorCode as W, isCloudSessionSourceType as X, isCloudSessionStatus as Y, type BrowserProfileListRequest as a, type BrowserProfileListResponse as b, type BrowserProfileCreateRequest as c, type BrowserProfileDescriptor as d, type ActionFailureCode as e, type CloudActionFailureDetails as f, type CloudSessionCreateRequest as g, type CloudSessionCreateResponse as h, type CloudSelectorCacheImportRequest as i, type CloudSelectorCacheImportResponse as j, type CloudActionMethod as k, type CloudSelectorCacheImportEntry as l, type ActionFailureBlocker as m, type ActionFailureClassificationSource as n, type ActionFailureDetails as o, type BrowserProfileArchiveFormat as p, BrowserProfileClient as q, type BrowserProfileProxyPolicy as r, type CloudActionFailure as s, type CloudActionRequest as t, type CloudActionResponse as u, type CloudActionSuccess as v, type CloudBrowserContextConfig as w, type CloudBrowserExtensionConfig as x, type CloudBrowserLaunchConfig as y, type CloudBrowserProfileLaunchPreference as z };
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { O as OpensteerAuthScheme } from './types-Cr10igF3.js';
|
|
2
|
+
|
|
3
|
+
type ActionFailureCode = 'TARGET_NOT_FOUND' | 'TARGET_UNAVAILABLE' | 'TARGET_STALE' | 'TARGET_AMBIGUOUS' | 'BLOCKED_BY_INTERCEPTOR' | 'NOT_VISIBLE' | 'NOT_ENABLED' | 'NOT_EDITABLE' | 'INVALID_TARGET' | 'INVALID_OPTIONS' | 'ACTION_TIMEOUT' | 'UNKNOWN';
|
|
4
|
+
type ActionFailureClassificationSource = 'typed_error' | 'playwright_call_log' | 'dom_probe' | 'message_heuristic' | 'unknown';
|
|
5
|
+
interface ActionFailureBlocker {
|
|
6
|
+
tag: string;
|
|
7
|
+
id: string | null;
|
|
8
|
+
classes: string[];
|
|
9
|
+
role: string | null;
|
|
10
|
+
text: string | null;
|
|
11
|
+
}
|
|
12
|
+
interface ActionFailureDetails {
|
|
13
|
+
blocker?: ActionFailureBlocker;
|
|
14
|
+
observation?: string;
|
|
15
|
+
}
|
|
16
|
+
interface ActionFailure {
|
|
17
|
+
code: ActionFailureCode;
|
|
18
|
+
message: string;
|
|
19
|
+
retryable: boolean;
|
|
20
|
+
classificationSource: ActionFailureClassificationSource;
|
|
21
|
+
details?: ActionFailureDetails;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare const cloudActionMethods: readonly ["goto", "snapshot", "screenshot", "state", "click", "dblclick", "rightclick", "hover", "input", "select", "scroll", "tabs", "newTab", "switchTab", "closeTab", "getCookies", "setCookie", "clearCookies", "pressKey", "type", "getElementText", "getElementValue", "getElementAttributes", "getElementBoundingBox", "getHtml", "getTitle", "uploadFile", "exportCookies", "importCookies", "waitForText", "extract", "extractFromPlan", "clearCache"];
|
|
25
|
+
type CloudActionMethod = (typeof cloudActionMethods)[number];
|
|
26
|
+
declare const cloudErrorCodes: readonly ["CLOUD_AUTH_FAILED", "CLOUD_SESSION_NOT_FOUND", "CLOUD_SESSION_CLOSED", "CLOUD_UNSUPPORTED_METHOD", "CLOUD_INVALID_REQUEST", "CLOUD_MODEL_NOT_ALLOWED", "CLOUD_ACTION_FAILED", "CLOUD_CAPACITY_EXHAUSTED", "CLOUD_RUNTIME_UNAVAILABLE", "CLOUD_RUNTIME_MISMATCH", "CLOUD_SESSION_STALE", "CLOUD_CONTROL_PLANE_ERROR", "CLOUD_CONTRACT_MISMATCH", "CLOUD_PROXY_UNAVAILABLE", "CLOUD_PROXY_REQUIRED", "CLOUD_BILLING_LIMIT_REACHED", "CLOUD_RATE_LIMITED", "CLOUD_BROWSER_PROFILE_NOT_FOUND", "CLOUD_BROWSER_PROFILE_BUSY", "CLOUD_BROWSER_PROFILE_DISABLED", "CLOUD_BROWSER_PROFILE_PROXY_UNAVAILABLE", "CLOUD_BROWSER_PROFILE_SYNC_FAILED", "CLOUD_INTERNAL"];
|
|
27
|
+
type CloudErrorCode = (typeof cloudErrorCodes)[number];
|
|
28
|
+
declare const cloudSessionStatuses: readonly ["provisioning", "active", "closing", "closed", "failed"];
|
|
29
|
+
type CloudSessionStatus = (typeof cloudSessionStatuses)[number];
|
|
30
|
+
declare const cloudSessionContractVersion: "v3";
|
|
31
|
+
type CloudSessionContractVersion = typeof cloudSessionContractVersion;
|
|
32
|
+
declare const cloudSessionSourceTypes: readonly ["agent-thread", "agent-run", "project-agent-run", "local-cloud", "manual"];
|
|
33
|
+
type CloudSessionSourceType = (typeof cloudSessionSourceTypes)[number];
|
|
34
|
+
type CloudSessionVisibilityScope = 'team' | 'owner';
|
|
35
|
+
type CloudProxyMode = 'disabled' | 'optional' | 'required';
|
|
36
|
+
type CloudProxyProtocol = 'http' | 'https' | 'socks5';
|
|
37
|
+
type CloudFingerprintMode = 'off' | 'auto';
|
|
38
|
+
type BrowserProfileStatus = 'active' | 'archived' | 'error';
|
|
39
|
+
type BrowserProfileProxyPolicy = 'strict_sticky';
|
|
40
|
+
type BrowserProfileArchiveFormat = 'tar.gz';
|
|
41
|
+
interface CloudViewport {
|
|
42
|
+
width: number;
|
|
43
|
+
height: number;
|
|
44
|
+
}
|
|
45
|
+
interface CloudGeolocation {
|
|
46
|
+
latitude: number;
|
|
47
|
+
longitude: number;
|
|
48
|
+
accuracy?: number;
|
|
49
|
+
}
|
|
50
|
+
interface CloudBrowserContextConfig {
|
|
51
|
+
viewport?: CloudViewport;
|
|
52
|
+
locale?: string;
|
|
53
|
+
timezoneId?: string;
|
|
54
|
+
geolocation?: CloudGeolocation;
|
|
55
|
+
colorScheme?: 'light' | 'dark' | 'no-preference';
|
|
56
|
+
userAgent?: string;
|
|
57
|
+
javaScriptEnabled?: boolean;
|
|
58
|
+
ignoreHTTPSErrors?: boolean;
|
|
59
|
+
}
|
|
60
|
+
interface CloudBrowserExtensionConfig {
|
|
61
|
+
includeDefaults?: boolean;
|
|
62
|
+
extensionKeys?: string[];
|
|
63
|
+
}
|
|
64
|
+
interface CloudBrowserLaunchConfig {
|
|
65
|
+
headless?: boolean;
|
|
66
|
+
context?: CloudBrowserContextConfig;
|
|
67
|
+
chromeArgs?: string[];
|
|
68
|
+
extensions?: CloudBrowserExtensionConfig;
|
|
69
|
+
}
|
|
70
|
+
interface CloudProxyPreference {
|
|
71
|
+
mode?: CloudProxyMode;
|
|
72
|
+
countryCode?: string;
|
|
73
|
+
region?: string;
|
|
74
|
+
city?: string;
|
|
75
|
+
proxyId?: string;
|
|
76
|
+
}
|
|
77
|
+
interface CloudFingerprintPreference {
|
|
78
|
+
mode?: CloudFingerprintMode;
|
|
79
|
+
locales?: string[];
|
|
80
|
+
minWidth?: number;
|
|
81
|
+
maxWidth?: number;
|
|
82
|
+
minHeight?: number;
|
|
83
|
+
maxHeight?: number;
|
|
84
|
+
slim?: boolean;
|
|
85
|
+
}
|
|
86
|
+
interface CloudBrowserProfileLaunchPreference {
|
|
87
|
+
profileId: string;
|
|
88
|
+
reuseIfActive?: boolean;
|
|
89
|
+
}
|
|
90
|
+
interface CloudSessionLaunchConfig {
|
|
91
|
+
browser?: CloudBrowserLaunchConfig;
|
|
92
|
+
proxy?: CloudProxyPreference;
|
|
93
|
+
fingerprint?: CloudFingerprintPreference;
|
|
94
|
+
browserProfile?: CloudBrowserProfileLaunchPreference;
|
|
95
|
+
}
|
|
96
|
+
interface CloudSessionCreateRequest {
|
|
97
|
+
cloudSessionContractVersion: CloudSessionContractVersion;
|
|
98
|
+
sourceType: 'local-cloud';
|
|
99
|
+
clientSessionHint: string;
|
|
100
|
+
localRunId: string;
|
|
101
|
+
name?: string;
|
|
102
|
+
model?: string;
|
|
103
|
+
launchContext?: Record<string, unknown>;
|
|
104
|
+
launchConfig?: CloudSessionLaunchConfig;
|
|
105
|
+
}
|
|
106
|
+
interface CloudSessionSummary {
|
|
107
|
+
sessionId: string;
|
|
108
|
+
workspaceId: string;
|
|
109
|
+
state: CloudSessionStatus;
|
|
110
|
+
createdAt: number;
|
|
111
|
+
sourceType: CloudSessionSourceType;
|
|
112
|
+
sourceRef?: string;
|
|
113
|
+
label?: string;
|
|
114
|
+
}
|
|
115
|
+
interface CloudSessionCreateResponse {
|
|
116
|
+
sessionId: string;
|
|
117
|
+
actionWsUrl: string;
|
|
118
|
+
cdpWsUrl: string;
|
|
119
|
+
actionToken: string;
|
|
120
|
+
cdpToken: string;
|
|
121
|
+
expiresAt?: number;
|
|
122
|
+
cloudSessionUrl: string;
|
|
123
|
+
cloudSession: CloudSessionSummary;
|
|
124
|
+
}
|
|
125
|
+
interface CloudSelectorCacheImportEntry {
|
|
126
|
+
namespace: string;
|
|
127
|
+
siteOrigin: string;
|
|
128
|
+
method: string;
|
|
129
|
+
descriptionHash: string;
|
|
130
|
+
path: unknown;
|
|
131
|
+
schemaHash?: string;
|
|
132
|
+
createdAt: number;
|
|
133
|
+
updatedAt: number;
|
|
134
|
+
}
|
|
135
|
+
interface CloudSelectorCacheImportRequest {
|
|
136
|
+
entries: CloudSelectorCacheImportEntry[];
|
|
137
|
+
}
|
|
138
|
+
interface CloudSelectorCacheImportResponse {
|
|
139
|
+
imported: number;
|
|
140
|
+
inserted: number;
|
|
141
|
+
updated: number;
|
|
142
|
+
skipped: number;
|
|
143
|
+
}
|
|
144
|
+
interface CloudActionRequest {
|
|
145
|
+
id: number;
|
|
146
|
+
method: CloudActionMethod;
|
|
147
|
+
args: Record<string, unknown>;
|
|
148
|
+
sessionId: string;
|
|
149
|
+
token: string;
|
|
150
|
+
}
|
|
151
|
+
interface CloudActionSuccess {
|
|
152
|
+
id: number;
|
|
153
|
+
ok: true;
|
|
154
|
+
result: unknown;
|
|
155
|
+
}
|
|
156
|
+
interface CloudActionFailure {
|
|
157
|
+
id: number;
|
|
158
|
+
ok: false;
|
|
159
|
+
error: string;
|
|
160
|
+
code: CloudErrorCode;
|
|
161
|
+
details?: CloudActionFailureDetails;
|
|
162
|
+
}
|
|
163
|
+
type CloudActionResponse = CloudActionSuccess | CloudActionFailure;
|
|
164
|
+
interface CloudActionFailureDetails {
|
|
165
|
+
actionFailure?: ActionFailure;
|
|
166
|
+
}
|
|
167
|
+
interface BrowserProfileDescriptor {
|
|
168
|
+
profileId: string;
|
|
169
|
+
teamId: string;
|
|
170
|
+
ownerUserId: string;
|
|
171
|
+
name: string;
|
|
172
|
+
status: BrowserProfileStatus;
|
|
173
|
+
proxyPolicy: BrowserProfileProxyPolicy;
|
|
174
|
+
stickyProxyId?: string;
|
|
175
|
+
proxyCountryCode?: string;
|
|
176
|
+
proxyRegion?: string;
|
|
177
|
+
proxyCity?: string;
|
|
178
|
+
fingerprintMode: CloudFingerprintMode;
|
|
179
|
+
fingerprintHash?: string;
|
|
180
|
+
activeSessionId?: string;
|
|
181
|
+
lastSessionId?: string;
|
|
182
|
+
lastLaunchedAt?: number;
|
|
183
|
+
latestRevision?: number;
|
|
184
|
+
latestStorageId?: string;
|
|
185
|
+
latestSizeBytes?: number;
|
|
186
|
+
latestArchiveSha256?: string;
|
|
187
|
+
latestArchiveFormat?: BrowserProfileArchiveFormat;
|
|
188
|
+
createdAt: number;
|
|
189
|
+
updatedAt: number;
|
|
190
|
+
lastError?: string;
|
|
191
|
+
}
|
|
192
|
+
interface BrowserProfileListResponse {
|
|
193
|
+
profiles: BrowserProfileDescriptor[];
|
|
194
|
+
nextCursor?: string;
|
|
195
|
+
}
|
|
196
|
+
interface BrowserProfileCreateRequest {
|
|
197
|
+
name: string;
|
|
198
|
+
proxy?: {
|
|
199
|
+
proxyId?: string;
|
|
200
|
+
countryCode?: string;
|
|
201
|
+
region?: string;
|
|
202
|
+
city?: string;
|
|
203
|
+
};
|
|
204
|
+
fingerprint?: {
|
|
205
|
+
mode?: CloudFingerprintMode;
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
declare function isCloudActionMethod(value: unknown): value is CloudActionMethod;
|
|
209
|
+
declare function isCloudErrorCode(value: unknown): value is CloudErrorCode;
|
|
210
|
+
declare function isCloudSessionSourceType(value: unknown): value is CloudSessionSourceType;
|
|
211
|
+
declare function isCloudSessionStatus(value: unknown): value is CloudSessionStatus;
|
|
212
|
+
|
|
213
|
+
interface BrowserProfileListRequest {
|
|
214
|
+
cursor?: string;
|
|
215
|
+
limit?: number;
|
|
216
|
+
status?: BrowserProfileStatus;
|
|
217
|
+
}
|
|
218
|
+
declare class BrowserProfileClient {
|
|
219
|
+
private readonly baseUrl;
|
|
220
|
+
private readonly key;
|
|
221
|
+
private readonly authScheme;
|
|
222
|
+
constructor(baseUrl: string, key: string, authScheme?: OpensteerAuthScheme);
|
|
223
|
+
list(request?: BrowserProfileListRequest): Promise<BrowserProfileListResponse>;
|
|
224
|
+
get(profileId: string): Promise<BrowserProfileDescriptor>;
|
|
225
|
+
create(request: BrowserProfileCreateRequest): Promise<BrowserProfileDescriptor>;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export { type ActionFailure as A, type BrowserProfileStatus as B, type CloudErrorCode as C, type CloudFingerprintMode as D, type CloudFingerprintPreference as E, type CloudGeolocation as F, type CloudProxyMode as G, type CloudProxyPreference as H, type CloudProxyProtocol as I, type CloudSessionContractVersion as J, type CloudSessionLaunchConfig as K, type CloudSessionSourceType as L, type CloudSessionStatus as M, type CloudSessionSummary as N, type CloudSessionVisibilityScope as O, type CloudViewport as P, cloudActionMethods as Q, cloudErrorCodes as R, cloudSessionContractVersion as S, cloudSessionSourceTypes as T, cloudSessionStatuses as U, isCloudActionMethod as V, isCloudErrorCode as W, isCloudSessionSourceType as X, isCloudSessionStatus as Y, type BrowserProfileListRequest as a, type BrowserProfileListResponse as b, type BrowserProfileCreateRequest as c, type BrowserProfileDescriptor as d, type ActionFailureCode as e, type CloudActionFailureDetails as f, type CloudSessionCreateRequest as g, type CloudSessionCreateResponse as h, type CloudSelectorCacheImportRequest as i, type CloudSelectorCacheImportResponse as j, type CloudActionMethod as k, type CloudSelectorCacheImportEntry as l, type ActionFailureBlocker as m, type ActionFailureClassificationSource as n, type ActionFailureDetails as o, type BrowserProfileArchiveFormat as p, BrowserProfileClient as q, type BrowserProfileProxyPolicy as r, type CloudActionFailure as s, type CloudActionRequest as t, type CloudActionResponse as u, type CloudActionSuccess as v, type CloudBrowserContextConfig as w, type CloudBrowserExtensionConfig as x, type CloudBrowserLaunchConfig as y, type CloudBrowserProfileLaunchPreference as z };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OpensteerCloudError,
|
|
3
3
|
cloudNotLaunchedError,
|
|
4
|
+
cloudSessionContractVersion,
|
|
4
5
|
cloudUnsupportedMethodError,
|
|
5
6
|
createCloudRuntimeState,
|
|
6
7
|
extractErrorMessage,
|
|
@@ -11,8 +12,9 @@ import {
|
|
|
11
12
|
resolveConfigWithEnv,
|
|
12
13
|
resolveNamespace,
|
|
13
14
|
resolveNamespaceDir,
|
|
14
|
-
selectCloudCredential
|
|
15
|
-
|
|
15
|
+
selectCloudCredential,
|
|
16
|
+
withTokenQuery
|
|
17
|
+
} from "./chunk-LTREUXLO.js";
|
|
16
18
|
import {
|
|
17
19
|
detectChromePaths,
|
|
18
20
|
expandHome,
|
|
@@ -6004,9 +6006,6 @@ var OpensteerActionError = class extends Error {
|
|
|
6004
6006
|
}
|
|
6005
6007
|
};
|
|
6006
6008
|
|
|
6007
|
-
// src/cloud/contracts.ts
|
|
6008
|
-
var cloudSessionContractVersion = "v3";
|
|
6009
|
-
|
|
6010
6009
|
// src/cloud/action-ws-client.ts
|
|
6011
6010
|
import WebSocket2 from "ws";
|
|
6012
6011
|
var ActionWsClient = class _ActionWsClient {
|
|
@@ -6136,11 +6135,6 @@ function rawDataToUtf8(raw) {
|
|
|
6136
6135
|
if (Array.isArray(raw)) return Buffer.concat(raw).toString("utf8");
|
|
6137
6136
|
return raw.toString("utf8");
|
|
6138
6137
|
}
|
|
6139
|
-
function withTokenQuery(wsUrl, token) {
|
|
6140
|
-
const url = new URL(wsUrl);
|
|
6141
|
-
url.searchParams.set("token", token);
|
|
6142
|
-
return url.toString();
|
|
6143
|
-
}
|
|
6144
6138
|
|
|
6145
6139
|
// src/cloud/local-cache-sync.ts
|
|
6146
6140
|
import fs2 from "fs";
|
|
@@ -12997,7 +12991,6 @@ export {
|
|
|
12997
12991
|
getPageTitle,
|
|
12998
12992
|
performFileUpload,
|
|
12999
12993
|
OpensteerActionError,
|
|
13000
|
-
cloudSessionContractVersion,
|
|
13001
12994
|
ActionWsClient,
|
|
13002
12995
|
collectLocalSelectorCacheEntries,
|
|
13003
12996
|
OpensteerAgentError,
|