@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.
Files changed (463) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/PURPOSE.md +106 -153
  3. package/README.md +27 -16
  4. package/SECURITY.md +28 -10
  5. package/dist/native/automation/LICENSE +201 -0
  6. package/dist/native/automation/README.md +31 -0
  7. package/dist/native/automation/control-auth.patch +129 -0
  8. package/dist/native/automation/source.json +6 -0
  9. package/dist/native/automation.json +90 -0
  10. package/dist/native/darwin-universal/amalgm-browser-keychain +0 -0
  11. package/dist/native/encoder-notices/README.md +7 -0
  12. package/dist/native/encoder-notices/darwin-arm64.LICENSE +129 -0
  13. package/dist/native/encoder-notices/darwin-arm64.README +46 -0
  14. package/dist/native/encoder-notices/darwin-x64.LICENSE +127 -0
  15. package/dist/native/encoder-notices/darwin-x64.README +293 -0
  16. package/dist/native/encoder-notices/linux-arm64.LICENSE +674 -0
  17. package/dist/native/encoder-notices/linux-arm64.README +67 -0
  18. package/dist/native/encoder-notices/linux-x64.LICENSE +674 -0
  19. package/dist/native/encoder-notices/linux-x64.README +67 -0
  20. package/dist/native/encoder-notices/win32-x64.LICENSE +674 -0
  21. package/dist/native/encoder-notices/win32-x64.README +792 -0
  22. package/dist/native/encoder.json +90 -0
  23. package/dist/native/engine.json +5016 -0
  24. package/dist/src/adapters/http/desktop-link.d.ts +7 -0
  25. package/dist/src/adapters/http/desktop-link.js +29 -0
  26. package/dist/src/adapters/http/desktop-link.js.map +1 -0
  27. package/dist/src/adapters/http/internal-routes.js +0 -11
  28. package/dist/src/adapters/http/internal-routes.js.map +1 -1
  29. package/dist/src/adapters/http/openapi.js +8 -1
  30. package/dist/src/adapters/http/openapi.js.map +1 -1
  31. package/dist/src/adapters/http/server.js +17 -3
  32. package/dist/src/adapters/http/server.js.map +1 -1
  33. package/dist/src/adapters/http/session-routes.js +1 -0
  34. package/dist/src/adapters/http/session-routes.js.map +1 -1
  35. package/dist/src/adapters/http/stream.d.ts +3 -2
  36. package/dist/src/adapters/http/stream.js +36 -52
  37. package/dist/src/adapters/http/stream.js.map +1 -1
  38. package/dist/src/adapters/http/types.d.ts +5 -0
  39. package/dist/src/{electron/adblock → adblock}/cache.d.ts +1 -1
  40. package/dist/src/{electron/adblock → adblock}/cache.js +8 -2
  41. package/dist/src/adblock/cache.js.map +1 -0
  42. package/dist/src/adblock/cosmetics.d.ts +33 -0
  43. package/dist/src/adblock/cosmetics.js +122 -0
  44. package/dist/src/adblock/cosmetics.js.map +1 -0
  45. package/dist/src/adblock/monitor.d.ts +4 -0
  46. package/dist/src/adblock/monitor.js +51 -0
  47. package/dist/src/adblock/monitor.js.map +1 -0
  48. package/dist/src/adblock/network.d.ts +15 -0
  49. package/dist/src/adblock/network.js +20 -0
  50. package/dist/src/adblock/network.js.map +1 -0
  51. package/dist/src/adblock/policy.js.map +1 -0
  52. package/dist/src/adblock/runtime.d.ts +30 -0
  53. package/dist/src/adblock/runtime.js +221 -0
  54. package/dist/src/adblock/runtime.js.map +1 -0
  55. package/dist/src/adblock/settings.js.map +1 -0
  56. package/dist/src/auth/vault.d.ts +3 -2
  57. package/dist/src/auth/vault.js.map +1 -1
  58. package/dist/src/cdp/capability.d.ts +2 -0
  59. package/dist/src/cdp/capability.js +8 -0
  60. package/dist/src/cdp/capability.js.map +1 -0
  61. package/dist/src/cdp/capture-png.d.ts +2 -0
  62. package/dist/src/cdp/capture-png.js +40 -0
  63. package/dist/src/cdp/capture-png.js.map +1 -0
  64. package/dist/src/cdp/capture.js +12 -13
  65. package/dist/src/cdp/capture.js.map +1 -1
  66. package/dist/src/cdp/navigation.d.ts +5 -0
  67. package/dist/src/cdp/navigation.js +53 -1
  68. package/dist/src/cdp/navigation.js.map +1 -1
  69. package/dist/src/cdp/screencast.d.ts +0 -1
  70. package/dist/src/cdp/screencast.js +7 -18
  71. package/dist/src/cdp/screencast.js.map +1 -1
  72. package/dist/src/chrome/cookie-adapter.d.ts +3 -0
  73. package/dist/src/chrome/cookie-adapter.js +6 -32
  74. package/dist/src/chrome/cookie-adapter.js.map +1 -1
  75. package/dist/src/chrome/cookie-changes.d.ts +1 -1
  76. package/dist/src/chrome/cookie-format.d.ts +19 -0
  77. package/dist/src/chrome/cookie-format.js +31 -0
  78. package/dist/src/chrome/cookie-format.js.map +1 -0
  79. package/dist/src/cookies/coordinator.d.ts +2 -2
  80. package/dist/src/cookies/coordinator.js +58 -24
  81. package/dist/src/cookies/coordinator.js.map +1 -1
  82. package/dist/src/cookies/database.d.ts +0 -1
  83. package/dist/src/cookies/database.js +10 -6
  84. package/dist/src/cookies/database.js.map +1 -1
  85. package/dist/src/cookies/jar.d.ts +1 -2
  86. package/dist/src/cookies/jar.js +2 -22
  87. package/dist/src/cookies/jar.js.map +1 -1
  88. package/dist/src/cookies/secret-file.d.ts +4 -2
  89. package/dist/src/cookies/secret-file.js +8 -32
  90. package/dist/src/cookies/secret-file.js.map +1 -1
  91. package/dist/src/cookies/types.d.ts +7 -0
  92. package/dist/src/credentials/keyring-helper.js +30 -0
  93. package/dist/src/credentials/keyring-helper.js.map +1 -0
  94. package/dist/src/credentials/platform-key.d.ts +3 -0
  95. package/dist/src/credentials/platform-key.js +92 -0
  96. package/dist/src/credentials/platform-key.js.map +1 -0
  97. package/dist/src/defaults.d.ts +3 -0
  98. package/dist/src/defaults.js +12 -10
  99. package/dist/src/defaults.js.map +1 -1
  100. package/dist/src/driver/attachment.d.ts +5 -0
  101. package/dist/src/driver/attachment.js +23 -0
  102. package/dist/src/driver/attachment.js.map +1 -0
  103. package/dist/src/driver/cli-policy.js +1 -1
  104. package/dist/src/driver/cli-policy.js.map +1 -1
  105. package/dist/src/driver/cli.d.ts +7 -0
  106. package/dist/src/driver/cli.js +21 -0
  107. package/dist/src/driver/cli.js.map +1 -0
  108. package/dist/src/driver/command.d.ts +5 -4
  109. package/dist/src/driver/command.js +86 -85
  110. package/dist/src/driver/command.js.map +1 -1
  111. package/dist/src/driver/cua.d.ts +8 -0
  112. package/dist/src/driver/cua.js +36 -0
  113. package/dist/src/driver/cua.js.map +1 -0
  114. package/dist/src/driver/daemon-start.d.ts +1 -0
  115. package/dist/src/driver/daemon-start.js +19 -0
  116. package/dist/src/driver/daemon-start.js.map +1 -0
  117. package/dist/src/driver/daemon.d.ts +28 -0
  118. package/dist/src/driver/daemon.js +125 -0
  119. package/dist/src/driver/daemon.js.map +1 -0
  120. package/dist/src/driver/driver.d.ts +9 -6
  121. package/dist/src/driver/driver.js +62 -63
  122. package/dist/src/driver/driver.js.map +1 -1
  123. package/dist/src/driver/response.d.ts +4 -0
  124. package/dist/src/driver/response.js +53 -0
  125. package/dist/src/driver/response.js.map +1 -0
  126. package/dist/src/electron/bounds.d.ts +4 -0
  127. package/dist/src/electron/bounds.js +11 -0
  128. package/dist/src/electron/bounds.js.map +1 -0
  129. package/dist/src/electron/contracts.d.ts +10 -1
  130. package/dist/src/electron/contracts.js +3 -0
  131. package/dist/src/electron/contracts.js.map +1 -1
  132. package/dist/src/electron/desktop-link.d.ts +25 -0
  133. package/dist/src/electron/desktop-link.js +153 -0
  134. package/dist/src/electron/desktop-link.js.map +1 -0
  135. package/dist/src/electron/native-context-menu.d.ts +18 -0
  136. package/dist/src/electron/native-context-menu.js +98 -0
  137. package/dist/src/electron/native-context-menu.js.map +1 -0
  138. package/dist/src/electron/native-downloads.d.ts +13 -0
  139. package/dist/src/electron/native-downloads.js +72 -0
  140. package/dist/src/electron/native-downloads.js.map +1 -0
  141. package/dist/src/electron/native-interactions.d.ts +21 -0
  142. package/dist/src/electron/native-interactions.js +101 -0
  143. package/dist/src/electron/native-interactions.js.map +1 -0
  144. package/dist/src/electron/native-popups.d.ts +19 -0
  145. package/dist/src/electron/native-popups.js +109 -0
  146. package/dist/src/electron/native-popups.js.map +1 -0
  147. package/dist/src/electron/native-presentation.d.ts +8 -0
  148. package/dist/src/electron/native-presentation.js +2 -0
  149. package/dist/src/electron/native-presentation.js.map +1 -0
  150. package/dist/src/electron/native-surfaces.d.ts +7 -0
  151. package/dist/src/electron/native-surfaces.js +214 -0
  152. package/dist/src/electron/native-surfaces.js.map +1 -0
  153. package/dist/src/electron/policy.d.ts +0 -4
  154. package/dist/src/electron/policy.js +0 -24
  155. package/dist/src/electron/policy.js.map +1 -1
  156. package/dist/src/electron/runtime-windows.d.ts +19 -0
  157. package/dist/src/electron/runtime-windows.js +115 -0
  158. package/dist/src/electron/runtime-windows.js.map +1 -0
  159. package/dist/src/electron/shell.d.ts +10 -2
  160. package/dist/src/electron/shell.js +22 -68
  161. package/dist/src/electron/shell.js.map +1 -1
  162. package/dist/src/electron.cjs +4551 -12940
  163. package/dist/src/electron.d.cts +4 -1
  164. package/dist/src/electron.d.ts +4 -1
  165. package/dist/src/electron.js +2 -1
  166. package/dist/src/electron.js.map +1 -1
  167. package/dist/src/host/desktop-protocol.d.ts +71 -0
  168. package/dist/src/host/desktop-protocol.js +13 -0
  169. package/dist/src/host/desktop-protocol.js.map +1 -0
  170. package/dist/src/host/desktop-windows.d.ts +6 -0
  171. package/dist/src/host/desktop-windows.js +34 -0
  172. package/dist/src/host/desktop-windows.js.map +1 -0
  173. package/dist/src/host/desktop.d.ts +5 -0
  174. package/dist/src/host/desktop.js +138 -0
  175. package/dist/src/host/desktop.js.map +1 -0
  176. package/dist/src/host/engine.d.ts +43 -0
  177. package/dist/src/host/engine.js +2 -0
  178. package/dist/src/host/engine.js.map +1 -0
  179. package/dist/src/host/host.d.ts +38 -0
  180. package/dist/src/host/host.js +213 -0
  181. package/dist/src/host/host.js.map +1 -0
  182. package/dist/src/host/live-stream.d.ts +20 -0
  183. package/dist/src/host/live-stream.js +115 -0
  184. package/dist/src/host/live-stream.js.map +1 -0
  185. package/dist/src/host/relay/editing.js.map +1 -0
  186. package/dist/src/host/relay/server.d.ts +30 -0
  187. package/dist/src/host/relay/server.js +219 -0
  188. package/dist/src/host/relay/server.js.map +1 -0
  189. package/dist/src/{chrome → host}/relay/view.d.ts +2 -1
  190. package/dist/src/{chrome → host}/relay/view.js +11 -5
  191. package/dist/src/host/relay/view.js.map +1 -0
  192. package/dist/src/host/sessions.d.ts +42 -0
  193. package/dist/src/host/sessions.js +158 -0
  194. package/dist/src/host/sessions.js.map +1 -0
  195. package/dist/src/host/stream-input.d.ts +4 -0
  196. package/dist/src/host/stream-input.js +46 -0
  197. package/dist/src/host/stream-input.js.map +1 -0
  198. package/dist/src/host/stream-viewport.d.ts +6 -0
  199. package/dist/src/host/stream-viewport.js +70 -0
  200. package/dist/src/host/stream-viewport.js.map +1 -0
  201. package/dist/src/host/window-protocol.d.ts +67 -0
  202. package/dist/src/host/window-protocol.js +2 -0
  203. package/dist/src/host/window-protocol.js.map +1 -0
  204. package/dist/src/native/artifact-archive.d.ts +4 -0
  205. package/dist/src/native/artifact-archive.js +110 -0
  206. package/dist/src/native/artifact-archive.js.map +1 -0
  207. package/dist/src/native/artifact-cache.d.ts +9 -0
  208. package/dist/src/native/artifact-cache.js +113 -0
  209. package/dist/src/native/artifact-cache.js.map +1 -0
  210. package/dist/src/native/artifact-manifest.d.ts +25 -0
  211. package/dist/src/native/artifact-manifest.js +60 -0
  212. package/dist/src/native/artifact-manifest.js.map +1 -0
  213. package/dist/src/native/artifact-zip.d.ts +3 -0
  214. package/dist/src/native/artifact-zip.js +59 -0
  215. package/dist/src/native/artifact-zip.js.map +1 -0
  216. package/dist/src/native/automation.d.ts +2 -0
  217. package/dist/src/native/automation.js +33 -0
  218. package/dist/src/native/automation.js.map +1 -0
  219. package/dist/src/native/cache-directory.d.ts +1 -0
  220. package/dist/src/native/cache-directory.js +11 -0
  221. package/dist/src/native/cache-directory.js.map +1 -0
  222. package/dist/src/native/cdp-bridge.d.ts +17 -0
  223. package/dist/src/native/cdp-bridge.js +240 -0
  224. package/dist/src/native/cdp-bridge.js.map +1 -0
  225. package/dist/src/native/cdp-dialogs.d.ts +19 -0
  226. package/dist/src/native/cdp-dialogs.js +54 -0
  227. package/dist/src/native/cdp-dialogs.js.map +1 -0
  228. package/dist/src/native/cdp-pipe.d.ts +19 -0
  229. package/dist/src/native/cdp-pipe.js +112 -0
  230. package/dist/src/native/cdp-pipe.js.map +1 -0
  231. package/dist/src/native/cdp.d.ts +4 -0
  232. package/dist/src/native/cdp.js +71 -0
  233. package/dist/src/native/cdp.js.map +1 -0
  234. package/dist/src/native/downloads.d.ts +16 -0
  235. package/dist/src/native/downloads.js +76 -0
  236. package/dist/src/native/downloads.js.map +1 -0
  237. package/dist/src/native/encoder.d.ts +3 -0
  238. package/dist/src/native/encoder.js +37 -0
  239. package/dist/src/native/encoder.js.map +1 -0
  240. package/dist/src/native/engine.d.ts +20 -0
  241. package/dist/src/native/engine.js +267 -0
  242. package/dist/src/native/engine.js.map +1 -0
  243. package/dist/src/native/executable.d.ts +1 -0
  244. package/dist/src/native/executable.js +23 -0
  245. package/dist/src/native/executable.js.map +1 -0
  246. package/dist/src/native/interactions.d.ts +30 -0
  247. package/dist/src/native/interactions.js +16 -0
  248. package/dist/src/native/interactions.js.map +1 -0
  249. package/dist/src/native/permissions.d.ts +10 -0
  250. package/dist/src/native/permissions.js +62 -0
  251. package/dist/src/native/permissions.js.map +1 -0
  252. package/dist/src/native/process.d.ts +32 -0
  253. package/dist/src/native/process.js +212 -0
  254. package/dist/src/native/process.js.map +1 -0
  255. package/dist/src/native/profile-cookies.d.ts +3 -0
  256. package/dist/src/native/profile-cookies.js +160 -0
  257. package/dist/src/native/profile-cookies.js.map +1 -0
  258. package/dist/src/persistence/session-pages.d.ts +10 -0
  259. package/dist/src/persistence/session-pages.js +31 -0
  260. package/dist/src/persistence/session-pages.js.map +1 -0
  261. package/dist/src/persistence/sqlite-registry.js +7 -1
  262. package/dist/src/persistence/sqlite-registry.js.map +1 -1
  263. package/dist/src/ports.d.ts +5 -1
  264. package/dist/src/ports.js.map +1 -1
  265. package/dist/src/recording/service.js +2 -1
  266. package/dist/src/recording/service.js.map +1 -1
  267. package/dist/src/registry.js +2 -0
  268. package/dist/src/registry.js.map +1 -1
  269. package/dist/src/runtime-electron/downloads.d.ts +11 -0
  270. package/dist/src/runtime-electron/downloads.js +60 -0
  271. package/dist/src/runtime-electron/downloads.js.map +1 -0
  272. package/dist/src/runtime-electron/engine.d.ts +4 -0
  273. package/dist/src/runtime-electron/engine.js +46 -0
  274. package/dist/src/runtime-electron/engine.js.map +1 -0
  275. package/dist/src/runtime-electron/interactions.d.ts +24 -0
  276. package/dist/src/runtime-electron/interactions.js +211 -0
  277. package/dist/src/runtime-electron/interactions.js.map +1 -0
  278. package/dist/src/runtime-electron/main.cjs +6312 -0
  279. package/dist/src/runtime-electron/main.d.ts +1 -0
  280. package/dist/src/runtime-electron/main.js +133 -0
  281. package/dist/src/runtime-electron/main.js.map +1 -0
  282. package/dist/src/runtime-electron/media-components.d.ts +3 -0
  283. package/dist/src/runtime-electron/media-components.js +18 -0
  284. package/dist/src/runtime-electron/media-components.js.map +1 -0
  285. package/dist/src/runtime-electron/native-frame.d.ts +5 -0
  286. package/dist/src/runtime-electron/native-frame.js +21 -0
  287. package/dist/src/runtime-electron/native-frame.js.map +1 -0
  288. package/dist/src/runtime-electron/network.d.ts +23 -0
  289. package/dist/src/runtime-electron/network.js +98 -0
  290. package/dist/src/runtime-electron/network.js.map +1 -0
  291. package/dist/src/runtime-electron/page-preload.cjs +13 -0
  292. package/dist/src/runtime-electron/page-preload.d.ts +1 -0
  293. package/dist/src/runtime-electron/page-preload.js +10 -0
  294. package/dist/src/runtime-electron/page-preload.js.map +1 -0
  295. package/dist/src/runtime-electron/page-rendering.d.ts +19 -0
  296. package/dist/src/runtime-electron/page-rendering.js +100 -0
  297. package/dist/src/runtime-electron/page-rendering.js.map +1 -0
  298. package/dist/src/runtime-electron/page-viewport.d.ts +14 -0
  299. package/dist/src/runtime-electron/page-viewport.js +39 -0
  300. package/dist/src/runtime-electron/page-viewport.js.map +1 -0
  301. package/dist/src/runtime-electron/page-views.d.ts +22 -0
  302. package/dist/src/runtime-electron/page-views.js +137 -0
  303. package/dist/src/runtime-electron/page-views.js.map +1 -0
  304. package/dist/src/runtime-electron/pages.d.ts +50 -0
  305. package/dist/src/runtime-electron/pages.js +213 -0
  306. package/dist/src/runtime-electron/pages.js.map +1 -0
  307. package/dist/src/runtime-electron/permission-scopes.d.ts +5 -0
  308. package/dist/src/runtime-electron/permission-scopes.js +12 -0
  309. package/dist/src/runtime-electron/permission-scopes.js.map +1 -0
  310. package/dist/src/runtime-electron/presentation.d.ts +22 -0
  311. package/dist/src/runtime-electron/presentation.js +143 -0
  312. package/dist/src/runtime-electron/presentation.js.map +1 -0
  313. package/dist/src/runtime-electron/profile-migration.d.ts +3 -0
  314. package/dist/src/runtime-electron/profile-migration.js +112 -0
  315. package/dist/src/runtime-electron/profile-migration.js.map +1 -0
  316. package/dist/src/runtime-electron/prompt-preload.cjs +24 -0
  317. package/dist/src/runtime-electron/prompt-preload.d.ts +1 -0
  318. package/dist/src/runtime-electron/prompt-preload.js +18 -0
  319. package/dist/src/runtime-electron/prompt-preload.js.map +1 -0
  320. package/dist/src/runtime-electron/prompt-window.d.ts +16 -0
  321. package/dist/src/runtime-electron/prompt-window.js +52 -0
  322. package/dist/src/runtime-electron/prompt-window.js.map +1 -0
  323. package/dist/src/runtime-electron/protocol.d.ts +8 -0
  324. package/dist/src/runtime-electron/protocol.js +43 -0
  325. package/dist/src/runtime-electron/protocol.js.map +1 -0
  326. package/dist/src/runtime-electron/ui-profile.d.ts +15 -0
  327. package/dist/src/runtime-electron/ui-profile.js +128 -0
  328. package/dist/src/runtime-electron/ui-profile.js.map +1 -0
  329. package/dist/src/runtime-electron/window-control.d.ts +4 -0
  330. package/dist/src/runtime-electron/window-control.js +40 -0
  331. package/dist/src/runtime-electron/window-control.js.map +1 -0
  332. package/dist/src/runtime-electron/windows.d.ts +28 -0
  333. package/dist/src/runtime-electron/windows.js +186 -0
  334. package/dist/src/runtime-electron/windows.js.map +1 -0
  335. package/dist/src/service-options.d.ts +2 -0
  336. package/dist/src/service.d.ts +3 -0
  337. package/dist/src/service.js +12 -40
  338. package/dist/src/service.js.map +1 -1
  339. package/dist/src/sessions/admission.d.ts +12 -0
  340. package/dist/src/sessions/admission.js +68 -0
  341. package/dist/src/sessions/admission.js.map +1 -0
  342. package/dist/src/testing.d.ts +2 -1
  343. package/dist/src/testing.js +5 -1
  344. package/dist/src/testing.js.map +1 -1
  345. package/dist/src/types.d.ts +0 -1
  346. package/dist/src/viewport.d.ts +7 -0
  347. package/dist/src/viewport.js +8 -0
  348. package/dist/src/viewport.js.map +1 -0
  349. package/docs/ARCHITECTURE.md +114 -58
  350. package/docs/AXIOMS.md +39 -17
  351. package/docs/CHROME.md +74 -155
  352. package/docs/COMPATIBILITY.md +11 -4
  353. package/docs/COOKIES.md +33 -19
  354. package/docs/ELECTRON_INTEGRATION.md +70 -100
  355. package/docs/ENGINE_DELIVERY.md +143 -0
  356. package/docs/ENGINE_RELEASE.md +72 -0
  357. package/docs/NATIVE_BROWSER.md +138 -0
  358. package/docs/OPERATIONS.md +28 -12
  359. package/docs/README.md +3 -1
  360. package/docs/REALTIME_BOUNDARY.md +3 -4
  361. package/docs/REST.md +13 -9
  362. package/docs/SDK.md +13 -8
  363. package/docs/SHELL_INTEGRATION.md +11 -8
  364. package/docs/TESTING.md +56 -62
  365. package/docs/TROUBLESHOOTING.md +24 -24
  366. package/package.json +37 -17
  367. package/skills/use-amalgm-browser/SKILL.md +4 -3
  368. package/dist/src/chrome/executable.d.ts +0 -1
  369. package/dist/src/chrome/executable.js +0 -55
  370. package/dist/src/chrome/executable.js.map +0 -1
  371. package/dist/src/chrome/flags.d.ts +0 -7
  372. package/dist/src/chrome/flags.js +0 -59
  373. package/dist/src/chrome/flags.js.map +0 -1
  374. package/dist/src/chrome/host.d.ts +0 -25
  375. package/dist/src/chrome/host.js +0 -135
  376. package/dist/src/chrome/host.js.map +0 -1
  377. package/dist/src/chrome/launch.d.ts +0 -11
  378. package/dist/src/chrome/launch.js +0 -121
  379. package/dist/src/chrome/launch.js.map +0 -1
  380. package/dist/src/chrome/relay/editing.js.map +0 -1
  381. package/dist/src/chrome/relay/server.d.ts +0 -18
  382. package/dist/src/chrome/relay/server.js +0 -120
  383. package/dist/src/chrome/relay/server.js.map +0 -1
  384. package/dist/src/chrome/relay/targets.d.ts +0 -11
  385. package/dist/src/chrome/relay/targets.js +0 -59
  386. package/dist/src/chrome/relay/targets.js.map +0 -1
  387. package/dist/src/chrome/relay/view.js.map +0 -1
  388. package/dist/src/driver/executable.d.ts +0 -8
  389. package/dist/src/driver/executable.js +0 -56
  390. package/dist/src/driver/executable.js.map +0 -1
  391. package/dist/src/driver/stream.d.ts +0 -1
  392. package/dist/src/driver/stream.js +0 -22
  393. package/dist/src/driver/stream.js.map +0 -1
  394. package/dist/src/electron/adblock/cache.js.map +0 -1
  395. package/dist/src/electron/adblock/cosmetics.d.ts +0 -11
  396. package/dist/src/electron/adblock/cosmetics.js +0 -45
  397. package/dist/src/electron/adblock/cosmetics.js.map +0 -1
  398. package/dist/src/electron/adblock/index.d.ts +0 -43
  399. package/dist/src/electron/adblock/index.js +0 -157
  400. package/dist/src/electron/adblock/index.js.map +0 -1
  401. package/dist/src/electron/adblock/policy.js.map +0 -1
  402. package/dist/src/electron/adblock/preload.js +0 -131
  403. package/dist/src/electron/adblock/preload.js.map +0 -1
  404. package/dist/src/electron/adblock/settings.js.map +0 -1
  405. package/dist/src/electron/cookie-adapter.d.ts +0 -17
  406. package/dist/src/electron/cookie-adapter.js +0 -72
  407. package/dist/src/electron/cookie-adapter.js.map +0 -1
  408. package/dist/src/electron/cookie-sync.d.ts +0 -6
  409. package/dist/src/electron/cookie-sync.js +0 -18
  410. package/dist/src/electron/cookie-sync.js.map +0 -1
  411. package/dist/src/electron/session.d.ts +0 -2
  412. package/dist/src/electron/session.js +0 -9
  413. package/dist/src/electron/session.js.map +0 -1
  414. package/dist/src/electron/shell/adblock-ipc.d.ts +0 -10
  415. package/dist/src/electron/shell/adblock-ipc.js +0 -44
  416. package/dist/src/electron/shell/adblock-ipc.js.map +0 -1
  417. package/dist/src/electron/shell/context-menu.d.ts +0 -11
  418. package/dist/src/electron/shell/context-menu.js +0 -129
  419. package/dist/src/electron/shell/context-menu.js.map +0 -1
  420. package/dist/src/electron/shell/downloads.d.ts +0 -11
  421. package/dist/src/electron/shell/downloads.js +0 -90
  422. package/dist/src/electron/shell/downloads.js.map +0 -1
  423. package/dist/src/electron/shell/helpers.d.ts +0 -5
  424. package/dist/src/electron/shell/helpers.js +0 -53
  425. package/dist/src/electron/shell/helpers.js.map +0 -1
  426. package/dist/src/electron/shell/permissions.d.ts +0 -16
  427. package/dist/src/electron/shell/permissions.js +0 -107
  428. package/dist/src/electron/shell/permissions.js.map +0 -1
  429. package/dist/src/electron/shell/sites.d.ts +0 -22
  430. package/dist/src/electron/shell/sites.js +0 -87
  431. package/dist/src/electron/shell/sites.js.map +0 -1
  432. package/dist/src/electron/shell/types.d.ts +0 -12
  433. package/dist/src/electron/shell/types.js +0 -2
  434. package/dist/src/electron/shell/types.js.map +0 -1
  435. package/dist/src/electron/surface/commands.d.ts +0 -4
  436. package/dist/src/electron/surface/commands.js +0 -49
  437. package/dist/src/electron/surface/commands.js.map +0 -1
  438. package/dist/src/electron/surface/create.d.ts +0 -4
  439. package/dist/src/electron/surface/create.js +0 -40
  440. package/dist/src/electron/surface/create.js.map +0 -1
  441. package/dist/src/electron/surface/events.d.ts +0 -3
  442. package/dist/src/electron/surface/events.js +0 -43
  443. package/dist/src/electron/surface/events.js.map +0 -1
  444. package/dist/src/electron/surface/presentation.d.ts +0 -8
  445. package/dist/src/electron/surface/presentation.js +0 -29
  446. package/dist/src/electron/surface/presentation.js.map +0 -1
  447. package/dist/src/electron/surface/state.d.ts +0 -12
  448. package/dist/src/electron/surface/state.js +0 -51
  449. package/dist/src/electron/surface/state.js.map +0 -1
  450. package/dist/src/electron/surface/types.d.ts +0 -33
  451. package/dist/src/electron/surface/types.js +0 -2
  452. package/dist/src/electron/surface/types.js.map +0 -1
  453. package/dist/src/electron/surface-controller.d.ts +0 -6
  454. package/dist/src/electron/surface-controller.js +0 -135
  455. package/dist/src/electron/surface-controller.js.map +0 -1
  456. package/dist/src/electron-preload.cjs +0 -113
  457. /package/dist/src/{electron/adblock → adblock}/policy.d.ts +0 -0
  458. /package/dist/src/{electron/adblock → adblock}/policy.js +0 -0
  459. /package/dist/src/{electron/adblock → adblock}/settings.d.ts +0 -0
  460. /package/dist/src/{electron/adblock → adblock}/settings.js +0 -0
  461. /package/dist/src/{electron/adblock/preload.d.ts → credentials/keyring-helper.d.ts} +0 -0
  462. /package/dist/src/{chrome → host}/relay/editing.d.ts +0 -0
  463. /package/dist/src/{chrome → host}/relay/editing.js +0 -0
@@ -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`. Everything Browser keeps on
8
- disk is inside it:
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
- | `chrome/` | Chrome's user data directory |
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
- | `cookie-observer/` | SDK-generated private Chrome cookie extension |
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
- | `AMALGM_BROWSER_EXECUTABLE_PATH` | Chrome executable (`AGENT_BROWSER_EXECUTABLE_PATH` also accepted) |
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` | Electron ad-block kill switch |
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. Recovery
45
- retires an orphan only through the exact endpoint in `chrome/DevToolsActivePort`.
46
- The embedding host (Shell) is that one long-lived process. If Chrome dies, the
47
- next action starts a new one.
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 project and cwd values through `BrowserRuntimeContext`.
9
- It never imports Realtime or infers a project from Chat records. Its own files,
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 an optional `id`)
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 that relays the session's live view,
30
- in agent-browser's stream format:
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 `input_touch`.
33
+ JPEG plus that frame's Chromium metadata), and `navigation`;
34
+ - in: `input_mouse`, `input_keyboard`, `input_touch`, and `viewport`.
35
35
 
36
- Messages pass through unchanged. Send keyboard input as a full key event, not
37
- just `key` and `code`:
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/metadata|bootstrap` (`GET`),
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/install|merge` (`POST`) serve trusted cookie adapters
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, and a different
29
- `account` on an existing root takes them over.
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). `context.ownerId` is stored as the session's owner.
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
- `projectRef`, `cwdRef`, `authorization`, and `signal`.
87
- Browser does not discover these from Chat or a workspace registry. An
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
- the first action.
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 the application lifecycle and hosts the user's in-app browser
85
- tabs through `@amalgm/browser/electron` (see
86
- [Electron integration](./ELECTRON_INTEGRATION.md)). Application auth stays in
87
- Electron's `defaultSession`; websites stay in the account-specific
88
- `persist:amalgm-browser-<account hash>` partition. Its cookies sync with the
89
- runtime through Browser's private adapter port. Managed UI and Shell bind to
90
- the same exact published Browser release.
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
- Tests are organized by invariant rather than implementation file. The default
4
- suite is deterministic and uses injected drivers and stores; the real suite
5
- drives real Chrome.
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 hygiene and strict TypeScript
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
- npx --no-install agent-browser install # provision Chrome for Testing
11
- npm run test:real # real Chrome and agent-browser
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
- ## Contract coverage
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
- - one browsing identity: every session browses as the account, and a root
18
- cannot be reassigned to another account
19
- - restart reopen, cross-process leases, one action per session, cancellation
20
- - a session's own live view, and closing the runtime releases Chrome
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
- ## Real browser
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
- `npm run test:real` sets `AMALGM_BROWSER_REAL=1` and drives real Chrome
40
- through the MCP adapter against a public site. It checks that:
33
+ ## Coverage
41
34
 
42
- - two chats browse side by side in one Chrome as one signed-in account;
43
- - a viewer watches and drives one chat's live view, only with the runtime
44
- token;
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
- CI runs this suite on Linux and Windows and provisions Chrome for Testing
56
- through the locked `agent-browser` dependency first. Mocks cannot validate
57
- these paths.
39
+ The real suite checks:
58
40
 
59
- UI's `test:browser` source examination additionally drives its canonical web
60
- and Electron browser surfaces through the actual UI routes and Shell gateway.
61
- It covers human input, companion ownership, login handoff, native cookie
62
- sharing and deletion, account switching, sign-out, and fractional native bounds.
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
- ## Package verification
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
- `verify:pack` runs `npm pack`, checks the tarball for required files and for
67
- runtime data or secrets, installs the tarball into a
68
- temporary consumer without Electron, imports the core entry points, and
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
- TypeScript in `src/` and `test/` is limited to 220 lines per file. The tree
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
- ## Adding behavior
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
- Update the purpose and axioms if the model changes, then the typed SDK, the
78
- shared action descriptor, every transport projection, the documentation, and
79
- an invariant test. A new action that is not reachable through all four public
80
- surfaces fails the parity suite.
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.
@@ -1,33 +1,33 @@
1
1
  # Troubleshooting
2
2
 
3
- ## Chrome was not found
3
+ ## Native runtime is not installed
4
4
 
5
- Install Google Chrome, run `npx agent-browser install` to download Chrome for
6
- Testing, or set `AMALGM_BROWSER_EXECUTABLE_PATH`. A configured path that does
7
- not exist fails with `PROCESS_FAILED` and is not replaced by a search. See
8
- [Chrome runtime](./CHROME.md) for the search order.
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
- ## Chrome did not start
11
+ ## Native runtime did not start
11
12
 
12
- Browser waits 20 seconds for Chrome's DevTools port and reports the end of
13
- Chrome's stderr. On Linux as root, Browser already adds `--no-sandbox` and
14
- `--disable-dev-shm-usage`; check the executable runs by hand.
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 Chrome lease (`chrome.lease.sqlite`). This happens
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 next start retires its orphaned Chrome
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 logs "Chrome exited; it restarts on next use." An action caught by
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. Open pages
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
- Browsing continues with the cookies Chrome already has, but sign-ins no longer
64
- sync with other browser stores. Do not print or hand-edit encrypted files. Restore a
65
- matching `cookie-jar.sqlite` and `browser.key` backup while the runtime is stopped,
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
- ## "Chrome cookie changes are not reaching the account; browsing continues."
69
+ ## Cookie observation prevents startup or stops the runtime
70
70
 
71
- Chrome refused or lost Browser's private cookie extension, for example under a
72
- policy that forbids extensions. Agents keep browsing, signed in with the
73
- account's cookies, but sign-ins made in this Chrome do not reach the account or
74
- the desktop app. Check `chrome://policy` for extension restrictions on the
75
- machine; the next Chrome start tries the extension again.
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.39017048402",
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 --define:__AMALGM_BROWSER_ADBLOCK_PRELOAD__=\\\"electron-preload.cjs\\\" --outfile=dist/src/electron.cjs --external:electron && esbuild src/electron/adblock/preload.ts --bundle --platform=node --format=cjs --target=node20 --outfile=dist/src/electron-preload.cjs --external:electron",
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
- "test:real": "cross-env AMALGM_BROWSER_REAL=1 tsx --test --test-concurrency=1 --test-timeout=120000 test/real-*.test.ts",
78
- "verify": "npm run check && npm run build && npm test && npm run verify:pack",
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.37556608028",
96
+ "@amalgm/core": "0.5.1-preview.44182200738",
93
97
  "@ghostery/adblocker": "^2.18.1",
94
- "agent-browser": "0.26.0",
98
+ "@napi-rs/keyring": "2.1.2",
95
99
  "better-sqlite3": "^12.10.1",
96
- "ffmpeg-static": "^5.3.0",
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 (windows-latest)"
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": "658e876d906c8bf791cbb18956a111053385ced9",
166
+ "gitHead": "245885baa9c47247ddf0963b8abb41227551cb2e",
147
167
  "amalgmSource": {
148
168
  "repository": "amalgm-inc/amalgm-browser",
149
169
  "branch": "preview",
150
- "commit": "658e876d906c8bf791cbb18956a111053385ced9",
151
- "occurrence": "39017048402"
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 runs one headless Chrome per runtime and drives it through the bundled `agent-browser`. It uses an installed Chrome, Chromium, or Brave, or the Chrome for Testing that `agent-browser install` downloads; `AMALGM_BROWSER_EXECUTABLE_PATH` picks a specific executable.
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` | agent-browser, Chrome, or ffmpeg failed — including a stale `@ref` or missing target; re-snapshot and retry that step. |
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;