browser-use-sdk 2.0.6 → 2.0.7

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.
Files changed (26) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/sessions/client/Client.d.ts +16 -0
  3. package/dist/cjs/api/resources/sessions/client/Client.js +67 -0
  4. package/dist/cjs/api/resources/sessions/client/requests/DeleteSessionSessionsSessionIdDeleteRequest.d.ts +9 -0
  5. package/dist/cjs/api/resources/sessions/client/requests/DeleteSessionSessionsSessionIdDeleteRequest.js +3 -0
  6. package/dist/cjs/api/resources/sessions/client/requests/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/tasks/client/requests/CreateTaskRequest.d.ts +6 -0
  8. package/dist/cjs/api/types/TaskItemView.d.ts +4 -0
  9. package/dist/cjs/api/types/TaskView.d.ts +5 -1
  10. package/dist/cjs/version.d.ts +1 -1
  11. package/dist/cjs/version.js +1 -1
  12. package/dist/cjs/wrapper/lib/parse.js +10 -7
  13. package/dist/esm/Client.mjs +2 -2
  14. package/dist/esm/api/resources/sessions/client/Client.d.mts +16 -0
  15. package/dist/esm/api/resources/sessions/client/Client.mjs +67 -0
  16. package/dist/esm/api/resources/sessions/client/requests/DeleteSessionSessionsSessionIdDeleteRequest.d.mts +9 -0
  17. package/dist/esm/api/resources/sessions/client/requests/DeleteSessionSessionsSessionIdDeleteRequest.mjs +2 -0
  18. package/dist/esm/api/resources/sessions/client/requests/index.d.mts +1 -0
  19. package/dist/esm/api/resources/tasks/client/requests/CreateTaskRequest.d.mts +6 -0
  20. package/dist/esm/api/types/TaskItemView.d.mts +4 -0
  21. package/dist/esm/api/types/TaskView.d.mts +5 -1
  22. package/dist/esm/version.d.mts +1 -1
  23. package/dist/esm/version.mjs +1 -1
  24. package/dist/esm/wrapper/lib/parse.mjs +10 -7
  25. package/package.json +1 -1
  26. package/reference.md +65 -0
@@ -49,8 +49,8 @@ class BrowserUseClient {
49
49
  this._options = Object.assign(Object.assign({}, _options), { logging: core.logging.createLogger(_options === null || _options === void 0 ? void 0 : _options.logging), headers: (0, headers_js_1.mergeHeaders)({
50
50
  "X-Fern-Language": "JavaScript",
51
51
  "X-Fern-SDK-Name": "browser-use-sdk",
52
- "X-Fern-SDK-Version": "2.0.6",
53
- "User-Agent": "browser-use-sdk/2.0.6",
52
+ "X-Fern-SDK-Version": "2.0.7",
53
+ "User-Agent": "browser-use-sdk/2.0.7",
54
54
  "X-Fern-Runtime": core.RUNTIME.type,
55
55
  "X-Fern-Runtime-Version": core.RUNTIME.version,
56
56
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -54,6 +54,22 @@ export declare class Sessions {
54
54
  */
55
55
  getSession(request: BrowserUse.GetSessionSessionsSessionIdGetRequest, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<BrowserUse.SessionView>;
56
56
  private __getSession;
57
+ /**
58
+ * Delete a session with all its tasks.
59
+ *
60
+ * @param {BrowserUse.DeleteSessionSessionsSessionIdDeleteRequest} request
61
+ * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
62
+ *
63
+ * @throws {@link BrowserUse.NotFoundError}
64
+ * @throws {@link BrowserUse.UnprocessableEntityError}
65
+ *
66
+ * @example
67
+ * await client.sessions.deleteSession({
68
+ * session_id: "session_id"
69
+ * })
70
+ */
71
+ deleteSession(request: BrowserUse.DeleteSessionSessionsSessionIdDeleteRequest, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<void>;
72
+ private __deleteSession;
57
73
  /**
58
74
  * Stop a session and all its running tasks.
59
75
  *
@@ -273,6 +273,73 @@ class Sessions {
273
273
  }
274
274
  });
275
275
  }
276
+ /**
277
+ * Delete a session with all its tasks.
278
+ *
279
+ * @param {BrowserUse.DeleteSessionSessionsSessionIdDeleteRequest} request
280
+ * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
281
+ *
282
+ * @throws {@link BrowserUse.NotFoundError}
283
+ * @throws {@link BrowserUse.UnprocessableEntityError}
284
+ *
285
+ * @example
286
+ * await client.sessions.deleteSession({
287
+ * session_id: "session_id"
288
+ * })
289
+ */
290
+ deleteSession(request, requestOptions) {
291
+ return core.HttpResponsePromise.fromPromise(this.__deleteSession(request, requestOptions));
292
+ }
293
+ __deleteSession(request, requestOptions) {
294
+ return __awaiter(this, void 0, void 0, function* () {
295
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
296
+ const { session_id: sessionId } = request;
297
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
298
+ const _response = yield core.fetcher({
299
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, `sessions/${core.url.encodePathParam(sessionId)}`),
300
+ method: "DELETE",
301
+ headers: _headers,
302
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
303
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
304
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
305
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
306
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
307
+ logging: this._options.logging,
308
+ });
309
+ if (_response.ok) {
310
+ return { data: undefined, rawResponse: _response.rawResponse };
311
+ }
312
+ if (_response.error.reason === "status-code") {
313
+ switch (_response.error.statusCode) {
314
+ case 404:
315
+ throw new BrowserUse.NotFoundError(_response.error.body, _response.rawResponse);
316
+ case 422:
317
+ throw new BrowserUse.UnprocessableEntityError(_response.error.body, _response.rawResponse);
318
+ default:
319
+ throw new errors.BrowserUseError({
320
+ statusCode: _response.error.statusCode,
321
+ body: _response.error.body,
322
+ rawResponse: _response.rawResponse,
323
+ });
324
+ }
325
+ }
326
+ switch (_response.error.reason) {
327
+ case "non-json":
328
+ throw new errors.BrowserUseError({
329
+ statusCode: _response.error.statusCode,
330
+ body: _response.error.rawBody,
331
+ rawResponse: _response.rawResponse,
332
+ });
333
+ case "timeout":
334
+ throw new errors.BrowserUseTimeoutError("Timeout exceeded when calling DELETE /sessions/{session_id}.");
335
+ case "unknown":
336
+ throw new errors.BrowserUseError({
337
+ message: _response.error.errorMessage,
338
+ rawResponse: _response.rawResponse,
339
+ });
340
+ }
341
+ });
342
+ }
276
343
  /**
277
344
  * Stop a session and all its running tasks.
278
345
  *
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * session_id: "session_id"
5
+ * }
6
+ */
7
+ export interface DeleteSessionSessionsSessionIdDeleteRequest {
8
+ session_id: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +1,7 @@
1
1
  export type { CreateSessionPublicShareSessionsSessionIdPublicSharePostRequest } from "./CreateSessionPublicShareSessionsSessionIdPublicSharePostRequest.js";
2
2
  export type { CreateSessionRequest } from "./CreateSessionRequest.js";
3
3
  export type { DeleteSessionPublicShareSessionsSessionIdPublicShareDeleteRequest } from "./DeleteSessionPublicShareSessionsSessionIdPublicShareDeleteRequest.js";
4
+ export type { DeleteSessionSessionsSessionIdDeleteRequest } from "./DeleteSessionSessionsSessionIdDeleteRequest.js";
4
5
  export type { GetSessionPublicShareSessionsSessionIdPublicShareGetRequest } from "./GetSessionPublicShareSessionsSessionIdPublicShareGetRequest.js";
5
6
  export type { GetSessionSessionsSessionIdGetRequest } from "./GetSessionSessionsSessionIdGetRequest.js";
6
7
  export type { ListSessionsSessionsGetRequest } from "./ListSessionsSessionsGetRequest.js";
@@ -36,6 +36,12 @@ export interface CreateTaskRequest {
36
36
  vision?: CreateTaskRequest.Vision;
37
37
  /** Optional extension to the agent system prompt. */
38
38
  systemPromptExtension?: string;
39
+ /** Enable judge mode to evaluate task completion against ground truth. */
40
+ judge?: boolean;
41
+ /** Expected answer for judge evaluation. */
42
+ judgeGroundTruth?: string | null;
43
+ /** The LLM model to use for judging. If not provided, uses the default judge LLM. */
44
+ judgeLlm?: BrowserUse.SupportedLlMs | null;
39
45
  }
40
46
  export declare namespace CreateTaskRequest {
41
47
  /**
@@ -26,4 +26,8 @@ export interface TaskItemView {
26
26
  browserUseVersion?: string | null;
27
27
  /** Whether the task was successful (self-reported by the agent) */
28
28
  isSuccess?: boolean | null;
29
+ /** Stringified JSON object containing the full report from the judge */
30
+ judgement?: string | null;
31
+ /** Judge verdict - True if the judge found the task to be successful, False otherwise (None if judge is not enabled) */
32
+ judgeVerdict?: boolean | null;
29
33
  }
@@ -26,6 +26,10 @@ export interface TaskView {
26
26
  outputFiles: BrowserUse.FileView[];
27
27
  /** Version of browser-use used for this task (older tasks may not have this set) */
28
28
  browserUseVersion?: string | null;
29
- /** Whether the task was successful (self-reported by the agent) */
29
+ /** Whether the task was successful based on the agent's self-reported output (less reliable than the judge) */
30
30
  isSuccess?: boolean | null;
31
+ /** Stringified JSON object containing the full report from the judge */
32
+ judgement?: string | null;
33
+ /** Judge verdict - True if the judge found the task to be successful, False otherwise (None if judge is not enabled) */
34
+ judgeVerdict?: boolean | null;
31
35
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.0.6";
1
+ export declare const SDK_VERSION = "2.0.7";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "2.0.6";
4
+ exports.SDK_VERSION = "2.0.7";
@@ -91,6 +91,8 @@ function wrapCreateTaskResponse(client, response, schema) {
91
91
  switch (res.status) {
92
92
  case "finished":
93
93
  case "stopped":
94
+ break poll;
95
+ case "created":
94
96
  case "started":
95
97
  yield __await(new Promise((resolve) => setTimeout(resolve, intervalMs)));
96
98
  break;
@@ -167,13 +169,14 @@ function wrapCreateTaskResponse(client, response, schema) {
167
169
  _c = _f.value;
168
170
  _d = false;
169
171
  const msg = _c;
170
- switch (msg.data.status) {
171
- case "finished":
172
- case "stopped":
173
- case "started":
174
- break;
175
- // default:
176
- // throw new ExhaustiveSwitchCheck(msg.data.status as never);
172
+ // Return on terminal statuses
173
+ if (msg.data.status === "finished" || msg.data.status === "stopped") {
174
+ if (schema != null) {
175
+ return parseStructuredTaskOutput(msg.data, schema);
176
+ }
177
+ else {
178
+ return msg.data;
179
+ }
177
180
  }
178
181
  }
179
182
  }
@@ -13,8 +13,8 @@ export class BrowserUseClient {
13
13
  this._options = Object.assign(Object.assign({}, _options), { logging: core.logging.createLogger(_options === null || _options === void 0 ? void 0 : _options.logging), headers: mergeHeaders({
14
14
  "X-Fern-Language": "JavaScript",
15
15
  "X-Fern-SDK-Name": "browser-use-sdk",
16
- "X-Fern-SDK-Version": "2.0.6",
17
- "User-Agent": "browser-use-sdk/2.0.6",
16
+ "X-Fern-SDK-Version": "2.0.7",
17
+ "User-Agent": "browser-use-sdk/2.0.7",
18
18
  "X-Fern-Runtime": core.RUNTIME.type,
19
19
  "X-Fern-Runtime-Version": core.RUNTIME.version,
20
20
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -54,6 +54,22 @@ export declare class Sessions {
54
54
  */
55
55
  getSession(request: BrowserUse.GetSessionSessionsSessionIdGetRequest, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<BrowserUse.SessionView>;
56
56
  private __getSession;
57
+ /**
58
+ * Delete a session with all its tasks.
59
+ *
60
+ * @param {BrowserUse.DeleteSessionSessionsSessionIdDeleteRequest} request
61
+ * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
62
+ *
63
+ * @throws {@link BrowserUse.NotFoundError}
64
+ * @throws {@link BrowserUse.UnprocessableEntityError}
65
+ *
66
+ * @example
67
+ * await client.sessions.deleteSession({
68
+ * session_id: "session_id"
69
+ * })
70
+ */
71
+ deleteSession(request: BrowserUse.DeleteSessionSessionsSessionIdDeleteRequest, requestOptions?: Sessions.RequestOptions): core.HttpResponsePromise<void>;
72
+ private __deleteSession;
57
73
  /**
58
74
  * Stop a session and all its running tasks.
59
75
  *
@@ -237,6 +237,73 @@ export class Sessions {
237
237
  }
238
238
  });
239
239
  }
240
+ /**
241
+ * Delete a session with all its tasks.
242
+ *
243
+ * @param {BrowserUse.DeleteSessionSessionsSessionIdDeleteRequest} request
244
+ * @param {Sessions.RequestOptions} requestOptions - Request-specific configuration.
245
+ *
246
+ * @throws {@link BrowserUse.NotFoundError}
247
+ * @throws {@link BrowserUse.UnprocessableEntityError}
248
+ *
249
+ * @example
250
+ * await client.sessions.deleteSession({
251
+ * session_id: "session_id"
252
+ * })
253
+ */
254
+ deleteSession(request, requestOptions) {
255
+ return core.HttpResponsePromise.fromPromise(this.__deleteSession(request, requestOptions));
256
+ }
257
+ __deleteSession(request, requestOptions) {
258
+ return __awaiter(this, void 0, void 0, function* () {
259
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
260
+ const { session_id: sessionId } = request;
261
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
262
+ const _response = yield core.fetcher({
263
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BrowserUseEnvironment.Production, `sessions/${core.url.encodePathParam(sessionId)}`),
264
+ method: "DELETE",
265
+ headers: _headers,
266
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
267
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
268
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
269
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
270
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
271
+ logging: this._options.logging,
272
+ });
273
+ if (_response.ok) {
274
+ return { data: undefined, rawResponse: _response.rawResponse };
275
+ }
276
+ if (_response.error.reason === "status-code") {
277
+ switch (_response.error.statusCode) {
278
+ case 404:
279
+ throw new BrowserUse.NotFoundError(_response.error.body, _response.rawResponse);
280
+ case 422:
281
+ throw new BrowserUse.UnprocessableEntityError(_response.error.body, _response.rawResponse);
282
+ default:
283
+ throw new errors.BrowserUseError({
284
+ statusCode: _response.error.statusCode,
285
+ body: _response.error.body,
286
+ rawResponse: _response.rawResponse,
287
+ });
288
+ }
289
+ }
290
+ switch (_response.error.reason) {
291
+ case "non-json":
292
+ throw new errors.BrowserUseError({
293
+ statusCode: _response.error.statusCode,
294
+ body: _response.error.rawBody,
295
+ rawResponse: _response.rawResponse,
296
+ });
297
+ case "timeout":
298
+ throw new errors.BrowserUseTimeoutError("Timeout exceeded when calling DELETE /sessions/{session_id}.");
299
+ case "unknown":
300
+ throw new errors.BrowserUseError({
301
+ message: _response.error.errorMessage,
302
+ rawResponse: _response.rawResponse,
303
+ });
304
+ }
305
+ });
306
+ }
240
307
  /**
241
308
  * Stop a session and all its running tasks.
242
309
  *
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * session_id: "session_id"
5
+ * }
6
+ */
7
+ export interface DeleteSessionSessionsSessionIdDeleteRequest {
8
+ session_id: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,6 +1,7 @@
1
1
  export type { CreateSessionPublicShareSessionsSessionIdPublicSharePostRequest } from "./CreateSessionPublicShareSessionsSessionIdPublicSharePostRequest.mjs";
2
2
  export type { CreateSessionRequest } from "./CreateSessionRequest.mjs";
3
3
  export type { DeleteSessionPublicShareSessionsSessionIdPublicShareDeleteRequest } from "./DeleteSessionPublicShareSessionsSessionIdPublicShareDeleteRequest.mjs";
4
+ export type { DeleteSessionSessionsSessionIdDeleteRequest } from "./DeleteSessionSessionsSessionIdDeleteRequest.mjs";
4
5
  export type { GetSessionPublicShareSessionsSessionIdPublicShareGetRequest } from "./GetSessionPublicShareSessionsSessionIdPublicShareGetRequest.mjs";
5
6
  export type { GetSessionSessionsSessionIdGetRequest } from "./GetSessionSessionsSessionIdGetRequest.mjs";
6
7
  export type { ListSessionsSessionsGetRequest } from "./ListSessionsSessionsGetRequest.mjs";
@@ -36,6 +36,12 @@ export interface CreateTaskRequest {
36
36
  vision?: CreateTaskRequest.Vision;
37
37
  /** Optional extension to the agent system prompt. */
38
38
  systemPromptExtension?: string;
39
+ /** Enable judge mode to evaluate task completion against ground truth. */
40
+ judge?: boolean;
41
+ /** Expected answer for judge evaluation. */
42
+ judgeGroundTruth?: string | null;
43
+ /** The LLM model to use for judging. If not provided, uses the default judge LLM. */
44
+ judgeLlm?: BrowserUse.SupportedLlMs | null;
39
45
  }
40
46
  export declare namespace CreateTaskRequest {
41
47
  /**
@@ -26,4 +26,8 @@ export interface TaskItemView {
26
26
  browserUseVersion?: string | null;
27
27
  /** Whether the task was successful (self-reported by the agent) */
28
28
  isSuccess?: boolean | null;
29
+ /** Stringified JSON object containing the full report from the judge */
30
+ judgement?: string | null;
31
+ /** Judge verdict - True if the judge found the task to be successful, False otherwise (None if judge is not enabled) */
32
+ judgeVerdict?: boolean | null;
29
33
  }
@@ -26,6 +26,10 @@ export interface TaskView {
26
26
  outputFiles: BrowserUse.FileView[];
27
27
  /** Version of browser-use used for this task (older tasks may not have this set) */
28
28
  browserUseVersion?: string | null;
29
- /** Whether the task was successful (self-reported by the agent) */
29
+ /** Whether the task was successful based on the agent's self-reported output (less reliable than the judge) */
30
30
  isSuccess?: boolean | null;
31
+ /** Stringified JSON object containing the full report from the judge */
32
+ judgement?: string | null;
33
+ /** Judge verdict - True if the judge found the task to be successful, False otherwise (None if judge is not enabled) */
34
+ judgeVerdict?: boolean | null;
31
35
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.0.6";
1
+ export declare const SDK_VERSION = "2.0.7";
@@ -1 +1 @@
1
- export const SDK_VERSION = "2.0.6";
1
+ export const SDK_VERSION = "2.0.7";
@@ -82,6 +82,8 @@ export function wrapCreateTaskResponse(client, response, schema) {
82
82
  switch (res.status) {
83
83
  case "finished":
84
84
  case "stopped":
85
+ break poll;
86
+ case "created":
85
87
  case "started":
86
88
  yield __await(new Promise((resolve) => setTimeout(resolve, intervalMs)));
87
89
  break;
@@ -158,13 +160,14 @@ export function wrapCreateTaskResponse(client, response, schema) {
158
160
  _c = _f.value;
159
161
  _d = false;
160
162
  const msg = _c;
161
- switch (msg.data.status) {
162
- case "finished":
163
- case "stopped":
164
- case "started":
165
- break;
166
- // default:
167
- // throw new ExhaustiveSwitchCheck(msg.data.status as never);
163
+ // Return on terminal statuses
164
+ if (msg.data.status === "finished" || msg.data.status === "stopped") {
165
+ if (schema != null) {
166
+ return parseStructuredTaskOutput(msg.data, schema);
167
+ }
168
+ else {
169
+ return msg.data;
170
+ }
168
171
  }
169
172
  }
170
173
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-use-sdk",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "private": false,
5
5
  "repository": "github:browser-use/browser-use-node",
6
6
  "type": "commonjs",
package/reference.md CHANGED
@@ -570,6 +570,71 @@ await client.sessions.getSession({
570
570
  </dl>
571
571
 
572
572
 
573
+ </dd>
574
+ </dl>
575
+ </details>
576
+
577
+ <details><summary><code>client.sessions.<a href="/src/api/resources/sessions/client/Client.ts">deleteSession</a>({ ...params }) -> void</code></summary>
578
+ <dl>
579
+ <dd>
580
+
581
+ #### 📝 Description
582
+
583
+ <dl>
584
+ <dd>
585
+
586
+ <dl>
587
+ <dd>
588
+
589
+ Delete a session with all its tasks.
590
+ </dd>
591
+ </dl>
592
+ </dd>
593
+ </dl>
594
+
595
+ #### 🔌 Usage
596
+
597
+ <dl>
598
+ <dd>
599
+
600
+ <dl>
601
+ <dd>
602
+
603
+ ```typescript
604
+ await client.sessions.deleteSession({
605
+ session_id: "session_id"
606
+ });
607
+
608
+ ```
609
+ </dd>
610
+ </dl>
611
+ </dd>
612
+ </dl>
613
+
614
+ #### ⚙️ Parameters
615
+
616
+ <dl>
617
+ <dd>
618
+
619
+ <dl>
620
+ <dd>
621
+
622
+ **request:** `BrowserUse.DeleteSessionSessionsSessionIdDeleteRequest`
623
+
624
+ </dd>
625
+ </dl>
626
+
627
+ <dl>
628
+ <dd>
629
+
630
+ **requestOptions:** `Sessions.RequestOptions`
631
+
632
+ </dd>
633
+ </dl>
634
+ </dd>
635
+ </dl>
636
+
637
+
573
638
  </dd>
574
639
  </dl>
575
640
  </details>