@chatbridge/runtime 0.1.0 → 0.2.1

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.
@@ -7,7 +7,8 @@ export interface AuthStoreOptions {
7
7
  baseDir?: string;
8
8
  }
9
9
  /** Persists Playwright storageState JSON with restrictive permissions.
10
- * The content is sensitive (session cookies): never log it. */
10
+ * The content is sensitive it holds cookies, localStorage and IndexedDB
11
+ * contents: never log it. */
11
12
  export declare class AuthStore {
12
13
  private readonly dir;
13
14
  private readonly file;
@@ -4,7 +4,8 @@ import { homedir } from "node:os";
4
4
  import { join } from "node:path";
5
5
  import { validateProviderName } from "./provider-name.js";
6
6
  /** Persists Playwright storageState JSON with restrictive permissions.
7
- * The content is sensitive (session cookies): never log it. */
7
+ * The content is sensitive it holds cookies, localStorage and IndexedDB
8
+ * contents: never log it. */
8
9
  export class AuthStore {
9
10
  dir;
10
11
  file;
@@ -30,7 +30,9 @@ export class BrowserRuntime {
30
30
  }
31
31
  }
32
32
  async saveAuthState() {
33
- await this.authStore.save(await this.context.storageState());
33
+ // Services may keep the session in IndexedDB; the default state excludes it.
34
+ // Playwright throws if a service stores values it cannot serialise (e.g. Blobs).
35
+ await this.authStore.save(await this.context.storageState({ indexedDB: true }));
34
36
  }
35
37
  async close() {
36
38
  await this.browser.close();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chatbridge/runtime",
3
- "version": "0.1.0",
3
+ "version": "0.2.1",
4
4
  "description": "Playwright runtime for chatbridge: browser lifecycle and auth-state persistence",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "playwright": "1.63.0",
28
- "@chatbridge/provider": "0.1.0"
28
+ "@chatbridge/provider": "0.2.0"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@chatbridge/example-dummy-chat": "0.0.0"