@hyperbrowser/sdk 0.79.0 → 0.80.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.
@@ -76,5 +76,11 @@ export declare class SessionsService extends BaseService {
76
76
  * @param durationMinutes The duration in minutes to extend the session by
77
77
  */
78
78
  extendSession(id: string, durationMinutes: number): Promise<BasicResponse>;
79
+ /**
80
+ * Update the profile parameters of a session
81
+ * @param id The ID of the session to update the profile parameters of
82
+ * @param persistChanges Whether to persist the changes to the profile
83
+ */
84
+ updateProfileParams(id: string, persistChanges: boolean): Promise<BasicResponse>;
79
85
  }
80
86
  export {};
@@ -317,5 +317,24 @@ class SessionsService extends base_1.BaseService {
317
317
  throw new client_1.HyperbrowserError(`Failed to extend session ${id}`, undefined);
318
318
  }
319
319
  }
320
+ /**
321
+ * Update the profile parameters of a session
322
+ * @param id The ID of the session to update the profile parameters of
323
+ * @param persistChanges Whether to persist the changes to the profile
324
+ */
325
+ async updateProfileParams(id, persistChanges) {
326
+ try {
327
+ return await this.request(`/session/${id}/update`, {
328
+ method: "PUT",
329
+ body: JSON.stringify({ type: "profile", params: { persistChanges } }),
330
+ });
331
+ }
332
+ catch (error) {
333
+ if (error instanceof client_1.HyperbrowserError) {
334
+ throw error;
335
+ }
336
+ throw new client_1.HyperbrowserError(`Failed to update profile for session ${id}`, undefined);
337
+ }
338
+ }
320
339
  }
321
340
  exports.SessionsService = SessionsService;
@@ -1,4 +1,4 @@
1
- import { HyperAgentLlm, HyperAgentTaskStatus } from "../constants";
1
+ import { HyperAgentLlm, HyperAgentTaskStatus, HyperAgentVersion } from "../constants";
2
2
  import { CreateSessionParams } from "../session";
3
3
  export interface HyperAgentApiKeys {
4
4
  openai?: string;
@@ -7,9 +7,11 @@ export interface HyperAgentApiKeys {
7
7
  }
8
8
  export interface StartHyperAgentTaskParams {
9
9
  task: string;
10
+ version?: HyperAgentVersion;
10
11
  llm?: HyperAgentLlm;
11
12
  sessionId?: string;
12
13
  maxSteps?: number;
14
+ enableVisualMode?: boolean;
13
15
  keepBrowserOpen?: boolean;
14
16
  sessionOptions?: CreateSessionParams;
15
17
  useCustomApiKeys?: boolean;
@@ -35,13 +37,23 @@ export interface HyperAgentOutput {
35
37
  [x: string]: any;
36
38
  }[];
37
39
  }
40
+ export interface HyperAgentOutputV110 {
41
+ thoughts: string;
42
+ memory: string;
43
+ action: Record<string, unknown>;
44
+ }
38
45
  export interface HyperAgentStep {
39
46
  idx: number;
40
47
  agentOutput: HyperAgentOutput;
41
48
  actionOutputs: HyperAgentActionOutput[];
42
49
  }
50
+ export interface HyperAgentStepV110 {
51
+ idx: number;
52
+ agentOutput: HyperAgentOutputV110;
53
+ actionOutput: HyperAgentActionOutput;
54
+ }
43
55
  export interface HyperAgentTaskData {
44
- steps: HyperAgentStep[];
56
+ steps: HyperAgentStep[] | HyperAgentStepV110[];
45
57
  finalResult: string | null;
46
58
  }
47
59
  export interface HyperAgentTaskMetadata {
@@ -18,7 +18,8 @@ export declare const POLLING_ATTEMPTS = 5;
18
18
  export type BrowserUseVersion = "0.1.40" | "0.7.10" | "latest";
19
19
  export type BrowserUseLlm = "gpt-4o" | "gpt-4o-mini" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-5" | "gpt-5-mini" | "claude-sonnet-4-5" | "claude-sonnet-4-20250514" | "claude-3-7-sonnet-20250219" | "claude-3-5-sonnet-20241022" | "claude-3-5-haiku-20241022" | "gemini-2.0-flash" | "gemini-2.5-flash";
20
20
  export type ClaudeComputerUseLlm = "claude-opus-4-5" | "claude-haiku-4-5-20251001" | "claude-sonnet-4-5" | "claude-sonnet-4-20250514" | "claude-3-7-sonnet-20250219";
21
- export type HyperAgentLlm = "gpt-5.1" | "gpt-5" | "gpt-5-mini" | "gpt-4o" | "gpt-4o-mini" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano";
21
+ export type HyperAgentVersion = "0.8.0" | "1.1.0";
22
+ export type HyperAgentLlm = "gpt-5.2" | "gpt-5.1" | "gpt-5" | "gpt-5-mini" | "gpt-4o" | "gpt-4o-mini" | "gpt-4.1" | "gpt-4.1-mini" | "gpt-4.1-nano" | "claude-sonnet-4-5" | "claude-sonnet-4-20250514" | "gemini-2.0-flash" | "gemini-2.5-flash" | "gemini-2.5-pro";
22
23
  export type GeminiComputerUseLlm = "gemini-2.5-computer-use-preview-10-2025";
23
24
  export type SessionRegion = "us-central" | "asia-south" | "us-dev" | "europe-west" | "us-west" | "us-east";
24
25
  export type Country = "AD" | "AE" | "AF" | "AL" | "AM" | "AO" | "AR" | "AT" | "AU" | "AW" | "AZ" | "BA" | "BD" | "BE" | "BG" | "BH" | "BJ" | "BO" | "BR" | "BS" | "BT" | "BY" | "BZ" | "CA" | "CF" | "CH" | "CI" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "EC" | "EE" | "EG" | "ES" | "ET" | "EU" | "FI" | "FJ" | "FR" | "GB" | "GE" | "GH" | "GM" | "GR" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IN" | "IQ" | "IR" | "IS" | "IT" | "JM" | "JO" | "JP" | "KE" | "KH" | "KR" | "KW" | "KZ" | "LB" | "LI" | "LR" | "LT" | "LU" | "LV" | "MA" | "MC" | "MD" | "ME" | "MG" | "MK" | "ML" | "MM" | "MN" | "MR" | "MT" | "MU" | "MV" | "MX" | "MY" | "MZ" | "NG" | "NL" | "NO" | "NZ" | "OM" | "PA" | "PE" | "PH" | "PK" | "PL" | "PR" | "PT" | "PY" | "QA" | "RANDOM_COUNTRY" | "RO" | "RS" | "RU" | "SA" | "SC" | "SD" | "SE" | "SG" | "SI" | "SK" | "SN" | "SS" | "TD" | "TG" | "TH" | "TM" | "TN" | "TR" | "TT" | "TW" | "UA" | "UG" | "US" | "UY" | "UZ" | "VE" | "VG" | "VN" | "YE" | "ZA" | "ZM" | "ZW" | "ad" | "ae" | "af" | "al" | "am" | "ao" | "ar" | "at" | "au" | "aw" | "az" | "ba" | "bd" | "be" | "bg" | "bh" | "bj" | "bo" | "br" | "bs" | "bt" | "by" | "bz" | "ca" | "cf" | "ch" | "ci" | "cl" | "cm" | "cn" | "co" | "cr" | "cu" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "ec" | "ee" | "eg" | "es" | "et" | "eu" | "fi" | "fj" | "fr" | "gb" | "ge" | "gh" | "gm" | "gr" | "hk" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "in" | "iq" | "ir" | "is" | "it" | "jm" | "jo" | "jp" | "ke" | "kh" | "kr" | "kw" | "kz" | "lb" | "li" | "lr" | "lt" | "lu" | "lv" | "ma" | "mc" | "md" | "me" | "mg" | "mk" | "ml" | "mm" | "mn" | "mr" | "mt" | "mu" | "mv" | "mx" | "my" | "mz" | "ng" | "nl" | "no" | "nz" | "om" | "pa" | "pe" | "ph" | "pk" | "pl" | "pr" | "pt" | "py" | "qa" | "ro" | "rs" | "ru" | "sa" | "sc" | "sd" | "se" | "sg" | "si" | "sk" | "sn" | "ss" | "td" | "tg" | "th" | "tm" | "tn" | "tr" | "tt" | "tw" | "ua" | "ug" | "us" | "uy" | "uz" | "ve" | "vg" | "vn" | "ye" | "za" | "zm" | "zw";
@@ -5,11 +5,11 @@ export { StartExtractJobParams, StartExtractJobResponse, ExtractJobResponse, Ext
5
5
  export { StartBrowserUseTaskParams, StartBrowserUseTaskResponse, BrowserUseTaskStatusResponse, BrowserUseTaskResponse, BrowserUseTaskData, BrowserUseApiKeys, BrowserUseTaskMetadata, BrowserUseStep, BrowserUseAgentBrain, BrowserUseAgentOutput, BrowserUseActionResult, BrowserUseStepMetadata, BrowserUseTabInfo, BrowserUseBrowserStateHistory, BrowserUseAgentHistory, BrowserUseAgentOutputV0710, BrowserUseActionResultV0710, BrowserUseBrowserStateHistoryV0710, BrowserUseStepMetadataV0710, BrowserUseAgentHistoryV0710, BrowserUseAgentHistoryLatest, } from "./agents/browser-use";
6
6
  export { StartClaudeComputerUseTaskParams, StartClaudeComputerUseTaskResponse, ClaudeComputerUseTaskStatusResponse, ClaudeComputerUseTaskResponse, ClaudeComputerUseTaskData, ClaudeComputerUseStepResponse, ClaudeComputerUseApiKeys, ClaudeComputerUseTaskMetadata, } from "./agents/claude-computer-use";
7
7
  export { StartCuaTaskParams, StartCuaTaskResponse, CuaTaskStatusResponse, CuaTaskResponse, CuaTaskData, CuaStepResponse, CuaApiKeys, CuaTaskMetadata, } from "./agents/cua";
8
- export { StartHyperAgentTaskParams, StartHyperAgentTaskResponse, HyperAgentTaskStatusResponse, HyperAgentTaskResponse, HyperAgentTaskData, HyperAgentStep, HyperAgentOutput, HyperAgentActionOutput, HyperAgentApiKeys, HyperAgentTaskMetadata, } from "./agents/hyper-agent";
8
+ export { StartHyperAgentTaskParams, StartHyperAgentTaskResponse, HyperAgentTaskStatusResponse, HyperAgentTaskResponse, HyperAgentTaskData, HyperAgentStep, HyperAgentOutput, HyperAgentActionOutput, HyperAgentApiKeys, HyperAgentTaskMetadata, HyperAgentOutputV110, HyperAgentStepV110, } from "./agents/hyper-agent";
9
9
  export { StartGeminiComputerUseTaskParams, StartGeminiComputerUseTaskResponse, GeminiComputerUseTaskStatusResponse, GeminiComputerUseTaskResponse, GeminiComputerUseTaskData, GeminiComputerUseStepResponse, GeminiComputerUseApiKeys, GeminiComputerUseTaskMetadata, } from "./agents/gemini-computer-use";
10
10
  export { BasicResponse, SessionStatus, Session, SessionDetail, SessionListParams, SessionListResponse, ScreenConfig, CreateSessionParams, GetSessionDownloadsUrlResponse, GetSessionVideoRecordingUrlResponse, GetSessionRecordingUrlResponse, ImageCaptchaParam, UploadFileResponse, UploadFileOptions, GetActiveSessionsCountResponse, SessionEventLogListParams, SessionEventLogListResponse, SessionEventLog, SessionProfile, SessionLaunchState, } from "./session";
11
11
  export { CreateProfileParams, ProfileResponse, CreateProfileResponse, ProfileListParams, ProfileListResponse, } from "./profile";
12
12
  export { CreateExtensionParams, CreateExtensionResponse, ListExtensionsResponse, } from "./extension";
13
- export { ExtractJobStatus, BrowserUseTaskStatus, BrowserUseLlm, ClaudeComputerUseLlm, GeminiComputerUseLlm, ScrapeScreenshotFormat, ScrapeJobStatus, CrawlJobStatus, Country, State, ISO639_1, OperatingSystem, Platform, ScrapeFormat, ScrapeWaitUntil, ScrapePageStatus, CrawlPageStatus, RecordingStatus, DownloadsStatus, HyperAgentLlm, HyperAgentTaskStatus, ClaudeComputerUseTaskStatus, CuaTaskStatus, GeminiComputerUseTaskStatus, SessionEventLogType, SessionRegion, BrowserUseVersion, } from "./constants";
13
+ export { ExtractJobStatus, BrowserUseTaskStatus, BrowserUseLlm, ClaudeComputerUseLlm, GeminiComputerUseLlm, ScrapeScreenshotFormat, ScrapeJobStatus, CrawlJobStatus, Country, State, ISO639_1, OperatingSystem, Platform, ScrapeFormat, ScrapeWaitUntil, ScrapePageStatus, CrawlPageStatus, RecordingStatus, DownloadsStatus, HyperAgentLlm, HyperAgentTaskStatus, ClaudeComputerUseTaskStatus, CuaTaskStatus, GeminiComputerUseTaskStatus, SessionEventLogType, SessionRegion, BrowserUseVersion, HyperAgentVersion, } from "./constants";
14
14
  export { TeamCreditInfo } from "./team";
15
15
  export { ComputerAction, Coordinate, ClickActionParams, DragActionParams, PressKeysActionParams, MoveMouseActionParams, ScreenshotActionParams, ScrollActionParams, TypeTextActionParams, ComputerActionParams, ComputerActionResponse, ComputerActionMouseButton, ComputerActionResponseData, HoldKeyActionParams, MouseDownActionParams, MouseUpActionParams, GetClipboardTextActionParams, PutSelectionTextActionParams, ComputerActionResponseDataClipboardText, } from "./computer-action";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperbrowser/sdk",
3
- "version": "0.79.0",
3
+ "version": "0.80.0",
4
4
  "description": "Node SDK for Hyperbrowser API",
5
5
  "author": "",
6
6
  "main": "dist/index.js",