From 42c532ede1ba630159e410ebf3c8cc8a73721242 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 16 Aug 2025 02:37:30 +0000
Subject: [PATCH 1/6] chore(deps): update dependency @types/node to v20.17.58
---
yarn.lock | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/yarn.lock b/yarn.lock
index 43b21d6..0a07e14 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -938,11 +938,11 @@
undici-types "~5.26.4"
"@types/node@^20.17.6":
- version "20.17.6"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-20.17.6.tgz#6e4073230c180d3579e8c60141f99efdf5df0081"
- integrity sha512-VEI7OdvK2wP7XHnsuXbAJnEpEkF6NjSN45QJlL4VGqZSXsnicpesdTWsg9RISeSdYd3yeRj/y3k5KGjUXYnFwQ==
+ version "20.19.11"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.19.11.tgz#728cab53092bd5f143beed7fbba7ba99de3c16c4"
+ integrity sha512-uug3FEEGv0r+jrecvUUpbY8lLisvIjg6AAic6a2bSP5OEOLeJsDSnvhCDov7ipFFMXS3orMpzlmi0ZcuGkBbow==
dependencies:
- undici-types "~6.19.2"
+ undici-types "~6.21.0"
"@types/stack-utils@^2.0.0":
version "2.0.3"
@@ -3285,6 +3285,7 @@ ts-node@^10.5.0:
"tsc-multi@https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz":
version "1.1.8"
+ uid f544b359b8f05e607771ffacc280e58201476b04
resolved "https://github.com/stainless-api/tsc-multi/releases/download/v1.1.8/tsc-multi.tgz#f544b359b8f05e607771ffacc280e58201476b04"
dependencies:
debug "^4.3.7"
@@ -3353,10 +3354,10 @@ undici-types@~5.26.4:
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
-undici-types@~6.19.2:
- version "6.19.8"
- resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
- integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==
+undici-types@~6.21.0:
+ version "6.21.0"
+ resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.21.0.tgz#691d00af3909be93a7faa13be61b3a5b50ef12cb"
+ integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==
unicode-emoji-modifier-base@^1.0.0:
version "1.0.0"
From e09c8357715abca8d1e095316a7f43d171a3a0f9 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sat, 16 Aug 2025 02:41:08 +0000
Subject: [PATCH 2/6] chore(internal): formatting change
---
src/client.ts | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/client.ts b/src/client.ts
index 9e20f56..27ed60a 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -765,11 +765,13 @@ export class BrowserUse {
browserProfiles: API.BrowserProfiles = new API.BrowserProfiles(this);
agentProfiles: API.AgentProfiles = new API.AgentProfiles(this);
}
+
BrowserUse.Users = Users;
BrowserUse.Tasks = Tasks;
BrowserUse.Sessions = Sessions;
BrowserUse.BrowserProfiles = BrowserProfiles;
BrowserUse.AgentProfiles = AgentProfiles;
+
export declare namespace BrowserUse {
export type RequestOptions = Opts.RequestOptions;
From 68615f4851b05203a78520c34409ad4c8f043cc4 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sun, 17 Aug 2025 18:06:46 +0000
Subject: [PATCH 3/6] feat: Update param and response views
---
.stats.yml | 4 +-
api.md | 2 +-
src/client.ts | 2 -
src/resources/index.ts | 1 -
src/resources/sessions/index.ts | 1 -
src/resources/sessions/sessions.ts | 18 +---
src/resources/tasks.ts | 100 ++++++++++++------
tests/api-resources/sessions/sessions.test.ts | 14 +--
tests/api-resources/tasks.test.ts | 3 -
9 files changed, 72 insertions(+), 73 deletions(-)
diff --git a/.stats.yml b/.stats.yml
index 4189f1a..1091c47 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 26
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browser-use%2Fbrowser-use-d20f308ac3a63b1ea5749dac763fd846481c9723156a5653c1d03669e73d5b5e.yml
-openapi_spec_hash: ccf5babfe92a776213a3e5097a7cd546
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browser-use%2Fbrowser-use-758a1c052b93e7e478fa650c1748f4b466653f44cb26f97fef1314c7a96924df.yml
+openapi_spec_hash: 9e0e99b613f2b9bf3993ac36aa0c7911
config_hash: 9d52be5177b2ede4cb0633c04f4cc4ef
diff --git a/api.md b/api.md
index 8f782ff..be74967 100644
--- a/api.md
+++ b/api.md
@@ -56,7 +56,7 @@ Types:
Methods:
-- client.sessions.retrieve(sessionID, { ...params }) -> SessionView
+- client.sessions.retrieve(sessionID) -> SessionView
- client.sessions.update(sessionID, { ...params }) -> SessionView
- client.sessions.list({ ...params }) -> SessionListResponse
- client.sessions.delete(sessionID) -> void
diff --git a/src/client.ts b/src/client.ts
index 27ed60a..9ea96ab 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -55,7 +55,6 @@ import {
import {
SessionListParams,
SessionListResponse,
- SessionRetrieveParams,
SessionStatus,
SessionUpdateParams,
SessionView,
@@ -802,7 +801,6 @@ export declare namespace BrowserUse {
type SessionStatus as SessionStatus,
type SessionView as SessionView,
type SessionListResponse as SessionListResponse,
- type SessionRetrieveParams as SessionRetrieveParams,
type SessionUpdateParams as SessionUpdateParams,
type SessionListParams as SessionListParams,
};
diff --git a/src/resources/index.ts b/src/resources/index.ts
index a43d293..23500e6 100644
--- a/src/resources/index.ts
+++ b/src/resources/index.ts
@@ -22,7 +22,6 @@ export {
type SessionStatus,
type SessionView,
type SessionListResponse,
- type SessionRetrieveParams,
type SessionUpdateParams,
type SessionListParams,
} from './sessions/sessions';
diff --git a/src/resources/sessions/index.ts b/src/resources/sessions/index.ts
index 2b7a211..f13cf66 100644
--- a/src/resources/sessions/index.ts
+++ b/src/resources/sessions/index.ts
@@ -6,7 +6,6 @@ export {
type SessionStatus,
type SessionView,
type SessionListResponse,
- type SessionRetrieveParams,
type SessionUpdateParams,
type SessionListParams,
} from './sessions';
diff --git a/src/resources/sessions/sessions.ts b/src/resources/sessions/sessions.ts
index db6ca55..0942244 100644
--- a/src/resources/sessions/sessions.ts
+++ b/src/resources/sessions/sessions.ts
@@ -34,12 +34,8 @@ export class Sessions extends APIResource {
*
* - 404: If the user agent session doesn't exist
*/
- retrieve(
- sessionID: string,
- query: SessionRetrieveParams | null | undefined = {},
- options?: RequestOptions,
- ): APIPromise {
- return this._client.get(path`/sessions/${sessionID}`, { query, ...options });
+ retrieve(sessionID: string, options?: RequestOptions): APIPromise {
+ return this._client.get(path`/sessions/${sessionID}`, options);
}
/**
@@ -185,7 +181,6 @@ export namespace SessionListResponse {
* session (active/stopped). live_url: URL where the browser can be viewed live in
* real-time. started_at: Timestamp when the session was created and started.
* finished_at: Timestamp when the session was stopped (None if still active).
- * tasks: Optional list of tasks associated with this session.
*/
export interface Item {
id: string;
@@ -203,15 +198,9 @@ export namespace SessionListResponse {
finishedAt?: string | null;
liveUrl?: string | null;
-
- tasks?: Array | null;
}
}
-export interface SessionRetrieveParams {
- includeTasks?: boolean;
-}
-
export interface SessionUpdateParams {
/**
* Available actions that can be performed on a session
@@ -231,8 +220,6 @@ export interface SessionListParams {
*/
filterBy?: SessionStatus | null;
- includeTasks?: boolean;
-
pageNumber?: number;
pageSize?: number;
@@ -245,7 +232,6 @@ export declare namespace Sessions {
type SessionStatus as SessionStatus,
type SessionView as SessionView,
type SessionListResponse as SessionListResponse,
- type SessionRetrieveParams as SessionRetrieveParams,
type SessionUpdateParams as SessionUpdateParams,
type SessionListParams as SessionListParams,
};
diff --git a/src/resources/tasks.ts b/src/resources/tasks.ts
index 61983e8..118b2fc 100644
--- a/src/resources/tasks.ts
+++ b/src/resources/tasks.ts
@@ -390,18 +390,18 @@ export type LlmModel =
* View model for representing a task with its execution details
*
* Attributes: id: Unique identifier for the task session_id: ID of the session
- * this task belongs to session_live_url: Optional live URL of the session llm: The
- * LLM model used for this task task: The task prompt/instruction given to the
- * agent status: Current status of the task execution started_at: Naive UTC
- * timestamp when the task was started finished_at: Naive UTC timestamp when the
- * task completed (None if still running) metadata: Optional additional metadata
- * associated with the task set by the user is_scheduled: Whether this task was
- * created as a scheduled task steps: Optional list of execution steps done_output:
- * Final output/result of the task user_uploaded_files: Optional list of files
- * uploaded by user for this task output_files: Optional list of files generated as
- * output by this task browser_use_version: Version of browser-use used for this
- * task (older tasks may not have this set) is_success: Whether the task was
- * successful (self-reported by the agent)
+ * this task belongs to llm: The LLM model used for this task task: The task
+ * prompt/instruction given to the agent status: Current status of the task
+ * execution started_at: Naive UTC timestamp when the task was started finished_at:
+ * Naive UTC timestamp when the task completed (None if still running) metadata:
+ * Optional additional metadata associated with the task set by the user
+ * is_scheduled: Whether this task was created as a scheduled task steps: Optional
+ * list of execution steps done_output: Final output/result of the task
+ * user_uploaded_files: Optional list of files uploaded by user for this task
+ * output_files: Optional list of files generated as output by this task
+ * browser_use_version: Version of browser-use used for this task (older tasks may
+ * not have this set) is_success: Whether the task was successful (self-reported by
+ * the agent)
*/
export interface TaskItemView {
id: string;
@@ -434,14 +434,6 @@ export interface TaskItemView {
isSuccess?: boolean | null;
metadata?: { [key: string]: unknown };
-
- outputFiles?: Array | null;
-
- sessionLiveUrl?: string | null;
-
- steps?: Array | null;
-
- userUploadedFiles?: Array | null;
}
/**
@@ -483,11 +475,11 @@ export interface TaskStepView {
* View model for representing a task with its execution details
*
* Attributes: id: Unique identifier for the task session_id: ID of the session
- * this task belongs to session_live_url: Optional live URL of the session llm: The
- * LLM model used for this task task: The task prompt/instruction given to the
- * agent status: Current status of the task execution started_at: Naive UTC
- * timestamp when the task was started finished_at: Naive UTC timestamp when the
- * task completed (None if still running) metadata: Optional additional metadata
+ * this task belongs to session: The session this task belongs to llm: The LLM
+ * model used for this task task: The task prompt/instruction given to the agent
+ * status: Current status of the task execution started_at: Naive UTC timestamp
+ * when the task was started finished_at: Naive UTC timestamp when the task
+ * completed (None if still running) metadata: Optional additional metadata
* associated with the task set by the user is_scheduled: Whether this task was
* created as a scheduled task steps: List of execution steps done_output: Final
* output/result of the task user_uploaded_files: List of files uploaded by user
@@ -505,6 +497,16 @@ export interface TaskView {
outputFiles: Array;
+ /**
+ * View model for representing a session that a task belongs to
+ *
+ * Attributes: id: Unique identifier for the session status: Current status of the
+ * session live_url: URL where the browser can be viewed live in real-time.
+ * started_at: Timestamp when the session was created and started. finished_at:
+ * Timestamp when the session was stopped (None if still active).
+ */
+ session: TaskView.Session;
+
sessionId: string;
startedAt: string;
@@ -533,8 +535,34 @@ export interface TaskView {
isSuccess?: boolean | null;
metadata?: { [key: string]: unknown };
+}
+
+export namespace TaskView {
+ /**
+ * View model for representing a session that a task belongs to
+ *
+ * Attributes: id: Unique identifier for the session status: Current status of the
+ * session live_url: URL where the browser can be viewed live in real-time.
+ * started_at: Timestamp when the session was created and started. finished_at:
+ * Timestamp when the session was stopped (None if still active).
+ */
+ export interface Session {
+ id: string;
- sessionLiveUrl?: string | null;
+ startedAt: string;
+
+ /**
+ * Enumeration of possible (browser) session states
+ *
+ * Attributes: ACTIVE: Session is currently active and running (browser is running)
+ * STOPPED: Session has been stopped and is no longer active (browser is stopped)
+ */
+ status: 'active' | 'stopped';
+
+ finishedAt?: string | null;
+
+ liveUrl?: string | null;
+ }
}
/**
@@ -576,19 +604,29 @@ export interface TaskGetLogsResponse {
/**
* Response model for output file requests
*
- * Attributes: download_url: URL to download the output file
+ * Attributes: id: Unique identifier for the output file file_name: Name of the
+ * output file download_url: URL to download the output file
*/
export interface TaskGetOutputFileResponse {
+ id: string;
+
downloadUrl: string;
+
+ fileName: string;
}
/**
* Response model for user uploaded file requests
*
- * Attributes: download_url: URL to download the user uploaded file
+ * Attributes: id: Unique identifier for the user uploaded file file_name: Name of
+ * the user uploaded file download_url: URL to download the user uploaded file
*/
export interface TaskGetUserUploadedFileResponse {
+ id: string;
+
downloadUrl: string;
+
+ fileName: string;
}
export interface TaskCreateParams {
@@ -670,12 +708,6 @@ export interface TaskListParams {
*/
filterBy?: 'started' | 'paused' | 'stopped' | 'finished' | 'successful' | 'unsuccessful' | null;
- includeOutputFiles?: boolean;
-
- includeSteps?: boolean;
-
- includeUserUploadedFiles?: boolean;
-
pageNumber?: number;
pageSize?: number;
diff --git a/tests/api-resources/sessions/sessions.test.ts b/tests/api-resources/sessions/sessions.test.ts
index 8e44b21..06f77ae 100644
--- a/tests/api-resources/sessions/sessions.test.ts
+++ b/tests/api-resources/sessions/sessions.test.ts
@@ -20,18 +20,6 @@ describe('resource sessions', () => {
expect(dataAndResponse.response).toBe(rawResponse);
});
- // Prism tests are disabled
- test.skip('retrieve: request options and params are passed correctly', async () => {
- // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
- await expect(
- client.sessions.retrieve(
- '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
- { includeTasks: true },
- { path: '/_stainless_unknown_path' },
- ),
- ).rejects.toThrow(BrowserUse.NotFoundError);
- });
-
// Prism tests are disabled
test.skip('update: only required params', async () => {
const responsePromise = client.sessions.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
@@ -68,7 +56,7 @@ describe('resource sessions', () => {
// ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
await expect(
client.sessions.list(
- { filterBy: 'active', includeTasks: true, pageNumber: 1, pageSize: 1 },
+ { filterBy: 'active', pageNumber: 1, pageSize: 1 },
{ path: '/_stainless_unknown_path' },
),
).rejects.toThrow(BrowserUse.NotFoundError);
diff --git a/tests/api-resources/tasks.test.ts b/tests/api-resources/tasks.test.ts
index e74fa97..82a9798 100644
--- a/tests/api-resources/tasks.test.ts
+++ b/tests/api-resources/tasks.test.ts
@@ -85,9 +85,6 @@ describe('resource tasks', () => {
client.tasks.list(
{
filterBy: 'started',
- includeOutputFiles: true,
- includeSteps: true,
- includeUserUploadedFiles: true,
pageNumber: 1,
pageSize: 1,
sessionId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
From 0843af1191d466c4cb29fb75f2143e804bc8283a Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Sun, 17 Aug 2025 18:07:25 +0000
Subject: [PATCH 4/6] release: 0.4.0
---
.release-please-manifest.json | 2 +-
CHANGELOG.md | 14 ++++++++++++++
package.json | 2 +-
src/version.ts | 2 +-
4 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 0ee8c01..2537c1f 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.3.0"
+ ".": "0.4.0"
}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 40769e7..5113f09 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,19 @@
# Changelog
+## 0.4.0 (2025-08-17)
+
+Full Changelog: [v0.3.0...v0.4.0](https://github.com/browser-use/browser-use-node/compare/v0.3.0...v0.4.0)
+
+### Features
+
+* Update param and response views ([68615f4](https://github.com/browser-use/browser-use-node/commit/68615f4851b05203a78520c34409ad4c8f043cc4))
+
+
+### Chores
+
+* **deps:** update dependency @types/node to v20.17.58 ([42c532e](https://github.com/browser-use/browser-use-node/commit/42c532ede1ba630159e410ebf3c8cc8a73721242))
+* **internal:** formatting change ([e09c835](https://github.com/browser-use/browser-use-node/commit/e09c8357715abca8d1e095316a7f43d171a3a0f9))
+
## 0.3.0 (2025-08-15)
Full Changelog: [v0.2.2...v0.3.0](https://github.com/browser-use/browser-use-node/compare/v0.2.2...v0.3.0)
diff --git a/package.json b/package.json
index d22676e..9f72bd3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "browser-use-sdk",
- "version": "0.3.0",
+ "version": "0.4.0",
"description": "The official TypeScript library for the Browser Use API",
"author": "Browser Use ",
"types": "dist/index.d.ts",
diff --git a/src/version.ts b/src/version.ts
index 88f4d40..4e7f788 100644
--- a/src/version.ts
+++ b/src/version.ts
@@ -1 +1 @@
-export const VERSION = '0.3.0'; // x-release-please-version
+export const VERSION = '0.4.0'; // x-release-please-version
From de156a23f8f55263d195f79ec06600c9d8449ce1 Mon Sep 17 00:00:00 2001
From: Matic Zavadlal
Date: Sun, 17 Aug 2025 19:24:42 +0100
Subject: [PATCH 5/6] fixes
---
examples/demo.ts | 2 +-
examples/stream-zod.ts | 4 ++--
examples/zod.ts | 2 +-
src/lib/bin/commands/listen.ts | 7 +------
src/lib/stream.ts | 9 ++++++---
5 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/examples/demo.ts b/examples/demo.ts
index c8db403..4579b78 100755
--- a/examples/demo.ts
+++ b/examples/demo.ts
@@ -26,7 +26,7 @@ async function main() {
case 'started':
case 'paused':
case 'stopped':
- log = `agent ${status.status} - live: ${status.sessionLiveUrl}`;
+ log = `agent ${status.status} - live: ${status.session.liveUrl}`;
await new Promise((resolve) => setTimeout(resolve, 2000));
break;
diff --git a/examples/stream-zod.ts b/examples/stream-zod.ts
index 1e7ed2c..fa283ca 100755
--- a/examples/stream-zod.ts
+++ b/examples/stream-zod.ts
@@ -37,8 +37,8 @@ async function main() {
for await (const msg of stream) {
// Regular
process.stdout.write(`${msg.data.status}`);
- if (msg.data.sessionLiveUrl) {
- process.stdout.write(` | Live URL: ${msg.data.sessionLiveUrl}`);
+ if (msg.data.session.liveUrl) {
+ process.stdout.write(` | Live URL: ${msg.data.session.liveUrl}`);
}
if (msg.data.steps.length > 0) {
diff --git a/examples/zod.ts b/examples/zod.ts
index 49eb30c..eb5dbf7 100755
--- a/examples/zod.ts
+++ b/examples/zod.ts
@@ -46,7 +46,7 @@ async function main() {
const steps = `${stepsCount} steps`;
const lastGoalDescription = stepsCount > 0 ? status.steps![stepsCount - 1]!.nextGoal : undefined;
const lastGoal = lastGoalDescription ? `, last: ${lastGoalDescription}` : '';
- const liveUrl = status.sessionLiveUrl ? `, live: ${status.sessionLiveUrl}` : '';
+ const liveUrl = status.session.liveUrl ? `, live: ${status.session.liveUrl}` : '';
log = `agent ${status.status} (${steps}${lastGoal}${liveUrl}) `;
diff --git a/src/lib/bin/commands/listen.ts b/src/lib/bin/commands/listen.ts
index c9f8f4e..8b8201f 100644
--- a/src/lib/bin/commands/listen.ts
+++ b/src/lib/bin/commands/listen.ts
@@ -51,12 +51,7 @@ export const listen = new Command('listen')
const tasks: BrowserUse.Tasks.TaskItemView[] = await client.tasks
.list(
- {
- includeOutputFiles: false,
- includeSteps: false,
- includeUserUploadedFiles: false,
- pageSize: 10,
- },
+ { pageSize: 10 },
{
signal: tickRef.abort.signal,
},
diff --git a/src/lib/stream.ts b/src/lib/stream.ts
index 25f5139..7848a32 100644
--- a/src/lib/stream.ts
+++ b/src/lib/stream.ts
@@ -23,7 +23,7 @@ export function reducer(state: BrowserState, action: BrowserAction): [BrowserSta
// INIT
if (state == null) {
- const liveUrl = action.status.sessionLiveUrl ?? null;
+ const liveUrl = action.status.session.liveUrl ?? null;
const doneOutput = action.status.doneOutput ?? null;
const state: BrowserState = {
@@ -39,7 +39,7 @@ export function reducer(state: BrowserState, action: BrowserAction): [BrowserSta
// UPDATE
- const liveUrl = action.status.sessionLiveUrl ?? state.liveUrl;
+ const liveUrl = action.status.session.liveUrl ?? state.liveUrl;
const doneOutput = action.status.doneOutput ?? state.doneOutput;
const steps: TaskStepView[] = [...state.steps];
@@ -68,7 +68,10 @@ export function reducer(state: BrowserState, action: BrowserAction): [BrowserSta
const update: ReducerEvent = {
...action.status,
steps: newState.steps,
- sessionLiveUrl: newState.liveUrl,
+ session: {
+ ...action.status.session,
+ liveUrl: newState.liveUrl,
+ },
doneOutput: newState.doneOutput,
};
From f55f1b24bd77d71f7680dc8e98c62bd40f41fa5e Mon Sep 17 00:00:00 2001
From: Matic Zavadlal
Date: Sun, 17 Aug 2025 19:26:24 +0100
Subject: [PATCH 6/6] lint
---
src/internal/detect-platform.ts | 2 +-
tests/index.test.ts | 4 ++--
tests/uploads.test.ts | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/internal/detect-platform.ts b/src/internal/detect-platform.ts
index e82d95c..7dbe981 100644
--- a/src/internal/detect-platform.ts
+++ b/src/internal/detect-platform.ts
@@ -67,7 +67,7 @@ const getPlatformProperties = (): PlatformProperties => {
'X-Stainless-Arch': normalizeArch(Deno.build.arch),
'X-Stainless-Runtime': 'deno',
'X-Stainless-Runtime-Version':
- typeof Deno.version === 'string' ? Deno.version : Deno.version?.deno ?? 'unknown',
+ typeof Deno.version === 'string' ? Deno.version : (Deno.version?.deno ?? 'unknown'),
};
}
if (typeof EdgeRuntime !== 'undefined') {
diff --git a/tests/index.test.ts b/tests/index.test.ts
index 5a8892f..94e7081 100644
--- a/tests/index.test.ts
+++ b/tests/index.test.ts
@@ -536,8 +536,8 @@ describe('retries', () => {
{ signal }: RequestInit = {},
): Promise => {
if (count++ === 0) {
- return new Promise(
- (resolve, reject) => signal?.addEventListener('abort', () => reject(new Error('timed out'))),
+ return new Promise((resolve, reject) =>
+ signal?.addEventListener('abort', () => reject(new Error('timed out'))),
);
}
return new Response(JSON.stringify({ a: 1 }), { headers: { 'Content-Type': 'application/json' } });
diff --git a/tests/uploads.test.ts b/tests/uploads.test.ts
index 23bc350..29e1a46 100644
--- a/tests/uploads.test.ts
+++ b/tests/uploads.test.ts
@@ -69,7 +69,7 @@ describe('toFile', () => {
const result = await toFile(input);
const file: File = result;
const blob: Blob = result;
- void file, blob;
+ (void file, blob);
});
});