@amalgm/browser 0.1.2-preview.39017048402 → 0.1.2-preview.44182928298
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/CHANGELOG.md +3 -1
- package/PURPOSE.md +106 -153
- package/README.md +27 -16
- package/SECURITY.md +28 -10
- package/dist/native/automation/LICENSE +201 -0
- package/dist/native/automation/README.md +31 -0
- package/dist/native/automation/control-auth.patch +129 -0
- package/dist/native/automation/source.json +6 -0
- package/dist/native/automation.json +90 -0
- package/dist/native/darwin-universal/amalgm-browser-keychain +0 -0
- package/dist/native/encoder-notices/README.md +7 -0
- package/dist/native/encoder-notices/darwin-arm64.LICENSE +129 -0
- package/dist/native/encoder-notices/darwin-arm64.README +46 -0
- package/dist/native/encoder-notices/darwin-x64.LICENSE +127 -0
- package/dist/native/encoder-notices/darwin-x64.README +293 -0
- package/dist/native/encoder-notices/linux-arm64.LICENSE +674 -0
- package/dist/native/encoder-notices/linux-arm64.README +67 -0
- package/dist/native/encoder-notices/linux-x64.LICENSE +674 -0
- package/dist/native/encoder-notices/linux-x64.README +67 -0
- package/dist/native/encoder-notices/win32-x64.LICENSE +674 -0
- package/dist/native/encoder-notices/win32-x64.README +792 -0
- package/dist/native/encoder.json +90 -0
- package/dist/native/engine.json +5016 -0
- package/dist/src/adapters/http/desktop-link.d.ts +7 -0
- package/dist/src/adapters/http/desktop-link.js +29 -0
- package/dist/src/adapters/http/desktop-link.js.map +1 -0
- package/dist/src/adapters/http/internal-routes.js +0 -11
- package/dist/src/adapters/http/internal-routes.js.map +1 -1
- package/dist/src/adapters/http/openapi.js +8 -1
- package/dist/src/adapters/http/openapi.js.map +1 -1
- package/dist/src/adapters/http/server.js +17 -3
- package/dist/src/adapters/http/server.js.map +1 -1
- package/dist/src/adapters/http/session-routes.js +1 -0
- package/dist/src/adapters/http/session-routes.js.map +1 -1
- package/dist/src/adapters/http/stream.d.ts +3 -2
- package/dist/src/adapters/http/stream.js +36 -52
- package/dist/src/adapters/http/stream.js.map +1 -1
- package/dist/src/adapters/http/types.d.ts +5 -0
- package/dist/src/{electron/adblock → adblock}/cache.d.ts +1 -1
- package/dist/src/{electron/adblock → adblock}/cache.js +8 -2
- package/dist/src/adblock/cache.js.map +1 -0
- package/dist/src/adblock/cosmetics.d.ts +33 -0
- package/dist/src/adblock/cosmetics.js +122 -0
- package/dist/src/adblock/cosmetics.js.map +1 -0
- package/dist/src/adblock/monitor.d.ts +4 -0
- package/dist/src/adblock/monitor.js +51 -0
- package/dist/src/adblock/monitor.js.map +1 -0
- package/dist/src/adblock/network.d.ts +15 -0
- package/dist/src/adblock/network.js +20 -0
- package/dist/src/adblock/network.js.map +1 -0
- package/dist/src/adblock/policy.js.map +1 -0
- package/dist/src/adblock/runtime.d.ts +30 -0
- package/dist/src/adblock/runtime.js +221 -0
- package/dist/src/adblock/runtime.js.map +1 -0
- package/dist/src/adblock/settings.js.map +1 -0
- package/dist/src/auth/vault.d.ts +3 -2
- package/dist/src/auth/vault.js.map +1 -1
- package/dist/src/cdp/capability.d.ts +2 -0
- package/dist/src/cdp/capability.js +8 -0
- package/dist/src/cdp/capability.js.map +1 -0
- package/dist/src/cdp/capture-png.d.ts +2 -0
- package/dist/src/cdp/capture-png.js +40 -0
- package/dist/src/cdp/capture-png.js.map +1 -0
- package/dist/src/cdp/capture.js +12 -13
- package/dist/src/cdp/capture.js.map +1 -1
- package/dist/src/cdp/navigation.d.ts +5 -0
- package/dist/src/cdp/navigation.js +53 -1
- package/dist/src/cdp/navigation.js.map +1 -1
- package/dist/src/cdp/screencast.d.ts +0 -1
- package/dist/src/cdp/screencast.js +7 -18
- package/dist/src/cdp/screencast.js.map +1 -1
- package/dist/src/chrome/cookie-adapter.d.ts +3 -0
- package/dist/src/chrome/cookie-adapter.js +6 -32
- package/dist/src/chrome/cookie-adapter.js.map +1 -1
- package/dist/src/chrome/cookie-changes.d.ts +1 -1
- package/dist/src/chrome/cookie-format.d.ts +19 -0
- package/dist/src/chrome/cookie-format.js +31 -0
- package/dist/src/chrome/cookie-format.js.map +1 -0
- package/dist/src/cookies/coordinator.d.ts +2 -2
- package/dist/src/cookies/coordinator.js +58 -24
- package/dist/src/cookies/coordinator.js.map +1 -1
- package/dist/src/cookies/database.d.ts +0 -1
- package/dist/src/cookies/database.js +10 -6
- package/dist/src/cookies/database.js.map +1 -1
- package/dist/src/cookies/jar.d.ts +1 -2
- package/dist/src/cookies/jar.js +2 -22
- package/dist/src/cookies/jar.js.map +1 -1
- package/dist/src/cookies/secret-file.d.ts +4 -2
- package/dist/src/cookies/secret-file.js +8 -32
- package/dist/src/cookies/secret-file.js.map +1 -1
- package/dist/src/cookies/types.d.ts +7 -0
- package/dist/src/credentials/keyring-helper.js +30 -0
- package/dist/src/credentials/keyring-helper.js.map +1 -0
- package/dist/src/credentials/platform-key.d.ts +3 -0
- package/dist/src/credentials/platform-key.js +92 -0
- package/dist/src/credentials/platform-key.js.map +1 -0
- package/dist/src/defaults.d.ts +3 -0
- package/dist/src/defaults.js +12 -10
- package/dist/src/defaults.js.map +1 -1
- package/dist/src/driver/attachment.d.ts +5 -0
- package/dist/src/driver/attachment.js +23 -0
- package/dist/src/driver/attachment.js.map +1 -0
- package/dist/src/driver/cli-policy.js +1 -1
- package/dist/src/driver/cli-policy.js.map +1 -1
- package/dist/src/driver/cli.d.ts +7 -0
- package/dist/src/driver/cli.js +21 -0
- package/dist/src/driver/cli.js.map +1 -0
- package/dist/src/driver/command.d.ts +5 -4
- package/dist/src/driver/command.js +86 -85
- package/dist/src/driver/command.js.map +1 -1
- package/dist/src/driver/cua.d.ts +8 -0
- package/dist/src/driver/cua.js +36 -0
- package/dist/src/driver/cua.js.map +1 -0
- package/dist/src/driver/daemon-start.d.ts +1 -0
- package/dist/src/driver/daemon-start.js +19 -0
- package/dist/src/driver/daemon-start.js.map +1 -0
- package/dist/src/driver/daemon.d.ts +28 -0
- package/dist/src/driver/daemon.js +125 -0
- package/dist/src/driver/daemon.js.map +1 -0
- package/dist/src/driver/driver.d.ts +9 -6
- package/dist/src/driver/driver.js +62 -63
- package/dist/src/driver/driver.js.map +1 -1
- package/dist/src/driver/response.d.ts +4 -0
- package/dist/src/driver/response.js +53 -0
- package/dist/src/driver/response.js.map +1 -0
- package/dist/src/electron/bounds.d.ts +4 -0
- package/dist/src/electron/bounds.js +11 -0
- package/dist/src/electron/bounds.js.map +1 -0
- package/dist/src/electron/contracts.d.ts +10 -1
- package/dist/src/electron/contracts.js +3 -0
- package/dist/src/electron/contracts.js.map +1 -1
- package/dist/src/electron/desktop-link.d.ts +25 -0
- package/dist/src/electron/desktop-link.js +153 -0
- package/dist/src/electron/desktop-link.js.map +1 -0
- package/dist/src/electron/native-context-menu.d.ts +18 -0
- package/dist/src/electron/native-context-menu.js +98 -0
- package/dist/src/electron/native-context-menu.js.map +1 -0
- package/dist/src/electron/native-downloads.d.ts +13 -0
- package/dist/src/electron/native-downloads.js +72 -0
- package/dist/src/electron/native-downloads.js.map +1 -0
- package/dist/src/electron/native-interactions.d.ts +21 -0
- package/dist/src/electron/native-interactions.js +101 -0
- package/dist/src/electron/native-interactions.js.map +1 -0
- package/dist/src/electron/native-popups.d.ts +19 -0
- package/dist/src/electron/native-popups.js +109 -0
- package/dist/src/electron/native-popups.js.map +1 -0
- package/dist/src/electron/native-presentation.d.ts +8 -0
- package/dist/src/electron/native-presentation.js +2 -0
- package/dist/src/electron/native-presentation.js.map +1 -0
- package/dist/src/electron/native-surfaces.d.ts +7 -0
- package/dist/src/electron/native-surfaces.js +214 -0
- package/dist/src/electron/native-surfaces.js.map +1 -0
- package/dist/src/electron/policy.d.ts +0 -4
- package/dist/src/electron/policy.js +0 -24
- package/dist/src/electron/policy.js.map +1 -1
- package/dist/src/electron/runtime-windows.d.ts +19 -0
- package/dist/src/electron/runtime-windows.js +115 -0
- package/dist/src/electron/runtime-windows.js.map +1 -0
- package/dist/src/electron/shell.d.ts +10 -2
- package/dist/src/electron/shell.js +22 -68
- package/dist/src/electron/shell.js.map +1 -1
- package/dist/src/electron.cjs +4551 -12940
- package/dist/src/electron.d.cts +4 -1
- package/dist/src/electron.d.ts +4 -1
- package/dist/src/electron.js +2 -1
- package/dist/src/electron.js.map +1 -1
- package/dist/src/host/desktop-protocol.d.ts +71 -0
- package/dist/src/host/desktop-protocol.js +13 -0
- package/dist/src/host/desktop-protocol.js.map +1 -0
- package/dist/src/host/desktop-windows.d.ts +6 -0
- package/dist/src/host/desktop-windows.js +34 -0
- package/dist/src/host/desktop-windows.js.map +1 -0
- package/dist/src/host/desktop.d.ts +5 -0
- package/dist/src/host/desktop.js +138 -0
- package/dist/src/host/desktop.js.map +1 -0
- package/dist/src/host/engine.d.ts +43 -0
- package/dist/src/host/engine.js +2 -0
- package/dist/src/host/engine.js.map +1 -0
- package/dist/src/host/host.d.ts +38 -0
- package/dist/src/host/host.js +213 -0
- package/dist/src/host/host.js.map +1 -0
- package/dist/src/host/live-stream.d.ts +20 -0
- package/dist/src/host/live-stream.js +115 -0
- package/dist/src/host/live-stream.js.map +1 -0
- package/dist/src/host/relay/editing.js.map +1 -0
- package/dist/src/host/relay/server.d.ts +30 -0
- package/dist/src/host/relay/server.js +219 -0
- package/dist/src/host/relay/server.js.map +1 -0
- package/dist/src/{chrome → host}/relay/view.d.ts +2 -1
- package/dist/src/{chrome → host}/relay/view.js +11 -5
- package/dist/src/host/relay/view.js.map +1 -0
- package/dist/src/host/sessions.d.ts +42 -0
- package/dist/src/host/sessions.js +158 -0
- package/dist/src/host/sessions.js.map +1 -0
- package/dist/src/host/stream-input.d.ts +4 -0
- package/dist/src/host/stream-input.js +46 -0
- package/dist/src/host/stream-input.js.map +1 -0
- package/dist/src/host/stream-viewport.d.ts +6 -0
- package/dist/src/host/stream-viewport.js +70 -0
- package/dist/src/host/stream-viewport.js.map +1 -0
- package/dist/src/host/window-protocol.d.ts +67 -0
- package/dist/src/host/window-protocol.js +2 -0
- package/dist/src/host/window-protocol.js.map +1 -0
- package/dist/src/native/artifact-archive.d.ts +4 -0
- package/dist/src/native/artifact-archive.js +110 -0
- package/dist/src/native/artifact-archive.js.map +1 -0
- package/dist/src/native/artifact-cache.d.ts +9 -0
- package/dist/src/native/artifact-cache.js +113 -0
- package/dist/src/native/artifact-cache.js.map +1 -0
- package/dist/src/native/artifact-manifest.d.ts +25 -0
- package/dist/src/native/artifact-manifest.js +60 -0
- package/dist/src/native/artifact-manifest.js.map +1 -0
- package/dist/src/native/artifact-zip.d.ts +3 -0
- package/dist/src/native/artifact-zip.js +59 -0
- package/dist/src/native/artifact-zip.js.map +1 -0
- package/dist/src/native/automation.d.ts +2 -0
- package/dist/src/native/automation.js +33 -0
- package/dist/src/native/automation.js.map +1 -0
- package/dist/src/native/cache-directory.d.ts +1 -0
- package/dist/src/native/cache-directory.js +11 -0
- package/dist/src/native/cache-directory.js.map +1 -0
- package/dist/src/native/cdp-bridge.d.ts +17 -0
- package/dist/src/native/cdp-bridge.js +240 -0
- package/dist/src/native/cdp-bridge.js.map +1 -0
- package/dist/src/native/cdp-dialogs.d.ts +19 -0
- package/dist/src/native/cdp-dialogs.js +54 -0
- package/dist/src/native/cdp-dialogs.js.map +1 -0
- package/dist/src/native/cdp-pipe.d.ts +19 -0
- package/dist/src/native/cdp-pipe.js +112 -0
- package/dist/src/native/cdp-pipe.js.map +1 -0
- package/dist/src/native/cdp.d.ts +4 -0
- package/dist/src/native/cdp.js +71 -0
- package/dist/src/native/cdp.js.map +1 -0
- package/dist/src/native/downloads.d.ts +16 -0
- package/dist/src/native/downloads.js +76 -0
- package/dist/src/native/downloads.js.map +1 -0
- package/dist/src/native/encoder.d.ts +3 -0
- package/dist/src/native/encoder.js +37 -0
- package/dist/src/native/encoder.js.map +1 -0
- package/dist/src/native/engine.d.ts +20 -0
- package/dist/src/native/engine.js +267 -0
- package/dist/src/native/engine.js.map +1 -0
- package/dist/src/native/executable.d.ts +1 -0
- package/dist/src/native/executable.js +23 -0
- package/dist/src/native/executable.js.map +1 -0
- package/dist/src/native/interactions.d.ts +30 -0
- package/dist/src/native/interactions.js +16 -0
- package/dist/src/native/interactions.js.map +1 -0
- package/dist/src/native/permissions.d.ts +10 -0
- package/dist/src/native/permissions.js +62 -0
- package/dist/src/native/permissions.js.map +1 -0
- package/dist/src/native/process.d.ts +32 -0
- package/dist/src/native/process.js +212 -0
- package/dist/src/native/process.js.map +1 -0
- package/dist/src/native/profile-cookies.d.ts +3 -0
- package/dist/src/native/profile-cookies.js +160 -0
- package/dist/src/native/profile-cookies.js.map +1 -0
- package/dist/src/persistence/session-pages.d.ts +10 -0
- package/dist/src/persistence/session-pages.js +31 -0
- package/dist/src/persistence/session-pages.js.map +1 -0
- package/dist/src/persistence/sqlite-registry.js +7 -1
- package/dist/src/persistence/sqlite-registry.js.map +1 -1
- package/dist/src/ports.d.ts +5 -1
- package/dist/src/ports.js.map +1 -1
- package/dist/src/recording/service.js +2 -1
- package/dist/src/recording/service.js.map +1 -1
- package/dist/src/registry.js +2 -0
- package/dist/src/registry.js.map +1 -1
- package/dist/src/runtime-electron/downloads.d.ts +11 -0
- package/dist/src/runtime-electron/downloads.js +60 -0
- package/dist/src/runtime-electron/downloads.js.map +1 -0
- package/dist/src/runtime-electron/engine.d.ts +4 -0
- package/dist/src/runtime-electron/engine.js +46 -0
- package/dist/src/runtime-electron/engine.js.map +1 -0
- package/dist/src/runtime-electron/interactions.d.ts +24 -0
- package/dist/src/runtime-electron/interactions.js +211 -0
- package/dist/src/runtime-electron/interactions.js.map +1 -0
- package/dist/src/runtime-electron/main.cjs +6312 -0
- package/dist/src/runtime-electron/main.d.ts +1 -0
- package/dist/src/runtime-electron/main.js +133 -0
- package/dist/src/runtime-electron/main.js.map +1 -0
- package/dist/src/runtime-electron/media-components.d.ts +3 -0
- package/dist/src/runtime-electron/media-components.js +18 -0
- package/dist/src/runtime-electron/media-components.js.map +1 -0
- package/dist/src/runtime-electron/native-frame.d.ts +5 -0
- package/dist/src/runtime-electron/native-frame.js +21 -0
- package/dist/src/runtime-electron/native-frame.js.map +1 -0
- package/dist/src/runtime-electron/network.d.ts +23 -0
- package/dist/src/runtime-electron/network.js +98 -0
- package/dist/src/runtime-electron/network.js.map +1 -0
- package/dist/src/runtime-electron/page-preload.cjs +13 -0
- package/dist/src/runtime-electron/page-preload.d.ts +1 -0
- package/dist/src/runtime-electron/page-preload.js +10 -0
- package/dist/src/runtime-electron/page-preload.js.map +1 -0
- package/dist/src/runtime-electron/page-rendering.d.ts +19 -0
- package/dist/src/runtime-electron/page-rendering.js +100 -0
- package/dist/src/runtime-electron/page-rendering.js.map +1 -0
- package/dist/src/runtime-electron/page-viewport.d.ts +14 -0
- package/dist/src/runtime-electron/page-viewport.js +39 -0
- package/dist/src/runtime-electron/page-viewport.js.map +1 -0
- package/dist/src/runtime-electron/page-views.d.ts +22 -0
- package/dist/src/runtime-electron/page-views.js +137 -0
- package/dist/src/runtime-electron/page-views.js.map +1 -0
- package/dist/src/runtime-electron/pages.d.ts +50 -0
- package/dist/src/runtime-electron/pages.js +213 -0
- package/dist/src/runtime-electron/pages.js.map +1 -0
- package/dist/src/runtime-electron/permission-scopes.d.ts +5 -0
- package/dist/src/runtime-electron/permission-scopes.js +12 -0
- package/dist/src/runtime-electron/permission-scopes.js.map +1 -0
- package/dist/src/runtime-electron/presentation.d.ts +22 -0
- package/dist/src/runtime-electron/presentation.js +143 -0
- package/dist/src/runtime-electron/presentation.js.map +1 -0
- package/dist/src/runtime-electron/profile-migration.d.ts +3 -0
- package/dist/src/runtime-electron/profile-migration.js +112 -0
- package/dist/src/runtime-electron/profile-migration.js.map +1 -0
- package/dist/src/runtime-electron/prompt-preload.cjs +24 -0
- package/dist/src/runtime-electron/prompt-preload.d.ts +1 -0
- package/dist/src/runtime-electron/prompt-preload.js +18 -0
- package/dist/src/runtime-electron/prompt-preload.js.map +1 -0
- package/dist/src/runtime-electron/prompt-window.d.ts +16 -0
- package/dist/src/runtime-electron/prompt-window.js +52 -0
- package/dist/src/runtime-electron/prompt-window.js.map +1 -0
- package/dist/src/runtime-electron/protocol.d.ts +8 -0
- package/dist/src/runtime-electron/protocol.js +43 -0
- package/dist/src/runtime-electron/protocol.js.map +1 -0
- package/dist/src/runtime-electron/ui-profile.d.ts +15 -0
- package/dist/src/runtime-electron/ui-profile.js +128 -0
- package/dist/src/runtime-electron/ui-profile.js.map +1 -0
- package/dist/src/runtime-electron/window-control.d.ts +4 -0
- package/dist/src/runtime-electron/window-control.js +40 -0
- package/dist/src/runtime-electron/window-control.js.map +1 -0
- package/dist/src/runtime-electron/windows.d.ts +28 -0
- package/dist/src/runtime-electron/windows.js +186 -0
- package/dist/src/runtime-electron/windows.js.map +1 -0
- package/dist/src/service-options.d.ts +2 -0
- package/dist/src/service.d.ts +3 -0
- package/dist/src/service.js +12 -40
- package/dist/src/service.js.map +1 -1
- package/dist/src/sessions/admission.d.ts +12 -0
- package/dist/src/sessions/admission.js +68 -0
- package/dist/src/sessions/admission.js.map +1 -0
- package/dist/src/testing.d.ts +2 -1
- package/dist/src/testing.js +5 -1
- package/dist/src/testing.js.map +1 -1
- package/dist/src/types.d.ts +0 -1
- package/dist/src/viewport.d.ts +7 -0
- package/dist/src/viewport.js +8 -0
- package/dist/src/viewport.js.map +1 -0
- package/docs/ARCHITECTURE.md +114 -58
- package/docs/AXIOMS.md +39 -17
- package/docs/CHROME.md +74 -155
- package/docs/COMPATIBILITY.md +11 -4
- package/docs/COOKIES.md +33 -19
- package/docs/ELECTRON_INTEGRATION.md +70 -100
- package/docs/ENGINE_DELIVERY.md +143 -0
- package/docs/ENGINE_RELEASE.md +72 -0
- package/docs/NATIVE_BROWSER.md +138 -0
- package/docs/OPERATIONS.md +28 -12
- package/docs/README.md +3 -1
- package/docs/REALTIME_BOUNDARY.md +3 -4
- package/docs/REST.md +13 -9
- package/docs/SDK.md +13 -8
- package/docs/SHELL_INTEGRATION.md +11 -8
- package/docs/TESTING.md +56 -62
- package/docs/TROUBLESHOOTING.md +24 -24
- package/package.json +37 -17
- package/skills/use-amalgm-browser/SKILL.md +4 -3
- package/dist/src/chrome/executable.d.ts +0 -1
- package/dist/src/chrome/executable.js +0 -55
- package/dist/src/chrome/executable.js.map +0 -1
- package/dist/src/chrome/flags.d.ts +0 -7
- package/dist/src/chrome/flags.js +0 -59
- package/dist/src/chrome/flags.js.map +0 -1
- package/dist/src/chrome/host.d.ts +0 -25
- package/dist/src/chrome/host.js +0 -135
- package/dist/src/chrome/host.js.map +0 -1
- package/dist/src/chrome/launch.d.ts +0 -11
- package/dist/src/chrome/launch.js +0 -121
- package/dist/src/chrome/launch.js.map +0 -1
- package/dist/src/chrome/relay/editing.js.map +0 -1
- package/dist/src/chrome/relay/server.d.ts +0 -18
- package/dist/src/chrome/relay/server.js +0 -120
- package/dist/src/chrome/relay/server.js.map +0 -1
- package/dist/src/chrome/relay/targets.d.ts +0 -11
- package/dist/src/chrome/relay/targets.js +0 -59
- package/dist/src/chrome/relay/targets.js.map +0 -1
- package/dist/src/chrome/relay/view.js.map +0 -1
- package/dist/src/driver/executable.d.ts +0 -8
- package/dist/src/driver/executable.js +0 -56
- package/dist/src/driver/executable.js.map +0 -1
- package/dist/src/driver/stream.d.ts +0 -1
- package/dist/src/driver/stream.js +0 -22
- package/dist/src/driver/stream.js.map +0 -1
- package/dist/src/electron/adblock/cache.js.map +0 -1
- package/dist/src/electron/adblock/cosmetics.d.ts +0 -11
- package/dist/src/electron/adblock/cosmetics.js +0 -45
- package/dist/src/electron/adblock/cosmetics.js.map +0 -1
- package/dist/src/electron/adblock/index.d.ts +0 -43
- package/dist/src/electron/adblock/index.js +0 -157
- package/dist/src/electron/adblock/index.js.map +0 -1
- package/dist/src/electron/adblock/policy.js.map +0 -1
- package/dist/src/electron/adblock/preload.js +0 -131
- package/dist/src/electron/adblock/preload.js.map +0 -1
- package/dist/src/electron/adblock/settings.js.map +0 -1
- package/dist/src/electron/cookie-adapter.d.ts +0 -17
- package/dist/src/electron/cookie-adapter.js +0 -72
- package/dist/src/electron/cookie-adapter.js.map +0 -1
- package/dist/src/electron/cookie-sync.d.ts +0 -6
- package/dist/src/electron/cookie-sync.js +0 -18
- package/dist/src/electron/cookie-sync.js.map +0 -1
- package/dist/src/electron/session.d.ts +0 -2
- package/dist/src/electron/session.js +0 -9
- package/dist/src/electron/session.js.map +0 -1
- package/dist/src/electron/shell/adblock-ipc.d.ts +0 -10
- package/dist/src/electron/shell/adblock-ipc.js +0 -44
- package/dist/src/electron/shell/adblock-ipc.js.map +0 -1
- package/dist/src/electron/shell/context-menu.d.ts +0 -11
- package/dist/src/electron/shell/context-menu.js +0 -129
- package/dist/src/electron/shell/context-menu.js.map +0 -1
- package/dist/src/electron/shell/downloads.d.ts +0 -11
- package/dist/src/electron/shell/downloads.js +0 -90
- package/dist/src/electron/shell/downloads.js.map +0 -1
- package/dist/src/electron/shell/helpers.d.ts +0 -5
- package/dist/src/electron/shell/helpers.js +0 -53
- package/dist/src/electron/shell/helpers.js.map +0 -1
- package/dist/src/electron/shell/permissions.d.ts +0 -16
- package/dist/src/electron/shell/permissions.js +0 -107
- package/dist/src/electron/shell/permissions.js.map +0 -1
- package/dist/src/electron/shell/sites.d.ts +0 -22
- package/dist/src/electron/shell/sites.js +0 -87
- package/dist/src/electron/shell/sites.js.map +0 -1
- package/dist/src/electron/shell/types.d.ts +0 -12
- package/dist/src/electron/shell/types.js +0 -2
- package/dist/src/electron/shell/types.js.map +0 -1
- package/dist/src/electron/surface/commands.d.ts +0 -4
- package/dist/src/electron/surface/commands.js +0 -49
- package/dist/src/electron/surface/commands.js.map +0 -1
- package/dist/src/electron/surface/create.d.ts +0 -4
- package/dist/src/electron/surface/create.js +0 -40
- package/dist/src/electron/surface/create.js.map +0 -1
- package/dist/src/electron/surface/events.d.ts +0 -3
- package/dist/src/electron/surface/events.js +0 -43
- package/dist/src/electron/surface/events.js.map +0 -1
- package/dist/src/electron/surface/presentation.d.ts +0 -8
- package/dist/src/electron/surface/presentation.js +0 -29
- package/dist/src/electron/surface/presentation.js.map +0 -1
- package/dist/src/electron/surface/state.d.ts +0 -12
- package/dist/src/electron/surface/state.js +0 -51
- package/dist/src/electron/surface/state.js.map +0 -1
- package/dist/src/electron/surface/types.d.ts +0 -33
- package/dist/src/electron/surface/types.js +0 -2
- package/dist/src/electron/surface/types.js.map +0 -1
- package/dist/src/electron/surface-controller.d.ts +0 -6
- package/dist/src/electron/surface-controller.js +0 -135
- package/dist/src/electron/surface-controller.js.map +0 -1
- package/dist/src/electron-preload.cjs +0 -113
- /package/dist/src/{electron/adblock → adblock}/policy.d.ts +0 -0
- /package/dist/src/{electron/adblock → adblock}/policy.js +0 -0
- /package/dist/src/{electron/adblock → adblock}/settings.d.ts +0 -0
- /package/dist/src/{electron/adblock → adblock}/settings.js +0 -0
- /package/dist/src/{electron/adblock/preload.d.ts → credentials/keyring-helper.d.ts} +0 -0
- /package/dist/src/{chrome → host}/relay/editing.d.ts +0 -0
- /package/dist/src/{chrome → host}/relay/editing.js +0 -0
package/docs/OPERATIONS.md
CHANGED
|
@@ -4,18 +4,19 @@
|
|
|
4
4
|
|
|
5
5
|
The host hands `createBrowser` its `root`; Browser never chooses one. Shell
|
|
6
6
|
hands it the user's computer-only `browser` folder from `@amalgm/core`'s
|
|
7
|
-
layout, `~/amalgm/users/<user>/.amalgm/browser`.
|
|
8
|
-
|
|
7
|
+
layout, `~/amalgm/users/<user>/.amalgm/browser`. Mutable Browser records and
|
|
8
|
+
artifacts live inside it; verified engine code uses the separate machine cache:
|
|
9
9
|
|
|
10
10
|
| Path | Contents |
|
|
11
11
|
| --- | --- |
|
|
12
|
-
| `
|
|
12
|
+
| `electron/` | runtime website profile and isolated desktop UI profiles |
|
|
13
|
+
| `chrome/` | retained legacy profile after migration |
|
|
14
|
+
| `browser-owner.sqlite` | exclusive account-root owner lease |
|
|
13
15
|
| `chrome.lease.sqlite` | OS-held exclusive lease for the process running Chrome |
|
|
14
16
|
| `cookie-adapter.json` | private native-adapter capability published by the host |
|
|
15
|
-
| `browser.db` (+ WAL files) | sessions, auth-bundle metadata, login sessions |
|
|
17
|
+
| `browser.db` (+ WAL files) | sessions, tab addresses and selection, auth-bundle metadata, login sessions |
|
|
16
18
|
| `cookie-jar.sqlite` (+ WAL files) | the account's encrypted cookie records and tombstones |
|
|
17
|
-
| `
|
|
18
|
-
| `browser.key` | the local encryption key |
|
|
19
|
+
| `browser.keychain` | public reference to the encryption key in macOS Keychain |
|
|
19
20
|
| `auth-bundles/` | encrypted auth-bundle payloads |
|
|
20
21
|
| `login-secrets.enc` | hashed login tokens |
|
|
21
22
|
| `process/` | agent-browser's config and working directory |
|
|
@@ -26,25 +27,40 @@ Directories are private and secret files are mode `0600` where the platform
|
|
|
26
27
|
supports POSIX permissions. Do not put the root inside a source repository.
|
|
27
28
|
Do not copy a live SQLite database without its committed WAL state; stop the
|
|
28
29
|
runtime or use a SQLite-safe snapshot for both `browser.db` and `cookie-jar.sqlite`.
|
|
30
|
+
Encrypted-state backups also need an authorized key recovery/export strategy;
|
|
31
|
+
copying the public Keychain reference does not copy the encryption key.
|
|
32
|
+
The old plaintext `browser.key` is removed only after verified Keychain migration.
|
|
33
|
+
Older Browser releases that require that plaintext file cannot read the migrated
|
|
34
|
+
state; do not roll back across this credential format change without a verified
|
|
35
|
+
migration plan.
|
|
29
36
|
|
|
30
37
|
## Environment
|
|
31
38
|
|
|
32
39
|
| Variable | Purpose |
|
|
33
40
|
| --- | --- |
|
|
34
|
-
| `
|
|
41
|
+
| `AMALGM_BROWSER_ELECTRON_EXECUTABLE` | explicit development engine executable |
|
|
42
|
+
| `AMALGM_BROWSER_ELECTRON_ENTRY` | explicit absolute compiled runtime entry |
|
|
43
|
+
| `AMALGM_BROWSER_LEGACY_EXECUTABLE` | old engine used only for unknown legacy-cookie decoding |
|
|
44
|
+
| `AMALGM_BROWSER_ENGINE_CACHE` | verified machine engine cache |
|
|
35
45
|
| `AMALGM_AGENT_BROWSER_BIN` | agent-browser executable |
|
|
36
46
|
| `AMALGM_FFMPEG` | ffmpeg executable |
|
|
37
|
-
| `AMALGM_BROWSER_ADBLOCK=0` |
|
|
47
|
+
| `AMALGM_BROWSER_ADBLOCK=0` | runtime ad-block kill switch |
|
|
38
48
|
| `AMALGM_BROWSER_DEBUG` | sanitized debug logging |
|
|
39
49
|
|
|
40
50
|
## Process model
|
|
41
51
|
|
|
42
52
|
One process runs a root's Chrome. It holds an exclusive SQLite lease, and
|
|
43
53
|
another process gets `CONFLICT` when it needs Chrome on the same root.
|
|
44
|
-
The OS releases the lease on process death; never remove its file.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
54
|
+
The OS releases the lease on process death; never remove its file. The native
|
|
55
|
+
control pipe closes when its owner dies, requesting Electron shutdown. The embedding
|
|
56
|
+
host (Shell) is the long-lived owner. If Chromium dies, the next action starts
|
|
57
|
+
a new process.
|
|
58
|
+
|
|
59
|
+
Browser persists each session's ordered tab addresses and selected position in
|
|
60
|
+
that same registry. A new engine restores them and automation adopts the saved
|
|
61
|
+
selection, including when multiple tabs have the same URL. This recovers tabs,
|
|
62
|
+
not their previous JavaScript execution contexts. Viewer close, reload or crash
|
|
63
|
+
never invokes that recovery path and leaves the original live targets intact.
|
|
48
64
|
|
|
49
65
|
Processes may still share the SQLite metadata: entity writes never replace the
|
|
50
66
|
whole registry, and cross-process leases stop two processes from acting on,
|
package/docs/README.md
CHANGED
|
@@ -6,7 +6,7 @@ your integration:
|
|
|
6
6
|
- [Architecture](./ARCHITECTURE.md) and [axiom map](./AXIOMS.md)
|
|
7
7
|
- [SDK](./SDK.md), [actions](./ACTIONS.md), [MCP](./MCP.md), and
|
|
8
8
|
[REST](./REST.md)
|
|
9
|
-
- [Chrome runtime](./CHROME.md) and
|
|
9
|
+
- [Native browser integration and evidence](./NATIVE_BROWSER.md), [Chrome runtime](./CHROME.md) and
|
|
10
10
|
[Electron integration](./ELECTRON_INTEGRATION.md)
|
|
11
11
|
- [Cookies](./COOKIES.md), [authentication](./AUTHENTICATION.md), and
|
|
12
12
|
[recording](./RECORDING.md)
|
|
@@ -21,3 +21,5 @@ The core package is ESM-only and requires Node.js 24+. The
|
|
|
21
21
|
`@amalgm/browser/electron` entry point also provides a generated CommonJS
|
|
22
22
|
condition for Electron main processes; no internal implementation module is
|
|
23
23
|
public.
|
|
24
|
+
|
|
25
|
+
- [Engine delivery](ENGINE_DELIVERY.md): independent cache, custom media/cookie build and pending acceptance.
|
|
@@ -5,15 +5,14 @@ directory, and general application-state synchronization. Browser owns the
|
|
|
5
5
|
runtime's Chrome, browser sessions, the account's cookie jar, auth resources,
|
|
6
6
|
recordings, and Browser events.
|
|
7
7
|
|
|
8
|
-
Browser receives opaque
|
|
9
|
-
It never imports Realtime or infers a project from Chat records. Its own
|
|
10
|
-
recordings included, stay in the root its host hands it.
|
|
8
|
+
Browser receives opaque caller and cwd values through `BrowserRuntimeContext`.
|
|
9
|
+
It never imports Realtime or infers a project from Chat records. Its own mutable
|
|
10
|
+
files, recordings included, stay in the root its host hands it.
|
|
11
11
|
|
|
12
12
|
An invisible host-provided cwd flow looks like:
|
|
13
13
|
|
|
14
14
|
```ts
|
|
15
15
|
await browser.execute(sessionId, action, {
|
|
16
|
-
projectRef: realtimeProject.id,
|
|
17
16
|
cwdRef: realtimeProject.cwdRef,
|
|
18
17
|
signal,
|
|
19
18
|
});
|
package/docs/REST.md
CHANGED
|
@@ -16,7 +16,7 @@ WebSocket clients that cannot set headers, as the subprotocol
|
|
|
16
16
|
|
|
17
17
|
## Sessions and actions
|
|
18
18
|
|
|
19
|
-
- `GET|POST /v1/sessions` (`POST` takes
|
|
19
|
+
- `GET|POST /v1/sessions` (`POST` takes optional `id` and `initialUrl`; concurrent requests join one admission, and a ready session keeps its live page regardless of `initialUrl`)
|
|
20
20
|
- `POST /v1/sessions/prune` (optional `maxAgeMs`)
|
|
21
21
|
- `GET|DELETE /v1/sessions/:sessionId`
|
|
22
22
|
- `POST /v1/sessions/:sessionId/cancel`
|
|
@@ -26,15 +26,19 @@ WebSocket clients that cannot set headers, as the subprotocol
|
|
|
26
26
|
Each of the 22 actions has an action route generated from the shared
|
|
27
27
|
descriptor; the path's session ID is the action's session.
|
|
28
28
|
|
|
29
|
-
The stream route upgrades to a WebSocket
|
|
30
|
-
|
|
29
|
+
The stream route upgrades to a WebSocket presenting the selected runtime page,
|
|
30
|
+
using the existing live-view message format:
|
|
31
31
|
|
|
32
32
|
- out: `status`, `tabs` (only this session's tabs), and `frame` (a base64
|
|
33
|
-
JPEG plus metadata)
|
|
34
|
-
- in: `input_mouse`, `input_keyboard`, and `
|
|
33
|
+
JPEG plus that frame's Chromium metadata), and `navigation`;
|
|
34
|
+
- in: `input_mouse`, `input_keyboard`, `input_touch`, and `viewport`.
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
Browser owns one selected-page screencast shared by viewers. A `viewport` message
|
|
37
|
+
contains integer CSS `width` and `height` (1–8192) and an `active` boolean.
|
|
38
|
+
The visible native input view controls page layout when present; otherwise the
|
|
39
|
+
most recently active streamed viewer controls it. Other viewers fit that same
|
|
40
|
+
rendering. Frame metadata supplies the coordinates for input.
|
|
41
|
+
Send keyboard input as a full key event, not just `key` and `code`:
|
|
38
42
|
|
|
39
43
|
```json
|
|
40
44
|
{"type":"input_keyboard","eventType":"keyDown","key":"Enter","code":"Enter","text":"\r","windowsVirtualKeyCode":13,"modifiers":0}
|
|
@@ -59,10 +63,10 @@ a failed upstream closes with `1011` and the reason `<CODE>: <message>`.
|
|
|
59
63
|
|
|
60
64
|
## Internal cookie routes
|
|
61
65
|
|
|
62
|
-
`/internal/v1/cookies/
|
|
66
|
+
`/internal/v1/cookies/bootstrap` (`GET`),
|
|
63
67
|
`/internal/v1/cookies/delta?after=<version>` (`GET`),
|
|
64
68
|
`/internal/v1/cookies/changes` (value-free SSE), and
|
|
65
|
-
`/internal/v1/cookies/
|
|
69
|
+
`/internal/v1/cookies/merge` (`POST`) serve trusted cookie adapters
|
|
66
70
|
in other processes. They require the runtime token and a matching
|
|
67
71
|
`X-Browser-Adapter-Token`, and answer `401` unless the server was given an
|
|
68
72
|
adapter token (`adapterToken`). They are not in
|
package/docs/SDK.md
CHANGED
|
@@ -25,19 +25,25 @@ opens a page, snapshots it, and closes.
|
|
|
25
25
|
## Account
|
|
26
26
|
|
|
27
27
|
`browser.account` is the account record. There is one browsing identity per
|
|
28
|
-
root: sessions, auth bundles, and logins all belong to it
|
|
29
|
-
|
|
28
|
+
root: sessions, auth bundles, and logins all belong to it. An existing root
|
|
29
|
+
rejects another account; the host selects a separate root for that profile.
|
|
30
30
|
|
|
31
31
|
## Sessions and actions
|
|
32
32
|
|
|
33
|
-
- `createSession({ id?, context? })`: creates the session, or reopens an
|
|
33
|
+
- `createSession({ id?, initialUrl?, context? })`: atomically creates the session, or reopens an
|
|
34
34
|
existing ready one; after a restart, call it before `execute` (the adapters
|
|
35
|
-
do this on every call).
|
|
35
|
+
do this on every call). Concurrent callers share one admission. `initialUrl`
|
|
36
|
+
opens only a new session; it never navigates an existing ready page.
|
|
37
|
+
Ready means the runtime owns the page, not that the website finished loading.
|
|
38
|
+
Page load failures leave that session available for another navigation, and
|
|
39
|
+
automation attaches only when an action needs it.
|
|
40
|
+
`context.ownerId` is stored as the session's owner.
|
|
36
41
|
- `getSession(id)` / `listSessions()`
|
|
37
42
|
- `execute(sessionId, BrowserAction, context?)`: one action at a time per
|
|
38
43
|
session
|
|
39
44
|
- `streamUrl(sessionId, context?)`: loopback WebSocket URL for the session's
|
|
40
|
-
live view
|
|
45
|
+
live view, carrying a session capability distinct from its CDP capability;
|
|
46
|
+
it is revoked when the session closes and rejects browser-page origins
|
|
41
47
|
- `cancel(sessionId)`
|
|
42
48
|
- `closeSession(sessionId, context?)`: closes the session's tabs
|
|
43
49
|
- `pruneSessions(maxAgeMs?)`: deletes old closed and failed sessions
|
|
@@ -83,9 +89,8 @@ See [RECORDING.md](./RECORDING.md).
|
|
|
83
89
|
## Runtime context
|
|
84
90
|
|
|
85
91
|
`BrowserRuntimeContext` accepts opaque `ownerId`, `callerId`, `clientKind`,
|
|
86
|
-
`
|
|
87
|
-
|
|
88
|
-
injected `authorization` port is asked before `sessions.create`,
|
|
92
|
+
`cwdRef`, `authorization`, and `signal`. Browser does not discover these from
|
|
93
|
+
Chat or a workspace registry. The injected `authorization` port is asked before `sessions.create`,
|
|
89
94
|
`sessions.close`, `sessions.stream`, `actions.<type>`, `auth.export`, and
|
|
90
95
|
`auth.import`.
|
|
91
96
|
|
|
@@ -29,7 +29,7 @@ const browser = createBrowser({
|
|
|
29
29
|
`{ id: 'local', name: 'Local' }`. On an existing root, a different account
|
|
30
30
|
takes over every session, auth bundle, and login, along with the root's
|
|
31
31
|
cookie jar, so give each account its own root. Chrome is not started until
|
|
32
|
-
|
|
32
|
+
a session needs it.
|
|
33
33
|
|
|
34
34
|
## Map chats to sessions
|
|
35
35
|
|
|
@@ -81,10 +81,13 @@ second process on the same root gets `CONFLICT` when it tries to start Chrome.
|
|
|
81
81
|
|
|
82
82
|
## Electron
|
|
83
83
|
|
|
84
|
-
Electron owns
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
Electron owns application windows and presents runtime pages through
|
|
85
|
+
`@amalgm/browser/electron`. Shell supervises the native Chromium process
|
|
86
|
+
independently of those windows. Website storage remains in the runtime profile;
|
|
87
|
+
application authentication remains in Electron's application session.
|
|
88
|
+
|
|
89
|
+
Shell mounts the private adapter at `/browser-adapter`, including the
|
|
90
|
+
WebSocket at `/browser-adapter/host`. Both runtime and adapter credentials are
|
|
91
|
+
required. The connection grants presentation capabilities for existing session
|
|
92
|
+
pages; it never transfers pages to Electron. Managed UI and Shell bind to the
|
|
93
|
+
same exact Browser release so their private protocols match.
|
package/docs/TESTING.md
CHANGED
|
@@ -1,80 +1,74 @@
|
|
|
1
1
|
# Testing
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Checks follow the ownership invariants in [PURPOSE.md](../PURPOSE.md).
|
|
4
|
+
The deterministic suite uses injected drivers and stores. Real examinations
|
|
5
|
+
run the pinned Chromium runtime and, for desktop journeys, actual Electron.
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npm run check # tree
|
|
8
|
+
npm run check # tracked tree, source sizes, strict types
|
|
9
|
+
npm run build # credential helper, TypeScript package and Electron runtime entry
|
|
9
10
|
npm test # unit and transport contracts
|
|
10
|
-
|
|
11
|
-
npm run
|
|
12
|
-
npm run verify # check, build, test, package/install
|
|
11
|
+
npm run test:real # runtime, CDP, policies and desktop journeys
|
|
12
|
+
npm run verify:pack # packed archive and fresh consumer imports
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
A macOS source build needs Xcode command-line tools for the credential helper.
|
|
16
|
+
The browser engine is fetched from the immutable pin; it is not rebuilt during
|
|
17
|
+
an SDK build. Source examinations set `AMALGM_BROWSER_ELECTRON_ENTRY` to the
|
|
18
|
+
built `dist/src/runtime-electron/main.cjs`. Desktop fixtures bundle their own
|
|
19
|
+
entry around the same product source. `AMALGM_BROWSER_ELECTRON_EXECUTABLE`
|
|
20
|
+
can select an explicitly isolated development engine. Overrides are not proof
|
|
21
|
+
of the shipped pin.
|
|
16
22
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
- all 22 actions reachable through SDK, MCP, REST, and Toolbox, from one
|
|
22
|
-
action manifest; an MCP call without a session uses its chat's session
|
|
23
|
-
- two-way cookie sync: sign-ins and sign-outs reach the account, failed
|
|
24
|
-
applies retry without echo, echoes reported after a newer write,
|
|
25
|
-
partitioned cookies, protected hosts
|
|
26
|
-
- record-level merges, tombstones, corrupt-jar health, wrong-key redaction
|
|
27
|
-
- auth filtering, login token TTL and hashing, deprecated-input compatibility,
|
|
28
|
-
serialized live login transitions
|
|
29
|
-
- recording frame pacing, backpressure, ffmpeg checks, viability deadline,
|
|
30
|
-
cancellation, and dead-owner recovery
|
|
31
|
-
- SQLite cross-process writes
|
|
32
|
-
- REST auth, SSE, redaction, and MCP cancellation
|
|
33
|
-
- argv process safety, bounded output and termination, asar resolution
|
|
34
|
-
- Electron URL, popup, permission, download, and ad-block policy, and the
|
|
35
|
-
Electron cookie adapter against an injected store
|
|
23
|
+
Run native desktop examinations sequentially: focus and operating-system
|
|
24
|
+
windows are shared resources. Test-only injected keys never certify production
|
|
25
|
+
credential access. Use `AMALGM_BROWSER_KEYCHAIN_REAL=1 npx tsx --test
|
|
26
|
+
test/real-keychain.test.ts` for the separate signed macOS credential journey.
|
|
36
27
|
|
|
37
|
-
|
|
28
|
+
`AMALGM_BROWSER_DRM_REAL=1 npm run test:real -- test/real-protected-media.test.ts`
|
|
29
|
+
checks actual encrypted playback against the public Shaka/Widevine UAT service.
|
|
30
|
+
It requires network access and accepts development VMP signatures; a pass does
|
|
31
|
+
not replace EVS enrollment or production-service acceptance.
|
|
38
32
|
|
|
39
|
-
|
|
40
|
-
through the MCP adapter against a public site. It checks that:
|
|
33
|
+
## Coverage
|
|
41
34
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
- the account stays signed in across restarts and follows sign-outs;
|
|
46
|
-
- a chat keeps browsing, still signed in, after Chrome is killed;
|
|
47
|
-
- loopback cookies never enter the account;
|
|
48
|
-
- a competing owner cannot replace or stop the live Chrome;
|
|
49
|
-
- captures and input follow the selected tab even with repeated URLs;
|
|
50
|
-
- session and service shutdown drain work, HTTP requests, SSE and viewers;
|
|
51
|
-
- raw CDP and advanced CLI calls cannot escape their session;
|
|
52
|
-
- repeated login activation preserves the page, terminal states remain final,
|
|
53
|
-
and recorded imagery can be decoded.
|
|
35
|
+
The public suite checks action parity, account/session isolation, concurrency,
|
|
36
|
+
cancellation, encrypted cookies and tombstones, auth expiry,
|
|
37
|
+
recording bounds, REST admission, process arguments and packaged imports.
|
|
54
38
|
|
|
55
|
-
|
|
56
|
-
through the locked `agent-browser` dependency first. Mocks cannot validate
|
|
57
|
-
these paths.
|
|
39
|
+
The real suite checks:
|
|
58
40
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
41
|
+
- account cookies, partition identity, working-copy reconstruction and idle work;
|
|
42
|
+
- capture and recording of the exact selected page, including duplicate URLs;
|
|
43
|
+
- session CDP isolation, authenticated streaming and runtime crash recovery;
|
|
44
|
+
- native and remote viewers of the same live target;
|
|
45
|
+
- completed actions and unchanged page memory across viewer quit and crash;
|
|
46
|
+
- child pages retaining opener, surviving viewer shutdown and closing explicitly;
|
|
47
|
+
- page-scoped dialogs, permissions, downloads and runtime ad blocking.
|
|
63
48
|
|
|
64
|
-
|
|
49
|
+
Desktop checks exercise real native containers, same-target input, dialog text
|
|
50
|
+
entry, application-profile isolation, one-time sign-in handoffs and connection recovery. They do not
|
|
51
|
+
certify OS IME, drag/drop or assistive technologies; those need physical native
|
|
52
|
+
journeys on each supported platform. Older CEF presentation measurements do not
|
|
53
|
+
certify this Electron implementation.
|
|
65
54
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
confirms the Electron entry resolves to its CommonJS build.
|
|
55
|
+
UI's browser examination uses its canonical components and the Shell gateway.
|
|
56
|
+
Both the Browser package journey and the integrated UI journey are required.
|
|
57
|
+
See [native evidence](NATIVE_BROWSER.md) for current limits.
|
|
70
58
|
|
|
71
|
-
|
|
72
|
-
check also fails on empty or untracked source files, JavaScript source in
|
|
73
|
-
`src/`, and tracked build or runtime artifacts.
|
|
59
|
+
## Platforms and packaging
|
|
74
60
|
|
|
75
|
-
|
|
61
|
+
Mac, Windows and Linux native jobs must each execute the exact release candidate.
|
|
62
|
+
The six engine archives are pinned and inventoried; only locally executed
|
|
63
|
+
platform evidence is marked passed. Protected media additionally needs approved
|
|
64
|
+
supplier verification and actual encrypted playback. An EME capability query
|
|
65
|
+
alone is not sufficient.
|
|
76
66
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
67
|
+
`verify:pack` checks the runtime entry and both preloads, credential assets,
|
|
68
|
+
engine pin, archive hygiene, fresh installation without the npm Electron peer,
|
|
69
|
+
public imports and actual execution through the installed package. TypeScript
|
|
70
|
+
under `src/` and `test/` must be tracked, nonempty and at most 220 lines. Runtime
|
|
71
|
+
state, test media and build output remain outside tracked source.
|
|
72
|
+
|
|
73
|
+
Update purpose, implementation and invariant evidence together. Public action
|
|
74
|
+
changes additionally require all four projections and their parity checks.
|
package/docs/TROUBLESHOOTING.md
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
# Troubleshooting
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Native runtime is not installed
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
Use a Browser package with a valid engine pin for the platform. Source users run
|
|
6
|
+
`npm run build`; `npm run test:real` builds the runtime entry automatically.
|
|
7
|
+
Installed packages carry that entry and download their verified engine once.
|
|
8
|
+
Normal Chromium or another installed Electron app is not a substitute for the
|
|
9
|
+
pinned browser runtime. Platform execution status is in `NATIVE_BROWSER.md`.
|
|
9
10
|
|
|
10
|
-
##
|
|
11
|
+
## Native runtime did not start
|
|
11
12
|
|
|
12
|
-
Browser waits
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
Browser waits for its private control service and CDP pipe. Check engine-cache
|
|
14
|
+
integrity, the packaged entry, platform sandbox prerequisites and credential
|
|
15
|
+
access. Missing, locked or denied credentials fail explicitly. Never weaken
|
|
16
|
+
credential storage or disable Chromium's sandbox to hide a startup failure.
|
|
15
17
|
|
|
16
18
|
## "This browser profile already has a live owner."
|
|
17
19
|
|
|
18
|
-
Another live process holds this root's
|
|
20
|
+
Another live process holds this root's browser lease (`browser-owner.sqlite` or `chrome.lease.sqlite`). This happens
|
|
19
21
|
when a second process creates a Browser service on a root another runtime is
|
|
20
22
|
using. Send the work to that runtime or stop it.
|
|
21
23
|
Never delete the lease file or Chrome's lock files. An owner that has died
|
|
22
|
-
releases its lease automatically; the
|
|
23
|
-
through the exact endpoint published by that profile.
|
|
24
|
+
releases its lease automatically; the native control pipe requests shutdown when its owner disappears.
|
|
24
25
|
|
|
25
26
|
## Chrome crashed
|
|
26
27
|
|
|
27
|
-
The runtime
|
|
28
|
+
The runtime reports that its live pages ended. An action caught by
|
|
28
29
|
the crash can fail; retry it. A later action starts a new Chrome filled with
|
|
29
|
-
the account's cookies from the jar, and the session keeps browsing.
|
|
30
|
-
are not restored.
|
|
30
|
+
the account's cookies from the jar, and the session keeps browsing. Remembered URLs may reopen; in-memory JavaScript state cannot survive a runtime crash.
|
|
31
31
|
|
|
32
32
|
## SURFACE_IDENTITY_FAILED
|
|
33
33
|
|
|
@@ -60,19 +60,19 @@ page before recording.
|
|
|
60
60
|
|
|
61
61
|
## Cookie jar reports unhealthy
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
Startup refuses an unavailable cookie authority. Do not print or hand-edit
|
|
64
|
+
encrypted files. Restore the matching `cookie-jar.sqlite` and authorized
|
|
65
|
+
Keychain key while the runtime is stopped,
|
|
66
66
|
using the SQLite-safe backup procedure in [Operations](./OPERATIONS.md).
|
|
67
67
|
Named auth bundles are separate.
|
|
68
68
|
|
|
69
|
-
##
|
|
69
|
+
## Cookie observation prevents startup or stops the runtime
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
Browser could not observe Chromium cookies or commit their changes to its authority. Since Amalgm owns
|
|
72
|
+
the sole durable cookie store, startup requires observation and a later failure
|
|
73
|
+
stops the runtime after attempting to drain admitted changes. Retained jar
|
|
74
|
+
records remain available. Check the private CDP channel and credential/disk availability, then retry after repairing
|
|
75
|
+
the cause; every start establishes observation before admitting pages.
|
|
76
76
|
|
|
77
77
|
## REST returns 401 or 403
|
|
78
78
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amalgm/browser",
|
|
3
|
-
"version": "0.1.2-preview.
|
|
3
|
+
"version": "0.1.2-preview.44182928298",
|
|
4
4
|
"description": "The amalgm runtime's browser: one Chrome, a session per chat, and the account's cookies in every view.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -70,12 +70,14 @@
|
|
|
70
70
|
"SECURITY.md"
|
|
71
71
|
],
|
|
72
72
|
"scripts": {
|
|
73
|
-
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json && npm run build:electron-cjs && tsx scripts/finalize-build.ts",
|
|
74
|
-
"build:electron-cjs": "esbuild src/electron.ts --bundle --platform=node --format=cjs --target=node20 --define:import.meta.dirname=__dirname --
|
|
73
|
+
"build": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && npm run build:native && tsc -p tsconfig.build.json && npm run build:electron-cjs && npm run build:runtime-electron && tsx scripts/finalize-build.ts",
|
|
74
|
+
"build:electron-cjs": "esbuild src/electron.ts --bundle --platform=node --format=cjs --target=node20 --define:import.meta.dirname=__dirname --outfile=dist/src/electron.cjs --external:electron",
|
|
75
|
+
"build:runtime-electron": "esbuild src/runtime-electron/main.ts --bundle --platform=node --format=cjs --target=node24 --define:import.meta.dirname=__dirname --outfile=dist/src/runtime-electron/main.cjs --external:electron && esbuild src/runtime-electron/page-preload.ts src/runtime-electron/prompt-preload.ts --bundle --platform=node --format=cjs --target=node24 --outdir=dist/src/runtime-electron --out-extension:.js=.cjs --external:electron",
|
|
75
76
|
"check": "tsx scripts/check-tree.ts && tsc -p tsconfig.json && tsc -p tsconfig.test.json",
|
|
76
77
|
"test": "tsx --test --test-concurrency=1 --test-timeout=30000 test/*.test.ts",
|
|
77
|
-
"
|
|
78
|
-
"
|
|
78
|
+
"pretest:real": "npm run build:runtime-electron",
|
|
79
|
+
"test:real": "tsx scripts/test-real.ts",
|
|
80
|
+
"verify": "npm run check && npm run test:engine && npm run build && npm test && npm run verify:pack",
|
|
79
81
|
"verify:pack": "tsx scripts/verify-package.ts",
|
|
80
82
|
"prepack": "npm run build",
|
|
81
83
|
"resolve": "node scripts/release/resolve.mjs",
|
|
@@ -83,19 +85,22 @@
|
|
|
83
85
|
"release:prepare": "node scripts/release/package.mjs prepare",
|
|
84
86
|
"release:examine": "node scripts/release/package.mjs examine",
|
|
85
87
|
"release:publish": "node scripts/release/package.mjs publish",
|
|
86
|
-
"test:release": "node --test scripts/release/*.test.mjs"
|
|
88
|
+
"test:release": "node --test scripts/release/*.test.mjs",
|
|
89
|
+
"build:native": "tsx scripts/build-native.ts",
|
|
90
|
+
"test:engine": "node --test scripts/engine/*.test.mjs"
|
|
87
91
|
},
|
|
88
92
|
"engines": {
|
|
89
93
|
"node": ">=24"
|
|
90
94
|
},
|
|
91
95
|
"dependencies": {
|
|
92
|
-
"@amalgm/core": "0.5.1-preview.
|
|
96
|
+
"@amalgm/core": "0.5.1-preview.44182200738",
|
|
93
97
|
"@ghostery/adblocker": "^2.18.1",
|
|
94
|
-
"
|
|
98
|
+
"@napi-rs/keyring": "2.1.2",
|
|
95
99
|
"better-sqlite3": "^12.10.1",
|
|
96
|
-
"
|
|
100
|
+
"tar": "7.5.22",
|
|
97
101
|
"tldts-experimental": "^7.4.9",
|
|
98
|
-
"ws": "^8.18.3"
|
|
102
|
+
"ws": "^8.18.3",
|
|
103
|
+
"yauzl": "3.4.0"
|
|
99
104
|
},
|
|
100
105
|
"peerDependencies": {
|
|
101
106
|
"electron": ">=33"
|
|
@@ -106,10 +111,12 @@
|
|
|
106
111
|
}
|
|
107
112
|
},
|
|
108
113
|
"devDependencies": {
|
|
114
|
+
"@aws-sdk/client-s3": "3.1090.0",
|
|
115
|
+
"@electron/osx-sign": "1.3.3",
|
|
109
116
|
"@types/better-sqlite3": "^7.6.13",
|
|
110
|
-
"@types/ffmpeg-static": "^3.0.3",
|
|
111
117
|
"@types/node": "^20.19.43",
|
|
112
118
|
"@types/ws": "^8.18.1",
|
|
119
|
+
"@types/yauzl": "^3.4.0",
|
|
113
120
|
"cross-env": "^7.0.3",
|
|
114
121
|
"electron": "41.10.7",
|
|
115
122
|
"esbuild": "0.28.2",
|
|
@@ -122,17 +129,30 @@
|
|
|
122
129
|
"jobs": [
|
|
123
130
|
"verify",
|
|
124
131
|
"real-browser (ubuntu-latest)",
|
|
125
|
-
"real-browser (
|
|
132
|
+
"real-browser (ubuntu-24.04-arm)",
|
|
133
|
+
"real-browser (macos-latest)",
|
|
134
|
+
"real-browser (macos-15-intel)",
|
|
135
|
+
"real-browser (windows-latest)",
|
|
136
|
+
"real-browser (windows-11-arm)"
|
|
126
137
|
],
|
|
127
138
|
"verify": "verify",
|
|
139
|
+
"nativeExaminations": [
|
|
140
|
+
"scripts/verify-native-package.ts"
|
|
141
|
+
],
|
|
128
142
|
"peerExports": [
|
|
129
143
|
"./electron"
|
|
144
|
+
],
|
|
145
|
+
"nativeTargets": [
|
|
146
|
+
"darwin-arm64",
|
|
147
|
+
"darwin-x64",
|
|
148
|
+
"linux-arm64",
|
|
149
|
+
"linux-x64",
|
|
150
|
+
"win32-arm64",
|
|
151
|
+
"win32-x64"
|
|
130
152
|
]
|
|
131
153
|
},
|
|
132
154
|
"allowScripts": {
|
|
133
|
-
"agent-browser@0.26.0": true,
|
|
134
155
|
"better-sqlite3@12.11.1": true,
|
|
135
|
-
"ffmpeg-static@5.3.0": true,
|
|
136
156
|
"fsevents@2.3.3": false,
|
|
137
157
|
"esbuild@0.28.2": true,
|
|
138
158
|
"electron@41.10.7": true
|
|
@@ -143,11 +163,11 @@
|
|
|
143
163
|
"@amalgm/core"
|
|
144
164
|
]
|
|
145
165
|
},
|
|
146
|
-
"gitHead": "
|
|
166
|
+
"gitHead": "245885baa9c47247ddf0963b8abb41227551cb2e",
|
|
147
167
|
"amalgmSource": {
|
|
148
168
|
"repository": "amalgm-inc/amalgm-browser",
|
|
149
169
|
"branch": "preview",
|
|
150
|
-
"commit": "
|
|
151
|
-
"occurrence": "
|
|
170
|
+
"commit": "245885baa9c47247ddf0963b8abb41227551cb2e",
|
|
171
|
+
"occurrence": "44182928298"
|
|
152
172
|
}
|
|
153
173
|
}
|
|
@@ -11,15 +11,16 @@ Browser is one safe, persistent, observable way for agents to operate the web. Y
|
|
|
11
11
|
|
|
12
12
|
The Amalgm runtime hosts one Browser service. Agents reach it through the platform's `browser_*` MCP tools, listed in [MCP tools](#mcp-tools); there is nothing to install or start. From a terminal, `amalgm browser …` calls the same tools on the running runtime, with the same JSON inputs and results. Screenshots come back as MCP image content; everything else is bounded, sanitized JSON.
|
|
13
13
|
|
|
14
|
-
Browser
|
|
14
|
+
Browser ships one independently cached castLabs Chromium runtime and an authenticated automation program. Its immutable engine, automation and encoder artifacts are verified before use; no installed browser is selected as a fallback.
|
|
15
15
|
|
|
16
16
|
To embed Browser in your own Node.js 24+ program instead, install the SDK:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
19
|
npm install @amalgm/browser
|
|
20
|
-
npx --no-install agent-browser install
|
|
21
20
|
```
|
|
22
21
|
|
|
22
|
+
Native desktop views and remote streams address the same runtime-owned pages. Closing a viewer does not close those pages. Native examination covers macOS, Windows and Linux on x64 and ARM64; package release requires the complete platform matrix described in `docs/NATIVE_BROWSER.md`.
|
|
23
|
+
|
|
23
24
|
## Quickstart
|
|
24
25
|
|
|
25
26
|
Open a page, read it, and click something. With the SDK:
|
|
@@ -143,7 +144,7 @@ Failures are typed `BrowserError` values with stable codes:
|
|
|
143
144
|
| `CONFLICT` | The session is busy or owned by another process, or another process runs this root's Chrome. |
|
|
144
145
|
| `AUTHORIZATION_DENIED` | The caller is not permitted to perform the action. |
|
|
145
146
|
| `TIMEOUT` / `ABORTED` | The operation ran out of time or was cancelled. |
|
|
146
|
-
| `PROCESS_FAILED` |
|
|
147
|
+
| `PROCESS_FAILED` | The automation program, Chromium, or encoder failed. Re-observe the page before deciding what to do next; an unknown action outcome must never be blindly replayed. |
|
|
147
148
|
| `SURFACE_IDENTITY_FAILED` | A screenshot, computer-use double-click, or recording could not tell which of the session's tabs is its page; this fails closed. Switch to or close tabs, then retry. |
|
|
148
149
|
|
|
149
150
|
For the complete target grammar, computer-use operation shapes, and tab, dialog, auth, and recording inputs, see [references/actions.md](references/actions.md).
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function findChrome(env?: NodeJS.ProcessEnv, home?: string, platform?: NodeJS.Platform): string;
|