dsh-builtin-browser 0.5.8 → 1.0.1

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 (401) hide show
  1. package/CHANGELOG.md +410 -1
  2. package/README.en.md +16 -64
  3. package/README.md +33 -64
  4. package/assets/browser-carriers.svg +20 -0
  5. package/assets/browser-extension-identity.d.mts +2 -0
  6. package/assets/browser-extension-identity.mjs +2 -0
  7. package/assets/browser-messages.d.mts +5 -0
  8. package/assets/browser-messages.mjs +64 -0
  9. package/assets/browser-panel-locales.d.mts +2 -0
  10. package/assets/browser-panel-locales.mjs +380 -0
  11. package/assets/browser-policy.d.mts +37 -0
  12. package/assets/browser-policy.mjs +37 -0
  13. package/assets/browser-products.d.mts +6 -0
  14. package/assets/browser-products.mjs +76 -0
  15. package/assets/screenshots/1-main.png +0 -0
  16. package/assets/screenshots/2-form-fill.png +0 -0
  17. package/assets/screenshots/3-challenge.png +0 -0
  18. package/browser-extension/constants.mjs +20 -0
  19. package/browser-extension/controller.mjs +293 -0
  20. package/browser-extension/locales.mjs +15 -0
  21. package/browser-extension/manifest.json +12 -0
  22. package/browser-extension/options.html +14 -0
  23. package/browser-extension/options.mjs +9 -0
  24. package/browser-extension/permission-guard.mjs +13 -0
  25. package/browser-extension/worker.mjs +74 -0
  26. package/cordis.patch.yml +23 -48
  27. package/desktop-bridge/desktop-discovery.d.mts +2 -0
  28. package/desktop-bridge/desktop-discovery.mjs +36 -0
  29. package/desktop-bridge/desktop-identity.json +17 -1
  30. package/desktop-bridge/desktop-processes.d.mts +1 -0
  31. package/desktop-bridge/desktop-processes.mjs +15 -0
  32. package/desktop-bridge/guest-proxy.mjs +109 -0
  33. package/desktop-bridge/install.mjs +197 -74
  34. package/desktop-bridge/main.mjs +11 -0
  35. package/desktop-bridge/maintenance-files.d.mts +8 -0
  36. package/desktop-bridge/maintenance-files.mjs +28 -0
  37. package/desktop-bridge/maintenance-progress.ps1 +2 -2
  38. package/desktop-bridge/native-guests.mjs +41 -0
  39. package/desktop-bridge/plugin-browser-bridge.js +618 -370
  40. package/desktop-bridge/profile-loader.mjs +26 -0
  41. package/dist/client.cjs +43167 -0
  42. package/dist/client.d.cts +516 -0
  43. package/dist/client.d.mts +516 -0
  44. package/dist/index.cjs +92 -0
  45. package/dist/index.d.mts +2960 -0
  46. package/dist/index.mjs +24 -0
  47. package/docs/HANDOVER-2026-11-15.md +178 -0
  48. package/docs/README.md +10 -19
  49. package/docs/architecture.md +17 -145
  50. package/docs/child-tabs.md +13 -0
  51. package/docs/desktop-acceptance.md +9 -0
  52. package/docs/development.md +88 -18
  53. package/docs/extension-browser.md +44 -0
  54. package/docs/hardcoding-audit.md +64 -0
  55. package/docs/limitations.md +23 -73
  56. package/docs/pr64-extension-status.md +46 -0
  57. package/docs/pr64-maintenance.md +25 -0
  58. package/docs/pr64-native-children.md +52 -0
  59. package/docs/pr64-native-views.md +60 -0
  60. package/docs/tool-reference.md +87 -11
  61. package/docs/user-guide.md +47 -255
  62. package/docs/why-browser.md +6 -39
  63. package/dsh-host-patch/README.md +60 -0
  64. package/dsh-host-patch/apply.mjs +194 -0
  65. package/dsh-host-patch/legacy-bridge.mjs +53 -0
  66. package/dsh-host-patch/rc3-revision1.json +90 -0
  67. package/dsh-host-patch/rc3-revision2.json +112 -0
  68. package/dsh-host-patch/rc3-revision3.json.gz +0 -0
  69. package/dsh-host-patch/rc3-revision4.json.gz +0 -0
  70. package/dsh-host-patch/rc3-revision5.json.gz +0 -0
  71. package/dsh-host-patch/rc3-revision6.json.gz +0 -0
  72. package/dsh-host-patch/rc3-revision7.json.gz +0 -0
  73. package/dsh-host-patch/rc3-revision8.json.gz +0 -0
  74. package/dsh-host-patch/rc3.json +148 -0
  75. package/dsh-host-patch/rc5-revision1.json +90 -0
  76. package/dsh-host-patch/rc5-revision2.json +112 -0
  77. package/dsh-host-patch/rc5-revision3.json.gz +0 -0
  78. package/dsh-host-patch/rc5-revision4.json.gz +0 -0
  79. package/dsh-host-patch/rc5-revision5.json.gz +0 -0
  80. package/dsh-host-patch/rc5-revision6.json.gz +0 -0
  81. package/dsh-host-patch/rc5-revision7.json.gz +0 -0
  82. package/dsh-host-patch/rc5-revision8.json.gz +0 -0
  83. package/dsh-host-patch/rc5.json +148 -0
  84. package/lib/bridge-compatibility.js +38 -0
  85. package/lib/browser/handles.js +78 -0
  86. package/lib/browser/runtime.js +155 -43
  87. package/lib/browser/takeover-target.js +24 -0
  88. package/lib/browser-electron/authenticated-route.js +23 -0
  89. package/lib/browser-electron/automatic-maintenance.js +394 -51
  90. package/lib/browser-electron/bridge-auto.js +2 -1
  91. package/lib/browser-electron/bridge-connection.js +8 -1
  92. package/lib/browser-electron/bridge-install.js +27 -2
  93. package/lib/browser-electron/bridge-maintenance.js +35 -10
  94. package/lib/browser-electron/bridge-status.js +98 -27
  95. package/lib/browser-electron/desktop-bridge-host.js +193 -560
  96. package/lib/browser-electron/desktop-identity.js +40 -2
  97. package/lib/browser-electron/document-readiness.js +34 -0
  98. package/lib/browser-electron/electron-provision.js +14 -44
  99. package/lib/browser-electron/entry.js +659 -252
  100. package/lib/browser-electron/extension-browser.js +234 -0
  101. package/lib/browser-electron/extension-setup.js +69 -0
  102. package/lib/browser-electron/guest-cookie-jar.LICENSE.txt +32 -0
  103. package/lib/browser-electron/guest-cookie-jar.js +10559 -0
  104. package/lib/browser-electron/guest-cookie-store.js +74 -0
  105. package/lib/browser-electron/guest-css-runtime.js +75 -0
  106. package/lib/browser-electron/guest-css.js +106 -0
  107. package/lib/browser-electron/guest-route.js +603 -0
  108. package/lib/browser-electron/guest-runtime.js +356 -0
  109. package/lib/browser-electron/guest-storage-runtime.js +52 -0
  110. package/lib/browser-electron/guest-storage.js +163 -0
  111. package/lib/browser-electron/history-store.js +2 -1
  112. package/lib/browser-electron/host-main.js +162 -7
  113. package/lib/browser-electron/host-patch-maintenance.js +141 -0
  114. package/lib/browser-electron/http-body.js +22 -0
  115. package/lib/browser-electron/maintenance-broker.js +35 -5
  116. package/lib/browser-electron/maintenance-lifecycle.js +7 -5
  117. package/lib/browser-electron/maintenance-route.js +9 -6
  118. package/lib/browser-electron/open-slot.js +47 -0
  119. package/lib/browser-electron/paths.js +4 -1
  120. package/lib/browser-electron/preferred-browser.js +144 -0
  121. package/lib/browser-electron/preview-route.js +11 -8
  122. package/lib/browser-electron/process-ownership.js +198 -0
  123. package/lib/browser-electron/profile-checkpoint.js +222 -0
  124. package/lib/browser-electron/profile-command.js +60 -0
  125. package/lib/browser-electron/profile-extension.js +126 -0
  126. package/lib/browser-electron/profile-lease.js +157 -0
  127. package/lib/browser-electron/profile-residue.js +61 -0
  128. package/lib/browser-electron/provider.js +719 -262
  129. package/lib/browser-electron/reference-route.js +635 -0
  130. package/lib/browser-electron/remote-host.js +12 -13
  131. package/lib/browser-electron/runtime-route.js +6 -5
  132. package/lib/browser-electron/runtime-status.js +30 -29
  133. package/lib/browser-electron/settings-store.js +10 -5
  134. package/lib/browser-electron/shortcuts-route.js +108 -0
  135. package/lib/browser-electron/sidebar-only-host.js +119 -18
  136. package/lib/browser-electron/startpage-shortcuts.js +172 -0
  137. package/lib/browser-electron/system-browser.js +352 -371
  138. package/lib/browser-electron/windows-system.js +2 -1
  139. package/lib/browser-reference/delivery.js +326 -0
  140. package/lib/browser-reference/entry.js +597 -0
  141. package/lib/browser-reference/export.js +298 -0
  142. package/lib/browser-reference/import.js +295 -0
  143. package/lib/browser-reference/page-script.js +1406 -0
  144. package/lib/browser-reference/service.js +1062 -0
  145. package/lib/browser-reference/store.js +177 -0
  146. package/lib/browser-reference/submission-receipts.js +139 -0
  147. package/lib/browser-reference/text-quote.js +167 -0
  148. package/lib/browser-reference/types.js +11 -0
  149. package/lib/browser-reference/visible.js +311 -0
  150. package/lib/browser-reference/web-sources.js +97 -0
  151. package/lib/index.js +10 -3
  152. package/lib/reference-owner.js +5 -0
  153. package/lib/reference-page.js +12 -0
  154. package/lib/reference-source.js +2 -0
  155. package/lib/reference-text.js +188 -0
  156. package/lib/startpage-settings.js +63 -0
  157. package/lib/startpage.js +44 -0
  158. package/lib/takeover-protocol.js +2 -0
  159. package/lib/tool-browser/code-tool.js +416 -0
  160. package/lib/tool-browser/code-worker.js +872 -0
  161. package/lib/tool-browser/index.js +940 -76
  162. package/lib/tool-browser/page-probe.js +3 -3
  163. package/lib/tool-browser/panel-page.js +95 -0
  164. package/lib/tool-browser/screenshot-image.js +51 -0
  165. package/lib/tool-browser/takeover.js +205 -0
  166. package/lib/types.js +1 -0
  167. package/lib/web-guest.js +26 -0
  168. package/native-host/client.d.mts +17 -0
  169. package/native-host/client.mjs +100 -0
  170. package/native-host/host.mjs +150 -0
  171. package/native-host/identity.d.mts +2 -0
  172. package/native-host/identity.mjs +1 -0
  173. package/native-host/install.mjs +168 -0
  174. package/native-host/protocol.mjs +75 -0
  175. package/package.json +80 -92
  176. package/scripts/build.mjs +66 -0
  177. package/scripts/bundle-host.mjs +28 -0
  178. package/scripts/fix-exports.mjs +50 -0
  179. package/scripts/install-electron.mjs +11 -26
  180. package/scripts/verify-exports.mjs +47 -0
  181. package/scripts/verify-preview-sdk.mjs +93 -0
  182. package/skills/dsh-builtin-browser/SKILL.md +56 -47
  183. package/skills/dsh-builtin-browser/references/batch.md +31 -1
  184. package/skills/dsh-debug-host/SKILL.md +56 -0
  185. package/skills/dsh-debug-self/SKILL.md +50 -0
  186. package/src/bridge-compatibility.ts +39 -0
  187. package/src/browser/handles.ts +89 -0
  188. package/src/browser/runtime.ts +146 -50
  189. package/src/browser/takeover-target.ts +36 -0
  190. package/src/browser/types.ts +19 -7
  191. package/src/browser-electron/authenticated-route.ts +29 -1
  192. package/src/browser-electron/automatic-maintenance.ts +368 -56
  193. package/src/browser-electron/bridge-auto.ts +5 -4
  194. package/src/browser-electron/bridge-connection.ts +20 -2
  195. package/src/browser-electron/bridge-endpoint.ts +3 -3
  196. package/src/browser-electron/bridge-install.ts +40 -4
  197. package/src/browser-electron/bridge-maintenance.ts +42 -14
  198. package/src/browser-electron/bridge-status.ts +94 -23
  199. package/src/browser-electron/desktop-bridge-host.ts +185 -585
  200. package/src/browser-electron/desktop-identity.ts +53 -2
  201. package/src/browser-electron/document-readiness.ts +45 -0
  202. package/src/browser-electron/electron-provision.ts +12 -45
  203. package/src/browser-electron/entry.ts +1299 -882
  204. package/src/browser-electron/ephemeral-profile.ts +1 -1
  205. package/src/browser-electron/extension-browser.ts +223 -0
  206. package/src/browser-electron/extension-setup.ts +67 -0
  207. package/src/browser-electron/guest-cookie-jar.ts +176 -0
  208. package/src/browser-electron/guest-cookie-store.ts +59 -0
  209. package/src/browser-electron/guest-css-runtime.ts +76 -0
  210. package/src/browser-electron/guest-css.ts +68 -0
  211. package/src/browser-electron/guest-route.ts +568 -0
  212. package/src/browser-electron/guest-runtime.ts +357 -0
  213. package/src/browser-electron/guest-storage-runtime.ts +54 -0
  214. package/src/browser-electron/guest-storage.ts +117 -0
  215. package/src/browser-electron/history-store.ts +5 -4
  216. package/src/browser-electron/host-main.ts +156 -11
  217. package/src/browser-electron/host-patch-maintenance.ts +112 -0
  218. package/src/browser-electron/http-body.ts +23 -0
  219. package/src/browser-electron/maintenance-broker.ts +29 -5
  220. package/src/browser-electron/maintenance-lifecycle.ts +14 -9
  221. package/src/browser-electron/maintenance-route.ts +17 -14
  222. package/src/browser-electron/missing-system-browser.ts +2 -2
  223. package/src/browser-electron/open-slot.ts +49 -0
  224. package/src/browser-electron/paths.ts +5 -1
  225. package/src/browser-electron/preferred-browser.ts +120 -0
  226. package/src/browser-electron/preview-route.ts +18 -11
  227. package/src/browser-electron/process-ownership.ts +168 -0
  228. package/src/browser-electron/profile-checkpoint.ts +187 -0
  229. package/src/browser-electron/profile-command.ts +46 -0
  230. package/src/browser-electron/profile-extension.ts +124 -0
  231. package/src/browser-electron/profile-lease.ts +115 -0
  232. package/src/browser-electron/profile-residue.ts +49 -0
  233. package/src/browser-electron/provider.ts +771 -289
  234. package/src/browser-electron/reference-route.ts +608 -0
  235. package/src/browser-electron/remote-host.ts +15 -15
  236. package/src/browser-electron/runtime-route.ts +11 -10
  237. package/src/browser-electron/runtime-status.ts +51 -32
  238. package/src/browser-electron/settings-store.ts +27 -7
  239. package/src/browser-electron/shortcuts-route.ts +112 -0
  240. package/src/browser-electron/sidebar-only-host.ts +118 -19
  241. package/src/browser-electron/startpage-shortcuts.ts +213 -0
  242. package/src/browser-electron/system-browser.ts +309 -338
  243. package/src/browser-electron/windows-system.ts +2 -1
  244. package/src/browser-reference/delivery.ts +384 -0
  245. package/src/browser-reference/entry.ts +631 -0
  246. package/src/browser-reference/export.ts +339 -0
  247. package/src/browser-reference/import.ts +303 -0
  248. package/src/browser-reference/page-script.ts +1537 -0
  249. package/src/browser-reference/service.ts +1315 -0
  250. package/src/browser-reference/store.ts +172 -0
  251. package/src/browser-reference/submission-receipts.ts +122 -0
  252. package/src/browser-reference/text-quote.ts +219 -0
  253. package/src/browser-reference/types.ts +195 -0
  254. package/src/browser-reference/visible.ts +367 -0
  255. package/src/browser-reference/web-sources.ts +103 -0
  256. package/src/client/browser/BrowserController.ts +693 -0
  257. package/src/client/browser/BrowserFrame.ts +78 -0
  258. package/src/client/browser/BrowserNavigation.ts +169 -0
  259. package/src/client/browser/BrowserPage.ts +23 -0
  260. package/src/client/browser/BrowserPersistence.ts +44 -0
  261. package/src/client/browser/IframeImpl.ts +176 -0
  262. package/src/client/browser/child-tabs.ts +14 -0
  263. package/src/client/browser/iframe-reference.ts +67 -0
  264. package/src/client/browser/initialization.ts +262 -0
  265. package/src/client/browser/omnibox.ts +243 -0
  266. package/src/client/browser/store.ts +38 -0
  267. package/src/client/browser/takeover-channel.ts +72 -0
  268. package/src/client/browser/url.ts +46 -0
  269. package/src/client/browser/web-reference-source.ts +52 -0
  270. package/src/client/css-modules.d.ts +4 -0
  271. package/src/client/definition.tsx +30 -0
  272. package/src/client/electron/ElectronWebViewImpl.ts +364 -0
  273. package/src/client/electron/ElectronWebviewPresentation.ts +138 -0
  274. package/src/client/electron/NativeChildPresentation.ts +45 -0
  275. package/src/client/electron/NativeViewPage.ts +251 -0
  276. package/src/client/electron/pages.ts +23 -0
  277. package/src/client/electron/reference-overlay.ts +53 -0
  278. package/src/client/electron/workspace.ts +33 -0
  279. package/src/client/index.ts +293 -0
  280. package/src/client/locales.ts +857 -0
  281. package/src/client/pages.ts +28 -0
  282. package/src/client/reference/client/BrowserRefLink.tsx +142 -0
  283. package/src/client/reference/client/draft-reference.ts +167 -0
  284. package/src/client/reference/client/index.ts +7 -0
  285. package/src/client/reference/client/ordered-submission.ts +108 -0
  286. package/src/client/reference/client/pending-delivery.ts +216 -0
  287. package/src/client/reference/client/plugin.ts +189 -0
  288. package/src/client/reference/client/production/ReferenceCapsules.tsx +345 -0
  289. package/src/client/reference/client/production/ReferenceDock.module.css +193 -0
  290. package/src/client/reference/client/production/ReferenceDock.tsx +6 -0
  291. package/src/client/reference/client/production/ReferenceFeedback.tsx +15 -0
  292. package/src/client/reference/client/production/ReferenceMath.tsx +44 -0
  293. package/src/client/reference/client/production/ReferenceText.tsx +36 -0
  294. package/src/client/reference/client/production/assembly.ts +471 -0
  295. package/src/client/reference/client/production/asset-store.ts +144 -0
  296. package/src/client/reference/client/production/availability.ts +74 -0
  297. package/src/client/reference/client/production/bytes.ts +36 -0
  298. package/src/client/reference/client/production/delivery-client.ts +211 -0
  299. package/src/client/reference/client/production/draft-adapter.ts +508 -0
  300. package/src/client/reference/client/production/http-transport.ts +217 -0
  301. package/src/client/reference/client/production/production-submission.ts +310 -0
  302. package/src/client/reference/client/production/protocol.ts +231 -0
  303. package/src/client/reference/client/production/reference-card.ts +240 -0
  304. package/src/client/reference/client/production/reference-labels.ts +29 -0
  305. package/src/client/reference/client/production/reply-link-bridge.ts +222 -0
  306. package/src/client/reference/client/production/reveal.ts +215 -0
  307. package/src/client/reference/client/production/runtime.ts +1101 -0
  308. package/src/client/reference/client/production/snapshot-adapter.ts +154 -0
  309. package/src/client/reference/client/production/source-marker.ts +63 -0
  310. package/src/client/reference/client/production/source-opener.ts +55 -0
  311. package/src/client/reference/client/production/styles.ts +104 -0
  312. package/src/client/reference/client/production/user-text-rule.ts +58 -0
  313. package/src/client/reference/client/reveal.ts +107 -0
  314. package/src/client/reference/client/scheme.ts +114 -0
  315. package/src/client/reference/client/types.ts +168 -0
  316. package/src/client/reference/css-modules.d.ts +4 -0
  317. package/src/client/reference/index.ts +11 -0
  318. package/src/client/reference-capture-owner.ts +162 -0
  319. package/src/client/reference-intents.ts +36 -0
  320. package/src/client/settings/index.ts +34 -0
  321. package/{client.js → src/client/settings/panel.ts} +2657 -2231
  322. package/src/client/shortcut-open.ts +30 -0
  323. package/src/client/startpage/binding.ts +99 -0
  324. package/src/client/startpage/controller.ts +303 -0
  325. package/src/client/startpage/model.ts +279 -0
  326. package/src/client/view/Browser.module.css +751 -0
  327. package/src/client/view/BrowserBody.tsx +314 -0
  328. package/src/client/view/BrowserPresentation.ts +9 -0
  329. package/src/client/view/BrowserTitle.tsx +17 -0
  330. package/src/client/view/IframePresentation.ts +344 -0
  331. package/src/client/view/StartPage.tsx +597 -0
  332. package/src/client/view/TakeoverBanner.tsx +21 -0
  333. package/src/index.ts +110 -73
  334. package/src/reference-owner.ts +5 -0
  335. package/src/reference-page.ts +9 -0
  336. package/src/reference-source.ts +3 -0
  337. package/src/reference-text.ts +197 -0
  338. package/src/startpage-settings.ts +103 -0
  339. package/src/startpage.ts +71 -0
  340. package/src/takeover-protocol.ts +19 -0
  341. package/src/tool-browser/code-tool.ts +401 -0
  342. package/src/tool-browser/code-worker.ts +639 -0
  343. package/src/tool-browser/index.ts +908 -77
  344. package/src/tool-browser/page-probe.ts +4 -4
  345. package/src/tool-browser/panel-page.ts +124 -0
  346. package/src/tool-browser/screenshot-image.ts +49 -0
  347. package/src/tool-browser/takeover.ts +198 -0
  348. package/src/types/electron-shim.d.ts +20 -0
  349. package/src/types.ts +85 -0
  350. package/src/web-guest.ts +34 -0
  351. package/tools/accept-desktop.mjs +148 -0
  352. package/lib/browser/runtime.d.ts +0 -175
  353. package/lib/browser/types.d.ts +0 -797
  354. package/lib/browser-electron/authenticated-route.d.ts +0 -27
  355. package/lib/browser-electron/automatic-maintenance.d.ts +0 -41
  356. package/lib/browser-electron/bridge-auto.d.ts +0 -93
  357. package/lib/browser-electron/bridge-connection.d.ts +0 -93
  358. package/lib/browser-electron/bridge-endpoint.d.ts +0 -30
  359. package/lib/browser-electron/bridge-install.d.ts +0 -85
  360. package/lib/browser-electron/bridge-maintenance.d.ts +0 -24
  361. package/lib/browser-electron/bridge-status.d.ts +0 -50
  362. package/lib/browser-electron/desktop-bridge-host.d.ts +0 -248
  363. package/lib/browser-electron/desktop-identity.d.ts +0 -58
  364. package/lib/browser-electron/electron-provision.d.ts +0 -92
  365. package/lib/browser-electron/entry.d.ts +0 -64
  366. package/lib/browser-electron/ephemeral-profile.d.ts +0 -37
  367. package/lib/browser-electron/file-write.d.ts +0 -2
  368. package/lib/browser-electron/history-store.d.ts +0 -98
  369. package/lib/browser-electron/host-main.d.ts +0 -26
  370. package/lib/browser-electron/http-body.d.ts +0 -24
  371. package/lib/browser-electron/json-reply.d.ts +0 -33
  372. package/lib/browser-electron/maintenance-broker.d.ts +0 -35
  373. package/lib/browser-electron/maintenance-lifecycle.d.ts +0 -32
  374. package/lib/browser-electron/maintenance-route.d.ts +0 -18
  375. package/lib/browser-electron/missing-system-browser.d.ts +0 -54
  376. package/lib/browser-electron/paths.d.ts +0 -4
  377. package/lib/browser-electron/preview-route.d.ts +0 -89
  378. package/lib/browser-electron/process.d.ts +0 -14
  379. package/lib/browser-electron/provider.d.ts +0 -959
  380. package/lib/browser-electron/remote-host.d.ts +0 -256
  381. package/lib/browser-electron/rpc-input.d.ts +0 -4
  382. package/lib/browser-electron/rpc-ops.d.ts +0 -18
  383. package/lib/browser-electron/runtime-diagnostics.d.ts +0 -12
  384. package/lib/browser-electron/runtime-route.d.ts +0 -55
  385. package/lib/browser-electron/runtime-status.d.ts +0 -116
  386. package/lib/browser-electron/settings-route.d.ts +0 -15
  387. package/lib/browser-electron/settings-store.d.ts +0 -224
  388. package/lib/browser-electron/sidebar-only-host.d.ts +0 -36
  389. package/lib/browser-electron/system-browser.d.ts +0 -367
  390. package/lib/browser-electron/timing.d.ts +0 -8
  391. package/lib/browser-electron/virtual-cursor.d.ts +0 -67
  392. package/lib/browser-electron/windows-system.d.ts +0 -3
  393. package/lib/index.d.ts +0 -30
  394. package/lib/tool-browser/element-fields.d.ts +0 -145
  395. package/lib/tool-browser/index.d.ts +0 -53
  396. package/lib/tool-browser/page-probe.d.ts +0 -86
  397. package/scripts/consumer-install-check.mjs +0 -72
  398. package/scripts/run-tests.mjs +0 -32
  399. package/scripts/verify-host-compat.mjs +0 -195
  400. package/scripts/verify-preview-route.mjs +0 -168
  401. package/scripts/verify-runtime-status.mjs +0 -179
@@ -1,33 +0,0 @@
1
- /**
2
- * One JSON reply, written the same way by every route this plugin serves.
3
- *
4
- * Its own module rather than a helper inside one route file: there are four endpoints now, and the
5
- * second one that needed this had to import it from the live-view route — which reads as though the
6
- * readiness endpoints belong to the preview. They do not; only the header rules are shared.
7
- *
8
- * The header set is the substance, not boilerplate:
9
- * - `content-length` computed from the bytes actually written, so a proxy cannot truncate;
10
- * - `no-store` because every answer here is a reading of the current moment;
11
- * - `nosniff` + a same-origin resource policy, because these bodies name paths and pids.
12
- * @module dsh-browser/browser-electron/json-reply
13
- */
14
- import type { OutgoingHttpHeaders, ServerResponse } from 'node:http';
15
- /**
16
- * Write one JSON body with no caching and no sniffing.
17
- * @param response - the response to write.
18
- * @param status - the HTTP status.
19
- * @param body - anything JSON-serialisable.
20
- */
21
- /**
22
- * Write an already-serialised JSON body with caller-supplied headers.
23
- *
24
- * Routes do not all need the same header set: readiness answers carry length and sniffing
25
- * headers, while the settings route has always returned only a content type and no-store.
26
- * Sharing the write keeps those exact header sets from drifting into each other.
27
- * @param response - the response to write.
28
- * @param status - the HTTP status.
29
- * @param text - the serialised body.
30
- * @param headers - the exact header set this route has always sent.
31
- */
32
- export declare function writeJsonText(response: ServerResponse, status: number, text: string, headers: OutgoingHttpHeaders): void;
33
- export declare function replyJson(response: ServerResponse, status: number, body: unknown): void;
@@ -1,35 +0,0 @@
1
- export interface MaintenanceBrokerOptions {
2
- readonly runtimePath: string;
3
- readonly args: readonly string[];
4
- readonly cwd: string;
5
- /** Overrides for the explicitly inherited environment; undefined removes a variable. */
6
- readonly environment?: Readonly<Record<string, string | undefined>>;
7
- }
8
- export interface MaintenanceBrokerExecution {
9
- readonly windowsHide: true;
10
- readonly shell: false;
11
- readonly encoding: 'utf8';
12
- readonly timeout: number;
13
- readonly maxBuffer: number;
14
- readonly env: NodeJS.ProcessEnv;
15
- }
16
- export type MaintenanceBrokerExecutor = (file: string, args: readonly string[], options: MaintenanceBrokerExecution) => Promise<{
17
- readonly stdout: string;
18
- readonly stderr: string;
19
- }>;
20
- export interface MaintenanceBrokerDeps {
21
- /** Tests supply a fake executor; the real broker is prohibited inside the test runner. */
22
- readonly execFile?: MaintenanceBrokerExecutor;
23
- readonly platform?: NodeJS.Platform;
24
- }
25
- export interface MaintenanceBrokerResult {
26
- readonly pid: number;
27
- }
28
- /** Quote one argument using the Windows C runtime's command-line decoding rules. */
29
- export declare function quoteWin32Argument(value: string): string;
30
- /**
31
- * Create a hidden, independent local process. No shell evaluates runtime paths or arguments.
32
- * WMI receives an explicit environment copied from this process, including any plan overrides;
33
- * it therefore does not accidentally inherit the provider service's unrelated environment.
34
- */
35
- export declare function launchMaintenanceBroker(options: MaintenanceBrokerOptions, deps?: MaintenanceBrokerDeps): Promise<MaintenanceBrokerResult>;
@@ -1,32 +0,0 @@
1
- /** Explicit bridge maintenance lifecycle, independent of the Desktop-owned HTTP request. */
2
- import type { BridgeAction, BridgeActionResult } from './bridge-install.js';
3
- export type MaintenancePhase = 'armed' | 'closing' | 'installing' | 'restarting' | 'verifying' | 'completed' | 'cancelled' | 'failed';
4
- export interface MaintenanceState {
5
- readonly phase: MaintenancePhase;
6
- readonly action: BridgeAction;
7
- readonly at: string;
8
- readonly ok?: boolean;
9
- readonly restarted?: boolean;
10
- readonly pid?: number;
11
- readonly error?: string;
12
- readonly output?: string;
13
- }
14
- /** Effects are supplied by the independent worker; tests cannot close or start an application. */
15
- export interface MaintenanceLifecycleDeps {
16
- /** Invoke the verified Desktop's own Quit menu item. Never confirm active-task dialogs. */
17
- readonly requestQuit: () => Promise<void>;
18
- /** Resolve only once every GUI/helper process belonging to this installation has exited. */
19
- readonly waitUntilClosed: () => Promise<void>;
20
- /** The existing installer retains its own identity, ancestry and running-process checks. */
21
- readonly maintain: () => Promise<BridgeActionResult>;
22
- /** Reopen exactly the verified installation after it has exited. */
23
- readonly restart: () => Promise<number>;
24
- /** Installation verifies the new authenticated bridge; uninstall verifies the process. */
25
- readonly verify: (pid: number, action: BridgeAction) => Promise<void>;
26
- readonly publish: (state: MaintenanceState) => Promise<void>;
27
- }
28
- /**
29
- * A cancelled/failed quit never reaches the installer. After a confirmed exit, reopen Desktop even
30
- * when maintenance fails, and retain that failure instead of reporting a successful installation.
31
- */
32
- export declare function runMaintenanceLifecycle(action: BridgeAction, deps: MaintenanceLifecycleDeps): Promise<MaintenanceState>;
@@ -1,18 +0,0 @@
1
- /** Authenticated explicit maintenance protocol; older hosts cannot mistake it for direct install. */
2
- import type { IncomingMessage, ServerResponse } from 'node:http';
3
- import type { BridgeAction } from './bridge-install.js';
4
- import type { AutomaticMaintenanceJob } from './automatic-maintenance.js';
5
- export declare const AUTOMATIC_MAINTENANCE_ROUTE = "/dsh-builtin-browser/bridge-maintenance";
6
- export interface AutomaticMaintenanceRouteDeps {
7
- readonly supported: () => boolean;
8
- readonly read: () => AutomaticMaintenanceJob | undefined;
9
- readonly start: (action: BridgeAction, options?: {
10
- readonly locale?: 'zh' | 'en';
11
- }) => Promise<AutomaticMaintenanceJob>;
12
- /** Commit only after the accepted response has been flushed to the client. */
13
- readonly commit?: (id: string) => Promise<void>;
14
- /** True while the legacy bridge-action route is running an installer. */
15
- readonly busy?: () => boolean;
16
- }
17
- /** Register behind the host's signed-session authentication, as with settings writes. */
18
- export declare function createAutomaticMaintenanceHandler(deps: AutomaticMaintenanceRouteDeps): (request: IncomingMessage, response: ServerResponse) => Promise<void>;
@@ -1,54 +0,0 @@
1
- /**
2
- * A host that exists only to explain why the browser you asked for is not here.
3
- *
4
- * WHY THIS EXISTS
5
- * When the browser setting names a browser explicitly (Chrome or Edge rather than
6
- * "bundled" or "automatic"), the plugin used to log a warning and quietly fall back
7
- * to its own Electron window. That is worse than failing: you asked for Chrome, you
8
- * got an Electron window, and the error that eventually surfaced talked about
9
- * Electron — pointing at something you never chose and never wanted to install. The
10
- * actual problem ("no Chrome on this machine") never reached you.
11
- *
12
- * So the two choices are treated as the different requests they are:
13
- * - `auto` means "any browser will do", and falling back to the bundled one is the
14
- * behaviour it asks for;
15
- * - `chrome` / `edge` are explicit, and an explicit request that cannot be met is
16
- * reported as such, with the ways out of it.
17
- *
18
- * `available()` reports true on purpose. Reporting false would make the provider pick
19
- * a different carrier and hide the problem again, which is exactly the bug.
20
- */
21
- import type { ElectronBrowserViewHost, ElectronViewHandle } from './provider.js';
22
- import type { BrowserChannel } from './system-browser.js';
23
- /**
24
- * A carrier that cannot carry anything: every command explains the real problem.
25
- *
26
- * The message is written to be acted on, not just read: it says which browser was
27
- * requested, where the plugin looked, and the three concrete ways to resolve it.
28
- */
29
- export declare class MissingSystemBrowserHost implements ElectronBrowserViewHost {
30
- private readonly kind;
31
- private readonly searched;
32
- /**
33
- * @param kind - the browser the user asked for.
34
- * @param searched - the names and locations that were checked, for the report.
35
- */
36
- constructor(kind: Exclude<BrowserChannel, 'bundled' | 'auto'>, searched: readonly string[]);
37
- /** @returns always true: see the module comment — reporting false would hide this. */
38
- available(): boolean;
39
- /**
40
- * The message every command fails with.
41
- * @returns a multi-line explanation with the fixes.
42
- */
43
- private explain;
44
- /**
45
- * Create a handle whose every command fails with the explanation.
46
- * @returns a handle that never reaches a page.
47
- */
48
- createView(): ElectronViewHandle;
49
- /**
50
- * Accept a handle for destruction. Nothing was created, so nothing is released.
51
- * @param handle - the handle returned by {@link createView}.
52
- */
53
- destroyView(handle: ElectronViewHandle): void;
54
- }
@@ -1,4 +0,0 @@
1
- /** Absolute path of the DSH home directory; DSH_HOME overrides the per-user default. */
2
- export declare function dshHome(): string;
3
- /** Absolute path of the endpoint file the running desktop shell publishes. */
4
- export declare function bridgeEndpointPath(): string;
@@ -1,89 +0,0 @@
1
- /**
2
- * The live-view frame endpoint (issue #34): one JPEG per request, for a remote operator watching the
3
- * page the agent is driving.
4
- *
5
- * Deliberately one frame per request rather than a stream. The viewer asks for the next frame after
6
- * it has decoded and painted the previous one, so a slow link slows the view down instead of
7
- * queueing images; the design chose this over MJPEG and WebSocket for the first version precisely
8
- * because it needs no new plumbing and degrades predictably.
9
- *
10
- * The path is fixed and the session travels as a query parameter because the host web server only
11
- * registers exact paths. That is also why the session id is not a `viewId`: a client may name a
12
- * session the plugin handed out, never a carrier handle, a port, or an arbitrary target.
13
- * @module dsh-browser/browser-electron/preview-route
14
- */
15
- import type { IncomingMessage, ServerResponse } from 'node:http';
16
- /** Where the frame endpoint lives. The viewer must use exactly this path, same origin. */
17
- export declare const PREVIEW_ROUTE = "/dsh-builtin-browser/browser-view/frame";
18
- /**
19
- * Where the viewer asks which sessions it may watch.
20
- *
21
- * The provider names its sessions (`browser:<uuid>`) and only it knows them; the browser page has no
22
- * way to guess one. Without this the viewer could not build a frame URL at all, and inventing an id
23
- * is exactly what the design forbids. So the list is served, and it contains nothing but ids of
24
- * sessions that currently have a page — no URLs, no titles, no target handles.
25
- */
26
- export declare const PREVIEW_SESSIONS_ROUTE = "/dsh-builtin-browser/browser-view/sessions";
27
- /**
28
- * Where the settings panel asks whether the desktop bridge is installed.
29
- *
30
- * Reported as issue #36: a missing bridge was only a log warning, so a user on `channel: sidebar`
31
- * saw "another window opened again" with nothing connecting that to "the bridge is not installed".
32
- * The reading is taken from the install tree on disk, so it is true even when the plugin has just
33
- * started and remembers nothing.
34
- */
35
- export declare const BRIDGE_STATUS_ROUTE = "/dsh-builtin-browser/bridge-status";
36
- /** What the route needs from the settings document. */
37
- interface PreviewSettings {
38
- get(): {
39
- readonly remoteView: {
40
- readonly enabled: boolean;
41
- };
42
- };
43
- }
44
- /** What the route needs from the browser service. */
45
- interface PreviewBrowser {
46
- exists(session: string): boolean;
47
- capturePassive(session: string, signal?: AbortSignal): Promise<{
48
- readonly dataUrl: string;
49
- }>;
50
- /** Sessions that currently hold a page. Optional: a service without it reports none. */
51
- watchableSessions?(): readonly string[];
52
- }
53
- /**
54
- * List the sessions a viewer may watch.
55
- *
56
- * Ids only. The whole point of this endpoint is to give the page something it cannot guess; adding a
57
- * URL or title here would leak the very content the frame endpoint is careful not to describe in its
58
- * refusals.
59
- * @param request - the incoming request.
60
- * @param response - the response to write.
61
- * @param settings - the settings document, for the share switch.
62
- * @param browser - the browser service.
63
- */
64
- export declare function handlePreviewSessions(request: IncomingMessage, response: ServerResponse, settings: PreviewSettings, browser: PreviewBrowser): Promise<void>;
65
- /**
66
- * Serve one frame, or say precisely why not.
67
- *
68
- * Every refusal is a status the viewer can act on: 403 when watching is switched off (the host has
69
- * not agreed), 404 when that session has no page (nothing to watch, and nothing is opened on its
70
- * behalf), 503 when the page cannot produce an image right now (hidden window, capture timeout) —
71
- * which the viewer shows as paused rather than as an error.
72
- * @param request - the incoming request.
73
- * @param response - the response to write.
74
- * @param settings - the settings document, for the host's share switch.
75
- * @param browser - the browser service, for passive capture.
76
- */
77
- export declare function handlePreviewFrame(request: IncomingMessage, response: ServerResponse, settings: PreviewSettings, browser: PreviewBrowser): Promise<void>;
78
- /**
79
- * Report whether the desktop bridge is installed, for the settings panel.
80
- *
81
- * Read-only and same-origin like the rest: it names a directory and a state, nothing that could be
82
- * used to reach anything else. The command it returns is for a human to run — executing it here
83
- * would let a page decide to close the desktop shell.
84
- * @param request - the incoming request.
85
- * @param response - the response to write.
86
- * @param localAppData - the base directory to probe; injected so a test can point at a fixture.
87
- */
88
- export declare function handleBridgeStatus(request: IncomingMessage, response: ServerResponse, localAppData?: string): Promise<void>;
89
- export {};
@@ -1,14 +0,0 @@
1
- /**
2
- * One shared definition of process liveness.
3
- *
4
- * Signal 0 performs the permission and existence checks and delivers nothing, so it is safe to
5
- * call on a pid we only read from a file. `EPERM` means the process exists and belongs to
6
- * someone else, which is still "alive" for the endpoint reader and the profile sweeper alike.
7
- * @module dsh-browser/browser-electron/process
8
- */
9
- /**
10
- * Whether a process with this pid exists, without signalling it.
11
- * @param pid - the process id to test; a non-integer or non-positive value is never alive.
12
- * @returns whether that process exists.
13
- */
14
- export declare function pidAlive(pid: number): boolean;