@hyperbrowser/sdk 1.2.0 → 1.2.2
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 +109 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +2 -0
- package/dist/error.d.ts +3 -0
- package/dist/error.js +5 -1
- package/dist/sandbox/process.d.ts +65 -3
- package/dist/sandbox/process.js +248 -4
- package/dist/sandbox/secret-references.d.ts +15 -0
- package/dist/sandbox/secret-references.js +56 -0
- package/dist/secrets-envelope.d.ts +25 -0
- package/dist/secrets-envelope.js +124 -0
- package/dist/services/base.js +51 -3
- package/dist/services/sandboxes.d.ts +10 -1
- package/dist/services/sandboxes.js +61 -2
- package/dist/services/secrets.d.ts +39 -0
- package/dist/services/secrets.js +203 -0
- package/dist/types/agents/gemini-computer-use.d.ts +2 -1
- package/dist/types/constants.d.ts +3 -2
- package/dist/types/index.d.ts +4 -3
- package/dist/types/sandbox.d.ts +42 -0
- package/dist/types/secret.d.ts +67 -0
- package/dist/types/secret.js +2 -0
- package/dist/types/session.d.ts +44 -0
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -11,12 +11,13 @@ export { StartGeminiComputerUseTaskParams, StartGeminiComputerUseTaskResponse, G
|
|
|
11
11
|
export { StartGrokComputerUseTaskParams, StartGrokComputerUseTaskResponse, GrokComputerUseTaskStatusResponse, GrokComputerUseTaskResponse, GrokComputerUseTaskData, GrokComputerUseStepResponse, GrokComputerUseApiKeys, GrokComputerUseTaskMetadata, } from "./agents/grok-computer-use";
|
|
12
12
|
export { StartMetaComputerUseTaskParams, StartMetaComputerUseTaskResponse, MetaComputerUseTaskStatusResponse, MetaComputerUseTaskResponse, MetaComputerUseTaskData, MetaComputerUseStepResponse, MetaComputerUseStepError, MetaComputerUseStepIncompleteDetails, MetaComputerUseStepReasoning, MetaComputerUseApiKeys, MetaComputerUseTaskMetadata, } from "./agents/meta-computer-use";
|
|
13
13
|
export { StartJevComputerUseTaskParams, StartJevComputerUseTaskResponse, JevComputerUseTaskStatusResponse, JevComputerUseTaskResponse, JevComputerUseTaskData, JevComputerUseStepResponse, JevComputerUseApiKeys, JevComputerUseTaskMetadata, } from "./agents/jev-computer-use";
|
|
14
|
-
export { BasicResponse, BrowserMemorySize, SessionStatus, Session, SessionDetail, SessionGetParams, SessionListParams, SessionListResponse, ScreenConfig, CaptchaEvaluationPageResult, CaptchaEvaluationParams, CaptchaEvaluationResponse, CaptchaEvaluationTarget, CaptchaEvaluationType, CaptchaSolverType, CreateSessionParams, CreateSessionSnapshotResponse, GetSessionDownloadsUrlResponse, GetSessionVideoRecordingUrlResponse, GetSessionRecordingUrlResponse, ImageCaptchaParam, UploadFileResponse, UploadFileOptions, GetActiveSessionsCountResponse, SessionEventLogListParams, SessionEventLogListResponse, SessionEventLog, SessionProfile, SessionLaunchState, SessionCreditBreakdown, StartSessionFromSnapshotParams, UpdateSessionProfileParams, UpdateSessionProxyLocationParams, UpdateSessionProxyParams, UpdateSessionScreenParams, UpdateSessionSolveCaptchasParams, UpdateSessionSolveCaptchasResponse, } from "./session";
|
|
15
|
-
export { SandboxStatus, SandboxRuntimeTarget, SandboxNetworkPolicy, SandboxNetworkPolicyPatch, SandboxNetworkUpdateResult, Sandbox, SandboxDetail, SandboxVolumeMountType, SandboxVolumeMount, SandboxListParams, SandboxListResponse, SandboxImageSource, SandboxImageSummary, SandboxImageListParams, SandboxImageListResponse, SandboxSnapshotStatus, SandboxSnapshotSummary, SandboxSnapshotListParams, SandboxSnapshotListResponse, SandboxSnapshotDeleteResult, SandboxImageDeleteResult, SandboxImageInit, SandboxImageBuildStatus, SandboxImageBuildInputFormat, SandboxImageBuildSourcePlatform, SandboxImageBuildUpload, SandboxImageBuild, SandboxBuildContextBundle, SandboxBuildContextMode, SandboxBuildContextManifest, SandboxDockerImageConfig, SandboxDockerImageLayer, SandboxDockerImageManifest, CreateSandboxImageBuildParams, ReuseSandboxDockerImageParams, CompleteSandboxImageBuildParams, SandboxImageBuildCreateResult, SandboxDockerImageReuseResult, SandboxImageBuildResolutionOutcome, SandboxImageBuildResolution, SandboxImageBuildWaitOptions, BuildSandboxImageFromDockerImageOptions, BuildSandboxImageFromDockerfileOptions, GetOrBuildSandboxImageOptions, SandboxImageBuildListParams, SandboxImageBuildListResponse, CreateSandboxParams, SandboxMemorySnapshotParams, SandboxMemorySnapshotResult, SandboxExposeParams, SandboxExposeResult, SandboxUnexposeResult, SandboxProcessStatus, SandboxExecParams, SandboxExecOptions, SandboxProcessSummary, SandboxProcessResult, SandboxProcessListParams, SandboxProcessListResponse, SandboxProcessWaitParams, SandboxProcessSignal, SandboxProcessStdinParams, SandboxProcessOutputEvent, SandboxProcessExitEvent, SandboxProcessStreamEvent, SandboxFileType, SandboxFileInfo, SandboxFileWriteInfo, SandboxFileListOptions, SandboxFileReadFormat, SandboxFileReadOptions, SandboxFileWriteData, SandboxFileWriteEntry, SandboxFileTextWriteOptions, SandboxFileBytesWriteOptions, SandboxFileMakeDirOptions, SandboxFileCopyParams, SandboxFileChmodParams, SandboxFileChownParams, SandboxFileTransferResult, SandboxFileSystemEventType, SandboxFileSystemEvent, SandboxWatchDirOptions, SandboxPresignFileParams, SandboxPresignedUrl, SandboxTerminalCreateParams, SandboxTerminalOutputChunk, SandboxTerminalStatus, SandboxTerminalWaitParams, SandboxTerminalKillParams, SandboxTerminalEvent, } from "./sandbox";
|
|
14
|
+
export { BasicResponse, BrowserMemorySize, SessionStatus, Session, SessionDetail, SessionGetParams, SessionListParams, SessionListResponse, ScreenConfig, CaptchaEvaluationPageResult, CaptchaEvaluationParams, CaptchaEvaluationResponse, CaptchaEvaluationTarget, CaptchaEvaluationType, CaptchaSolverType, CreateSessionParams, CreateSessionSnapshotResponse, GetSessionDownloadsUrlResponse, GetSessionVideoRecordingUrlResponse, GetSessionRecordingUrlResponse, ImageCaptchaParam, UploadFileResponse, UploadFileOptions, GetActiveSessionsCountResponse, SessionEventLogListParams, SessionEventLogListResponse, SessionEventLog, SessionProfile, SessionLaunchState, SessionWebBotAuth, SessionCreditBreakdown, StartSessionFromSnapshotParams, WebBotAuthParams, ProxyRoute, UpdateSessionProfileParams, UpdateSessionProxyLocationParams, UpdateSessionProxyParams, UpdateSessionScreenParams, UpdateSessionSolveCaptchasParams, UpdateSessionSolveCaptchasResponse, } from "./session";
|
|
15
|
+
export { SandboxStatus, SandboxRuntimeTarget, SandboxNetworkPolicy, SandboxNetworkPolicyPatch, SandboxNetworkUpdateResult, Sandbox, SandboxDetail, SandboxVolumeMountType, SandboxVolumeMount, SandboxSecretReference, SandboxSecrets, SandboxResolvedSecret, SandboxListParams, SandboxListResponse, SandboxImageSource, SandboxImageSummary, SandboxImageListParams, SandboxImageListResponse, SandboxSnapshotStatus, SandboxSnapshotSummary, SandboxSnapshotListParams, SandboxSnapshotListResponse, SandboxSnapshotDeleteResult, SandboxImageDeleteResult, SandboxImageInit, SandboxImageBuildStatus, SandboxImageBuildInputFormat, SandboxImageBuildSourcePlatform, SandboxImageBuildUpload, SandboxImageBuild, SandboxBuildContextBundle, SandboxBuildContextMode, SandboxBuildContextManifest, SandboxDockerImageConfig, SandboxDockerImageLayer, SandboxDockerImageManifest, CreateSandboxImageBuildParams, ReuseSandboxDockerImageParams, CompleteSandboxImageBuildParams, SandboxImageBuildCreateResult, SandboxDockerImageReuseResult, SandboxImageBuildResolutionOutcome, SandboxImageBuildResolution, SandboxImageBuildWaitOptions, BuildSandboxImageFromDockerImageOptions, BuildSandboxImageFromDockerfileOptions, GetOrBuildSandboxImageOptions, SandboxImageBuildListParams, SandboxImageBuildListResponse, CreateSandboxParams, SandboxMemorySnapshotParams, SandboxMemorySnapshotResult, SandboxExposeParams, SandboxExposeResult, SandboxUnexposeResult, SandboxProcessStatus, SandboxExecParams, SandboxExecOptions, SandboxProcessSummary, SandboxProcessResult, SandboxProcessListParams, SandboxProcessListResponse, SandboxProcessWaitParams, SandboxProcessSignal, SandboxProcessStdinParams, SandboxProcessOutputEvent, SandboxProcessExitEvent, SandboxProcessStreamEvent, SandboxFileType, SandboxFileInfo, SandboxFileWriteInfo, SandboxFileListOptions, SandboxFileReadFormat, SandboxFileReadOptions, SandboxFileWriteData, SandboxFileWriteEntry, SandboxFileTextWriteOptions, SandboxFileBytesWriteOptions, SandboxFileMakeDirOptions, SandboxFileCopyParams, SandboxFileChmodParams, SandboxFileChownParams, SandboxFileTransferResult, SandboxFileSystemEventType, SandboxFileSystemEvent, SandboxWatchDirOptions, SandboxPresignFileParams, SandboxPresignedUrl, SandboxTerminalCreateParams, SandboxTerminalOutputChunk, SandboxTerminalStatus, SandboxTerminalWaitParams, SandboxTerminalKillParams, SandboxTerminalEvent, } from "./sandbox";
|
|
16
16
|
export { CreateVolumeParams, Volume, VolumeListParams, VolumeListResponse, VolumeDeleteResult, } from "./volume";
|
|
17
|
+
export { SecretValue, SecretsPublicKey, SecretsPublicKeyJwk, Secret, SecretVersion, SecretDetail, CreateSecretParams, UpdateSecretParams, SecretListParams, SecretListResponse, SecretDeleteResult, SecretVersionDeleteResult, } from "./secret";
|
|
17
18
|
export { CreateProfileParams, ForkProfileParams, ProfileResponse, CreateProfileResponse, ProfileListParams, ProfileListResponse, } from "./profile";
|
|
18
19
|
export { CreateExtensionParams, CreateExtensionResponse, ListExtensionsResponse, } from "./extension";
|
|
19
|
-
export { ExtractJobStatus, BrowserUseTaskStatus, BrowserUseLlm, ClaudeComputerUseLlm, ClaudeComputerUseReasoningEffort, CuaLlm, CuaReasoningEffort, GeminiComputerUseLlm, GrokComputerUseLlm, GrokReasoningEffort, MetaComputerUseLlm, MetaReasoningEffort, JevComputerUseLlm, JevTextLlm, ScrapeScreenshotFormat, ScrapeJobStatus, CrawlJobStatus, Country, State, ISO639_1, OperatingSystem, Platform, ScrapeFormat, ScrapeWaitUntil, ScrapePageStatus, CrawlPageStatus, RecordingStatus, DownloadsStatus, HyperAgentLlm, HyperAgentTaskStatus, ClaudeComputerUseTaskStatus, CuaTaskStatus, GeminiComputerUseTaskStatus, GrokComputerUseTaskStatus, MetaComputerUseTaskStatus, JevComputerUseTaskStatus, SessionEventLogType, SessionRegion, BrowserUseVersion, HyperAgentVersion, } from "./constants";
|
|
20
|
+
export { ExtractJobStatus, BrowserUseTaskStatus, BrowserUseLlm, ClaudeComputerUseLlm, ClaudeComputerUseReasoningEffort, CuaLlm, CuaReasoningEffort, GeminiComputerUseLlm, GeminiComputerUseReasoningEffort, GrokComputerUseLlm, GrokReasoningEffort, MetaComputerUseLlm, MetaReasoningEffort, JevComputerUseLlm, JevTextLlm, ScrapeScreenshotFormat, ScrapeJobStatus, CrawlJobStatus, Country, State, ISO639_1, OperatingSystem, Platform, ScrapeFormat, ScrapeWaitUntil, ScrapePageStatus, CrawlPageStatus, RecordingStatus, DownloadsStatus, HyperAgentLlm, HyperAgentTaskStatus, ClaudeComputerUseTaskStatus, CuaTaskStatus, GeminiComputerUseTaskStatus, GrokComputerUseTaskStatus, MetaComputerUseTaskStatus, JevComputerUseTaskStatus, SessionEventLogType, SessionRegion, BrowserUseVersion, HyperAgentVersion, } from "./constants";
|
|
20
21
|
export { TeamCreditInfo } from "./team";
|
|
21
22
|
export { ComputerAction, Coordinate, ClickActionParams, DragActionParams, PressKeysActionParams, MoveMouseActionParams, ScreenshotActionParams, CursorPositionActionParams, ScrollAtCursorActionParams, ScrollActionParams, TypeTextActionParams, ComputerActionParams, ComputerActionResponse, ComputerActionMouseButton, ComputerActionResponseData, HoldKeyActionParams, MouseDownActionParams, MouseUpActionParams, GetClipboardTextActionParams, PutSelectionTextActionParams, ComputerActionResponseDataClipboardText, ListWindowsActionParams, ComputerActionWindow, ComputerActionResponseDataListWindows, ComputerActionResponseDataCursorPosition, } from "./computer-action";
|
|
22
23
|
export { FetchParams, FetchResponse, FetchResponseData, FetchStatus } from "./web/fetch";
|
package/dist/types/sandbox.d.ts
CHANGED
|
@@ -59,12 +59,34 @@ export interface Sandbox {
|
|
|
59
59
|
network?: SandboxNetworkPolicy | null;
|
|
60
60
|
runtime: SandboxRuntimeTarget;
|
|
61
61
|
exposedPorts: SandboxExposeResult[];
|
|
62
|
+
/**
|
|
63
|
+
* Secrets were delivered into the sandbox, or it was restored from a
|
|
64
|
+
* snapshot that may hold them.
|
|
65
|
+
*/
|
|
66
|
+
containsSecrets?: boolean;
|
|
62
67
|
}
|
|
63
68
|
export interface SandboxDetail extends Sandbox {
|
|
64
69
|
token: string | null;
|
|
65
70
|
tokenExpiresAt: string | null;
|
|
66
71
|
}
|
|
67
72
|
export type SandboxVolumeMountType = "rw" | "ro";
|
|
73
|
+
/**
|
|
74
|
+
* A stored secret to deliver as an environment variable: its name, or
|
|
75
|
+
* `{ name, version }` to pin a version. The latest version is used otherwise.
|
|
76
|
+
*/
|
|
77
|
+
export type SandboxSecretReference = string | {
|
|
78
|
+
name: string;
|
|
79
|
+
version?: number | "latest";
|
|
80
|
+
};
|
|
81
|
+
/** Environment variable name to secret, at most 32 per process or sandbox. */
|
|
82
|
+
export type SandboxSecrets = Record<string, SandboxSecretReference>;
|
|
83
|
+
/** The secret version an environment variable received. */
|
|
84
|
+
export interface SandboxResolvedSecret {
|
|
85
|
+
env: string;
|
|
86
|
+
name: string;
|
|
87
|
+
secretId: string;
|
|
88
|
+
version: number;
|
|
89
|
+
}
|
|
68
90
|
export interface SandboxVolumeMount {
|
|
69
91
|
id: string;
|
|
70
92
|
type?: SandboxVolumeMountType;
|
|
@@ -89,6 +111,7 @@ export type CreateSandboxParams = (SandboxCreateCommonParams & {
|
|
|
89
111
|
cpu?: never;
|
|
90
112
|
memoryMiB?: never;
|
|
91
113
|
diskMiB?: never;
|
|
114
|
+
secrets?: never;
|
|
92
115
|
}) | (SandboxCreateCommonParams & {
|
|
93
116
|
snapshotName?: never;
|
|
94
117
|
snapshotId?: never;
|
|
@@ -97,6 +120,12 @@ export type CreateSandboxParams = (SandboxCreateCommonParams & {
|
|
|
97
120
|
cpu?: number;
|
|
98
121
|
memoryMiB?: number;
|
|
99
122
|
diskMiB?: number;
|
|
123
|
+
/**
|
|
124
|
+
* Secrets for the image's startup command only; requires the API key's
|
|
125
|
+
* `secrets.use` scope and is not supported with `runtimeClass:
|
|
126
|
+
* "gvisor-cpu"`. The sandbox is marked as containing secrets.
|
|
127
|
+
*/
|
|
128
|
+
secrets?: SandboxSecrets;
|
|
100
129
|
});
|
|
101
130
|
export interface SandboxListParams {
|
|
102
131
|
status?: SandboxStatus;
|
|
@@ -157,6 +186,8 @@ export interface SandboxSnapshotSummary {
|
|
|
157
186
|
compatibilityTag?: string | null;
|
|
158
187
|
metadata: Record<string, unknown>;
|
|
159
188
|
uploaded: boolean;
|
|
189
|
+
/** The snapshot's memory may hold secrets. */
|
|
190
|
+
containsSecrets?: boolean;
|
|
160
191
|
createdAt: string;
|
|
161
192
|
updatedAt: string;
|
|
162
193
|
}
|
|
@@ -409,6 +440,17 @@ export interface SandboxExecParams {
|
|
|
409
440
|
timeoutMs?: number;
|
|
410
441
|
timeoutSec?: number;
|
|
411
442
|
runAs?: string;
|
|
443
|
+
/**
|
|
444
|
+
* Stored secrets to deliver as environment variables of this process only.
|
|
445
|
+
* The process is started through the control API, which has the sandbox
|
|
446
|
+
* service decrypt them; requires the API key's `secrets.use` scope. Anything
|
|
447
|
+
* running as the same user (or root) in the sandbox can read the process's
|
|
448
|
+
* environment, and the sandbox is marked as containing secrets.
|
|
449
|
+
*
|
|
450
|
+
* Output is read back from the process's retained output rather than the
|
|
451
|
+
* start stream, so `maxOutputBytes` does not apply.
|
|
452
|
+
*/
|
|
453
|
+
secrets?: SandboxSecrets;
|
|
412
454
|
/** @deprecated Ignored for process APIs. */
|
|
413
455
|
useShell?: boolean;
|
|
414
456
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/** A secret value: a UTF-8 string or its raw bytes, used byte-for-byte. */
|
|
2
|
+
export type SecretValue = string | Uint8Array;
|
|
3
|
+
export interface SecretsPublicKeyJwk {
|
|
4
|
+
kty: string;
|
|
5
|
+
n: string;
|
|
6
|
+
e: string;
|
|
7
|
+
}
|
|
8
|
+
/** The platform key that secret values are encrypted to before upload. */
|
|
9
|
+
export interface SecretsPublicKey {
|
|
10
|
+
kid: string;
|
|
11
|
+
alg: string;
|
|
12
|
+
enc: string;
|
|
13
|
+
jwk: SecretsPublicKeyJwk;
|
|
14
|
+
}
|
|
15
|
+
export interface Secret {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
/** Bound into every envelope for this secret; the SDK uses it when encrypting. */
|
|
20
|
+
encryptionContext: string;
|
|
21
|
+
/** Null until a value is stored. */
|
|
22
|
+
latestVersion: number | null;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
updatedAt: string;
|
|
25
|
+
}
|
|
26
|
+
export interface SecretVersion {
|
|
27
|
+
version: number;
|
|
28
|
+
kid: string;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
}
|
|
31
|
+
export interface SecretDetail extends Secret {
|
|
32
|
+
versions: SecretVersion[];
|
|
33
|
+
}
|
|
34
|
+
export interface CreateSecretParams {
|
|
35
|
+
/** 1-128 letters, digits, '_' or '-', starting with a letter or digit. */
|
|
36
|
+
name: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The first version's value. It is validated and the platform key is checked
|
|
40
|
+
* before the secret is created, then encrypted locally and uploaded.
|
|
41
|
+
*/
|
|
42
|
+
value?: SecretValue;
|
|
43
|
+
}
|
|
44
|
+
export interface UpdateSecretParams {
|
|
45
|
+
description: string;
|
|
46
|
+
}
|
|
47
|
+
export interface SecretListParams {
|
|
48
|
+
search?: string;
|
|
49
|
+
page?: number;
|
|
50
|
+
/** At most 100. */
|
|
51
|
+
limit?: number;
|
|
52
|
+
}
|
|
53
|
+
export interface SecretListResponse {
|
|
54
|
+
secrets: Secret[];
|
|
55
|
+
totalCount: number;
|
|
56
|
+
page: number;
|
|
57
|
+
perPage: number;
|
|
58
|
+
}
|
|
59
|
+
export interface SecretDeleteResult {
|
|
60
|
+
deleted: boolean;
|
|
61
|
+
id: string;
|
|
62
|
+
name: string;
|
|
63
|
+
}
|
|
64
|
+
export interface SecretVersionDeleteResult {
|
|
65
|
+
deleted: boolean;
|
|
66
|
+
version: number;
|
|
67
|
+
}
|
package/dist/types/session.d.ts
CHANGED
|
@@ -9,8 +9,17 @@ export interface SessionProfile {
|
|
|
9
9
|
id: string;
|
|
10
10
|
persistChanges?: boolean;
|
|
11
11
|
}
|
|
12
|
+
/** How a session signs its requests with Web Bot Auth. */
|
|
13
|
+
export interface SessionWebBotAuth {
|
|
14
|
+
/** The identity the session signs as, e.g. "https://www.hyperbrowser.ai". */
|
|
15
|
+
signatureAgent: string;
|
|
16
|
+
/** Present when signing is limited to these hostnames and their subdomains. */
|
|
17
|
+
onlyDomains?: string[];
|
|
18
|
+
}
|
|
12
19
|
export interface SessionLaunchState {
|
|
13
20
|
enableWebMcp?: boolean;
|
|
21
|
+
/** Present only for a session that signs its requests with Web Bot Auth. */
|
|
22
|
+
webBotAuth?: SessionWebBotAuth;
|
|
14
23
|
useUltraStealth?: boolean;
|
|
15
24
|
useStealth?: boolean;
|
|
16
25
|
useProxy?: boolean;
|
|
@@ -128,9 +137,44 @@ export interface CaptchaEvaluationResponse {
|
|
|
128
137
|
export interface StartSessionFromSnapshotParams {
|
|
129
138
|
snapshotId: string;
|
|
130
139
|
}
|
|
140
|
+
export interface WebBotAuthParams {
|
|
141
|
+
/**
|
|
142
|
+
* Sign only requests to these hostnames (e.g. "example.com") and their
|
|
143
|
+
* subdomains. No scheme, port or path; at most 50.
|
|
144
|
+
*/
|
|
145
|
+
onlyDomains?: string[];
|
|
146
|
+
}
|
|
147
|
+
export interface ProxyRoute {
|
|
148
|
+
/**
|
|
149
|
+
* The hosts this route applies to: a hostname, "*.example.com" (subdomains,
|
|
150
|
+
* not example.com itself) or "*" (every host), or a list of them.
|
|
151
|
+
*/
|
|
152
|
+
match: string | string[];
|
|
153
|
+
/**
|
|
154
|
+
* "direct" sends the traffic straight out of the browser's machine;
|
|
155
|
+
* "default" sends it through the session's proxy.
|
|
156
|
+
*/
|
|
157
|
+
proxy: "direct" | "default";
|
|
158
|
+
}
|
|
131
159
|
export interface CreateSessionParams {
|
|
132
160
|
/** Enable page-provided WebMCP tools. Defaults to false on the server. */
|
|
133
161
|
enableWebMcp?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Sign the session's requests with Web Bot Auth so websites can verify they
|
|
164
|
+
* come from Hyperbrowser. Pass `{ onlyDomains }` to sign only for those
|
|
165
|
+
* hosts. Requires Web Bot Auth to be enabled for your team; works for
|
|
166
|
+
* sessions and agent tasks, and cannot be combined with `useUltraStealth`
|
|
167
|
+
* or `startFromSnapshot`.
|
|
168
|
+
*/
|
|
169
|
+
webBotAuth?: boolean | WebBotAuthParams;
|
|
170
|
+
/**
|
|
171
|
+
* Choose, per host, whether the session's traffic goes through its proxy or
|
|
172
|
+
* straight out. The first route that matches a host decides; hosts that no
|
|
173
|
+
* route matches use the proxy. Requires `useProxy` and proxy routes to be
|
|
174
|
+
* enabled for your team, only applies when creating a session, and cannot
|
|
175
|
+
* be combined with `allowInternetAccess: false`, `allowOut` or `denyOut`.
|
|
176
|
+
*/
|
|
177
|
+
proxyRoutes?: ProxyRoute[];
|
|
134
178
|
useUltraStealth?: boolean;
|
|
135
179
|
useStealth?: boolean;
|
|
136
180
|
useProxy?: boolean;
|