@inbrowser/driver 0.0.0-stage → 0.5.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.
Files changed (39) hide show
  1. package/AGENTS.md +20 -0
  2. package/LICENSE +21 -0
  3. package/README.md +112 -2
  4. package/THIRD_PARTY_NOTICES.txt +216 -0
  5. package/dist/LICENSE +21 -0
  6. package/dist/THIRD_PARTY_NOTICES.txt +216 -0
  7. package/dist/index.js +1631 -0
  8. package/dist/index.js.map +7 -0
  9. package/dist/preload.iife.js +5 -0
  10. package/dist/preload.js +2 -0
  11. package/dist/puppeteer.js +2569 -0
  12. package/dist/puppeteer.js.map +7 -0
  13. package/dist/tools.js +1283 -0
  14. package/dist/tools.js.map +7 -0
  15. package/dist/types/host/capture-seam.d.ts +17 -0
  16. package/dist/types/host/preview-backend.d.ts +9 -0
  17. package/dist/types/host/sandbox-connect.d.ts +38 -0
  18. package/dist/types/host/viewport-capture.d.ts +2 -0
  19. package/dist/types/index.d.ts +5 -0
  20. package/dist/types/preload/act.d.ts +4 -0
  21. package/dist/types/preload/capture-seam.d.ts +1 -0
  22. package/dist/types/preload/cursor-overlay.d.ts +5 -0
  23. package/dist/types/preload/diagnostics.d.ts +13 -0
  24. package/dist/types/preload/diff.d.ts +3 -0
  25. package/dist/types/preload/entry.d.ts +1 -0
  26. package/dist/types/preload/eval.d.ts +7 -0
  27. package/dist/types/preload/export.d.ts +11 -0
  28. package/dist/types/preload/intrinsics.d.ts +255 -0
  29. package/dist/types/preload/observe.d.ts +27 -0
  30. package/dist/types/preload/ref-registry.d.ts +44 -0
  31. package/dist/types/preload/silent-capture.d.ts +3 -0
  32. package/dist/types/protocol.d.ts +103 -0
  33. package/dist/types/puppeteer/cdp-driver.d.ts +11 -0
  34. package/dist/types/puppeteer/index.d.ts +2 -0
  35. package/dist/types/tools/format.d.ts +7 -0
  36. package/dist/types/tools/index.d.ts +9 -0
  37. package/dist/types/tools/schemas.d.ts +36 -0
  38. package/dist/types/types.d.ts +268 -0
  39. package/package.json +70 -4
package/AGENTS.md ADDED
@@ -0,0 +1,20 @@
1
+ # AGENTS.md — `@inbrowser/driver`
2
+
3
+ ## Purpose
4
+
5
+ `@inbrowser/driver` provides fast 1-RTT semantic browser UI observation, transactional multi-step actions, silent/GPU visual capture, and structured agent tool handlers (`ui_observe`, `ui_act`, `ui_capture`, opt-in `ui_eval`) across `<iframe>` previews, `MessagePort` channels, `@inbrowser/node` container previews, and real Chrome DevTools Protocol tabs (`puppeteer-core`).
6
+
7
+ ## Architectural Boundaries
8
+
9
+ 1. **Zero Core Runtime Dependencies:** `@inbrowser/driver` ships zero `dependencies`. Optional ecosystem integrations (`@inbrowser/node`, `@inbrowser/agent`, `@inbrowser/sandbox`, `puppeteer-core`) live strictly in optional `peerDependencies`.
10
+ 2. **Self-Contained Preload (`<= 44 KiB` minified, `<= 16 KiB` gzipped):** `src/preload/entry.ts` compiles into a minified IIFE (`dist/preload.iife.js`) injected into guest frames. Modules under `src/preload/**` may only import sibling modules in `src/preload/` or pure leaf contracts (`src/types.ts`, `src/protocol.ts`), and must capture browser intrinsics in `src/preload/intrinsics.ts` before guest scripts run.
11
+ 3. **Browser-Safe Core & Tools:** `src/index.ts`, `src/types.ts`, `src/protocol.ts`, `src/preload/**`, `src/host/**`, and `src/tools/**` must never import `node:*` modules or `puppeteer-core`. Only `src/puppeteer/**` may import `puppeteer-core`.
12
+ 4. **Untrusted Wire Inputs:** Cross-origin `MessagePort` envelopes are untrusted inputs. Validate channel namespaces, protocol versions, message kinds, and payload shapes using runtime type guards (`unknown` -> narrowed types). Never use `any`; any `as` assertion other than `as const` requires an immediately preceding or same-line `// Invariant:` comment explaining why runtime narrowing cannot express it.
13
+ 5. **Explicit Unsupported Seams:** Unimplemented capabilities throw a coded `DriverError` (`DRIVER_UNSUPPORTED` or `DRIVER_EVAL_DISABLED`) rather than returning silent fake success.
14
+ 6. **Deterministic Resource Teardown:** Every pending operation requires an owner, timeout or `AbortSignal` path, and `dispose()` cleanup. Shut down fixture HTTP servers and Playwright resources inside `try / finally` blocks so zero ports or workers leak.
15
+
16
+ ## Testing & Verification
17
+
18
+ - **Unit Tier (`bun run --cwd packages/driver test`):** Fast pure-TypeScript Vitest suites under `tests/unit/**/*.unit.test.ts` (protocol codecs, diffing, fingerprint matching, output formatting, compile-time ecosystem assignability).
19
+ - **Browser Acceptance Tier (`bun run test:e2e:driver`):** Real Chromium Playwright specs under `tests/*.spec.ts` against multi-origin HTTP fixtures (`DRIVER_TEST_PORT`, default `4700`) and the 3-origin `@inbrowser/node` `SandboxContainer` harness. Build `@inbrowser/node` and `@inbrowser/driver` before running E2E specs. Never substitute JSDOM or internal collaborator mocks for real browser behavior.
20
+ - **Boundary & Hygiene Gate (`bun run build:driver`):** Runs `scripts/build.mjs` (preload raw/gzip byte budgets, core/preload metafile graph checks, declaration emit with `types: []`, export target checks) followed by `scripts/check-boundaries.mjs` (AST import graph, `any`/bare-`as` invariant check, hygiene rules).
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 David East
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,113 @@
1
- # Temporary Holding Version
1
+ # `@inbrowser/driver`
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Fast 1-RTT browser UI observation, transactional action execution, and visual capture driver for live `<iframe>` previews, `MessagePort` channels, `@inbrowser/node` container previews, and optional real-CDP tabs.
4
+
5
+ - **Zero Core Runtime Dependencies:** Core, preload, and agent tool bundles are browser-safe with zero runtime npm dependencies.
6
+ - **1-RTT Semantic Observation & Transactional Actions:** Compact ARIA, landmark, `data-driver`, and open Shadow DOM snapshots with `<video>`, `<audio>`, `<canvas>`, and `<svg>` metadata, drained console/page/network/compile diagnostics, self-healing semantic fingerprints, user-takeover abort guards, and localized revision diffs.
7
+ - **Silent & GPU Visual Capture:** In-frame silent WebP/PNG screenshots and WebM video recordings on cross-origin previews without screen-share prompts, plus optional `DisplayMediaProvider` GPU capture (`RestrictionTarget` / `CropTarget`).
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ bun add @inbrowser/driver
13
+ ```
14
+
15
+ `@inbrowser/driver` ships with zero core runtime npm dependencies. If you use it with the optional container, agent, or CDP backends, install those peers alongside it (`@inbrowser/node`, `@inbrowser/agent`, `@inbrowser/sandbox`, or `puppeteer-core@^24.0.0`).
16
+
17
+ ## Package Entrypoints
18
+
19
+ | Entrypoint | Environment | Exports |
20
+ | --- | --- | --- |
21
+ | `@inbrowser/driver` | Browser / Neutral | `PageDriver`, `DriverError`, `connectContainerPreview`, `connectSandboxPreview`, `connectIframe`, `connectPort`, `buildContainerPreviewClientScript`, protocol type guards |
22
+ | `@inbrowser/driver/preload` | Browser / Neutral | `DRIVER_PRELOAD_SOURCE`, `DRIVER_PRELOAD_BYTE_LENGTH` (`<= 44 KiB` minified, `<= 16 KiB` gzipped) |
23
+ | `@inbrowser/driver/tools` | Browser / Neutral | `createDriverTools` (`ui_observe`, `ui_act`, `ui_capture`, opt-in `ui_eval`), JSON Schemas, compact YAML formatters |
24
+ | `@inbrowser/driver/puppeteer` | Node / CDP (`puppeteer-core`) | `connectPuppeteerDriver`, `PuppeteerDriverOptions`, `ConnectionTransport` |
25
+
26
+ ## Quick Start
27
+
28
+ ### 1. Connect an `@inbrowser/node` `SandboxContainer` or `BrowserContainer` Preview
29
+
30
+ `connectContainerPreview` (alias `connectSandboxPreview`) injects `DRIVER_PRELOAD_SOURCE` via `PreviewOptions.clientScript`, subscribes to `container.onPreviewClient(port, ...)`, navigates an optional `<iframe>`, and automatically rebinds fresh `MessagePort`s across cross-origin full-page navigations:
31
+
32
+ ```ts
33
+ import { connectContainerPreview } from '@inbrowser/driver';
34
+ import { createDriverTools } from '@inbrowser/driver/tools';
35
+
36
+ const iframe = document.createElement('iframe');
37
+ document.body.appendChild(iframe);
38
+
39
+ const { previewUrl, driver } = await connectContainerPreview(sandbox, 3000, {
40
+ iframe,
41
+ });
42
+
43
+ // Zero-glue tool handlers compatible with @inbrowser/agent and @inbrowser/sandbox
44
+ const tools = createDriverTools(driver);
45
+
46
+ // Or call the PageDriver API directly:
47
+ const snapshot = await driver.observe();
48
+ const actResult = await driver.act({
49
+ rev: snapshot.rev,
50
+ steps: [
51
+ { kind: 'fill', target: { role: 'textbox', name: 'Item Title' }, value: 'Draft v1' },
52
+ { kind: 'click', target: { role: 'button', name: 'Save' } },
53
+ ],
54
+ });
55
+ const screenshot = await driver.capture({ mode: 'screenshot', format: 'webp' });
56
+
57
+ driver.dispose();
58
+ ```
59
+
60
+ ### 2. Connect a Preloaded `<iframe>` or `MessagePort`
61
+
62
+ Inject `DRIVER_PRELOAD_SOURCE` from `@inbrowser/driver/preload` into the guest document `<head>` before guest scripts run, then connect from the host frame:
63
+
64
+ ```ts
65
+ import { connectIframe, connectPort } from '@inbrowser/driver';
66
+ import { DRIVER_PRELOAD_SOURCE } from '@inbrowser/driver/preload';
67
+
68
+ // Direct iframe handshake (supports cross-origin frames):
69
+ const iframeDriver = await connectIframe(iframeElement, { allowEval: false });
70
+
71
+ // Or over an explicit MessagePort pair:
72
+ const portDriver = await connectPort(hostPort);
73
+ ```
74
+
75
+ ### 3. Agent Tool Surface (`@inbrowser/driver/tools`)
76
+
77
+ `createDriverTools(driver, options)` returns structured, non-throwing tool definitions with token-budgeted YAML summaries:
78
+
79
+ - `ui_observe` — Observe semantic refs, media/canvas state, and drained diagnostics (`scope`, `includeAllText`).
80
+ - `ui_act` — Execute a transactional batch of steps (`click`, `fill`, `setValue`, `select`, `press`, `drag`, `navigate`, `waitFor`) against `rev` in 1 RTT.
81
+ - `ui_capture` — Capture `screenshot` (`webp` / `png`, viewport or `target`) or `start_recording` / `stop_recording` (`video/webm`).
82
+ - `ui_eval` — Opt-in (`{ allowEval: true }` on both driver and `createDriverTools`) JavaScript expression evaluation with drained diagnostics.
83
+
84
+ ### 4. Real-CDP Backend (`@inbrowser/driver/puppeteer`)
85
+
86
+ When `puppeteer-core` is installed, `connectPuppeteerDriver` provides the identical `PageDriver` contract backed by Chrome DevTools Protocol (`trustedInput: true`, native CDP screenshots/screencast):
87
+
88
+ ```ts
89
+ import { connectPuppeteerDriver } from '@inbrowser/driver/puppeteer';
90
+
91
+ const driver = await connectPuppeteerDriver({
92
+ browserWSEndpoint: 'ws://127.0.0.1:9222/devtools/browser/...',
93
+ targetUrl: 'http://localhost:3000/',
94
+ });
95
+
96
+ const snap = await driver.observe();
97
+ driver.dispose();
98
+ ```
99
+
100
+ ## Development & Verification
101
+
102
+ From the monorepo root:
103
+
104
+ ```bash
105
+ bun run build:driver
106
+ bun run --cwd packages/driver typecheck
107
+ bun run --cwd packages/driver test
108
+ bun run test:e2e:driver
109
+ ```
110
+
111
+ ## License
112
+
113
+ MIT licensed. Built `dist/` artifacts include `LICENSE` and `THIRD_PARTY_NOTICES.txt`.
@@ -0,0 +1,216 @@
1
+ THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
2
+ ============================================
3
+
4
+ @inbrowser/driver is licensed under the MIT License (see LICENSE in the
5
+ repository root):
6
+
7
+ MIT License
8
+ Copyright (c) 2026 @inbrowser/driver contributors
9
+
10
+ --------------------------------------------------------------------------------
11
+ Optional Peer Dependency: puppeteer-core
12
+ --------------------------------------------------------------------------------
13
+
14
+ The default entrypoints (`@inbrowser/driver`, `@inbrowser/driver/preload`, and
15
+ `@inbrowser/driver/tools`) have zero runtime dependencies.
16
+
17
+ When consumers opt into the `@inbrowser/driver/puppeteer` entrypoint, it
18
+ imports `puppeteer-core` as an optional peer dependency (`external` at build
19
+ time; not bundled into `dist/`).
20
+
21
+ Package: puppeteer-core
22
+ Upstream: https://pptr.dev
23
+ License: Apache-2.0
24
+ Copyright Notice:
25
+ Copyright 2017 Google Inc.
26
+
27
+ Licensed under the Apache License, Version 2.0 (the "License");
28
+ you may not use this file except in compliance with the License.
29
+ You may obtain a copy of the License at
30
+
31
+ http://www.apache.org/licenses/LICENSE-2.0
32
+
33
+ Unless required by applicable law or agreed to in writing, software
34
+ distributed under the License is distributed on an "AS IS" BASIS,
35
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36
+ See the License for the specific language governing permissions and
37
+ limitations under the License.
38
+
39
+ Full Apache License, Version 2.0 Text:
40
+
41
+ Apache License
42
+ Version 2.0, January 2004
43
+ http://www.apache.org/licenses/
44
+
45
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
46
+
47
+ 1. Definitions.
48
+
49
+ "License" shall mean the terms and conditions for use, reproduction,
50
+ and distribution as defined by Sections 1 through 9 of this document.
51
+
52
+ "Licensor" shall mean the copyright owner or entity authorized by
53
+ the copyright owner that is granting the License.
54
+
55
+ "Legal Entity" shall mean the union of the acting entity and all
56
+ other entities that control, are controlled by, or are under common
57
+ control with that entity. For the purposes of this definition,
58
+ "control" means (i) the power, direct or indirect, to cause the
59
+ direction or management of such entity, whether by contract or
60
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
61
+ outstanding shares, or (iii) beneficial ownership of such entity.
62
+
63
+ "You" (or "Your") shall mean an individual or Legal Entity
64
+ exercising permissions granted by this License.
65
+
66
+ "Source" form shall mean the preferred form for making modifications,
67
+ including but not limited to software source code, documentation
68
+ source, and configuration files.
69
+
70
+ "Object" form shall mean any form resulting from mechanical
71
+ transformation or translation of a Source form, including but
72
+ not limited to compiled object code, generated documentation,
73
+ and conversions to other media types.
74
+
75
+ "Work" shall mean the work of authorship, whether in Source or
76
+ Object form, made available under the License, as indicated by a
77
+ copyright notice that is included in or attached to the work
78
+ (an example is provided in the Appendix below).
79
+
80
+ "Derivative Works" shall mean any work, whether in Source or Object
81
+ form, that is based on (or derived from) the Work and for which the
82
+ editorial revisions, annotations, elaborations, or other modifications
83
+ represent, as a whole, an original work of authorship. For the purposes
84
+ of this License, Derivative Works shall not include works that remain
85
+ separable from, or merely link (or bind by name) to the interfaces of,
86
+ the Work and Derivative Works thereof.
87
+
88
+ "Contribution" shall mean any work of authorship, including
89
+ the original version of the Work and any modifications or additions
90
+ to that Work or Derivative Works thereof, that is intentionally
91
+ submitted to Licensor for inclusion in the Work by the copyright owner
92
+ or by an individual or Legal Entity authorized to submit on behalf of
93
+ the copyright owner. For the purposes of this definition, "submitted"
94
+ means any form of electronic, verbal, or written communication sent
95
+ to the Licensor or its representatives, including but not limited to
96
+ communication on electronic mailing lists, source code control systems,
97
+ and issue tracking systems that are managed by, or on behalf of, the
98
+ Licensor for the purpose of discussing and improving the Work, but
99
+ excluding communication that is conspicuously marked or otherwise
100
+ designated in writing by the copyright owner as "Not a Contribution."
101
+
102
+ "Contributor" shall mean Licensor and any individual or Legal Entity
103
+ on behalf of whom a Contribution has been received by Licensor and
104
+ subsequently incorporated within the Work.
105
+
106
+ 2. Grant of Copyright License. Subject to the terms and conditions of
107
+ this License, each Contributor hereby grants to You a perpetual,
108
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
109
+ copyright license to reproduce, prepare Derivative Works of,
110
+ publicly display, publicly perform, sublicense, and distribute the
111
+ Work and such Derivative Works in Source or Object form.
112
+
113
+ 3. Grant of Patent License. Subject to the terms and conditions of
114
+ this License, each Contributor hereby grants to You a perpetual,
115
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
116
+ (except as stated in this section) patent license to make, have made,
117
+ use, offer to sell, sell, import, and otherwise transfer the Work,
118
+ where such license applies only to those patent claims licensable
119
+ by such Contributor that are necessarily infringed by their
120
+ Contribution(s) alone or by combination of their Contribution(s)
121
+ with the Work to which such Contribution(s) was submitted. If You
122
+ institute patent litigation against any entity (including a
123
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
124
+ or a Contribution incorporated within the Work constitutes direct
125
+ or contributory patent infringement, then any patent licenses
126
+ granted to You under this License for that Work shall terminate
127
+ as of the date such litigation is filed.
128
+
129
+ 4. Redistribution. You may reproduce and distribute copies of the
130
+ Work or Derivative Works thereof in any medium, with or without
131
+ modifications, and in Source or Object form, provided that You
132
+ meet the following conditions:
133
+
134
+ (a) You must give any other recipients of the Work or
135
+ Derivative Works a copy of this License; and
136
+
137
+ (b) You must cause any modified files to carry prominent notices
138
+ stating that You changed the files; and
139
+
140
+ (c) You must retain, in the Source form of any Derivative Works
141
+ that You distribute, all copyright, patent, trademark, and
142
+ attribution notices from the Source form of the Work,
143
+ excluding those notices that do not pertain to any part of
144
+ the Derivative Works; and
145
+
146
+ (d) If the Work includes a "NOTICE" text file as part of its
147
+ distribution, then any Derivative Works that You distribute must
148
+ include a readable copy of the attribution notices contained
149
+ within such NOTICE file, excluding those notices that do not
150
+ pertain to any part of the Derivative Works, in at least one
151
+ of the following places: within a NOTICE text file distributed
152
+ as part of the Derivative Works; within the Source form or
153
+ documentation, if provided along with the Derivative Works; or,
154
+ within a display generated by the Derivative Works, if and
155
+ wherever such third-party notices normally appear. The contents
156
+ of the NOTICE file are for informational purposes only and
157
+ do not modify the License. You may add Your own attribution
158
+ notices within Derivative Works that You distribute, alongside
159
+ or as an addendum to the NOTICE text from the Work, provided
160
+ that such additional attribution notices cannot be construed
161
+ as modifying the License.
162
+
163
+ You may add Your own copyright statement to Your modifications and
164
+ may provide additional or different license terms and conditions
165
+ for use, reproduction, or distribution of Your modifications, or
166
+ for any such Derivative Works as a whole, provided Your use,
167
+ reproduction, and distribution of the Work otherwise complies with
168
+ the conditions stated in this License.
169
+
170
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
171
+ any Contribution intentionally submitted for inclusion in the Work
172
+ by You to the Licensor shall be under the terms and conditions of
173
+ this License, without any additional terms or conditions.
174
+ Notwithstanding the above, nothing herein shall supersede or modify
175
+ the terms of any separate license agreement you may have executed
176
+ with Licensor regarding such Contributions.
177
+
178
+ 6. Trademarks. This License does not grant permission to use the trade
179
+ names, trademarks, service marks, or product names of the Licensor,
180
+ except as required for reasonable and customary use in describing the
181
+ origin of the Work and reproducing the content of the NOTICE file.
182
+
183
+ 7. Disclaimer of Warranty. Unless required by applicable law or
184
+ agreed to in writing, Licensor provides the Work (and each
185
+ Contributor provides its Contributions) on an "AS IS" BASIS,
186
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
187
+ implied, including, without limitation, any warranties or conditions
188
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
189
+ PARTICULAR PURPOSE. You are solely responsible for determining the
190
+ appropriateness of using or redistributing the Work and assume any
191
+ risks associated with Your exercise of permissions under this License.
192
+
193
+ 8. Limitation of Liability. In no event and under no legal theory,
194
+ whether in tort (including negligence), contract, or otherwise,
195
+ unless required by applicable law (such as deliberate and grossly
196
+ negligent acts) or agreed to in writing, shall any Contributor be
197
+ liable to You for damages, including any direct, indirect, special,
198
+ incidental, or consequential damages of any character arising as a
199
+ result of this License or out of the use or inability to use the
200
+ Work (including but not limited to damages for loss of goodwill,
201
+ work stoppage, computer failure or malfunction, or any and all
202
+ other commercial damages or losses), even if such Contributor
203
+ has been advised of the possibility of such damages.
204
+
205
+ 9. Accepting Warranty or Additional Liability. While redistributing
206
+ the Work or Derivative Works thereof, You may choose to offer,
207
+ and charge a fee for, acceptance of support, warranty, indemnity,
208
+ or other liability obligations and/or rights consistent with this
209
+ License. However, in accepting such obligations, You may act only
210
+ on Your own behalf and on Your sole responsibility, not on behalf
211
+ of any other Contributor, and only if You agree to indemnify,
212
+ defend, and hold each Contributor harmless for any liability
213
+ incurred by, or claims asserted against, such Contributor by reason
214
+ of your accepting any such warranty or additional liability.
215
+
216
+ END OF TERMS AND CONDITIONS
package/dist/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 David East
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,216 @@
1
+ THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
2
+ ============================================
3
+
4
+ @inbrowser/driver is licensed under the MIT License (see LICENSE in the
5
+ repository root):
6
+
7
+ MIT License
8
+ Copyright (c) 2026 @inbrowser/driver contributors
9
+
10
+ --------------------------------------------------------------------------------
11
+ Optional Peer Dependency: puppeteer-core
12
+ --------------------------------------------------------------------------------
13
+
14
+ The default entrypoints (`@inbrowser/driver`, `@inbrowser/driver/preload`, and
15
+ `@inbrowser/driver/tools`) have zero runtime dependencies.
16
+
17
+ When consumers opt into the `@inbrowser/driver/puppeteer` entrypoint, it
18
+ imports `puppeteer-core` as an optional peer dependency (`external` at build
19
+ time; not bundled into `dist/`).
20
+
21
+ Package: puppeteer-core
22
+ Upstream: https://pptr.dev
23
+ License: Apache-2.0
24
+ Copyright Notice:
25
+ Copyright 2017 Google Inc.
26
+
27
+ Licensed under the Apache License, Version 2.0 (the "License");
28
+ you may not use this file except in compliance with the License.
29
+ You may obtain a copy of the License at
30
+
31
+ http://www.apache.org/licenses/LICENSE-2.0
32
+
33
+ Unless required by applicable law or agreed to in writing, software
34
+ distributed under the License is distributed on an "AS IS" BASIS,
35
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36
+ See the License for the specific language governing permissions and
37
+ limitations under the License.
38
+
39
+ Full Apache License, Version 2.0 Text:
40
+
41
+ Apache License
42
+ Version 2.0, January 2004
43
+ http://www.apache.org/licenses/
44
+
45
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
46
+
47
+ 1. Definitions.
48
+
49
+ "License" shall mean the terms and conditions for use, reproduction,
50
+ and distribution as defined by Sections 1 through 9 of this document.
51
+
52
+ "Licensor" shall mean the copyright owner or entity authorized by
53
+ the copyright owner that is granting the License.
54
+
55
+ "Legal Entity" shall mean the union of the acting entity and all
56
+ other entities that control, are controlled by, or are under common
57
+ control with that entity. For the purposes of this definition,
58
+ "control" means (i) the power, direct or indirect, to cause the
59
+ direction or management of such entity, whether by contract or
60
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
61
+ outstanding shares, or (iii) beneficial ownership of such entity.
62
+
63
+ "You" (or "Your") shall mean an individual or Legal Entity
64
+ exercising permissions granted by this License.
65
+
66
+ "Source" form shall mean the preferred form for making modifications,
67
+ including but not limited to software source code, documentation
68
+ source, and configuration files.
69
+
70
+ "Object" form shall mean any form resulting from mechanical
71
+ transformation or translation of a Source form, including but
72
+ not limited to compiled object code, generated documentation,
73
+ and conversions to other media types.
74
+
75
+ "Work" shall mean the work of authorship, whether in Source or
76
+ Object form, made available under the License, as indicated by a
77
+ copyright notice that is included in or attached to the work
78
+ (an example is provided in the Appendix below).
79
+
80
+ "Derivative Works" shall mean any work, whether in Source or Object
81
+ form, that is based on (or derived from) the Work and for which the
82
+ editorial revisions, annotations, elaborations, or other modifications
83
+ represent, as a whole, an original work of authorship. For the purposes
84
+ of this License, Derivative Works shall not include works that remain
85
+ separable from, or merely link (or bind by name) to the interfaces of,
86
+ the Work and Derivative Works thereof.
87
+
88
+ "Contribution" shall mean any work of authorship, including
89
+ the original version of the Work and any modifications or additions
90
+ to that Work or Derivative Works thereof, that is intentionally
91
+ submitted to Licensor for inclusion in the Work by the copyright owner
92
+ or by an individual or Legal Entity authorized to submit on behalf of
93
+ the copyright owner. For the purposes of this definition, "submitted"
94
+ means any form of electronic, verbal, or written communication sent
95
+ to the Licensor or its representatives, including but not limited to
96
+ communication on electronic mailing lists, source code control systems,
97
+ and issue tracking systems that are managed by, or on behalf of, the
98
+ Licensor for the purpose of discussing and improving the Work, but
99
+ excluding communication that is conspicuously marked or otherwise
100
+ designated in writing by the copyright owner as "Not a Contribution."
101
+
102
+ "Contributor" shall mean Licensor and any individual or Legal Entity
103
+ on behalf of whom a Contribution has been received by Licensor and
104
+ subsequently incorporated within the Work.
105
+
106
+ 2. Grant of Copyright License. Subject to the terms and conditions of
107
+ this License, each Contributor hereby grants to You a perpetual,
108
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
109
+ copyright license to reproduce, prepare Derivative Works of,
110
+ publicly display, publicly perform, sublicense, and distribute the
111
+ Work and such Derivative Works in Source or Object form.
112
+
113
+ 3. Grant of Patent License. Subject to the terms and conditions of
114
+ this License, each Contributor hereby grants to You a perpetual,
115
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
116
+ (except as stated in this section) patent license to make, have made,
117
+ use, offer to sell, sell, import, and otherwise transfer the Work,
118
+ where such license applies only to those patent claims licensable
119
+ by such Contributor that are necessarily infringed by their
120
+ Contribution(s) alone or by combination of their Contribution(s)
121
+ with the Work to which such Contribution(s) was submitted. If You
122
+ institute patent litigation against any entity (including a
123
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
124
+ or a Contribution incorporated within the Work constitutes direct
125
+ or contributory patent infringement, then any patent licenses
126
+ granted to You under this License for that Work shall terminate
127
+ as of the date such litigation is filed.
128
+
129
+ 4. Redistribution. You may reproduce and distribute copies of the
130
+ Work or Derivative Works thereof in any medium, with or without
131
+ modifications, and in Source or Object form, provided that You
132
+ meet the following conditions:
133
+
134
+ (a) You must give any other recipients of the Work or
135
+ Derivative Works a copy of this License; and
136
+
137
+ (b) You must cause any modified files to carry prominent notices
138
+ stating that You changed the files; and
139
+
140
+ (c) You must retain, in the Source form of any Derivative Works
141
+ that You distribute, all copyright, patent, trademark, and
142
+ attribution notices from the Source form of the Work,
143
+ excluding those notices that do not pertain to any part of
144
+ the Derivative Works; and
145
+
146
+ (d) If the Work includes a "NOTICE" text file as part of its
147
+ distribution, then any Derivative Works that You distribute must
148
+ include a readable copy of the attribution notices contained
149
+ within such NOTICE file, excluding those notices that do not
150
+ pertain to any part of the Derivative Works, in at least one
151
+ of the following places: within a NOTICE text file distributed
152
+ as part of the Derivative Works; within the Source form or
153
+ documentation, if provided along with the Derivative Works; or,
154
+ within a display generated by the Derivative Works, if and
155
+ wherever such third-party notices normally appear. The contents
156
+ of the NOTICE file are for informational purposes only and
157
+ do not modify the License. You may add Your own attribution
158
+ notices within Derivative Works that You distribute, alongside
159
+ or as an addendum to the NOTICE text from the Work, provided
160
+ that such additional attribution notices cannot be construed
161
+ as modifying the License.
162
+
163
+ You may add Your own copyright statement to Your modifications and
164
+ may provide additional or different license terms and conditions
165
+ for use, reproduction, or distribution of Your modifications, or
166
+ for any such Derivative Works as a whole, provided Your use,
167
+ reproduction, and distribution of the Work otherwise complies with
168
+ the conditions stated in this License.
169
+
170
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
171
+ any Contribution intentionally submitted for inclusion in the Work
172
+ by You to the Licensor shall be under the terms and conditions of
173
+ this License, without any additional terms or conditions.
174
+ Notwithstanding the above, nothing herein shall supersede or modify
175
+ the terms of any separate license agreement you may have executed
176
+ with Licensor regarding such Contributions.
177
+
178
+ 6. Trademarks. This License does not grant permission to use the trade
179
+ names, trademarks, service marks, or product names of the Licensor,
180
+ except as required for reasonable and customary use in describing the
181
+ origin of the Work and reproducing the content of the NOTICE file.
182
+
183
+ 7. Disclaimer of Warranty. Unless required by applicable law or
184
+ agreed to in writing, Licensor provides the Work (and each
185
+ Contributor provides its Contributions) on an "AS IS" BASIS,
186
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
187
+ implied, including, without limitation, any warranties or conditions
188
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
189
+ PARTICULAR PURPOSE. You are solely responsible for determining the
190
+ appropriateness of using or redistributing the Work and assume any
191
+ risks associated with Your exercise of permissions under this License.
192
+
193
+ 8. Limitation of Liability. In no event and under no legal theory,
194
+ whether in tort (including negligence), contract, or otherwise,
195
+ unless required by applicable law (such as deliberate and grossly
196
+ negligent acts) or agreed to in writing, shall any Contributor be
197
+ liable to You for damages, including any direct, indirect, special,
198
+ incidental, or consequential damages of any character arising as a
199
+ result of this License or out of the use or inability to use the
200
+ Work (including but not limited to damages for loss of goodwill,
201
+ work stoppage, computer failure or malfunction, or any and all
202
+ other commercial damages or losses), even if such Contributor
203
+ has been advised of the possibility of such damages.
204
+
205
+ 9. Accepting Warranty or Additional Liability. While redistributing
206
+ the Work or Derivative Works thereof, You may choose to offer,
207
+ and charge a fee for, acceptance of support, warranty, indemnity,
208
+ or other liability obligations and/or rights consistent with this
209
+ License. However, in accepting such obligations, You may act only
210
+ on Your own behalf and on Your sole responsibility, not on behalf
211
+ of any other Contributor, and only if You agree to indemnify,
212
+ defend, and hold each Contributor harmless for any liability
213
+ incurred by, or claims asserted against, such Contributor by reason
214
+ of your accepting any such warranty or additional liability.
215
+
216
+ END OF TERMS AND CONDITIONS