@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
package/CHANGELOG.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
- - `createBrowser` requires `root` and keeps everything, recordings included, inside it. Removed: the default state folder and its env overrides (`AMALGM_BROWSER_DIR`, `AMALGM_BROWSER_ROOT`, `AMALGM_DIR`), `artifactDestination`, the standalone `amalgm-browser*` bins with their stdio and listening servers, and every legacy import (`../amalgm.db`, `registry-v1.json`, `cookie-jar.enc`); hosts mount the MCP and REST adapters, and `amalgm browser …` calls the runtime.
5
+ - `createBrowser` requires `root` and keeps mutable state, recordings included, inside it. Removed: the default state folder and its env overrides (`AMALGM_BROWSER_DIR`, `AMALGM_BROWSER_ROOT`, `AMALGM_DIR`), `artifactDestination`, the standalone `amalgm-browser*` bins with their stdio and listening servers, and every legacy import (`../amalgm.db`, `registry-v1.json`, `cookie-jar.enc`); hosts mount the MCP and REST adapters, and `amalgm browser …` calls the runtime.
6
+ - Run website pages and native desktop windows in one independently supervised, integrity-pinned Electron browser. Viewers retain the same live pages through close, crash and reconnect; website cookies use one encrypted account authority.
7
+ - Persist session tab addresses and selection, restoring them after browser-owner loss while keeping application authentication separate from website storage.
6
8
 
7
9
  ## 0.1.0
8
10
 
package/PURPOSE.md CHANGED
@@ -2,49 +2,33 @@
2
2
 
3
3
  ## Purpose
4
4
 
5
- Amalgm Browser gives users and software agents one safe, persistent,
6
- observable way to browse and operate the web. It presents the same browser
7
- actions through an SDK, MCP, and REST API. Each runtime runs one headless
8
- Chrome. Every session, usually one per chat, drives its own tabs in that
9
- Chrome, and every session browses as the runtime's signed-in Amalgm account. A
10
- viewer can watch and drive any session through its live view. Browser state
11
- belongs to Browser, never to Chat, Agents, Shell, Engine, or the application
12
- renderer.
13
-
14
- Browser serves agents using Browser through a Toolbox, background automations
15
- and sub-agents, SDK consumers, and MCP and REST clients.
16
-
17
- Amalgm Shell is the active composition root. It supplies the account, the one
18
- folder Browser keeps its state in, caller context, event relay, and UI
19
- coordination through public Browser ports. It does not own a second browser implementation.
5
+ Amalgm Browser gives people and agents one browser shipped with the runtime,
6
+ one cookie store per account profile and one set of live sessions and tabs per machine runtime.
7
+ The runtime owns that browser independently of the desktop app. Every UI is a
8
+ window into that same browser: website viewers use its controlled CDP/live-view
9
+ connection and desktop viewers present its pages through a native surface.
10
+ Opening, closing, crashing or replacing a viewer never recreates or transfers a
11
+ page, interrupts an action or changes browser storage. The public SDK, MCP,
12
+ REST and Toolbox actions retain their existing contracts.
13
+
14
+ The engine supplier is an implementation choice. Using Electron to implement
15
+ the runtime browser would not give the desktop app ownership of website pages.
16
+ A candidate must satisfy the same ownership and native-interaction rules;
17
+ sharing a browser brand or rendering a frame does not establish that contract.
20
18
 
21
19
  ## Primitives
22
20
 
23
- - A **browser service** is the sole mutation boundary for one Browser state
24
- directory.
25
- - An **account** is the Amalgm identity the runtime browses as. Its one
26
- durable profile owns every session, auth bundle, and login.
27
- - The **Chrome host** is the runtime's one headless Chrome, shared by every
28
- session.
29
- - A **driver** runs actions for sessions. The default driver gives each
30
- session its own agent-browser daemon attached to the Chrome host.
31
- - A **session** is one named, durable browsing context with its own tabs.
32
- - A **page** is one tab belonging to one session.
33
- - An **action** is one typed browser operation.
34
- - A **live view** is a session's stream of frames out and input in.
35
- - A **capture** is a bounded raster result from a session's own page.
36
- - A **recording** is a bounded capture lifecycle and its stored artifact.
37
- - A **cookie jar** is the account's encrypted cookie store of record.
38
- - A **cookie adapter** syncs one browser's physical cookie store with the jar.
39
- - An **auth bundle** is an explicit encrypted snapshot of named browser
40
- authentication state.
41
- - A **login session** is a TTL-bound handoff for human authentication.
42
- - An **event** is a sanitized Browser state transition.
43
- - An **artifact store** persists Browser captures, downloads, traces, and
44
- recordings inside Browser's root without making Browser a workspace authority.
45
- - A **registry** stores durable Browser metadata.
46
- - A **runtime context** carries opaque caller, host, project, authorization,
47
- and cancellation information into Browser.
21
+ - An **account** owns one browser profile and cookie authority per runtime.
22
+ - A **native artifact** is an immutable engine, automation or encoder release with a complete verified file inventory.
23
+ - A **browser host** is the runtime-owned Chromium process and its pages.
24
+ - A **session** names a browsing context exposed by the unchanged tool contract.
25
+ - A **page** is a live Chromium target, independent of any viewer.
26
+ - A **viewer** presents a page and submits input without owning it.
27
+ - A **native surface** presents uncompressed runtime rendering with OS input.
28
+ - A **live view** streams a runtime page to a web or remote viewer.
29
+ - An **action** is a typed operation executed once by the browser service.
30
+ - A **cookie jar** is the encrypted record authority for browser cookies.
31
+ - An **artifact** is a bounded capture, recording, download or auth bundle.
48
32
 
49
33
  ## Axioms
50
34
 
@@ -64,6 +48,8 @@ Registry credentials are available only to the final protected publication job,
64
48
  after every native examination proves the exact candidate bytes.
65
49
  Native consumers install the archive as a dependency, so SDK development
66
50
  dependencies never become an end-user installation requirement.
51
+ Native examination filesystems permit the same OS sandbox primitives required
52
+ by an installed runtime; a generic temporary directory does not prove that permission.
67
53
  The repository token creates only its own dependency proposals and explicitly
68
54
  dispatches checks and delivery; every admitted gate proves the actual checkout,
69
55
  including the exact two-parent merge commit that becomes managed source.
@@ -71,116 +57,83 @@ including the exact two-parent merge commit that becomes managed source.
71
57
  Managed releases bind to one exact published Core version and build from the
72
58
  locked dependency graph on the supported Node toolchain.
73
59
 
74
- 1. Browser owns browser state and never depends on Chat, Agents, Shell, Engine,
75
- Realtime, or an application renderer to define it.
76
- 2. Every state change passes through `BrowserService`. The driver executes
77
- actions, and adapters expose the service without reimplementing its rules.
78
- 3. Browsing identity is the Amalgm account alone. The registry keeps exactly
79
- one durable profile, the account's, and every session, auth bundle, and
80
- login belongs to it. A state root binds to that account atomically and
81
- cannot be relabeled as another account.
82
- 4. A runtime runs one Chrome, owned by one process at a time. Chrome starts on
83
- first use and restarts on the next use after it dies. An OS-held lease
84
- protects the profile; a dead owner's Chrome is retired only through the
85
- exact browser endpoint that profile published, never by a PID guess.
86
- 5. Every tab belongs to exactly one session. A session sees and controls only
87
- its own tabs, every tab it opens lands in the account's browser context,
88
- and no session may end or reshape the Chrome that others share.
89
- Advanced argv describes page operations only; operation data is separate
90
- from process configuration and cannot select another engine or account.
91
- 6. Sessions are durable. A ready session from an earlier process reopens when
92
- `createSession` names it again, as every adapter does on each call, and a
93
- session keeps working after its Chrome dies and restarts. A session's live
94
- view shows and drives only that session.
95
- 7. Capture, computer-use input, and recording address the session's own page.
96
- When that page is ambiguous, they fail with `SURFACE_IDENTITY_FAILED`
97
- instead of guessing.
98
- 8. Cancellation and deadlines reach the underlying CDP call, encoder, or child
99
- process. Process execution uses argv, bounded output, and bounded
100
- termination without a shell. Admission precedes asynchronous work; closing
101
- stops admission, cancels and drains admitted operations, then releases
102
- recordings, the driver and the registry, in that order.
103
- 9. Browser output is bounded or externalized through an artifact store.
104
- Screenshot and computer-use coordinates share CSS-pixel space.
105
- 10. Application authentication and the Electron `defaultSession` are outside
106
- Browser. Browser never reads application authentication state, and
107
- cookies for protected hosts never enter the account.
108
- 11. The account's encrypted cookie jar is the store of record. Each browser
109
- store syncs both ways with the jar and never reads another store
110
- directly. Merges are record-level, deletions are tombstoned, and
111
- host-only, domain and partition scope are preserved. A reconnect cannot
112
- resurrect a tombstoned cookie; only an observed new local edit can do so.
113
- An interrupted adapter apply remains an unacknowledged store projection,
114
- so its partial echo cannot supersede newer store changes.
115
- Native cookie events carry the changed record: save it durably, then deliver
116
- the committed change to the other browser stores. Ordinary mutations never
117
- scan a store, rewrite the jar, or download a full snapshot. Connection and
118
- recovery events alone initialize a store from a snapshot. An idle account
119
- performs no cookie work; synchronization has no polling, debounce, or retry
120
- timer. An unavailable connection resumes on a host readiness or cookie event.
121
- The jar stores one encrypted row per cookie identity, including deletions;
122
- a transaction is durable before its value-free revision notification.
123
- 12. Cookie values, tokens, origin storage, encryption keys, and authorization
124
- headers never appear in logs, public events, diagnostics, ordinary API results, or
125
- resource projections. Automatic synchronization moves cookies only.
126
- 13. Cookies, auth bundles, and login sessions remain distinct. Named auth
127
- bundles move origin storage only when explicitly requested. A login handoff
128
- serializes its transitions, repeated activation keeps the same active page,
129
- and a terminal login cannot become active again.
130
- 14. Browser-owned secret records are encrypted, integrity-checked, atomic, and
131
- permission-restricted; physical browser profiles follow platform storage policy.
132
- A missing or corrupt cookie jar, or a Chrome that cannot report its cookie
133
- changes, degrades ordinary browsing safely instead of exposing secrets or
134
- disabling actions.
135
- 15. Recording proves capture before encoding, permits one active recording
136
- per session, captures page imagery only, and stops an uncooperative
137
- encoder within a deadline.
138
- 16. Browser emits sanitized events. Project, cwd, caller, and authorization
139
- enter through explicit context and ports; Browser never invents a
140
- workspace or synchronization authority.
141
- 17. Browser keeps all of its state, recordings included, inside the one root
142
- its host hands it. It never chooses a default folder, and never imports or
143
- migrates state from an older location or format.
144
- 18. TypeScript under `src/` is the sole implementation source. The
145
- SDK owns behavior; MCP, REST, Toolbox, and Electron IPC remain thin
146
- adapters with parity tests.
147
- 19. Browser installs and operates without Shell, Engine, or Electron. Behavior
148
- on an unseen session follows from these axioms without another special case.
149
- 20. Shell composes exactly one Browser service per runtime and closes it on
150
- shutdown. Electron browses in a separate persistent partition for each
151
- Amalgm account and syncs through Browser's private cookie adapter port;
152
- it never creates a second registry, session authority, or action implementation.
153
- Signing out retires that account's views and cookie adapter.
154
- 21. agent-browser IPC uses a private OS-temporary socket namespace and a digest
155
- of the canonical Browser root and session identity; durable path depth and
156
- session-name length cannot exceed the operating system's socket limit.
157
-
158
- ## Predictable behavior
159
-
160
- Every public surface dispatches the same typed action through
161
- `BrowserService`. The session is an explicit `session` input, else the
162
- caller's ID from the runtime context, else `default`, so each chat browses in
163
- its own session without naming one. The first use of a session in a process
164
- attaches its agent-browser daemon to the runtime's Chrome through the
165
- session's relay endpoint.
166
-
167
- All sessions share the account's browser context. A sign-in in one chat is
168
- visible in every other chat. Chrome's account profile and Electron's isolated
169
- account partition emit native cookie changes. Browser persists only those
170
- records and delivers only changes since each adapter's acknowledged revision.
171
- Chrome's private extension observes the profile, without attaching to websites
172
- or inspecting network traffic. The jar initializes each new connection;
173
- physical browser storage is a projection, never another authority.
174
- Named auth bundles are separate, explicit snapshots. Captures, input
175
- coordinates, and recordings address the session's own page, while large
176
- artifacts leave the API as files in Browser's root. Shell and Realtime can
177
- compose and relay Browser without becoming Browser.
178
-
179
- The Browser build supplies its Electron CommonJS adapter and companion preload as
180
- SDK-owned artifacts; a UI copies those bytes without rebuilding Browser behavior.
181
-
182
- Browser uses an explicitly configured Chrome, then an installed
183
- Chromium-family browser, then Chrome for Testing downloaded by agent-browser.
184
- Installing the npm dependency supplies agent-browser, not Chrome. Source CI
185
- provisions Chrome for Testing through the locked agent-browser dependency
186
- before the real-browser suite.
60
+ 1. Browser owns pages, profile, cookies and actions; consumers supply context and transport.
61
+ 2. The runtime ships and owns one browser with one set of live sessions and tabs; viewers never launch website renderers.
62
+ 3. Every viewer of a page addresses the same Chromium target and storage context without a viewer-local copy or handoff.
63
+ 4. Viewer disconnect, destruction, crash or update never closes or transfers a page.
64
+ 5. Only an explicit page/session close or browser-owner shutdown ends the live page.
65
+ 6. Native and streamed viewers submit input to the same owner; actions execute once, and navigation completion survives replacement of the document.
66
+ 7. Browser tools, input schemas, session resolution and action results stay compatible.
67
+ 8. Native presentation uses runtime-rendered pixels at device resolution without lossy encoding.
68
+ 9. Rendering and OS interaction are one native integration: focus, IME, clipboard, popups and accessibility require explicit support and real tests.
69
+ 10. Native resources remain owned until all consumers release them; slow or dead viewers cannot create an unbounded queue.
70
+ 11. Local presentation capabilities bind to the account, machine, page and connection; remote clients never receive native handles.
71
+ 12. Application authentication is separate from the website profile and never enters browser output.
72
+ 13. Amalgm's encrypted cookie jar is the only cookie authority per profile; Chromium's working copy is rebuilt from it before pages load and viewers own none.
73
+ 14. Durable browser records may travel through Live; a live JavaScript execution context is never replicated by replaying input.
74
+ 15. Captures, recordings, native presentation and live streaming resolve the exact selected page.
75
+ 16. Cancellation, deadlines and bounded cleanup reach browser operations and native resources.
76
+ 17. Secret records are encrypted and permission restricted; values never enter logs or public events.
77
+ 18. Shell composes and supervises Browser independently of desktop application lifetime.
78
+ 19. TypeScript owns product policy, public tools and artifact admission; native programs provide the engine, page automation, encoding and OS integration.
79
+ 20. A platform is supported only after its real native journey passes; unavailable features fail explicitly.
80
+ 21. Existing state is reused or verified before destructive migration; no silent browser fallback substitutes another profile.
81
+ 22. Interactive requests accept one authorized decision for their page and expire closed, with permission grants limited to the requesting origin and each requested capability.
82
+ 23. Runtime HTTP policy governs each owned-page request before transmission, follows the top-level site regardless of viewer presence, and reports unavailability without preventing unrelated browsing.
83
+ 24. Child pages retain their Chromium opener, session and tab/window disposition; popup windows are revocable viewers, and only an explicit popup close ends the child.
84
+ 25. A native drag belongs to its initiating view; disconnect cancels it, and transferred files outlive their readers without leaving permanent scratch data.
85
+ 26. Chromium control travels over inherited private channels; every exposed Amalgm control connection requires an authorized capability, and third-party access requires an explicit OAuth grant.
86
+ 27. Native engine, automation and encoder releases are immutable, integrity-pinned and cached independently of Browser code; unchanged artifacts are reused across package updates.
87
+ 28. Secret keys use the platform credential authority with bounded, explicit access failures; missing permission never selects insecure substitute encryption.
88
+ 29. Video acceptance includes common proprietary codecs and approved protected-media playback; architecture or codec detection alone cannot certify playback compatibility.
89
+
90
+ 30. The host supplies one absolute root for mutable Browser records and artifacts; immutable engine code uses its verified machine cache.
91
+ 31. Every page belongs to one session, and session control cannot mutate another session or its shared host.
92
+ 32. Profile adoption preserves existing jar records and tombstones, imports only unknown live cookies, and retires legacy cookie files only after durable verification under the profile's exclusive lease.
93
+ 33. Session admission atomically owns a live page independently of website loading or automation attachment; concurrent viewers join one opening, and an initial address never navigates an existing ready session.
94
+ 34. Browser's registry persists each session's tab addresses and selected position; only an actual engine loss restores those addresses into new execution contexts.
95
+ 35. Electron native windows are runtime-owned presentation containers; closing a window detaches its views without destroying the pages they present.
96
+ 36. Desktop application controllers connect to the runtime through revocable local capabilities; their exit closes their presentation containers, never browser pages.
97
+ 37. Desktop UI storage and readiness belong to its persistent application partition, independently of website media and filter preparation; bootstrap seeds it once, and explicit sign-in handoffs replace its cookies once before loading the UI.
98
+ 38. Engine-supplied web dialogs preserve synchronous page semantics and expose one page-scoped decision to native viewers and CDP clients; navigation, expiry and owner loss cancel that decision.
99
+ 39. Desktop controller handles name window intent across connection generations; reconnect replaces presentation containers and never replays website actions or application bootstrap state.
100
+ 40. Revoked desktop capabilities discard queued events and reject requests without interrupting the browser owner.
101
+ 41. A page has one native input view in its focused window; other windows display its current uncompressed frames and acquire that same input view on focus.
102
+ 42. Engine profile migration holds both owner leases, verifies a staged copy of website storage, and publishes it once while retaining the legacy source.
103
+ 43. Each page owns compositor readiness across navigation and viewer changes; streams, input and captures wait for that readiness, and capture bitmaps are sampled onto the requested CSS pixel grid regardless of display density or native rounding.
104
+ 44. Production engine pins identify the final bytes after every applicable platform and VMP signature; signing happens in staging, never in an installed cache, and credentials never enter a published artifact.
105
+ 45. Hardened-runtime permissions belong to process roles; the CDM host admits vendor-signed modules while other roles retain their library validation policy.
106
+ 46. Each supported host selects declared compatible program artifacts whose required operations pass on that host; processor names alone never select unpublished binaries or certify encoder formats, and explicit operator programs remain caller-owned.
107
+ 47. Cosmetic rules execute only as their declared kind, with each scriptlet's helpers private to that invocation.
108
+ 48. A page has one layout viewport: its visible native input view sets the bounds, otherwise its most recently active streamed viewer sets the size, and other viewers fit that same rendering.
109
+ 49. Each streamed frame carries its own Chromium viewport metadata; display and input never infer dimensions from a viewer preference or an automation client's defaults.
110
+ 50. An automation daemon accepts only its owner's authenticated commands, receives page access only after its auxiliary listeners are disabled, and loses that access with its process.
111
+
112
+ ## Implementation status
113
+
114
+ The runtime now uses a pinned castLabs Electron distribution and owns native
115
+ WebContentsViews and desktop UI windows. The local macOS journey confirms that
116
+ closing and reopening the desktop preserves the live website target, draft and
117
+ session storage, and that application sign-in storage stays separate. Website
118
+ cookies use Amalgm's encrypted jar with a rebuildable Chromium working copy.
119
+ The verified cache inventories all six Mac, Windows and Linux engine archives.
120
+ Fresh-consumer package execution, common-media playback, cookie restart
121
+ acceptance, native desktop quit/crash continuity and runtime ad blocking pass
122
+ on this Mac. Public UAT Widevine playback and signed background Keychain access
123
+ also pass. The same native journey is enforced in macOS, Windows and Linux CI.
124
+ Production VMP signatures now verify for both Mac and Windows architectures.
125
+ Actual production Widevine playback passes on Apple Silicon and on the Intel
126
+ build under Rosetta, and on native Windows x64 and ARM CI hosts. The Windows pins use
127
+ immutable production-signed candidates.
128
+ Both Mac candidates are notarized; their final public downloads pass signature,
129
+ staple and Gatekeeper checks after extraction and are pinned alongside both
130
+ production Windows builds. The source journey passes on all six supported
131
+ OS/CPU targets with those final pins, including production Widevine on both Mac
132
+ and Windows architectures. Package
133
+ qualification requires that same complete matrix. Native OS interaction
134
+ and signed package acceptance on each target remain release requirements.
135
+ Managed publication requires the exact signed package matrix. The remaining
136
+ manual interaction and intended-service gates govern complete native qualification.
137
+
138
+ See [native browser integration](docs/NATIVE_BROWSER.md) for the design and
139
+ observable acceptance criteria.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # @amalgm/browser
2
2
 
3
3
  Amalgm Browser gives agents and users one persistent, observable browser.
4
- Each runtime runs one headless Chrome. Every session, usually one per chat,
5
- drives its own tabs in it, and all sessions browse as the runtime's signed-in
6
- Amalgm account. Its TypeScript SDK owns behavior; the MCP and REST adapters,
7
- Toolbox manifest, and packaged skill are projections of the same actions.
4
+ Every session, usually one per chat, drives its own tabs in the runtime's
5
+ Chromium profile. The runtime owns website execution. Desktop native views
6
+ and remote streams show the same pages, which survive viewer close, crash,
7
+ reload and sign-out. The TypeScript SDK owns product behavior; MCP, REST and Toolbox project the same actions.
8
8
 
9
9
  Browser is independent of Amalgm Shell, Engine, Chat, Agents, Tools, and
10
10
  Realtime. Shell composes Browser through its public ports; it does not define
@@ -17,15 +17,26 @@ Node.js 24 or newer is required.
17
17
 
18
18
  ```sh
19
19
  npm install @amalgm/browser
20
- npx --no-install agent-browser install # only if no Chrome is installed
21
20
  ```
22
21
 
23
- The `agent-browser` dependency drives Chrome. Browser uses
24
- `AMALGM_BROWSER_EXECUTABLE_PATH` if set, then an installed Chrome, Chromium, or
25
- Brave, then the Chrome for Testing that `agent-browser install` downloads. See
26
- [Chrome runtime](./docs/CHROME.md).
27
-
28
- Electron is an optional peer dependency. Server consumers never load it.
22
+ The package pins castLabs Electron for Content Security 44.5.1. The runtime
23
+ owns that engine independently of the desktop controller. Its verified machine
24
+ cache keeps engine bytes across Browser package updates; the SDK supplies the
25
+ runtime entry point, policies and desktop presentation adapter.
26
+ The automation program and media encoder use the same verified cache contract;
27
+ ordinary installation needs no external browser installer or Rust compiler.
28
+
29
+ The pin inventories Mac, Windows and Linux archives for arm64 and x64. The native
30
+ CI matrix exercises the actual engine on all three operating systems. Signed
31
+ package execution and public Widevine UAT playback have also passed locally on
32
+ macOS arm64. Production protected media, OS interaction and signed acceptance
33
+ on every supported OS/CPU remain release gates; this branch is not a published
34
+ release. See
35
+ [engine delivery](./docs/ENGINE_DELIVERY.md) and
36
+ [native acceptance](./docs/NATIVE_BROWSER.md).
37
+
38
+ Electron is an optional SDK peer. Ordinary SDK imports do not load that peer;
39
+ the browser subprocess runs the independently cached, pinned distribution.
29
40
 
30
41
  ## SDK quick start
31
42
 
@@ -64,9 +75,9 @@ jar, auth bundles and login secrets, and recordings. Browser never chooses a
64
75
  folder of its own. In Amalgm, Shell hands it `user.computer.browser` from
65
76
  `@amalgm/core`, for example `~/amalgm/users/<user>/.amalgm/browser`.
66
77
 
67
- The account's encrypted cookie jar is the store of record. Chrome's cookies
68
- sync both ways with it, so a sign-in survives restarts and a sign-out anywhere
69
- applies everywhere. Cookies for Amalgm, Supabase, and loopback hosts never
78
+ The account's encrypted cookie jar is the store of record. The runtime's
79
+ Chromium profile reconciles with it; desktop viewers have no separate website
80
+ cookie store. Sign-ins survive restarts and jar sign-outs reach the profile. Cookies for Amalgm, Supabase, and loopback hosts never
70
81
  enter it. Named auth bundles are explicit and separate from this sync. See
71
82
  [cookies](./docs/COOKIES.md) and [authentication](./docs/AUTHENTICATION.md).
72
83
 
@@ -86,7 +97,7 @@ report `wallSeconds` and `videoSeconds` separately. They are written to
86
97
  - [Shell integration](./docs/SHELL_INTEGRATION.md) covers creating the one
87
98
  service, mapping chats to sessions, the live view, and shutdown.
88
99
  - [Electron integration](./docs/ELECTRON_INTEGRATION.md) covers the desktop
89
- app's native browser tabs, policy, and ad blocking.
100
+ app's native viewers, page continuity, OS interaction and runtime policy.
90
101
  - [Toolbox integration](./docs/TOOLBOX_INTEGRATION.md) covers the single
91
102
  `browser` tool, capability grants, and legacy aliases.
92
103
 
@@ -94,7 +105,7 @@ report `wallSeconds` and `videoSeconds` separately. They are written to
94
105
 
95
106
  ```sh
96
107
  npm run verify
97
- npm run test:real # real Chrome and a real site
108
+ npm run test:real # pinned Chromium and real desktop journeys
98
109
  ```
99
110
 
100
111
  Verification covers strict TypeScript, the 220-line source limit, runtime and
package/SECURITY.md CHANGED
@@ -6,11 +6,10 @@ recordings.
6
6
 
7
7
  ## Isolation
8
8
 
9
- Browser separates application authentication, the runtime's one Chrome, the
10
- Electron `persist:amalgm-browser` partition, the signed-in account's cookie
11
- jar, and explicit auth bundles. It never queries Electron `defaultSession`.
12
- Chrome and Electron never read each other's physical stores; cookies move
13
- between them only through the encrypted account jar.
9
+ Browser separates application authentication, the runtime's Chromium profile,
10
+ the signed-in account's cookie jar, and explicit auth bundles. The runtime owns website renderers and cookies independently of desktop UI windows.
11
+ Native views receive revocable page capabilities through the authenticated
12
+ local adapter; remote viewers never receive native handles.
14
13
 
15
14
  ## Secrets
16
15
 
@@ -26,9 +25,13 @@ list/get and MCP projections do not expose it. Portable auth resources are
26
25
  ciphertext but remain credentials and require an explicitly authorized
27
26
  32-byte key.
28
27
 
29
- Device-local encryption protects against accidental plaintext exposure. It
30
- does not protect against an attacker who can read both encrypted files and the
31
- local key or control the running Browser process.
28
+ On macOS, the default encryption key lives in Keychain behind a stable signed
29
+ helper. `browser.keychain` stores only a public reference. Migration verifies
30
+ that Keychain retained the existing key before removing `browser.key`.
31
+ Access is noninteractive and bounded; denial never creates a substitute key.
32
+ This does not isolate the runtime from malware already controlling the user's
33
+ OS account or the Browser process. Explicit embedding credential providers
34
+ remain the embedding owner's responsibility.
32
35
 
33
36
  ## Network surfaces
34
37
 
@@ -38,12 +41,27 @@ body parsing where feasible, defaults to loopback, and refuses remote binding
38
41
  without explicit authorization. Put TLS and network access control in front of
39
42
  any remote deployment. Never expose `/internal/v1/*` to untrusted clients.
40
43
 
41
- Chrome's debugging port listens on loopback only and is reached through
42
- Browser's relay. A session's live view is a WebSocket on the REST server under
44
+ Chromium exposes no debugging TCP port. It speaks CDP over inherited pipes to
45
+ Browser. Existing CDP clients use a loopback bridge with a random credential;
46
+ session relays require separate, revocable session credentials and reject web
47
+ Origins. Agent credentials travel in private configuration, not argv. Each
48
+ connection owns its CDP attachment tree. Automation starts with page access
49
+ closed, requires an HMAC on every command using a private per-process credential,
50
+ disables the supplier's auxiliary streaming listener, and only then
51
+ admits its exact process. A process change or unexpected listener revokes that
52
+ access; actions are never replayed after uncertain delivery or to recover a failed daemon. Browser owns live
53
+ streaming and advanced page operations cannot enable supplier listeners. Third-party OAuth grants are not yet
54
+ implemented; runtime/adapter credentials are for authorized Amalgm components,
55
+ not a third-party integration mechanism. A session's live view is a WebSocket on the REST server under
43
56
  the same bearer token; an unauthorized viewer is closed with code 4401. A
44
57
  capture that cannot identify the session's own page fails before input or
45
58
  capture.
46
59
 
60
+ Engine, automation and encoder downloads are pinned by archive SHA-256 and by a complete file inventory.
61
+ Extraction rejects unexpected files and escaping paths/links. Cache hits verify
62
+ installed bytes without contacting the download server. Production pins identify the final signed engine bytes; package publication
63
+ still requires the supported platform acceptance gates.
64
+
47
65
  ## User data
48
66
 
49
67
  Treat captures, recordings, downloads, traces, profile directories, and