@workglow/browser-control 0.2.31 → 0.2.32

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 ADDED
@@ -0,0 +1,44 @@
1
+ # @workglow/browser-control
2
+
3
+ Browser-control tasks and `IBrowserContext` abstraction for Workglow. Backend implementations ship as separate provider packages.
4
+
5
+ ## Features
6
+
7
+ - 26 task classes for browser automation (navigate, click, fill, snapshot, screenshot, etc.) built against `IBrowserContext`
8
+ - Abstract `CDPBrowserBackend` base for backends that drive a Chrome DevTools Protocol target
9
+ - DI wire-up via `registerBrowserDeps`
10
+
11
+ ## Backends
12
+
13
+ Install whichever backend(s) you need alongside this package:
14
+
15
+ - `@workglow/playwright` — Playwright (Node/Bun)
16
+ - `@workglow/electron` — native Electron `webContents` (Electron main process)
17
+ - `@workglow/bun-webview` — `Bun.WebView` (Bun-only)
18
+
19
+ ## Installation
20
+
21
+ ```bash
22
+ bun add @workglow/browser-control @workglow/playwright
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ ```typescript
28
+ import { registerBrowserDeps, BrowserNavigateTask } from "@workglow/browser-control/task";
29
+ import { PlaywrightBackend } from "@workglow/playwright";
30
+
31
+ registerBrowserDeps({
32
+ createContext: () => new PlaywrightBackend(),
33
+ availableBackends: ["local", "cloud"],
34
+ defaultBackend: "local",
35
+ profileStorage: { /* consumer-defined */ },
36
+ });
37
+
38
+ const task = new BrowserNavigateTask({ url: "https://example.com" });
39
+ await task.run();
40
+ ```
41
+
42
+ ## License
43
+
44
+ Apache 2.0 - See [LICENSE](../../LICENSE) for details.
@@ -4,7 +4,6 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  export * from "./BrowserSessionRegistry";
7
- export * from "./BunWebViewBackend";
8
7
  export * from "./CDPBrowserBackend";
9
8
  export * from "./IBrowserContext";
10
9
  export * from "./tasks";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/task/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/task/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC"}
package/dist/task.d.ts CHANGED
@@ -5,6 +5,4 @@
5
5
  */
6
6
  export * from "./task/index";
7
7
  export * from "./task/BrowserTaskDeps";
8
- export * from "./task/ElectronBackend";
9
- export * from "./task/PlaywrightBackend";
10
8
  //# sourceMappingURL=task.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../src/task.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC"}
1
+ {"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../src/task.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,wBAAwB,CAAC"}