dsh-builtin-browser 1.0.1 → 1.0.3

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 (360) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +1 -1
  3. package/assets/browser-panel-locales.mjs +37 -5
  4. package/assets/browser-policy.d.mts +29 -0
  5. package/assets/browser-policy.mjs +40 -0
  6. package/desktop-bridge/desktop-discovery.d.mts +1 -1
  7. package/desktop-bridge/desktop-discovery.mjs +59 -9
  8. package/desktop-bridge/desktop-identity.json +12 -0
  9. package/desktop-bridge/install.mjs +14 -7
  10. package/desktop-bridge/plugin-browser-bridge.js +19 -7
  11. package/docs/acceptance-2026-11-27.md +67 -0
  12. package/docs/architecture.md +1 -1
  13. package/docs/development.md +33 -4
  14. package/docs/dsh-0.2.3-host-patch-task.md +34 -0
  15. package/docs/hardcoding-audit.md +28 -8
  16. package/docs/known-issues.md +26 -0
  17. package/docs/limitations.md +6 -2
  18. package/docs/tool-reference.md +1 -1
  19. package/docs/v1.1.0-bu-data-batching-task.md +66 -0
  20. package/docs/v1.1.0-compat-hardcoding-task.md +85 -0
  21. package/dsh-builtin-browser-1.0.3-publish.tgz +0 -0
  22. package/dsh-builtin-browser-1.0.3.tgz +0 -0
  23. package/dsh-host-patch/README.md +4 -0
  24. package/dsh-host-patch/apply.mjs +61 -13
  25. package/dsh-host-patch/rc3-revision9.json.gz +0 -0
  26. package/dsh-host-patch/rc5-revision9.json.gz +0 -0
  27. package/dsh-host-patch/sources/main/0001-feat-sidebar-right-add-session-rendering-holds.patch.gz +0 -0
  28. package/dsh-host-patch/sources/main/0002-feat-desktop-load-trusted-profile-main-extensions.patch.gz +0 -0
  29. package/dsh-host-patch/sources/main/0003-feat-desktop-report-resolved-and-running-main-extens.patch.gz +0 -0
  30. package/dsh-host-patch/sources/main/0004-feat-desktop-compose-admitted-native-sidebar-views.patch.gz +0 -0
  31. package/dsh-host-patch/sources/main/0005-fix-client-admit-coded-browser-errors-in-native-comp.patch.gz +0 -0
  32. package/dsh-host-patch/sources/main/0006-fix-desktop-acknowledge-native-same-document-navigat.patch.gz +0 -0
  33. package/dsh-host-patch/sources/main/0007-fix-desktop-restore-auth-in-the-native-lease-partiti.patch.gz +0 -0
  34. package/dsh-host-patch/sources/main/0008-feat-desktop-adopt-native-children-in-admitted-sideb.patch.gz +0 -0
  35. package/dsh-host-patch/sources/main/0009-fix-desktop-publish-complete-native-child-close-reco.patch.gz +0 -0
  36. package/dsh-host-patch/sources/main/0010-fix-desktop-bundle-structured-errors-in-sandboxed-pr.patch.gz +0 -0
  37. package/dsh-host-patch/sources/main/0011-feat-desktop-offer-persistent-Sidebar-sessions-per-D.patch.gz +0 -0
  38. package/dsh-host-patch/sources/main/0012-feat-desktop-retain-sidebar-session-cookies-across-r.patch.gz +0 -0
  39. package/dsh-host-patch/sources/main/0013-fix-desktop-honor-sidebar-session-cookie-sidecar-con.patch.gz +0 -0
  40. package/dsh-host-patch/sources/main/0014-fix-desktop-retry-cookie-protection-without-failing-.patch.gz +0 -0
  41. package/dsh-host-patch/sources/main/0015-fix-desktop-preserve-host-only-cookie-identity-in-se.patch.gz +0 -0
  42. package/dsh-host-patch/sources/main/0016-fix-desktop-restore-session-cookies-before-checkpoin.patch.gz +0 -0
  43. package/dsh-host-patch/sources/main/0017-fix-desktop-restore-sidebar-cookies-once-before-gues.patch.gz +0 -0
  44. package/dsh-host-patch/sources/main/0018-fix-sidebar-right-follow-animated-native-slot-placem.patch.gz +0 -0
  45. package/dsh-host-patch/sources/manifest.json +218 -0
  46. package/dsh-host-patch/sources/rc3/0001-feat-sidebar-right-add-session-rendering-holds.patch.gz +0 -0
  47. package/dsh-host-patch/sources/rc3/0002-feat-desktop-load-trusted-profile-main-extensions.patch.gz +0 -0
  48. package/dsh-host-patch/sources/rc3/0003-feat-desktop-report-resolved-and-running-main-extens.patch.gz +0 -0
  49. package/dsh-host-patch/sources/rc3/0004-feat-desktop-compose-admitted-native-sidebar-views.patch.gz +0 -0
  50. package/dsh-host-patch/sources/rc3/0005-fix-client-admit-coded-browser-errors-in-native-comp.patch.gz +0 -0
  51. package/dsh-host-patch/sources/rc3/0006-fix-desktop-acknowledge-native-same-document-navigat.patch.gz +0 -0
  52. package/dsh-host-patch/sources/rc3/0007-fix-desktop-restore-auth-in-the-native-lease-partiti.patch.gz +0 -0
  53. package/dsh-host-patch/sources/rc3/0008-feat-desktop-adopt-native-children-in-admitted-sideb.patch.gz +0 -0
  54. package/dsh-host-patch/sources/rc3/0009-fix-desktop-publish-complete-native-child-close-reco.patch.gz +0 -0
  55. package/dsh-host-patch/sources/rc3/0010-fix-desktop-bundle-structured-errors-in-sandboxed-pr.patch.gz +0 -0
  56. package/dsh-host-patch/sources/rc3/0011-feat-desktop-offer-persistent-Sidebar-sessions-per-D.patch.gz +0 -0
  57. package/dsh-host-patch/sources/rc3/0012-feat-desktop-retain-sidebar-session-cookies-across-r.patch.gz +0 -0
  58. package/dsh-host-patch/sources/rc3/0013-fix-desktop-honor-sidebar-session-cookie-sidecar-con.patch.gz +0 -0
  59. package/dsh-host-patch/sources/rc3/0014-fix-desktop-retry-cookie-protection-without-failing-.patch.gz +0 -0
  60. package/dsh-host-patch/sources/rc3/0015-fix-desktop-preserve-host-only-cookie-identity-in-se.patch.gz +0 -0
  61. package/dsh-host-patch/sources/rc3/0016-fix-desktop-restore-session-cookies-before-checkpoin.patch.gz +0 -0
  62. package/dsh-host-patch/sources/rc3/0017-fix-desktop-restore-sidebar-cookies-once-before-gues.patch.gz +0 -0
  63. package/dsh-host-patch/sources/rc3/0018-fix-sidebar-right-follow-animated-native-slot-placem.patch.gz +0 -0
  64. package/dsh-host-patch/sources/rc5/0001-feat-sidebar-right-add-session-rendering-holds.patch.gz +0 -0
  65. package/dsh-host-patch/sources/rc5/0002-feat-desktop-load-trusted-profile-main-extensions.patch.gz +0 -0
  66. package/dsh-host-patch/sources/rc5/0003-feat-desktop-report-resolved-and-running-main-extens.patch.gz +0 -0
  67. package/dsh-host-patch/sources/rc5/0004-feat-desktop-compose-admitted-native-sidebar-views.patch.gz +0 -0
  68. package/dsh-host-patch/sources/rc5/0005-fix-client-admit-coded-browser-errors-in-native-comp.patch.gz +0 -0
  69. package/dsh-host-patch/sources/rc5/0006-fix-desktop-acknowledge-native-same-document-navigat.patch.gz +0 -0
  70. package/dsh-host-patch/sources/rc5/0007-fix-desktop-restore-auth-in-the-native-lease-partiti.patch.gz +0 -0
  71. package/dsh-host-patch/sources/rc5/0008-feat-desktop-adopt-native-children-in-admitted-sideb.patch.gz +0 -0
  72. package/dsh-host-patch/sources/rc5/0009-fix-desktop-publish-complete-native-child-close-reco.patch.gz +0 -0
  73. package/dsh-host-patch/sources/rc5/0010-fix-desktop-bundle-structured-errors-in-sandboxed-pr.patch.gz +0 -0
  74. package/dsh-host-patch/sources/rc5/0011-feat-desktop-offer-persistent-Sidebar-sessions-per-D.patch.gz +0 -0
  75. package/dsh-host-patch/sources/rc5/0012-feat-desktop-retain-sidebar-session-cookies-across-r.patch.gz +0 -0
  76. package/dsh-host-patch/sources/rc5/0013-fix-desktop-honor-sidebar-session-cookie-sidecar-con.patch.gz +0 -0
  77. package/dsh-host-patch/sources/rc5/0014-fix-desktop-retry-cookie-protection-without-failing-.patch.gz +0 -0
  78. package/dsh-host-patch/sources/rc5/0015-fix-desktop-preserve-host-only-cookie-identity-in-se.patch.gz +0 -0
  79. package/dsh-host-patch/sources/rc5/0016-fix-desktop-restore-session-cookies-before-checkpoin.patch.gz +0 -0
  80. package/dsh-host-patch/sources/rc5/0017-fix-desktop-restore-sidebar-cookies-once-before-gues.patch.gz +0 -0
  81. package/dsh-host-patch/sources/rc5/0018-fix-sidebar-right-follow-animated-native-slot-placem.patch.gz +0 -0
  82. package/dsh-host-patch/sources/series.json +260 -0
  83. package/dsh-host-patch/tauri/desktop-main.cjs +62 -0
  84. package/dsh-host-patch/tauri/sidebar-session.cjs +104 -0
  85. package/dsh-host-patch/tauri-revision1.json +39 -0
  86. package/dsh-host-patch/tauri.json +43 -0
  87. package/dsh-host-patch/v023-alpha2.json +153 -0
  88. package/lib/browser/anti-bot.js +215 -0
  89. package/lib/browser/deep-dom.js +39 -0
  90. package/lib/browser/runtime.js +15 -0
  91. package/lib/browser/takeover-target.js +13 -6
  92. package/lib/browser/types.js +30 -1
  93. package/lib/browser-electron/authenticated-route.js +16 -2
  94. package/lib/browser-electron/automatic-maintenance.js +16 -10
  95. package/lib/browser-electron/bridge-connection.js +3 -8
  96. package/lib/browser-electron/bridge-install.js +2 -1
  97. package/lib/browser-electron/bridge-status.js +55 -26
  98. package/lib/browser-electron/desktop-bridge-host.js +7 -6
  99. package/lib/browser-electron/desktop-identity.js +28 -5
  100. package/lib/browser-electron/desktop-shell.js +64 -0
  101. package/lib/browser-electron/electron-provision.js +105 -18
  102. package/lib/browser-electron/entry.js +129 -44
  103. package/lib/browser-electron/extension-browser.js +4 -4
  104. package/lib/browser-electron/foreground-watch.js +134 -0
  105. package/lib/browser-electron/guest-cookie-jar.js +13 -13
  106. package/lib/browser-electron/guest-route.js +181 -32
  107. package/lib/browser-electron/guest-runtime.js +61 -10
  108. package/lib/browser-electron/guest-storage.js +2 -2
  109. package/lib/browser-electron/history-store.js +1 -5
  110. package/lib/browser-electron/host-main.js +8 -4
  111. package/lib/browser-electron/host-patch-maintenance.js +14 -8
  112. package/lib/browser-electron/maintenance-route.js +2 -1
  113. package/lib/browser-electron/missing-system-browser.js +5 -9
  114. package/lib/browser-electron/preferred-browser.js +7 -3
  115. package/lib/browser-electron/preview-route.js +9 -13
  116. package/lib/browser-electron/process-ownership.js +1 -1
  117. package/lib/browser-electron/profile-command.js +2 -1
  118. package/lib/browser-electron/profile-extension.js +5 -0
  119. package/lib/browser-electron/profile-lease.js +152 -47
  120. package/lib/browser-electron/provider-core.js +527 -0
  121. package/lib/browser-electron/provider-interaction.js +963 -0
  122. package/lib/browser-electron/provider-media.js +518 -0
  123. package/lib/browser-electron/provider-navigation.js +301 -0
  124. package/lib/browser-electron/provider-observation.js +623 -0
  125. package/lib/browser-electron/provider-tabs.js +372 -0
  126. package/lib/browser-electron/provider.js +150 -3301
  127. package/lib/browser-electron/reference-route.js +9 -18
  128. package/lib/browser-electron/remote-host.js +79 -34
  129. package/lib/browser-electron/runtime-status.js +56 -6
  130. package/lib/browser-electron/settings-store.js +3 -6
  131. package/lib/browser-electron/sidebar-only-host.js +1 -1
  132. package/lib/browser-electron/system-browser.js +539 -172
  133. package/lib/browser-electron/tauri-host.js +208 -0
  134. package/lib/browser-electron/virtual-cursor.js +23 -13
  135. package/lib/browser-reference/service.js +22 -4
  136. package/lib/browser-reference/web-sources.js +1 -1
  137. package/lib/client.js +43409 -0
  138. package/lib/compat/host-features.js +75 -0
  139. package/lib/reference-source.js +1 -1
  140. package/lib/reference-text.js +23 -1
  141. package/lib/takeover-protocol.js +1 -1
  142. package/lib/tool-browser/block-recovery.js +69 -0
  143. package/lib/tool-browser/code-tool.js +170 -19
  144. package/lib/tool-browser/code-worker.js +115 -20
  145. package/lib/tool-browser/errors.js +34 -0
  146. package/lib/tool-browser/index.js +66 -3593
  147. package/lib/tool-browser/page-probe.js +227 -28
  148. package/lib/tool-browser/panel-page.js +2 -1
  149. package/lib/tool-browser/probe-client.js +157 -0
  150. package/lib/tool-browser/screenshot-annotations.js +108 -0
  151. package/lib/tool-browser/state.js +337 -0
  152. package/lib/tool-browser/takeover.js +1 -1
  153. package/lib/tool-browser/tools-debug.js +862 -0
  154. package/lib/tool-browser/tools-interaction.js +993 -0
  155. package/lib/tool-browser/tools-navigation.js +807 -0
  156. package/lib/tool-browser/tools-observation.js +461 -0
  157. package/lib/tool-browser/tools-reference.js +293 -0
  158. package/lib/web-guest.js +1 -0
  159. package/package.json +15 -53
  160. package/README.en.md +0 -89
  161. package/browser-extension/constants.mjs +0 -20
  162. package/browser-extension/controller.mjs +0 -293
  163. package/browser-extension/locales.mjs +0 -15
  164. package/browser-extension/manifest.json +0 -12
  165. package/browser-extension/options.html +0 -14
  166. package/browser-extension/options.mjs +0 -9
  167. package/browser-extension/permission-guard.mjs +0 -13
  168. package/browser-extension/worker.mjs +0 -74
  169. package/dist/client.cjs +0 -43167
  170. package/lib/browser-reference/submission-receipts.js +0 -139
  171. package/scripts/build.mjs +0 -66
  172. package/scripts/bundle-host.mjs +0 -28
  173. package/scripts/fix-exports.mjs +0 -50
  174. package/scripts/install-electron.mjs +0 -51
  175. package/scripts/verify-exports.mjs +0 -47
  176. package/scripts/verify-preview-sdk.mjs +0 -93
  177. package/skills/dsh-builtin-browser/SKILL.md +0 -73
  178. package/skills/dsh-builtin-browser/references/batch.md +0 -53
  179. package/skills/dsh-builtin-browser/references/deliver.md +0 -31
  180. package/skills/dsh-builtin-browser/references/locate.md +0 -11
  181. package/skills/dsh-builtin-browser/references/recover.md +0 -11
  182. package/skills/dsh-builtin-browser/references/verify.md +0 -13
  183. package/skills/dsh-debug-host/SKILL.md +0 -56
  184. package/skills/dsh-debug-self/SKILL.md +0 -50
  185. package/src/bridge-compatibility.ts +0 -39
  186. package/src/browser/handles.ts +0 -89
  187. package/src/browser/runtime.ts +0 -560
  188. package/src/browser/takeover-target.ts +0 -36
  189. package/src/browser/types.ts +0 -817
  190. package/src/browser-electron/authenticated-route.ts +0 -84
  191. package/src/browser-electron/automatic-maintenance.ts +0 -726
  192. package/src/browser-electron/bridge-auto.ts +0 -159
  193. package/src/browser-electron/bridge-connection.ts +0 -385
  194. package/src/browser-electron/bridge-endpoint.ts +0 -129
  195. package/src/browser-electron/bridge-install.ts +0 -289
  196. package/src/browser-electron/bridge-maintenance.ts +0 -189
  197. package/src/browser-electron/bridge-status.ts +0 -347
  198. package/src/browser-electron/desktop-bridge-host.ts +0 -251
  199. package/src/browser-electron/desktop-identity.ts +0 -320
  200. package/src/browser-electron/document-readiness.ts +0 -45
  201. package/src/browser-electron/electron-provision.ts +0 -261
  202. package/src/browser-electron/entry.ts +0 -1299
  203. package/src/browser-electron/ephemeral-profile.ts +0 -189
  204. package/src/browser-electron/extension-browser.ts +0 -223
  205. package/src/browser-electron/extension-setup.ts +0 -67
  206. package/src/browser-electron/file-write.ts +0 -31
  207. package/src/browser-electron/guest-cookie-jar.ts +0 -176
  208. package/src/browser-electron/guest-cookie-store.ts +0 -59
  209. package/src/browser-electron/guest-css-runtime.ts +0 -76
  210. package/src/browser-electron/guest-css.ts +0 -68
  211. package/src/browser-electron/guest-route.ts +0 -568
  212. package/src/browser-electron/guest-runtime.ts +0 -357
  213. package/src/browser-electron/guest-storage-runtime.ts +0 -54
  214. package/src/browser-electron/guest-storage.ts +0 -117
  215. package/src/browser-electron/history-store.ts +0 -227
  216. package/src/browser-electron/host-main.ts +0 -1381
  217. package/src/browser-electron/host-patch-maintenance.ts +0 -112
  218. package/src/browser-electron/http-body.ts +0 -65
  219. package/src/browser-electron/json-reply.ts +0 -47
  220. package/src/browser-electron/maintenance-broker.ts +0 -166
  221. package/src/browser-electron/maintenance-lifecycle.ts +0 -91
  222. package/src/browser-electron/maintenance-route.ts +0 -67
  223. package/src/browser-electron/missing-system-browser.ts +0 -113
  224. package/src/browser-electron/open-slot.ts +0 -49
  225. package/src/browser-electron/paths.ts +0 -25
  226. package/src/browser-electron/preferred-browser.ts +0 -120
  227. package/src/browser-electron/preview-route.ts +0 -218
  228. package/src/browser-electron/process-ownership.ts +0 -168
  229. package/src/browser-electron/process.ts +0 -23
  230. package/src/browser-electron/profile-checkpoint.ts +0 -187
  231. package/src/browser-electron/profile-command.ts +0 -46
  232. package/src/browser-electron/profile-extension.ts +0 -124
  233. package/src/browser-electron/profile-lease.ts +0 -115
  234. package/src/browser-electron/profile-residue.ts +0 -49
  235. package/src/browser-electron/provider.ts +0 -4571
  236. package/src/browser-electron/reference-route.ts +0 -608
  237. package/src/browser-electron/remote-host.ts +0 -1462
  238. package/src/browser-electron/rpc-input.ts +0 -13
  239. package/src/browser-electron/rpc-ops.ts +0 -41
  240. package/src/browser-electron/runtime-diagnostics.ts +0 -38
  241. package/src/browser-electron/runtime-route.ts +0 -105
  242. package/src/browser-electron/runtime-status.ts +0 -242
  243. package/src/browser-electron/settings-route.ts +0 -64
  244. package/src/browser-electron/settings-store.ts +0 -589
  245. package/src/browser-electron/shortcuts-route.ts +0 -112
  246. package/src/browser-electron/sidebar-only-host.ts +0 -298
  247. package/src/browser-electron/startpage-shortcuts.ts +0 -213
  248. package/src/browser-electron/system-browser.ts +0 -1497
  249. package/src/browser-electron/timing.ts +0 -16
  250. package/src/browser-electron/virtual-cursor.ts +0 -152
  251. package/src/browser-electron/windows-system.ts +0 -24
  252. package/src/browser-reference/delivery.ts +0 -384
  253. package/src/browser-reference/entry.ts +0 -631
  254. package/src/browser-reference/export.ts +0 -339
  255. package/src/browser-reference/import.ts +0 -303
  256. package/src/browser-reference/page-script.ts +0 -1537
  257. package/src/browser-reference/service.ts +0 -1315
  258. package/src/browser-reference/store.ts +0 -172
  259. package/src/browser-reference/submission-receipts.ts +0 -122
  260. package/src/browser-reference/text-quote.ts +0 -219
  261. package/src/browser-reference/types.ts +0 -195
  262. package/src/browser-reference/visible.ts +0 -367
  263. package/src/browser-reference/web-sources.ts +0 -103
  264. package/src/client/browser/BrowserController.ts +0 -693
  265. package/src/client/browser/BrowserFrame.ts +0 -78
  266. package/src/client/browser/BrowserNavigation.ts +0 -169
  267. package/src/client/browser/BrowserPage.ts +0 -23
  268. package/src/client/browser/BrowserPersistence.ts +0 -44
  269. package/src/client/browser/IframeImpl.ts +0 -176
  270. package/src/client/browser/child-tabs.ts +0 -14
  271. package/src/client/browser/iframe-reference.ts +0 -67
  272. package/src/client/browser/initialization.ts +0 -262
  273. package/src/client/browser/omnibox.ts +0 -243
  274. package/src/client/browser/store.ts +0 -38
  275. package/src/client/browser/takeover-channel.ts +0 -72
  276. package/src/client/browser/url.ts +0 -46
  277. package/src/client/browser/web-reference-source.ts +0 -52
  278. package/src/client/css-modules.d.ts +0 -4
  279. package/src/client/definition.tsx +0 -30
  280. package/src/client/electron/ElectronWebViewImpl.ts +0 -364
  281. package/src/client/electron/ElectronWebviewPresentation.ts +0 -138
  282. package/src/client/electron/NativeChildPresentation.ts +0 -45
  283. package/src/client/electron/NativeViewPage.ts +0 -251
  284. package/src/client/electron/pages.ts +0 -23
  285. package/src/client/electron/reference-overlay.ts +0 -53
  286. package/src/client/electron/workspace.ts +0 -33
  287. package/src/client/index.ts +0 -293
  288. package/src/client/locales.ts +0 -857
  289. package/src/client/pages.ts +0 -28
  290. package/src/client/reference/client/BrowserRefLink.tsx +0 -142
  291. package/src/client/reference/client/draft-reference.ts +0 -167
  292. package/src/client/reference/client/index.ts +0 -7
  293. package/src/client/reference/client/ordered-submission.ts +0 -108
  294. package/src/client/reference/client/pending-delivery.ts +0 -216
  295. package/src/client/reference/client/plugin.ts +0 -189
  296. package/src/client/reference/client/production/ReferenceCapsules.tsx +0 -345
  297. package/src/client/reference/client/production/ReferenceDock.module.css +0 -193
  298. package/src/client/reference/client/production/ReferenceDock.tsx +0 -6
  299. package/src/client/reference/client/production/ReferenceFeedback.tsx +0 -15
  300. package/src/client/reference/client/production/ReferenceMath.tsx +0 -44
  301. package/src/client/reference/client/production/ReferenceText.tsx +0 -36
  302. package/src/client/reference/client/production/assembly.ts +0 -471
  303. package/src/client/reference/client/production/asset-store.ts +0 -144
  304. package/src/client/reference/client/production/availability.ts +0 -74
  305. package/src/client/reference/client/production/bytes.ts +0 -36
  306. package/src/client/reference/client/production/delivery-client.ts +0 -211
  307. package/src/client/reference/client/production/draft-adapter.ts +0 -508
  308. package/src/client/reference/client/production/http-transport.ts +0 -217
  309. package/src/client/reference/client/production/production-submission.ts +0 -310
  310. package/src/client/reference/client/production/protocol.ts +0 -231
  311. package/src/client/reference/client/production/reference-card.ts +0 -240
  312. package/src/client/reference/client/production/reference-labels.ts +0 -29
  313. package/src/client/reference/client/production/reply-link-bridge.ts +0 -222
  314. package/src/client/reference/client/production/reveal.ts +0 -215
  315. package/src/client/reference/client/production/runtime.ts +0 -1101
  316. package/src/client/reference/client/production/snapshot-adapter.ts +0 -154
  317. package/src/client/reference/client/production/source-marker.ts +0 -63
  318. package/src/client/reference/client/production/source-opener.ts +0 -55
  319. package/src/client/reference/client/production/styles.ts +0 -104
  320. package/src/client/reference/client/production/user-text-rule.ts +0 -58
  321. package/src/client/reference/client/reveal.ts +0 -107
  322. package/src/client/reference/client/scheme.ts +0 -114
  323. package/src/client/reference/client/types.ts +0 -168
  324. package/src/client/reference/css-modules.d.ts +0 -4
  325. package/src/client/reference/index.ts +0 -11
  326. package/src/client/reference-capture-owner.ts +0 -162
  327. package/src/client/reference-intents.ts +0 -36
  328. package/src/client/settings/index.ts +0 -34
  329. package/src/client/settings/panel.ts +0 -2657
  330. package/src/client/shortcut-open.ts +0 -30
  331. package/src/client/startpage/binding.ts +0 -99
  332. package/src/client/startpage/controller.ts +0 -303
  333. package/src/client/startpage/model.ts +0 -279
  334. package/src/client/view/Browser.module.css +0 -751
  335. package/src/client/view/BrowserBody.tsx +0 -314
  336. package/src/client/view/BrowserPresentation.ts +0 -9
  337. package/src/client/view/BrowserTitle.tsx +0 -17
  338. package/src/client/view/IframePresentation.ts +0 -344
  339. package/src/client/view/StartPage.tsx +0 -597
  340. package/src/client/view/TakeoverBanner.tsx +0 -21
  341. package/src/index.ts +0 -110
  342. package/src/reference-owner.ts +0 -5
  343. package/src/reference-page.ts +0 -9
  344. package/src/reference-source.ts +0 -3
  345. package/src/reference-text.ts +0 -197
  346. package/src/startpage-settings.ts +0 -103
  347. package/src/startpage.ts +0 -71
  348. package/src/takeover-protocol.ts +0 -19
  349. package/src/tool-browser/code-tool.ts +0 -401
  350. package/src/tool-browser/code-worker.ts +0 -639
  351. package/src/tool-browser/element-fields.ts +0 -167
  352. package/src/tool-browser/index.ts +0 -3733
  353. package/src/tool-browser/page-probe.ts +0 -474
  354. package/src/tool-browser/panel-page.ts +0 -124
  355. package/src/tool-browser/screenshot-image.ts +0 -49
  356. package/src/tool-browser/takeover.ts +0 -198
  357. package/src/types/electron-shim.d.ts +0 -144
  358. package/src/types.ts +0 -85
  359. package/src/web-guest.ts +0 -34
  360. package/tools/accept-desktop.mjs +0 -148
@@ -0,0 +1,293 @@
1
+ /**
2
+ * Reference tools: capture, reveal and list what the human selected in the page.
3
+ * @module dsh-browser/tool-browser/tools-reference
4
+ */
5
+ import { defineTool } from '@deepseek-ai/dsh-tools';
6
+ import { createReferenceService, summarizeReference } from '../browser-reference/service.js';
7
+ import { resolveSessionHandle, sessionWireId } from '../browser/handles.js';
8
+ import { agentOf, taskKey, ensureSession, panelBound } from './state.js';
9
+ /**
10
+ * Define this module's tools for one apply.
11
+ * @param scope - the apply's context, settings and per-apply state.
12
+ * @returns the tool definitions, for the entry to register.
13
+ */
14
+ export function referenceTools(scope) {
15
+ const { ctx, state, settingsStore, timeoutMs } = scope;
16
+ const tools = [];
17
+ // Built on first use, not at apply time: the provider is registered by another plugin's apply,
18
+ // and a tool registered before the browser exists must still work once it does.
19
+ let referenceService;
20
+ const references = () => {
21
+ if (referenceService !== undefined)
22
+ return referenceService;
23
+ const browser = ctx.get('browser');
24
+ if (browser === undefined)
25
+ throw new Error('tool-browser: browser service unavailable');
26
+ // Keep the SAME image fallback as the floating bar and the HTTP capture
27
+ // (browser-electron/entry.ts): a clipped visible-region read lets an image
28
+ // whose source URL cannot be downloaded still become a real reference.
29
+ referenceService = createReferenceService(browser, {
30
+ visibleCapture: async (sessionId, clip, signal) => {
31
+ const shot = await browser.screenshot(sessionWireId(resolveSessionHandle(sessionId)), { clip, format: 'png' }, signal);
32
+ return { dataUrl: shot.dataUrl, mime: 'image/png' };
33
+ },
34
+ });
35
+ return referenceService;
36
+ };
37
+ const referenceCarrier = () => {
38
+ const channel = settingsStore.get().browser.channel;
39
+ return channel === 'sidebar' || channel === 'chrome' || channel === 'edge' ? channel : 'bundled';
40
+ };
41
+ tools.push(defineTool({
42
+ name: 'dsh_browser_reference_capture',
43
+ description: 'Capture what the human has selected in the shared-browser page as a durable reference, so it can be quoted and found again later. The reference keeps the selected text with enough surrounding context to relocate it, any images selected with their real bytes, and any table as a structural snapshot. Tool-only captures are stored for later dsh_browser_reference_reveal or export and do not create a chat capsule; do not emit dsh-browser-ref: URIs, reference markers, or synthetic source links in the reply. Re-capturing the same region creates a NEW reference, because a stored reference is an immutable snapshot.',
44
+ parameters: {
45
+ allowPartial: { type: 'boolean', description: 'Commit the fragments that succeeded when another fragment failed (default false: a group with a broken image or oversized table is refused as a whole).' },
46
+ tableSelector: { type: 'string', description: 'Capture this table whole (CSS selector) even when the selection does not touch it.' },
47
+ excerptText: { type: 'string', description: 'With no live selection, register the first occurrence of this exact page text as an agent excerpt. Two occurrences make it ambiguous and are refused.' },
48
+ },
49
+ output: {
50
+ schema: {
51
+ type: 'object',
52
+ additionalProperties: false,
53
+ properties: {
54
+ ok: { type: 'boolean', required: true },
55
+ referenceId: { type: 'string' },
56
+ pageUrl: { type: 'string' },
57
+ title: { type: 'string' },
58
+ parts: {
59
+ type: 'array',
60
+ required: true,
61
+ items: {
62
+ type: 'object',
63
+ additionalProperties: false,
64
+ properties: {
65
+ partId: { type: 'string', required: true },
66
+ type: { type: 'string', required: true },
67
+ preview: { type: 'string', required: true },
68
+ },
69
+ },
70
+ },
71
+ failures: {
72
+ type: 'array',
73
+ required: true,
74
+ items: {
75
+ type: 'object',
76
+ additionalProperties: false,
77
+ properties: {
78
+ kind: { type: 'string', required: true },
79
+ reason: { type: 'string', required: true },
80
+ },
81
+ },
82
+ },
83
+ },
84
+ },
85
+ render: (_args, value) => {
86
+ if (value.ok !== true) {
87
+ const reasons = value.failures.map(failure => `${failure.kind}: ${failure.reason}`).join('; ');
88
+ return [{ type: 'text', text: `Nothing was captured. ${reasons}` }];
89
+ }
90
+ const lines = [
91
+ `Reference ${value.referenceId} captured from ${value.title !== undefined && value.title !== '' ? value.title : value.pageUrl}.`,
92
+ 'Stored in the reference library for dsh_browser_reference_reveal or export (tool-only captures do not create a chat capsule). Do not emit dsh-browser-ref: URIs or reference markers in the reply.',
93
+ ...value.parts.map(part => ` ${part.partId} (${part.type}): ${part.preview}`),
94
+ ];
95
+ if (value.failures.length > 0)
96
+ lines.push(`(${value.failures.length} fragment(s) failed and were left out: ${value.failures.map(failure => failure.reason).join('; ')})`);
97
+ return [{ type: 'text', text: lines.join('\n') }];
98
+ },
99
+ },
100
+ timeoutMs,
101
+ isConcurrencySafe: () => false,
102
+ async execute(args, exec) {
103
+ const browser = ctx.get('browser');
104
+ if (browser === undefined)
105
+ throw new Error('tool-browser: browser service unavailable');
106
+ const session = await ensureSession(browser, state, taskKey(exec), agentOf(exec));
107
+ const outcome = await references().capture({
108
+ // The DSH session owns the reference; the provider session holds the page. They are
109
+ // different ids, and reveal needs the second one even after the first is long gone.
110
+ sessionId: taskKey(exec),
111
+ browserSessionId: session,
112
+ origin: args.excerptText !== undefined ? 'agent-excerpt' : 'user-selection',
113
+ entry: 'agent-tool',
114
+ carrier: panelBound(state, taskKey(exec)) ? 'sidebar' : referenceCarrier(),
115
+ ...args.allowPartial !== undefined ? { allowPartial: args.allowPartial } : {},
116
+ ...args.tableSelector !== undefined ? { tableSelector: args.tableSelector } : {},
117
+ ...args.excerptText !== undefined ? { excerptText: args.excerptText } : {},
118
+ }, exec.signal);
119
+ const failures = outcome.failures.map(failure => ({ kind: failure.kind, reason: failure.reason }));
120
+ if (outcome.reference === undefined)
121
+ return { ok: false, parts: [], failures };
122
+ const summary = summarizeReference(outcome.reference);
123
+ return {
124
+ ok: true,
125
+ referenceId: summary.referenceId,
126
+ pageUrl: summary.pageUrl,
127
+ title: summary.title,
128
+ // The summary's arrays are readonly; the schema declares a mutable array,
129
+ // so the parts are projected into plain objects rather than cast away.
130
+ parts: summary.parts.map(part => ({ partId: part.partId, type: part.type, preview: part.preview })),
131
+ failures,
132
+ };
133
+ },
134
+ }));
135
+ tools.push(defineTool({
136
+ name: 'dsh_browser_reference_reveal',
137
+ description: 'Return to a stored browser reference: select the browser session that captured it, verify the page is still the same one, then scroll to and highlight the part. Without partId the reference\'s first part is located; pass a partId to locate one specific fragment. A result status of page-mismatch means the session is showing another page (open the stored pageUrl first); ambiguous means several candidates matched equally and the exact one cannot be chosen; session-unavailable means the browser that captured it is gone.',
138
+ parameters: {
139
+ referenceId: { type: 'string', required: true, description: 'The reference id, with or without the dsh-browser-ref: prefix.' },
140
+ partId: { type: 'string', description: 'Locate this fragment instead of the whole reference\'s first part.' },
141
+ },
142
+ output: {
143
+ schema: {
144
+ type: 'object',
145
+ additionalProperties: false,
146
+ properties: {
147
+ status: { type: 'string', required: true },
148
+ pageUrl: { type: 'string', required: true },
149
+ currentUrl: { type: 'string' },
150
+ note: { type: 'string' },
151
+ parts: {
152
+ type: 'array',
153
+ required: true,
154
+ items: {
155
+ type: 'object',
156
+ additionalProperties: false,
157
+ properties: {
158
+ partId: { type: 'string', required: true },
159
+ type: { type: 'string', required: true },
160
+ status: { type: 'string', required: true },
161
+ matches: { type: 'number' },
162
+ collapsed: { type: 'boolean' },
163
+ note: { type: 'string' },
164
+ },
165
+ },
166
+ },
167
+ },
168
+ },
169
+ render: (_args, value) => {
170
+ const head = value.status === 'revealed'
171
+ ? 'Located the reference in the page.'
172
+ : `Could not locate the reference: ${value.status}${value.note !== undefined ? ` — ${value.note}` : ''}`;
173
+ const lines = [head, ...value.parts.map(part => ` ${part.partId} (${part.type}): ${part.status}${part.matches !== undefined ? `, ${part.matches} match(es)` : ''}${part.collapsed === true ? ', whitespace-collapsed' : ''}${part.note !== undefined ? ` — ${part.note}` : ''}`)];
174
+ return [{ type: 'text', text: lines.join('\n') }];
175
+ },
176
+ },
177
+ timeoutMs,
178
+ isConcurrencySafe: () => false,
179
+ async execute(args, exec) {
180
+ // The documented citation form is `dsh-browser-ref:<referenceId>/<partId?>`; accept it
181
+ // whole so a model can paste what it wrote instead of splitting the id by hand.
182
+ let referenceId = args.referenceId.startsWith('dsh-browser-ref:') ? args.referenceId.slice('dsh-browser-ref:'.length) : args.referenceId;
183
+ let partId = args.partId;
184
+ const slash = referenceId.indexOf('/');
185
+ if (slash !== -1) {
186
+ if (partId === undefined)
187
+ partId = referenceId.slice(slash + 1);
188
+ referenceId = referenceId.slice(0, slash);
189
+ }
190
+ const outcome = await references().reveal(referenceId, {
191
+ ownerSessionId: taskKey(exec),
192
+ ...partId !== undefined && partId !== '' ? { partId } : {},
193
+ }, exec.signal);
194
+ return {
195
+ status: outcome.status,
196
+ pageUrl: outcome.pageUrl,
197
+ ...outcome.currentUrl !== undefined ? { currentUrl: outcome.currentUrl } : {},
198
+ ...outcome.note !== undefined ? { note: outcome.note } : {},
199
+ parts: outcome.parts.map(part => ({
200
+ partId: part.partId,
201
+ type: part.type,
202
+ status: part.status,
203
+ ...part.matches !== undefined ? { matches: part.matches } : {},
204
+ ...part.collapsed !== undefined ? { collapsed: part.collapsed } : {},
205
+ ...part.note !== undefined ? { note: part.note } : {},
206
+ })),
207
+ };
208
+ },
209
+ }));
210
+ tools.push(defineTool({
211
+ name: 'dsh_browser_reference_list',
212
+ description: 'List the browser references stored for this task, newest first: id, page, capture time, and one preview line per fragment. Use it to identify a reference from earlier in the conversation. Source navigation is provided by reference capsules; do not repeat reference URIs, source URLs, markers, or source/citation links in the reply.',
213
+ parameters: {
214
+ limit: { type: 'number', description: 'Most references to return (default 20, maximum 100).' },
215
+ },
216
+ output: {
217
+ schema: {
218
+ type: 'object',
219
+ additionalProperties: false,
220
+ properties: {
221
+ references: {
222
+ type: 'array',
223
+ required: true,
224
+ items: {
225
+ type: 'object',
226
+ additionalProperties: false,
227
+ properties: {
228
+ referenceId: { type: 'string', required: true },
229
+ title: { type: 'string', required: true },
230
+ pageUrl: { type: 'string', required: true },
231
+ capturedAt: { type: 'string', required: true },
232
+ carrier: { type: 'string', required: true },
233
+ origin: { type: 'string', required: true },
234
+ entry: { type: 'string', required: true },
235
+ partCount: { type: 'number', required: true },
236
+ parts: {
237
+ type: 'array',
238
+ required: true,
239
+ items: {
240
+ type: 'object',
241
+ additionalProperties: false,
242
+ properties: {
243
+ partId: { type: 'string', required: true },
244
+ type: { type: 'string', required: true },
245
+ preview: { type: 'string', required: true },
246
+ },
247
+ },
248
+ },
249
+ },
250
+ },
251
+ },
252
+ },
253
+ },
254
+ render: (_args, value) => {
255
+ if (value.references.length === 0)
256
+ return [{ type: 'text', text: 'No browser references are stored for this task.' }];
257
+ return [{
258
+ type: 'text',
259
+ text: value.references.map(reference => [
260
+ `Reference ${reference.referenceId} — ${reference.title !== '' ? reference.title : reference.pageUrl} (${reference.capturedAt}); source navigation is in its capsule, not a reply link.`,
261
+ ...reference.parts.map(part => ` ${part.partId} (${part.type}): ${part.preview}`),
262
+ ].join('\n')).join('\n\n'),
263
+ }];
264
+ },
265
+ },
266
+ timeoutMs,
267
+ isConcurrencySafe: () => true,
268
+ async execute(args, exec) {
269
+ const key = taskKey(exec);
270
+ const limit = Math.min(Math.max(Math.trunc(args.limit ?? 20), 1), 100);
271
+ // Always scoped: with no agent the key is `default`, and an unfiltered read
272
+ // would hand this task every conversation's references.
273
+ const stored = references().list({ sessionId: key, limit });
274
+ return {
275
+ references: stored.slice().reverse().map(reference => {
276
+ const summary = summarizeReference(reference);
277
+ return {
278
+ referenceId: summary.referenceId,
279
+ title: summary.title,
280
+ pageUrl: summary.pageUrl,
281
+ capturedAt: summary.capturedAt,
282
+ carrier: summary.carrier,
283
+ origin: summary.origin,
284
+ entry: summary.entry,
285
+ partCount: summary.partCount,
286
+ parts: summary.parts.map(part => ({ partId: part.partId, type: part.type, preview: part.preview })),
287
+ };
288
+ }),
289
+ };
290
+ },
291
+ }));
292
+ return tools;
293
+ }
package/lib/web-guest.js CHANGED
@@ -20,6 +20,7 @@ export function registerWebGuest(ctx) {
20
20
  host.effect(() => host.webServer.register({
21
21
  kind: 'exact',
22
22
  path: GUEST_ROUTE,
23
+ auth: 'anonymous',
23
24
  handler: (request, response) => handleGuest(request, response, overlayTag(), ''),
24
25
  }, 'dsh-builtin-browser: web guest proxy (root row)'));
25
26
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-builtin-browser",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Sidebar browser for DeepSeek Harness with navigation, structured references and dsh_browser_* tools. Browser tools require a controllable host-provided sidebar. External Chrome or Edge requires explicit opt-in; no standalone Electron fallback.",
5
5
  "keywords": [
6
6
  "browser",
@@ -16,33 +16,15 @@
16
16
  "type": "git",
17
17
  "url": "https://github.com/wqty123/dsh-browser.git"
18
18
  },
19
- "files": [
20
- "lib",
21
- "dist",
22
- "src",
23
- "scripts",
24
- "tools/accept-desktop.mjs",
25
- "desktop-bridge",
26
- "dsh-host-patch",
27
- "!dsh-host-patch/sources",
28
- "browser-extension",
29
- "native-host",
30
- "cordis.patch.yml",
31
- "CHANGELOG.md",
32
- "README.md",
33
- "docs",
34
- "skills",
35
- "assets",
36
- "!src/**/__tests__"
37
- ],
38
19
  "type": "module",
20
+ "packageManager": "pnpm@11.7.0",
39
21
  "exports": {
40
22
  ".": "./lib/index.js",
41
23
  "./browser": "./lib/browser/runtime.js",
42
24
  "./browser-electron": "./lib/browser-electron/entry.js",
43
25
  "./tool-browser": "./lib/tool-browser/index.js",
44
26
  "./startpage": "./lib/startpage.js",
45
- "./client": "./dist/client.cjs",
27
+ "./client": "./lib/client.js",
46
28
  "./cordis.patch.yml": "./cordis.patch.yml",
47
29
  "./package.json": "./package.json"
48
30
  },
@@ -50,39 +32,20 @@
50
32
  "dsh-browser-install-electron": "scripts/install-electron.mjs"
51
33
  },
52
34
  "dependencies": {
53
- "katex": "0.16.25"
35
+ "katex": "0.16.25",
36
+ "undici": "7.30.1"
54
37
  },
55
38
  "peerDependencies": {
56
- "@deepseek-ai/cordis": "^4.1.0",
57
- "@deepseek-ai/dsh-llm": "^0.2.2-rc.3",
58
- "@deepseek-ai/dsh-system-prompt": "^0.2.2-rc.3",
59
- "@deepseek-ai/dsh-tools": "^0.2.2-rc.3",
60
- "@deepseek-ai/schemastery": "^3.19.0"
61
- },
62
- "devDependencies": {
63
- "@types/node": "^22.0.0",
64
- "react-dom": "^18.2.0",
65
- "tldts": "6.1.86",
66
- "typescript": "^5.5.0",
67
- "@deepseek-ai/dsh-brand": "^0.2.2-rc.3",
68
- "@deepseek-ai/dsh-api-workspace-controller": "^0.2.2-rc.3",
69
- "@deepseek-ai/dsh-client-locale": "^0.2.2-rc.3",
70
- "@deepseek-ai/dsh-client-store": "^0.2.2-rc.3",
71
- "@deepseek-ai/dsh-client-shortcuts": "^0.2.2-rc.3",
72
- "@deepseek-ai/dsh-client-ui-conversation": "^0.2.2-rc.3",
73
- "@deepseek-ai/dsh-client-ui-dockkit": "^0.2.2-rc.3",
74
- "@deepseek-ai/dsh-client-ui-context-menu": "^0.2.2-rc.3",
75
- "@deepseek-ai/dsh-client-ui-session": "^0.2.2-rc.3",
76
- "@deepseek-ai/dsh-client-ui-renderer": "^0.2.2-rc.3",
77
- "@deepseek-ai/dsh-client-ui-settings": "^0.2.2-rc.3",
78
- "@deepseek-ai/dsh-session": "^0.2.2-rc.3",
79
- "@deepseek-ai/dsh-client-ui-sidebar-right": "^0.2.2-rc.3",
80
- "@deepseek-ai/dsh-client-ui-slots": "^0.2.2-rc.3",
81
- "@deepseek-ai/dsh-client-ui-primitives": "^0.2.2-rc.3",
82
- "@deepseek-ai/dsh-settings": "^0.2.2-rc.3"
39
+ "@deepseek-ai/cordis": ">=0.2.2-rc.3 <0.3.0",
40
+ "@deepseek-ai/dsh-error": ">=0.2.2-rc.3 <0.3.0",
41
+ "@deepseek-ai/dsh-llm": ">=0.2.2-rc.3 <0.3.0",
42
+ "@deepseek-ai/dsh-system-prompt": ">=0.2.2-rc.3 <0.3.0",
43
+ "@deepseek-ai/dsh-tools": ">=0.2.2-rc.3 <0.3.0",
44
+ "@deepseek-ai/schemastery": ">=0.2.2-rc.3 <0.3.0"
83
45
  },
84
46
  "engines": {
85
- "dsh": ">=0.1.1-rc.2 <0.3.0"
47
+ "dsh": ">=0.2.2-rc.3 <0.3.0",
48
+ "node": "^24.22.3 || >=26.13.1"
86
49
  },
87
50
  "dsh": {
88
51
  "desktop": {
@@ -94,18 +57,17 @@
94
57
  "client": {
95
58
  "platform": "web",
96
59
  "inject": [
60
+ "@deepseek-ai/dsh-api-workspace-controller",
97
61
  "@deepseek-ai/dsh-client-locale",
98
62
  "@deepseek-ai/dsh-client-shortcuts",
99
63
  "@deepseek-ai/dsh-client-ui-context-menu",
100
64
  "@deepseek-ai/dsh-client-ui-conversation",
101
65
  "@deepseek-ai/dsh-client-ui-primitives",
66
+ "@deepseek-ai/dsh-client-ui-session",
102
67
  "@deepseek-ai/dsh-client-ui-settings",
103
68
  "@deepseek-ai/dsh-client-ui-sidebar-right",
104
69
  "@deepseek-ai/dsh-client-ui-slots"
105
70
  ]
106
71
  }
107
- },
108
- "scripts": {
109
- "build": "node scripts/build.mjs"
110
72
  }
111
73
  }
package/README.en.md DELETED
@@ -1,89 +0,0 @@
1
- <p align="center">
2
- <img src="https://img.shields.io/github/stars/wqty123/dsh-browser?style=flat&amp;label=%E2%98%85&amp;color=08C" alt="GitHub stars">
3
- <img src="https://img.shields.io/npm/v/dsh-builtin-browser?style=flat&amp;label=npm&amp;color=CB3837" alt="npm version">
4
- <img src="https://img.shields.io/badge/license-MIT-2EA44F?style=flat" alt="MIT License">
5
- <img src="https://img.shields.io/badge/DSH-Plugin-47848F?style=flat" alt="DeepSeek Harness plugin">
6
- </p>
7
-
8
- <p align="center"><sub><a href="README.md">中文</a> · English</sub></p>
9
-
10
- # Browser plugin for DeepSeek Harness
11
-
12
- Browse in the DSH sidebar, send rich page selections into a conversation, and let the agent operate the same page on supported Desktop hosts. Tabs and action history belong to the task. [1.0.0 release changes](CHANGELOG.md#未发布)
13
-
14
- ![Browser carrier choices: Desktop sidebar, isolated Web sidebar, and opt-in Chrome or Edge](assets/browser-carriers.svg)
15
-
16
- ## Quick start
17
-
18
- Desktop and Web use separate DSH profiles. These commands install the version currently published on npm:
19
-
20
- ```sh
21
- dsh plugin --profile desktop add dsh-builtin-browser
22
- dsh plugin --profile web add dsh-builtin-browser
23
- ```
24
-
25
- If already installed, run `dsh plugin --profile desktop remove dsh-builtin-browser` before adding the target version; replace `desktop` with `web` for Web. See the [update steps](docs/user-guide.md#先移除再安装).
26
-
27
- **Desktop (Windows and macOS).** Keep **DSH Sidebar** selected. If the bridge needs repair, save active work and use **Settings → Browser → Uninstall and reinstall** when available. On supported builds this can apply the bundled host patch; it changes local DSH files and is not required to use Chrome or Edge. DSH asks before quitting an active task. After a host update, check bridge status again.
28
-
29
- **Web (`dsh web`).** Open the browser from the DSH sidebar. You can navigate and send selections from the isolated guest. Desktop-native tooling and opener-dependent child tabs are not available in this guest. Use a supported Desktop sidebar or explicitly select a local browser when a task requires CDP.
30
-
31
- ## Choose a browser
32
-
33
- | Option | How it works |
34
- | --- | --- |
35
- | DSH Sidebar (default) | Uses the selected host's sidebar. If the needed capability is missing, it reports why instead of opening another window. |
36
- | Chrome / Edge | Uses a DSH-managed profile by default. If you prefer your own browser, the optional extension can use its sign-in state; when the extension is unavailable, a new session uses the managed profile. |
37
- | Bundled / Auto (legacy values) | Both now mean sidebar only. Neither downloads Electron or picks an external browser. |
38
-
39
- ## Quote a page in chat
40
-
41
- Select text in the sidebar, then use the floating bar to add it to the conversation. Supported selections retain paragraph, link, table and formula formatting. Sent references stay as capsules, without duplicated quote text. Hover for a preview or choose **Return to source** to reopen the page and locate the selection. If the source has changed, the saved preview is still available.
42
-
43
- ## Browser settings
44
-
45
- - **Environment check** shows the selected carrier, the bridge status, and the detected Chrome and Edge executables.
46
- - **Quiet mode** avoids raising the host window. With DSH sidebar selected, opening a URL reveals the target conversation's sidebar page; explicit tab switching selects the corresponding sidebar tab. Window behavior applies only to explicitly selected external browsers.
47
- - **Presentation** controls sidebar expansion, closing the browser with the session, the agent cursor, and remote viewing.
48
- - **Agent permissions** controls page scripts, downloads, and reading or writing sign-in state.
49
- - **Advanced settings** covers browsing history, permission for coordinate clicks and drags, and sign-in persistence and window mode for explicitly selected Chrome or Edge. The delivery form validates and saves the tool name, argument template, failure policy, and per-site rules together.
50
-
51
- On the local machine or in an isolated test environment, turn on **Allow remote viewing** and open the DSH viewer for a read-only view of the browser session. The viewer refreshes JPEG frames up to twice per second.
52
-
53
- ## Download delivery
54
-
55
- In **Advanced settings → Delivery**, enter an upload tool registered in DSH and configure its destination arguments. Automatic delivery uses the DSH native tool executor and retains the current task's tool permissions. The result includes the local download path and the upload tool's complete return value.
56
-
57
- DSH sidebar downloads use the target page's authenticated browser session, stream to a temporary file, and commit the completed file while preserving existing destinations.
58
-
59
- The official Baidu Netdisk stdio MCP upload tool accepts this argument template:
60
-
61
- ```json
62
- {
63
- "local_file_path": "{path}",
64
- "remote_path": "/来自:mcp_server/DSH下载"
65
- }
66
- ```
67
-
68
- `{path}` becomes the downloaded file's absolute path. `remote_path` names the destination folder. Use the tool name actually registered in DSH, following `mcp__<serverName>__upload_file`. [Baidu Netdisk MCP parameters](https://github.com/baidu-netdisk/mcp)
69
-
70
- For Feishu, configure an MCP tool that provides file uploads and use the argument fields it declares.
71
-
72
- ## Browser tools
73
-
74
- Common `dsh_browser_*` tools are loaded by default. Use `dsh_browser_load_tools` for less common groups and `dsh_browser_do` for a fixed action list. For loops, branches, or independent reads in parallel, use `dsh_browser_code` in standard DSH mode or DSH's `run_code` in PTC mode.
75
-
76
- When a site needs a login, CAPTCHA or other human verification, ask the agent to request takeover. The plugin does not solve challenges automatically.
77
-
78
- ## Documentation
79
-
80
- - [User guide](docs/user-guide.md)
81
- - [Tool parameters and examples](docs/tool-reference.md)
82
- - [Choosing tools, locating elements, and running steps](skills/dsh-builtin-browser/SKILL.md)
83
- - [Architecture](docs/architecture.md)
84
- - [Compatibility and operating conditions](docs/limitations.md)
85
- - [Build and test](docs/development.md)
86
-
87
- A community plugin built on [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) and [Cordis](https://github.com/cordiverse/cordis). Thanks to everyone who contributed issue reports, reproduction steps, and patches.
88
-
89
- Author on WeChat **hui13866591135** · [MIT License](LICENSE)
@@ -1,20 +0,0 @@
1
- export const nativeHostName = browser => `com.dsh.browser.${browser}`
2
- export const MAX_FRAME = 256 * 1024
3
- export const MAX_MESSAGE = 8 * 1024 * 1024
4
- export const CHUNK_BYTES = 48 * 1024
5
- export const MAX_IN_FLIGHT = 32
6
- export const MAX_ID_LENGTH = 128
7
- export const MAX_CHUNKS = 256
8
- export const MAX_PEERS = 8
9
- export const AUTH_TIMEOUT_MS = 5000
10
- export const HOST_OPERATION_TIMEOUT_MS = 15000
11
- export const CLIENT_OPERATION_TIMEOUT_MS = 20000
12
- export const LEGACY_PAIR_TTL_MS = 5 * 60 * 1000
13
- export const RECONNECT_ALARM = 'native-reconnect'
14
- export const RECONNECT_DELAY_MINUTES = 1
15
- export const MAX_ERROR_LENGTH = 1024
16
- export const DEBUGGER_IDLE_TIMEOUT_MS = 30_000
17
- export const DEBUGGER_IDLE_ALARM = 'debugger-idle'
18
- export const DEBUGGER_SESSION_KEY = 'debugger-owner'
19
- export const NATIVE_FILES = Object.freeze({ config: 'config.json', relay: 'relay.json' })
20
- export const EXTENSION_LIMITS = Object.freeze({ scopeLength: 4096, eventBytes: 32 * 1024, notices: 16, dialogPreview: 256, screenshotWidth: 1280, screenshotHeight: 960 })