@jingyi0605/codingns4dsh 0.2.0-beta.1 → 0.2.0-beta.2

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 (692) hide show
  1. package/README.en.md +29 -12
  2. package/README.md +19 -12
  3. package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts +1 -1
  4. package/data/build/dist/bootstrap/dsh-connection-adapter.d.ts.map +1 -0
  5. package/data/build/dist/bootstrap/dsh-connection-adapter.js.map +1 -0
  6. package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.d.ts +50 -0
  7. package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.d.ts.map +1 -0
  8. package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.js +239 -0
  9. package/data/build/dist/bootstrap/dsh-peer-host-preboot-shim.js.map +1 -0
  10. package/data/build/dist/bootstrap/index.d.ts +3 -1
  11. package/data/build/dist/bootstrap/index.d.ts.map +1 -0
  12. package/data/build/dist/bootstrap/index.js +1 -0
  13. package/data/build/dist/bootstrap/index.js.map +1 -0
  14. package/data/build/dist/client/account-bar.d.ts +7 -1
  15. package/data/build/dist/client/account-bar.d.ts.map +1 -0
  16. package/data/build/dist/client/account-bar.js +151 -69
  17. package/data/build/dist/client/account-bar.js.map +1 -0
  18. package/data/build/dist/client/bundle.js +12892 -7772
  19. package/data/build/dist/client/bundle.js.map +1 -0
  20. package/data/build/dist/client/cli-catalog.d.ts.map +1 -0
  21. package/data/build/dist/client/cli-catalog.js.map +1 -0
  22. package/data/build/dist/client/cli-slots.d.ts.map +1 -0
  23. package/data/build/dist/client/cli-slots.js +15 -4
  24. package/data/build/dist/client/cli-slots.js.map +1 -0
  25. package/data/build/dist/client/context-breakdown-dom.d.ts.map +1 -0
  26. package/data/build/dist/client/context-breakdown-dom.js.map +1 -0
  27. package/data/build/dist/client/debug/ui.d.ts.map +1 -0
  28. package/data/build/dist/client/debug/ui.js +2 -1
  29. package/data/build/dist/client/debug/ui.js.map +1 -0
  30. package/data/build/dist/client/dsh-h5-bootstrap.d.ts.map +1 -0
  31. package/data/build/dist/client/dsh-h5-bootstrap.js +12 -5
  32. package/data/build/dist/client/dsh-h5-bootstrap.js.map +1 -0
  33. package/data/build/dist/client/dsh-runtime-version.d.ts +3 -2
  34. package/data/build/dist/client/dsh-runtime-version.d.ts.map +1 -0
  35. package/data/build/dist/client/dsh-runtime-version.js +7 -6
  36. package/data/build/dist/client/dsh-runtime-version.js.map +1 -0
  37. package/data/build/dist/client/external-tool-stream.d.ts.map +1 -0
  38. package/data/build/dist/client/external-tool-stream.js.map +1 -0
  39. package/data/build/dist/client/features/cli-adapters.d.ts.map +1 -0
  40. package/data/build/dist/client/features/cli-adapters.js +9 -4
  41. package/data/build/dist/client/features/cli-adapters.js.map +1 -0
  42. package/data/build/dist/client/features/debug.d.ts.map +1 -0
  43. package/data/build/dist/client/features/debug.js +2 -2
  44. package/data/build/dist/client/features/debug.js.map +1 -0
  45. package/data/build/dist/client/features/file-management-panel.d.ts.map +1 -0
  46. package/data/build/dist/client/features/file-management-panel.js.map +1 -0
  47. package/data/build/dist/client/features/file-management.d.ts.map +1 -0
  48. package/data/build/dist/client/features/file-management.js +2 -2
  49. package/data/build/dist/client/features/file-management.js.map +1 -0
  50. package/data/build/dist/client/features/index.d.ts +4 -2
  51. package/data/build/dist/client/features/index.d.ts.map +1 -0
  52. package/data/build/dist/client/features/index.js +5 -2
  53. package/data/build/dist/client/features/index.js.map +1 -0
  54. package/data/build/dist/client/features/lan-access-panel.d.ts.map +1 -0
  55. package/data/build/dist/client/features/lan-access-panel.js +80 -2
  56. package/data/build/dist/client/features/lan-access-panel.js.map +1 -0
  57. package/data/build/dist/client/features/lan-access-status.d.ts +40 -0
  58. package/data/build/dist/client/features/lan-access-status.d.ts.map +1 -0
  59. package/data/build/dist/client/features/lan-access-status.js +118 -0
  60. package/data/build/dist/client/features/lan-access-status.js.map +1 -0
  61. package/data/build/dist/client/features/lan-access.d.ts +4 -1
  62. package/data/build/dist/client/features/lan-access.d.ts.map +1 -0
  63. package/data/build/dist/client/features/lan-access.js +29 -4
  64. package/data/build/dist/client/features/lan-access.js.map +1 -0
  65. package/data/build/dist/client/features/login-protection-panel.d.ts.map +1 -0
  66. package/data/build/dist/client/features/login-protection-panel.js.map +1 -0
  67. package/data/build/dist/client/features/login-protection-session.d.ts.map +1 -0
  68. package/data/build/dist/client/features/login-protection-session.js.map +1 -0
  69. package/data/build/dist/client/features/login-protection.d.ts.map +1 -0
  70. package/data/build/dist/client/features/login-protection.js +2 -2
  71. package/data/build/dist/client/features/login-protection.js.map +1 -0
  72. package/data/build/dist/client/features/mobile-access-panel.d.ts +12 -0
  73. package/data/build/dist/client/features/mobile-access-panel.d.ts.map +1 -0
  74. package/data/build/dist/client/features/mobile-access-panel.js +259 -0
  75. package/data/build/dist/client/features/mobile-access-panel.js.map +1 -0
  76. package/data/build/dist/client/features/mobile-access.d.ts +13 -0
  77. package/data/build/dist/client/features/mobile-access.d.ts.map +1 -0
  78. package/data/build/dist/client/features/mobile-access.js +75 -0
  79. package/data/build/dist/client/features/mobile-access.js.map +1 -0
  80. package/data/build/dist/client/features/peer-host.d.ts +35 -1
  81. package/data/build/dist/client/features/peer-host.d.ts.map +1 -0
  82. package/data/build/dist/client/features/peer-host.js +495 -56
  83. package/data/build/dist/client/features/peer-host.js.map +1 -0
  84. package/data/build/dist/client/features/reverse-proxy-panel.d.ts.map +1 -0
  85. package/data/build/dist/client/features/reverse-proxy-panel.js +2 -1
  86. package/data/build/dist/client/features/reverse-proxy-panel.js.map +1 -0
  87. package/data/build/dist/client/features/reverse-proxy.d.ts.map +1 -0
  88. package/data/build/dist/client/features/reverse-proxy.js +2 -2
  89. package/data/build/dist/client/features/reverse-proxy.js.map +1 -0
  90. package/data/build/dist/client/features/subscription-usage-panel.d.ts.map +1 -0
  91. package/data/build/dist/client/features/subscription-usage-panel.js.map +1 -0
  92. package/data/build/dist/client/features/terminal-enhancement-panel.d.ts.map +1 -0
  93. package/data/build/dist/client/features/terminal-enhancement-panel.js.map +1 -0
  94. package/data/build/dist/client/features/terminal-enhancement.d.ts.map +1 -0
  95. package/data/build/dist/client/features/terminal-enhancement.js +2 -2
  96. package/data/build/dist/client/features/terminal-enhancement.js.map +1 -0
  97. package/data/build/dist/client/features/types.d.ts +12 -0
  98. package/data/build/dist/client/features/types.d.ts.map +1 -0
  99. package/data/build/dist/client/features/types.js.map +1 -0
  100. package/data/build/dist/client/features/workspace-session-enhancement-panel.d.ts.map +1 -0
  101. package/data/build/dist/client/features/workspace-session-enhancement-panel.js +5 -2
  102. package/data/build/dist/client/features/workspace-session-enhancement-panel.js.map +1 -0
  103. package/data/build/dist/client/features/workspace-session-enhancement.d.ts.map +1 -0
  104. package/data/build/dist/client/features/workspace-session-enhancement.js +17 -4
  105. package/data/build/dist/client/features/workspace-session-enhancement.js.map +1 -0
  106. package/data/build/dist/client/file-management-dom.d.ts +2 -0
  107. package/data/build/dist/client/file-management-dom.d.ts.map +1 -0
  108. package/data/build/dist/client/file-management-dom.js +37 -8
  109. package/data/build/dist/client/file-management-dom.js.map +1 -0
  110. package/data/build/dist/client/git-history-graph.d.ts +81 -0
  111. package/data/build/dist/client/git-history-graph.d.ts.map +1 -0
  112. package/data/build/dist/client/git-history-graph.js +195 -0
  113. package/data/build/dist/client/git-history-graph.js.map +1 -0
  114. package/data/build/dist/client/git-management.d.ts.map +1 -0
  115. package/data/build/dist/client/git-management.js +245 -77
  116. package/data/build/dist/client/git-management.js.map +1 -0
  117. package/data/build/dist/client/git-panel-styles.d.ts +28 -0
  118. package/data/build/dist/client/git-panel-styles.d.ts.map +1 -0
  119. package/data/build/dist/client/git-panel-styles.js +95 -0
  120. package/data/build/dist/client/git-panel-styles.js.map +1 -0
  121. package/data/build/dist/client/h5-bootstrap-entry.d.ts.map +1 -0
  122. package/data/build/dist/client/h5-bootstrap-entry.js.map +1 -0
  123. package/data/build/dist/client/host-router.d.ts.map +1 -0
  124. package/data/build/dist/client/host-router.js.map +1 -0
  125. package/data/build/dist/client/index.d.ts +5 -4
  126. package/data/build/dist/client/index.d.ts.map +1 -0
  127. package/data/build/dist/client/index.js +10 -4
  128. package/data/build/dist/client/index.js.map +1 -0
  129. package/data/build/dist/client/lan-access.d.ts.map +1 -0
  130. package/data/build/dist/client/lan-access.js.map +1 -0
  131. package/data/build/dist/client/locale.d.ts.map +1 -0
  132. package/data/build/dist/client/locale.js +151 -11
  133. package/data/build/dist/client/locale.js.map +1 -0
  134. package/data/build/dist/client/mobile-settings-modal-dom.d.ts +49 -0
  135. package/data/build/dist/client/mobile-settings-modal-dom.d.ts.map +1 -0
  136. package/data/build/dist/client/mobile-settings-modal-dom.js +152 -0
  137. package/data/build/dist/client/mobile-settings-modal-dom.js.map +1 -0
  138. package/data/build/dist/client/mobile-sidebar-gestures.d.ts +97 -0
  139. package/data/build/dist/client/mobile-sidebar-gestures.d.ts.map +1 -0
  140. package/data/build/dist/client/mobile-sidebar-gestures.js +316 -0
  141. package/data/build/dist/client/mobile-sidebar-gestures.js.map +1 -0
  142. package/data/build/dist/client/mobile-sidebar-logo.d.ts +18 -0
  143. package/data/build/dist/client/mobile-sidebar-logo.d.ts.map +1 -0
  144. package/data/build/dist/client/mobile-sidebar-logo.js +15 -0
  145. package/data/build/dist/client/mobile-sidebar-logo.js.map +1 -0
  146. package/data/build/dist/client/mobile-sidebar-rail-dom.d.ts +106 -0
  147. package/data/build/dist/client/mobile-sidebar-rail-dom.d.ts.map +1 -0
  148. package/data/build/dist/client/mobile-sidebar-rail-dom.js +444 -0
  149. package/data/build/dist/client/mobile-sidebar-rail-dom.js.map +1 -0
  150. package/data/build/dist/client/mobile-vibration.d.ts +16 -0
  151. package/data/build/dist/client/mobile-vibration.d.ts.map +1 -0
  152. package/data/build/dist/client/mobile-vibration.js +20 -0
  153. package/data/build/dist/client/mobile-vibration.js.map +1 -0
  154. package/data/build/dist/client/native-workspace-store.d.ts +29 -0
  155. package/data/build/dist/client/native-workspace-store.d.ts.map +1 -0
  156. package/data/build/dist/client/native-workspace-store.js +64 -0
  157. package/data/build/dist/client/native-workspace-store.js.map +1 -0
  158. package/data/build/dist/client/peer-host-aggregate-refresh.d.ts +13 -0
  159. package/data/build/dist/client/peer-host-aggregate-refresh.d.ts.map +1 -0
  160. package/data/build/dist/client/peer-host-aggregate-refresh.js +14 -0
  161. package/data/build/dist/client/peer-host-aggregate-refresh.js.map +1 -0
  162. package/data/build/dist/client/peer-host-color.d.ts +13 -0
  163. package/data/build/dist/client/peer-host-color.d.ts.map +1 -0
  164. package/data/build/dist/client/peer-host-color.js +57 -0
  165. package/data/build/dist/client/peer-host-color.js.map +1 -0
  166. package/data/build/dist/client/peer-host-connection-button.d.ts.map +1 -0
  167. package/data/build/dist/client/peer-host-connection-button.js +6 -3
  168. package/data/build/dist/client/peer-host-connection-button.js.map +1 -0
  169. package/data/build/dist/client/peer-host-management-api.d.ts +34 -0
  170. package/data/build/dist/client/peer-host-management-api.d.ts.map +1 -0
  171. package/data/build/dist/client/peer-host-management-api.js +12 -0
  172. package/data/build/dist/client/peer-host-management-api.js.map +1 -0
  173. package/data/build/dist/client/peer-host-management-panel.d.ts +1 -1
  174. package/data/build/dist/client/peer-host-management-panel.d.ts.map +1 -0
  175. package/data/build/dist/client/peer-host-management-panel.js +521 -86
  176. package/data/build/dist/client/peer-host-management-panel.js.map +1 -0
  177. package/data/build/dist/client/peer-host-native-projection.d.ts +46 -0
  178. package/data/build/dist/client/peer-host-native-projection.d.ts.map +1 -0
  179. package/data/build/dist/client/peer-host-native-projection.js +137 -0
  180. package/data/build/dist/client/peer-host-native-projection.js.map +1 -0
  181. package/data/build/dist/client/peer-host-native-store-projection.d.ts +21 -0
  182. package/data/build/dist/client/peer-host-native-store-projection.d.ts.map +1 -0
  183. package/data/build/dist/client/peer-host-native-store-projection.js +114 -0
  184. package/data/build/dist/client/peer-host-native-store-projection.js.map +1 -0
  185. package/data/build/dist/client/peer-host-scoped-client.d.ts.map +1 -0
  186. package/data/build/dist/client/peer-host-scoped-client.js.map +1 -0
  187. package/data/build/dist/client/peer-host-session-controller.d.ts.map +1 -0
  188. package/data/build/dist/client/peer-host-session-controller.js.map +1 -0
  189. package/data/build/dist/client/peer-host-workspace-tab.d.ts +44 -0
  190. package/data/build/dist/client/peer-host-workspace-tab.d.ts.map +1 -0
  191. package/data/build/dist/client/peer-host-workspace-tab.js +472 -0
  192. package/data/build/dist/client/peer-host-workspace-tab.js.map +1 -0
  193. package/data/build/dist/client/peer-host-workspace-tag.d.ts +47 -0
  194. package/data/build/dist/client/peer-host-workspace-tag.d.ts.map +1 -0
  195. package/data/build/dist/client/peer-host-workspace-tag.js +207 -0
  196. package/data/build/dist/client/peer-host-workspace-tag.js.map +1 -0
  197. package/data/build/dist/client/popup-dismiss.d.ts +48 -0
  198. package/data/build/dist/client/popup-dismiss.d.ts.map +1 -0
  199. package/data/build/dist/client/popup-dismiss.js +93 -0
  200. package/data/build/dist/client/popup-dismiss.js.map +1 -0
  201. package/data/build/dist/client/provider-icon-assets.d.ts.map +1 -0
  202. package/data/build/dist/client/provider-icon-assets.js.map +1 -0
  203. package/data/build/dist/client/provider-icons.d.ts +10 -1
  204. package/data/build/dist/client/provider-icons.d.ts.map +1 -0
  205. package/data/build/dist/client/provider-icons.js +19 -12
  206. package/data/build/dist/client/provider-icons.js.map +1 -0
  207. package/data/build/dist/client/pwa-install-prompt.d.ts +73 -0
  208. package/data/build/dist/client/pwa-install-prompt.d.ts.map +1 -0
  209. package/data/build/dist/client/pwa-install-prompt.js +178 -0
  210. package/data/build/dist/client/pwa-install-prompt.js.map +1 -0
  211. package/data/build/dist/client/pwa-notifications.d.ts +105 -0
  212. package/data/build/dist/client/pwa-notifications.d.ts.map +1 -0
  213. package/data/build/dist/client/pwa-notifications.js +192 -0
  214. package/data/build/dist/client/pwa-notifications.js.map +1 -0
  215. package/data/build/dist/client/quick-phrase-layout.d.ts.map +1 -0
  216. package/data/build/dist/client/quick-phrase-layout.js.map +1 -0
  217. package/data/build/dist/client/quick-phrase-slot.d.ts.map +1 -0
  218. package/data/build/dist/client/quick-phrase-slot.js.map +1 -0
  219. package/data/build/dist/client/remote-web-context.d.ts.map +1 -0
  220. package/data/build/dist/client/remote-web-context.js.map +1 -0
  221. package/data/build/dist/client/session-adapter-cache.d.ts.map +1 -0
  222. package/data/build/dist/client/session-adapter-cache.js.map +1 -0
  223. package/data/build/dist/client/session-changed-files-view.d.ts.map +1 -0
  224. package/data/build/dist/client/session-changed-files-view.js.map +1 -0
  225. package/data/build/dist/client/settings-anchor.d.ts +67 -0
  226. package/data/build/dist/client/settings-anchor.d.ts.map +1 -0
  227. package/data/build/dist/client/settings-anchor.js +64 -0
  228. package/data/build/dist/client/settings-anchor.js.map +1 -0
  229. package/data/build/dist/client/settings-bridge.d.ts.map +1 -0
  230. package/data/build/dist/client/settings-bridge.js.map +1 -0
  231. package/data/build/dist/client/settings-section.d.ts.map +1 -0
  232. package/data/build/dist/client/settings-section.js +16 -2
  233. package/data/build/dist/client/settings-section.js.map +1 -0
  234. package/data/build/dist/client/subscription-slot.d.ts.map +1 -0
  235. package/data/build/dist/client/subscription-slot.js +2 -19
  236. package/data/build/dist/client/subscription-slot.js.map +1 -0
  237. package/data/build/dist/client/terminal/index.d.ts.map +1 -0
  238. package/data/build/dist/client/terminal/index.js.map +1 -0
  239. package/data/build/dist/client/terminal/model.d.ts.map +1 -0
  240. package/data/build/dist/client/terminal/model.js.map +1 -0
  241. package/data/build/dist/client/terminal/recovery.d.ts.map +1 -0
  242. package/data/build/dist/client/terminal/recovery.js.map +1 -0
  243. package/data/build/dist/client/terminal/styles.d.ts.map +1 -0
  244. package/data/build/dist/client/terminal/styles.js.map +1 -0
  245. package/data/build/dist/client/terminal/ui.d.ts.map +1 -0
  246. package/data/build/dist/client/terminal/ui.js.map +1 -0
  247. package/data/build/dist/client/terminal/xterm-view.d.ts.map +1 -0
  248. package/data/build/dist/client/terminal/xterm-view.js.map +1 -0
  249. package/data/build/dist/client/theme.d.ts +17 -5
  250. package/data/build/dist/client/theme.d.ts.map +1 -0
  251. package/data/build/dist/client/theme.js +35 -13
  252. package/data/build/dist/client/theme.js.map +1 -0
  253. package/data/build/dist/client/workspace-session-archive-dom.d.ts +14 -0
  254. package/data/build/dist/client/workspace-session-archive-dom.d.ts.map +1 -0
  255. package/data/build/dist/client/workspace-session-archive-dom.js +70 -11
  256. package/data/build/dist/client/workspace-session-archive-dom.js.map +1 -0
  257. package/data/build/dist/client/workspace-session-fiber.d.ts.map +1 -0
  258. package/data/build/dist/client/workspace-session-fiber.js.map +1 -0
  259. package/data/build/dist/client/workspace-session-logo-dom.d.ts.map +1 -0
  260. package/data/build/dist/client/workspace-session-logo-dom.js.map +1 -0
  261. package/data/build/dist/client/workspace-session-rightbar-dom.d.ts.map +1 -0
  262. package/data/build/dist/client/workspace-session-rightbar-dom.js.map +1 -0
  263. package/data/build/dist/client/workspace-session-visibility-dom.d.ts.map +1 -0
  264. package/data/build/dist/client/workspace-session-visibility-dom.js.map +1 -0
  265. package/data/build/dist/dsh-capabilities/client/config-forms-adapter.d.ts.map +1 -0
  266. package/data/build/dist/dsh-capabilities/client/config-forms-adapter.js.map +1 -0
  267. package/data/build/dist/dsh-capabilities/client/conversation-adapter.d.ts.map +1 -0
  268. package/data/build/dist/dsh-capabilities/client/conversation-adapter.js.map +1 -0
  269. package/data/build/dist/dsh-capabilities/client/locale-adapter.d.ts.map +1 -0
  270. package/data/build/dist/dsh-capabilities/client/locale-adapter.js.map +1 -0
  271. package/data/build/dist/dsh-capabilities/client/primitives-adapter.d.ts.map +1 -0
  272. package/data/build/dist/dsh-capabilities/client/primitives-adapter.js.map +1 -0
  273. package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.d.ts.map +1 -0
  274. package/data/build/dist/dsh-capabilities/client/settings-scope-adapter.js.map +1 -0
  275. package/data/build/dist/dsh-capabilities/client/sidebar-adapter.d.ts.map +1 -0
  276. package/data/build/dist/dsh-capabilities/client/sidebar-adapter.js.map +1 -0
  277. package/data/build/dist/dsh-capabilities/client/theme-adapter.d.ts.map +1 -0
  278. package/data/build/dist/dsh-capabilities/client/theme-adapter.js.map +1 -0
  279. package/data/build/dist/dsh-capabilities/client/typert-adapter.d.ts.map +1 -0
  280. package/data/build/dist/dsh-capabilities/client/typert-adapter.js.map +1 -0
  281. package/data/build/dist/dsh-capabilities/host/config-forms-adapter.d.ts.map +1 -0
  282. package/data/build/dist/dsh-capabilities/host/config-forms-adapter.js.map +1 -0
  283. package/data/build/dist/dsh-capabilities/host/connection-rpc-adapter.d.ts.map +1 -0
  284. package/data/build/dist/dsh-capabilities/host/connection-rpc-adapter.js.map +1 -0
  285. package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.d.ts.map +1 -0
  286. package/data/build/dist/dsh-capabilities/host/settings-scope-adapter.js.map +1 -0
  287. package/data/build/dist/dsh-capabilities/host/typert-adapter.d.ts.map +1 -0
  288. package/data/build/dist/dsh-capabilities/host/typert-adapter.js.map +1 -0
  289. package/data/build/dist/dsh-capabilities/index.d.ts.map +1 -0
  290. package/data/build/dist/dsh-capabilities/index.js.map +1 -0
  291. package/data/build/dist/dsh-capabilities/matrix.d.ts.map +1 -0
  292. package/data/build/dist/dsh-capabilities/matrix.js +44 -31
  293. package/data/build/dist/dsh-capabilities/matrix.js.map +1 -0
  294. package/data/build/dist/dsh-capabilities/registry.d.ts.map +1 -0
  295. package/data/build/dist/dsh-capabilities/registry.js +6 -2
  296. package/data/build/dist/dsh-capabilities/registry.js.map +1 -0
  297. package/data/build/dist/dsh-capabilities/routes.d.ts.map +1 -0
  298. package/data/build/dist/dsh-capabilities/routes.js +96 -11
  299. package/data/build/dist/dsh-capabilities/routes.js.map +1 -0
  300. package/data/build/dist/dsh-capabilities/settings-store.d.ts.map +1 -0
  301. package/data/build/dist/dsh-capabilities/settings-store.js.map +1 -0
  302. package/data/build/dist/dsh-capabilities/types.d.ts +1 -1
  303. package/data/build/dist/dsh-capabilities/types.d.ts.map +1 -0
  304. package/data/build/dist/dsh-capabilities/types.js.map +1 -0
  305. package/data/build/dist/features/host-router.d.ts.map +1 -0
  306. package/data/build/dist/features/host-router.js.map +1 -0
  307. package/data/build/dist/features/index.d.ts.map +1 -0
  308. package/data/build/dist/features/index.js.map +1 -0
  309. package/data/build/dist/features/registry.d.ts.map +1 -0
  310. package/data/build/dist/features/registry.js.map +1 -0
  311. package/data/build/dist/features/resource-scope/index.d.ts.map +1 -0
  312. package/data/build/dist/features/resource-scope/index.js.map +1 -0
  313. package/data/build/dist/host/auth-session.d.ts.map +1 -0
  314. package/data/build/dist/host/auth-session.js.map +1 -0
  315. package/data/build/dist/host/cli-adapters/attachment-utils.d.ts +14 -0
  316. package/data/build/dist/host/cli-adapters/attachment-utils.d.ts.map +1 -0
  317. package/data/build/dist/host/cli-adapters/attachment-utils.js +78 -0
  318. package/data/build/dist/host/cli-adapters/attachment-utils.js.map +1 -0
  319. package/data/build/dist/host/cli-adapters/claude-driver.d.ts.map +1 -0
  320. package/data/build/dist/host/cli-adapters/claude-driver.js +5 -2
  321. package/data/build/dist/host/cli-adapters/claude-driver.js.map +1 -0
  322. package/data/build/dist/host/cli-adapters/claude-model-options.d.ts.map +1 -0
  323. package/data/build/dist/host/cli-adapters/claude-model-options.js.map +1 -0
  324. package/data/build/dist/host/cli-adapters/codex-driver.d.ts.map +1 -0
  325. package/data/build/dist/host/cli-adapters/codex-driver.js +248 -45
  326. package/data/build/dist/host/cli-adapters/codex-driver.js.map +1 -0
  327. package/data/build/dist/host/cli-adapters/command-code-driver.d.ts +24 -2
  328. package/data/build/dist/host/cli-adapters/command-code-driver.d.ts.map +1 -0
  329. package/data/build/dist/host/cli-adapters/command-code-driver.js +250 -30
  330. package/data/build/dist/host/cli-adapters/command-code-driver.js.map +1 -0
  331. package/data/build/dist/host/cli-adapters/command-code-subscription.d.ts.map +1 -0
  332. package/data/build/dist/host/cli-adapters/command-code-subscription.js.map +1 -0
  333. package/data/build/dist/host/cli-adapters/driver.d.ts.map +1 -0
  334. package/data/build/dist/host/cli-adapters/driver.js.map +1 -0
  335. package/data/build/dist/host/cli-adapters/dsh-message-projector.d.ts.map +1 -0
  336. package/data/build/dist/host/cli-adapters/dsh-message-projector.js.map +1 -0
  337. package/data/build/dist/host/cli-adapters/dsh-tool-history.d.ts.map +1 -0
  338. package/data/build/dist/host/cli-adapters/dsh-tool-history.js +49 -1
  339. package/data/build/dist/host/cli-adapters/dsh-tool-history.js.map +1 -0
  340. package/data/build/dist/host/cli-adapters/feature.d.ts.map +1 -0
  341. package/data/build/dist/host/cli-adapters/feature.js +152 -5
  342. package/data/build/dist/host/cli-adapters/feature.js.map +1 -0
  343. package/data/build/dist/host/cli-adapters/gemini-driver.d.ts.map +1 -0
  344. package/data/build/dist/host/cli-adapters/gemini-driver.js +6 -3
  345. package/data/build/dist/host/cli-adapters/gemini-driver.js.map +1 -0
  346. package/data/build/dist/host/cli-adapters/grok-driver.d.ts.map +1 -0
  347. package/data/build/dist/host/cli-adapters/grok-driver.js +3 -2
  348. package/data/build/dist/host/cli-adapters/grok-driver.js.map +1 -0
  349. package/data/build/dist/host/cli-adapters/http-sse-client.d.ts.map +1 -0
  350. package/data/build/dist/host/cli-adapters/http-sse-client.js.map +1 -0
  351. package/data/build/dist/host/cli-adapters/interaction-events.d.ts.map +1 -0
  352. package/data/build/dist/host/cli-adapters/interaction-events.js.map +1 -0
  353. package/data/build/dist/host/cli-adapters/json-rpc-process.d.ts.map +1 -0
  354. package/data/build/dist/host/cli-adapters/json-rpc-process.js.map +1 -0
  355. package/data/build/dist/host/cli-adapters/kimi-driver.d.ts.map +1 -0
  356. package/data/build/dist/host/cli-adapters/kimi-driver.js +8 -3
  357. package/data/build/dist/host/cli-adapters/kimi-driver.js.map +1 -0
  358. package/data/build/dist/host/cli-adapters/legacy-session-adapter.d.ts.map +1 -0
  359. package/data/build/dist/host/cli-adapters/legacy-session-adapter.js.map +1 -0
  360. package/data/build/dist/host/cli-adapters/legacy-session-settings.d.ts.map +1 -0
  361. package/data/build/dist/host/cli-adapters/legacy-session-settings.js.map +1 -0
  362. package/data/build/dist/host/cli-adapters/model-catalog.d.ts.map +1 -0
  363. package/data/build/dist/host/cli-adapters/model-catalog.js.map +1 -0
  364. package/data/build/dist/host/cli-adapters/native-team-proxy.d.ts.map +1 -0
  365. package/data/build/dist/host/cli-adapters/native-team-proxy.js.map +1 -0
  366. package/data/build/dist/host/cli-adapters/official-provider-subscription.d.ts.map +1 -0
  367. package/data/build/dist/host/cli-adapters/official-provider-subscription.js.map +1 -0
  368. package/data/build/dist/host/cli-adapters/opencode-driver.d.ts.map +1 -0
  369. package/data/build/dist/host/cli-adapters/opencode-driver.js +7 -1
  370. package/data/build/dist/host/cli-adapters/opencode-driver.js.map +1 -0
  371. package/data/build/dist/host/cli-adapters/pi-driver.d.ts.map +1 -0
  372. package/data/build/dist/host/cli-adapters/pi-driver.js +7 -2
  373. package/data/build/dist/host/cli-adapters/pi-driver.js.map +1 -0
  374. package/data/build/dist/host/cli-adapters/process-utils.d.ts.map +1 -0
  375. package/data/build/dist/host/cli-adapters/process-utils.js.map +1 -0
  376. package/data/build/dist/host/cli-adapters/provider-registry.d.ts.map +1 -0
  377. package/data/build/dist/host/cli-adapters/provider-registry.js.map +1 -0
  378. package/data/build/dist/host/cli-adapters/provider-subscription.d.ts.map +1 -0
  379. package/data/build/dist/host/cli-adapters/provider-subscription.js.map +1 -0
  380. package/data/build/dist/host/cli-adapters/registry.d.ts.map +1 -0
  381. package/data/build/dist/host/cli-adapters/registry.js.map +1 -0
  382. package/data/build/dist/host/cli-adapters/rpc-driver-utils.d.ts.map +1 -0
  383. package/data/build/dist/host/cli-adapters/rpc-driver-utils.js.map +1 -0
  384. package/data/build/dist/host/cli-adapters/session-probe.d.ts.map +1 -0
  385. package/data/build/dist/host/cli-adapters/session-probe.js.map +1 -0
  386. package/data/build/dist/host/cli-adapters/session-store.d.ts.map +1 -0
  387. package/data/build/dist/host/cli-adapters/session-store.js.map +1 -0
  388. package/data/build/dist/host/cli-adapters/standard-stream-driver.d.ts.map +1 -0
  389. package/data/build/dist/host/cli-adapters/standard-stream-driver.js.map +1 -0
  390. package/data/build/dist/host/cli-adapters/stream-normalizer.d.ts.map +1 -0
  391. package/data/build/dist/host/cli-adapters/stream-normalizer.js.map +1 -0
  392. package/data/build/dist/host/cli-adapters/tool-observation.d.ts.map +1 -0
  393. package/data/build/dist/host/cli-adapters/tool-observation.js.map +1 -0
  394. package/data/build/dist/host/control-api-client.d.ts.map +1 -0
  395. package/data/build/dist/host/control-api-client.js.map +1 -0
  396. package/data/build/dist/host/credential-store.d.ts.map +1 -0
  397. package/data/build/dist/host/credential-store.js.map +1 -0
  398. package/data/build/dist/host/debug.d.ts.map +1 -0
  399. package/data/build/dist/host/debug.js.map +1 -0
  400. package/data/build/dist/host/dsh-device-runtime.d.ts.map +1 -0
  401. package/data/build/dist/host/dsh-device-runtime.js.map +1 -0
  402. package/data/build/dist/host/dsh-gateway-feature.d.ts.map +1 -0
  403. package/data/build/dist/host/dsh-gateway-feature.js.map +1 -0
  404. package/data/build/dist/host/dsh-runtime-version.d.ts.map +1 -0
  405. package/data/build/dist/host/dsh-runtime-version.js.map +1 -0
  406. package/data/build/dist/host/features/auth.d.ts.map +1 -0
  407. package/data/build/dist/host/features/auth.js.map +1 -0
  408. package/data/build/dist/host/features/debug.d.ts.map +1 -0
  409. package/data/build/dist/host/features/debug.js.map +1 -0
  410. package/data/build/dist/host/features/file-management.d.ts.map +1 -0
  411. package/data/build/dist/host/features/file-management.js.map +1 -0
  412. package/data/build/dist/host/features/git-management.d.ts.map +1 -0
  413. package/data/build/dist/host/features/git-management.js +97 -10
  414. package/data/build/dist/host/features/git-management.js.map +1 -0
  415. package/data/build/dist/host/features/host-status.d.ts.map +1 -0
  416. package/data/build/dist/host/features/host-status.js.map +1 -0
  417. package/data/build/dist/host/features/index.d.ts.map +1 -0
  418. package/data/build/dist/host/features/index.js.map +1 -0
  419. package/data/build/dist/host/features/lan-access-dsh.d.ts.map +1 -0
  420. package/data/build/dist/host/features/lan-access-dsh.js +30 -1
  421. package/data/build/dist/host/features/lan-access-dsh.js.map +1 -0
  422. package/data/build/dist/host/features/peer-host.d.ts.map +1 -0
  423. package/data/build/dist/host/features/peer-host.js +340 -20
  424. package/data/build/dist/host/features/peer-host.js.map +1 -0
  425. package/data/build/dist/host/features/terminal-process.d.ts.map +1 -0
  426. package/data/build/dist/host/features/terminal-process.js.map +1 -0
  427. package/data/build/dist/host/features/terminal-status.d.ts.map +1 -0
  428. package/data/build/dist/host/features/terminal-status.js.map +1 -0
  429. package/data/build/dist/host/features/types.d.ts +3 -0
  430. package/data/build/dist/host/features/types.d.ts.map +1 -0
  431. package/data/build/dist/host/features/types.js.map +1 -0
  432. package/data/build/dist/host/host-router.d.ts.map +1 -0
  433. package/data/build/dist/host/host-router.js.map +1 -0
  434. package/data/build/dist/host/index-injection.d.ts +15 -0
  435. package/data/build/dist/host/index-injection.d.ts.map +1 -0
  436. package/data/build/dist/host/index-injection.js +45 -0
  437. package/data/build/dist/host/index-injection.js.map +1 -0
  438. package/data/build/dist/host/index.d.ts +8 -2
  439. package/data/build/dist/host/index.d.ts.map +1 -0
  440. package/data/build/dist/host/index.js +39 -3
  441. package/data/build/dist/host/index.js.map +1 -0
  442. package/data/build/dist/host/lan-access-dsh.d.ts +87 -2
  443. package/data/build/dist/host/lan-access-dsh.d.ts.map +1 -0
  444. package/data/build/dist/host/lan-access-dsh.js +349 -14
  445. package/data/build/dist/host/lan-access-dsh.js.map +1 -0
  446. package/data/build/dist/host/modules/peer-host/aggregated-host-transport.d.ts +146 -0
  447. package/data/build/dist/host/modules/peer-host/aggregated-host-transport.d.ts.map +1 -0
  448. package/data/build/dist/host/modules/peer-host/aggregated-host-transport.js +322 -0
  449. package/data/build/dist/host/modules/peer-host/aggregated-host-transport.js.map +1 -0
  450. package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.d.ts +8 -0
  451. package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.d.ts.map +1 -0
  452. package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.js +120 -0
  453. package/data/build/dist/host/modules/peer-host/dsh-native-summary-source.js.map +1 -0
  454. package/data/build/dist/host/modules/peer-host/host-api-proxy-service.d.ts +22 -0
  455. package/data/build/dist/host/modules/peer-host/host-api-proxy-service.d.ts.map +1 -0
  456. package/data/build/dist/host/modules/peer-host/host-api-proxy-service.js +24 -3
  457. package/data/build/dist/host/modules/peer-host/host-api-proxy-service.js.map +1 -0
  458. package/data/build/dist/host/modules/peer-host/host-ws-connector.d.ts.map +1 -0
  459. package/data/build/dist/host/modules/peer-host/host-ws-connector.js.map +1 -0
  460. package/data/build/dist/host/modules/peer-host/host-ws-proxy-service.d.ts.map +1 -0
  461. package/data/build/dist/host/modules/peer-host/host-ws-proxy-service.js.map +1 -0
  462. package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.d.ts +9 -0
  463. package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.d.ts.map +1 -0
  464. package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.js +26 -12
  465. package/data/build/dist/host/modules/peer-host/peer-host-aggregate-service.js.map +1 -0
  466. package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.d.ts.map +1 -0
  467. package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.js +3 -0
  468. package/data/build/dist/host/modules/peer-host/peer-host-diagnostics.js.map +1 -0
  469. package/data/build/dist/host/modules/peer-host/peer-host-handshake.d.ts +2 -0
  470. package/data/build/dist/host/modules/peer-host/peer-host-handshake.d.ts.map +1 -0
  471. package/data/build/dist/host/modules/peer-host/peer-host-handshake.js +6 -0
  472. package/data/build/dist/host/modules/peer-host/peer-host-handshake.js.map +1 -0
  473. package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts +17 -0
  474. package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.d.ts.map +1 -0
  475. package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js +52 -0
  476. package/data/build/dist/host/modules/peer-host/peer-host-native-dispatch.js.map +1 -0
  477. package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts +25 -0
  478. package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.d.ts.map +1 -0
  479. package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js +184 -0
  480. package/data/build/dist/host/modules/peer-host/peer-host-native-protocol.js.map +1 -0
  481. package/data/build/dist/host/modules/peer-host/peer-host-native-transport.d.ts +22 -0
  482. package/data/build/dist/host/modules/peer-host/peer-host-native-transport.d.ts.map +1 -0
  483. package/data/build/dist/host/modules/peer-host/peer-host-native-transport.js +111 -0
  484. package/data/build/dist/host/modules/peer-host/peer-host-native-transport.js.map +1 -0
  485. package/data/build/dist/host/modules/peer-host/peer-host-relay.d.ts.map +1 -0
  486. package/data/build/dist/host/modules/peer-host/peer-host-relay.js.map +1 -0
  487. package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.d.ts +53 -0
  488. package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.d.ts.map +1 -0
  489. package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.js +153 -0
  490. package/data/build/dist/host/modules/peer-host/peer-host-remote-summary-source.js.map +1 -0
  491. package/data/build/dist/host/modules/peer-host/peer-host-session.d.ts +20 -1
  492. package/data/build/dist/host/modules/peer-host/peer-host-session.d.ts.map +1 -0
  493. package/data/build/dist/host/modules/peer-host/peer-host-session.js +118 -37
  494. package/data/build/dist/host/modules/peer-host/peer-host-session.js.map +1 -0
  495. package/data/build/dist/host/modules/peer-host/peer-host-store.d.ts +21 -0
  496. package/data/build/dist/host/modules/peer-host/peer-host-store.d.ts.map +1 -0
  497. package/data/build/dist/host/modules/peer-host/peer-host-store.js +65 -3
  498. package/data/build/dist/host/modules/peer-host/peer-host-store.js.map +1 -0
  499. package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.d.ts +49 -0
  500. package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.d.ts.map +1 -0
  501. package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.js +174 -0
  502. package/data/build/dist/host/modules/peer-host/peer-host-virtual-registry.js.map +1 -0
  503. package/data/build/dist/host/modules/peer-host/peer-host-ws-gateway.d.ts.map +1 -0
  504. package/data/build/dist/host/modules/peer-host/peer-host-ws-gateway.js.map +1 -0
  505. package/data/build/dist/host/modules/pwa/index.d.ts +7 -0
  506. package/data/build/dist/host/modules/pwa/index.d.ts.map +1 -0
  507. package/data/build/dist/host/modules/pwa/index.js +7 -0
  508. package/data/build/dist/host/modules/pwa/index.js.map +1 -0
  509. package/data/build/dist/host/modules/pwa/pwa-assets.d.ts +48 -0
  510. package/data/build/dist/host/modules/pwa/pwa-assets.d.ts.map +1 -0
  511. package/data/build/dist/host/modules/pwa/pwa-assets.js +180 -0
  512. package/data/build/dist/host/modules/pwa/pwa-assets.js.map +1 -0
  513. package/data/build/dist/host/modules/pwa/pwa-client-script.d.ts +10 -0
  514. package/data/build/dist/host/modules/pwa/pwa-client-script.d.ts.map +1 -0
  515. package/data/build/dist/host/modules/pwa/pwa-client-script.js +38 -0
  516. package/data/build/dist/host/modules/pwa/pwa-client-script.js.map +1 -0
  517. package/data/build/dist/host/modules/pwa/pwa-icons.d.ts +10 -0
  518. package/data/build/dist/host/modules/pwa/pwa-icons.d.ts.map +1 -0
  519. package/data/build/dist/host/modules/pwa/pwa-icons.js +185 -0
  520. package/data/build/dist/host/modules/pwa/pwa-icons.js.map +1 -0
  521. package/data/build/dist/host/modules/pwa/pwa-push.d.ts +74 -0
  522. package/data/build/dist/host/modules/pwa/pwa-push.d.ts.map +1 -0
  523. package/data/build/dist/host/modules/pwa/pwa-push.js +288 -0
  524. package/data/build/dist/host/modules/pwa/pwa-push.js.map +1 -0
  525. package/data/build/dist/host/modules/pwa/pwa-session-notifications.d.ts +14 -0
  526. package/data/build/dist/host/modules/pwa/pwa-session-notifications.d.ts.map +1 -0
  527. package/data/build/dist/host/modules/pwa/pwa-session-notifications.js +80 -0
  528. package/data/build/dist/host/modules/pwa/pwa-session-notifications.js.map +1 -0
  529. package/data/build/dist/host/modules/pwa/pwa-viewport.d.ts +12 -0
  530. package/data/build/dist/host/modules/pwa/pwa-viewport.d.ts.map +1 -0
  531. package/data/build/dist/host/modules/pwa/pwa-viewport.js +47 -0
  532. package/data/build/dist/host/modules/pwa/pwa-viewport.js.map +1 -0
  533. package/data/build/dist/host/native-session-bridge.d.ts.map +1 -0
  534. package/data/build/dist/host/native-session-bridge.js +16 -3
  535. package/data/build/dist/host/native-session-bridge.js.map +1 -0
  536. package/data/build/dist/host/relay-tunnel-runtime.d.ts +33 -0
  537. package/data/build/dist/host/relay-tunnel-runtime.d.ts.map +1 -0
  538. package/data/build/dist/host/relay-tunnel-runtime.js +71 -19
  539. package/data/build/dist/host/relay-tunnel-runtime.js.map +1 -0
  540. package/data/build/dist/host/remote-web-runtime.d.ts.map +1 -0
  541. package/data/build/dist/host/remote-web-runtime.js.map +1 -0
  542. package/data/build/dist/host/rpc-table.d.ts.map +1 -0
  543. package/data/build/dist/host/rpc-table.js.map +1 -0
  544. package/data/build/dist/host/rpc.d.ts.map +1 -0
  545. package/data/build/dist/host/rpc.js +17 -5
  546. package/data/build/dist/host/rpc.js.map +1 -0
  547. package/data/build/dist/host/session-changes.d.ts.map +1 -0
  548. package/data/build/dist/host/session-changes.js.map +1 -0
  549. package/data/build/dist/host/session-migration-repair.d.ts.map +1 -0
  550. package/data/build/dist/host/session-migration-repair.js.map +1 -0
  551. package/data/build/dist/host/settings.d.ts.map +1 -0
  552. package/data/build/dist/host/settings.js +30 -1
  553. package/data/build/dist/host/settings.js.map +1 -0
  554. package/data/build/dist/host/terminal/attachment-registry.d.ts.map +1 -0
  555. package/data/build/dist/host/terminal/attachment-registry.js.map +1 -0
  556. package/data/build/dist/host/terminal/backends/conpty-backend.d.ts.map +1 -0
  557. package/data/build/dist/host/terminal/backends/conpty-backend.js.map +1 -0
  558. package/data/build/dist/host/terminal/backends/local-pty-backend.d.ts.map +1 -0
  559. package/data/build/dist/host/terminal/backends/local-pty-backend.js.map +1 -0
  560. package/data/build/dist/host/terminal/backends/tmux-backend.d.ts.map +1 -0
  561. package/data/build/dist/host/terminal/backends/tmux-backend.js.map +1 -0
  562. package/data/build/dist/host/terminal/broker/conpty-broker-client.d.ts.map +1 -0
  563. package/data/build/dist/host/terminal/broker/conpty-broker-client.js.map +1 -0
  564. package/data/build/dist/host/terminal/broker/conpty-broker-process.d.ts.map +1 -0
  565. package/data/build/dist/host/terminal/broker/conpty-broker-process.js.map +1 -0
  566. package/data/build/dist/host/terminal/broker/conpty-broker-protocol.d.ts.map +1 -0
  567. package/data/build/dist/host/terminal/broker/conpty-broker-protocol.js.map +1 -0
  568. package/data/build/dist/host/terminal/controller-factory.d.ts.map +1 -0
  569. package/data/build/dist/host/terminal/controller-factory.js.map +1 -0
  570. package/data/build/dist/host/terminal/index.d.ts.map +1 -0
  571. package/data/build/dist/host/terminal/index.js.map +1 -0
  572. package/data/build/dist/host/terminal/runtime-adapter.d.ts.map +1 -0
  573. package/data/build/dist/host/terminal/runtime-adapter.js.map +1 -0
  574. package/data/build/dist/host/terminal/runtime-manager.d.ts.map +1 -0
  575. package/data/build/dist/host/terminal/runtime-manager.js.map +1 -0
  576. package/data/build/dist/host/terminal/shell-detection.d.ts.map +1 -0
  577. package/data/build/dist/host/terminal/shell-detection.js.map +1 -0
  578. package/data/build/dist/host/terminal/startup.d.ts.map +1 -0
  579. package/data/build/dist/host/terminal/startup.js.map +1 -0
  580. package/data/build/dist/host/terminal/terminal-controller.d.ts.map +1 -0
  581. package/data/build/dist/host/terminal/terminal-controller.js.map +1 -0
  582. package/data/build/dist/host/terminal/terminal-process-service.d.ts.map +1 -0
  583. package/data/build/dist/host/terminal/terminal-process-service.js.map +1 -0
  584. package/data/build/dist/host/terminal/terminal-process-store.d.ts.map +1 -0
  585. package/data/build/dist/host/terminal/terminal-process-store.js.map +1 -0
  586. package/data/build/dist/host/terminal/terminal-service.d.ts.map +1 -0
  587. package/data/build/dist/host/terminal/terminal-service.js.map +1 -0
  588. package/data/build/dist/host/terminal/terminal-store.d.ts.map +1 -0
  589. package/data/build/dist/host/terminal/terminal-store.js.map +1 -0
  590. package/data/build/dist/index.d.ts +2 -2
  591. package/data/build/dist/index.d.ts.map +1 -0
  592. package/data/build/dist/index.js +2 -2
  593. package/data/build/dist/index.js.map +1 -0
  594. package/data/build/dist/shared/contracts/auth.d.ts.map +1 -0
  595. package/data/build/dist/shared/contracts/auth.js.map +1 -0
  596. package/data/build/dist/shared/contracts/cli-adapter.d.ts +30 -0
  597. package/data/build/dist/shared/contracts/cli-adapter.d.ts.map +1 -0
  598. package/data/build/dist/shared/contracts/cli-adapter.js.map +1 -0
  599. package/data/build/dist/shared/contracts/command-code.d.ts.map +1 -0
  600. package/data/build/dist/shared/contracts/command-code.js.map +1 -0
  601. package/data/build/dist/shared/contracts/config.d.ts +79 -0
  602. package/data/build/dist/shared/contracts/config.d.ts.map +1 -0
  603. package/data/build/dist/shared/contracts/config.js +84 -0
  604. package/data/build/dist/shared/contracts/config.js.map +1 -0
  605. package/data/build/dist/shared/contracts/debug-config.d.ts.map +1 -0
  606. package/data/build/dist/shared/contracts/debug-config.js.map +1 -0
  607. package/data/build/dist/shared/contracts/debug.d.ts.map +1 -0
  608. package/data/build/dist/shared/contracts/debug.js.map +1 -0
  609. package/data/build/dist/shared/contracts/dsh-device.d.ts.map +1 -0
  610. package/data/build/dist/shared/contracts/dsh-device.js.map +1 -0
  611. package/data/build/dist/shared/contracts/errors.d.ts +2 -2
  612. package/data/build/dist/shared/contracts/errors.d.ts.map +1 -0
  613. package/data/build/dist/shared/contracts/errors.js.map +1 -0
  614. package/data/build/dist/shared/contracts/feature.d.ts.map +1 -0
  615. package/data/build/dist/shared/contracts/feature.js.map +1 -0
  616. package/data/build/dist/shared/contracts/file-management.d.ts.map +1 -0
  617. package/data/build/dist/shared/contracts/file-management.js.map +1 -0
  618. package/data/build/dist/shared/contracts/git.d.ts +15 -1
  619. package/data/build/dist/shared/contracts/git.d.ts.map +1 -0
  620. package/data/build/dist/shared/contracts/git.js.map +1 -0
  621. package/data/build/dist/shared/contracts/host-status.d.ts.map +1 -0
  622. package/data/build/dist/shared/contracts/host-status.js.map +1 -0
  623. package/data/build/dist/shared/contracts/lan-access-dsh.d.ts +23 -0
  624. package/data/build/dist/shared/contracts/lan-access-dsh.d.ts.map +1 -0
  625. package/data/build/dist/shared/contracts/lan-access-dsh.js.map +1 -0
  626. package/data/build/dist/shared/contracts/peer-host.d.ts +158 -1
  627. package/data/build/dist/shared/contracts/peer-host.d.ts.map +1 -0
  628. package/data/build/dist/shared/contracts/peer-host.js +73 -0
  629. package/data/build/dist/shared/contracts/peer-host.js.map +1 -0
  630. package/data/build/dist/shared/contracts/signaling.d.ts.map +1 -0
  631. package/data/build/dist/shared/contracts/signaling.js.map +1 -0
  632. package/data/build/dist/shared/contracts/subscription.d.ts.map +1 -0
  633. package/data/build/dist/shared/contracts/subscription.js.map +1 -0
  634. package/data/build/dist/shared/contracts/terminal-process.d.ts.map +1 -0
  635. package/data/build/dist/shared/contracts/terminal-process.js.map +1 -0
  636. package/data/build/dist/shared/contracts/terminal.d.ts.map +1 -0
  637. package/data/build/dist/shared/contracts/terminal.js.map +1 -0
  638. package/data/build/dist/shared/contracts/transport.d.ts.map +1 -0
  639. package/data/build/dist/shared/contracts/transport.js.map +1 -0
  640. package/data/build/dist/shared/contracts/version.d.ts +14 -6
  641. package/data/build/dist/shared/contracts/version.d.ts.map +1 -0
  642. package/data/build/dist/shared/contracts/version.js +23 -8
  643. package/data/build/dist/shared/contracts/version.js.map +1 -0
  644. package/data/build/dist/shared/debug.d.ts.map +1 -0
  645. package/data/build/dist/shared/debug.js.map +1 -0
  646. package/data/build/dist/shared/index.d.ts +5 -5
  647. package/data/build/dist/shared/index.d.ts.map +1 -0
  648. package/data/build/dist/shared/index.js +3 -3
  649. package/data/build/dist/shared/index.js.map +1 -0
  650. package/data/build/dist/transport/carrier.d.ts.map +1 -0
  651. package/data/build/dist/transport/carrier.js.map +1 -0
  652. package/data/build/dist/transport/debug.d.ts.map +1 -0
  653. package/data/build/dist/transport/debug.js +2 -0
  654. package/data/build/dist/transport/debug.js.map +1 -0
  655. package/data/build/dist/transport/dsh-envelope.d.ts.map +1 -0
  656. package/data/build/dist/transport/dsh-envelope.js.map +1 -0
  657. package/data/build/dist/transport/dsh-gateway.d.ts.map +1 -0
  658. package/data/build/dist/transport/dsh-gateway.js.map +1 -0
  659. package/data/build/dist/transport/dsh-session.d.ts.map +1 -0
  660. package/data/build/dist/transport/dsh-session.js.map +1 -0
  661. package/data/build/dist/transport/dsh-transport.d.ts.map +1 -0
  662. package/data/build/dist/transport/dsh-transport.js.map +1 -0
  663. package/data/build/dist/transport/frame.d.ts.map +1 -0
  664. package/data/build/dist/transport/frame.js.map +1 -0
  665. package/data/build/dist/transport/index.d.ts +1 -1
  666. package/data/build/dist/transport/index.d.ts.map +1 -0
  667. package/data/build/dist/transport/index.js +1 -1
  668. package/data/build/dist/transport/index.js.map +1 -0
  669. package/data/build/dist/transport/multiplexer.d.ts.map +1 -0
  670. package/data/build/dist/transport/multiplexer.js.map +1 -0
  671. package/data/build/dist/transport/webrtc-client.d.ts +8 -0
  672. package/data/build/dist/transport/webrtc-client.d.ts.map +1 -0
  673. package/data/build/dist/transport/webrtc-client.js +135 -9
  674. package/data/build/dist/transport/webrtc-client.js.map +1 -0
  675. package/data/build/dist/transport/webrtc-host.d.ts.map +1 -0
  676. package/data/build/dist/transport/webrtc-host.js +5 -1
  677. package/data/build/dist/transport/webrtc-host.js.map +1 -0
  678. package/data/build/dist/typert.host.d.ts.map +1 -0
  679. package/data/build/dist/typert.host.js.map +1 -0
  680. package/data/build/dist/typert.remote-client.d.ts.map +1 -0
  681. package/data/build/dist/typert.remote-client.js.map +1 -0
  682. package/package.json +34 -19
  683. package/profile/README.md +18 -5
  684. package/profile/package.json +3 -3
  685. package/profile/scripts/check-dsh-install.mjs +100 -9
  686. package/profile/version.json +3 -3
  687. package/scripts/check-dsh-install.mjs +98 -17
  688. package/version.json +3 -3
  689. package/data/build/dist/client/host-navigation.d.ts +0 -29
  690. package/data/build/dist/client/host-navigation.js +0 -29
  691. package/data/build/dist/client/peer-host-native-session-ui.d.ts +0 -60
  692. package/data/build/dist/client/peer-host-native-session-ui.js +0 -372
@@ -1,33 +1,108 @@
1
+ import { readFileSync } from 'node:fs'
1
2
  import { readFile } from 'node:fs/promises'
3
+ import { createRequire } from 'node:module'
2
4
  import { spawnSync } from 'node:child_process'
3
- import { fileURLToPath } from 'node:url'
4
5
  import { join } from 'node:path'
6
+ import { fileURLToPath } from 'node:url'
5
7
 
6
8
  const VERSION_PATTERN = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/u
7
9
  const root = fileURLToPath(new URL('../', import.meta.url))
8
10
  const manifest = JSON.parse(await readFile(join(root, 'package.json'), 'utf8'))
9
11
  const compatibility = manifest.engines?.dsh
10
- const actualVersion = readRuntimeDshVersion()
12
+ const detected = detectRuntimeDshVersion()
11
13
 
12
- // 普通 npm/pnpm 开发安装可能没有 DSH 宿主;这种场景没有可校验的目标,
13
- // 不能把插件作为独立 npm 包安装的能力误判为失败。
14
- if (actualVersion === undefined) {
15
- if (process.env.DSH_HOME !== undefined || process.env.DSH_PLUGIN_INSTALL === '1') {
16
- throw new Error('codingns4dsh 安装失败:检测到 DSH 安装上下文,但无法读取当前 DSH 版本')
17
- }
18
- console.warn('codingns4dsh: 未检测到 DSH 宿主,跳过安装期 DSH 兼容性检查')
14
+ // 这个脚本既可以作为 npm 包安装期的门禁运行,也可以手工执行。
15
+ //
16
+ // 关键约束:PATH 上的 `dsh` 只能证明机器上装了某个 DSH,不能证明它就是本次安装
17
+ // 所使用的运行时。桌面宿主经 scrubbedParentEnv() 派生子进程时会剥离全部 DSH_*
18
+ // 变量,命令行启动脚本也可能用绝对路径调用 0.2.x 启动器、同时把旧版 `dsh` 留在
19
+ // PATH 上。把 PATH 来源当作硬门禁会把正常安装误判为不兼容,因此它只用于提示;
20
+ // 真正会阻断的只有能归属到当前运行时的来源。
21
+ if (detected === undefined) {
22
+ console.warn('codingns4dsh: 未检测到当前 DSH 运行时,跳过安装期兼容性检查;运行期仍会再次校验')
19
23
  process.exit(0)
20
24
  }
21
25
 
22
- if (typeof compatibility !== 'string' || !isCompatible(actualVersion, compatibility)) {
23
- throw new Error(`codingns4dsh 安装失败:当前 DSH ${actualVersion} 不在插件支持范围 ${String(compatibility)} 内`)
26
+ if (detected.source === 'path') {
27
+ const verdict = isCompatible(detected.version, compatibility) ? '在' : '不在'
28
+ console.warn(
29
+ `codingns4dsh: PATH 上的 dsh ${detected.version} ${verdict}插件支持范围 ${String(compatibility)} 内,` +
30
+ '但它未必是本次安装所使用的运行时,已跳过阻断',
31
+ )
32
+ process.exit(0)
33
+ }
34
+
35
+ if (typeof compatibility !== 'string' || !isCompatible(detected.version, compatibility)) {
36
+ throw new Error(
37
+ `codingns4dsh 安装失败:当前 DSH ${detected.version} 不在插件支持范围 ${String(compatibility)} 内` +
38
+ `(版本来源:${detected.source})`,
39
+ )
40
+ }
41
+
42
+ console.log(
43
+ `codingns4dsh 安装期版本检查通过:DSH ${detected.version}(来源 ${detected.source}),兼容范围 ${compatibility}`,
44
+ )
45
+
46
+ /**
47
+ * 读取当前 DSH 运行时版本,并标注来源。
48
+ *
49
+ * 优先级:宿主显式注入的版本 → Desktop Runtime 根(app.asar 内真实加载的包)
50
+ * → 从插件目录可解析到的 @deepseek-ai/dsh → PATH 上的 dsh。
51
+ *
52
+ * @returns {{ version: string, source: 'env' | 'runtime' | 'module' | 'path' } | undefined}
53
+ */
54
+ function detectRuntimeDshVersion() {
55
+ const injected = [process.env.DSH_RUNTIME_VERSION, process.env.DSH_VERSION].find(isVersion)
56
+ if (injected !== undefined) return { version: injected, source: 'env' }
57
+
58
+ const fromRuntime = readVersionFromRuntimeRoots()
59
+ if (fromRuntime !== undefined) return { version: fromRuntime, source: 'runtime' }
60
+
61
+ const fromModule = readVersionFromModule()
62
+ if (fromModule !== undefined) return { version: fromModule, source: 'module' }
63
+
64
+ const fromPath = readVersionFromCommand()
65
+ if (fromPath !== undefined) return { version: fromPath, source: 'path' }
66
+
67
+ return undefined
68
+ }
69
+
70
+ /** Electron 把 Resources 根暴露为 process.resourcesPath;纯 Node 下不存在。 */
71
+ function readVersionFromRuntimeRoots() {
72
+ const resourcesRoot = process.resourcesPath
73
+ if (typeof resourcesRoot !== 'string' || resourcesRoot.trim() === '') return undefined
74
+ const runtimeRoots = [
75
+ join(resourcesRoot, 'app.asar', 'dsh'),
76
+ join(resourcesRoot, 'app.asar.unpacked', 'dsh'),
77
+ join(resourcesRoot, 'dsh'),
78
+ ]
79
+ for (const runtimeRoot of runtimeRoots) {
80
+ const version = readDshManifestVersion(
81
+ join(runtimeRoot, 'node_modules', '@deepseek-ai', 'dsh', 'package.json'),
82
+ )
83
+ if (version !== undefined) return version
84
+ }
85
+ return undefined
24
86
  }
25
87
 
26
- console.log(`codingns4dsh 安装期版本检查通过:DSH ${actualVersion},兼容范围 ${compatibility}`)
88
+ /** 插件被装进某个 DSH 运行时后,可从自身位置解析到宿主包清单。 */
89
+ function readVersionFromModule() {
90
+ try {
91
+ const require = createRequire(join(root, 'package.json'))
92
+ return readDshManifestVersion(require.resolve('@deepseek-ai/dsh/package.json'))
93
+ } catch {
94
+ return undefined
95
+ }
96
+ }
27
97
 
28
- function readRuntimeDshVersion() {
29
- const candidates = [process.env.DSH_RUNTIME_VERSION, process.env.DSH_VERSION, readVersionFromCommand()]
30
- return candidates.find((value) => typeof value === 'string' && VERSION_PATTERN.test(value))
98
+ function readDshManifestVersion(manifestPath) {
99
+ try {
100
+ const parsed = JSON.parse(readFileSync(manifestPath, 'utf8'))
101
+ if (parsed.name === '@deepseek-ai/dsh' && isVersion(parsed.version)) return parsed.version
102
+ } catch {
103
+ // 该路径没有 DSH 包时继续尝试下一个来源。
104
+ }
105
+ return undefined
31
106
  }
32
107
 
33
108
  function readVersionFromCommand() {
@@ -44,13 +119,19 @@ function readVersionFromCommand() {
44
119
  }
45
120
  }
46
121
 
122
+ function isVersion(value) {
123
+ return typeof value === 'string' && VERSION_PATTERN.test(value)
124
+ }
125
+
47
126
  function isCompatible(actual, range) {
48
- const match = /^>=([^ ]+) <=([^ ]+)$/u.exec(range)
127
+ const match = typeof range === 'string' ? /^>=([^ ]+)(?: <=([^ ]+))?$/u.exec(range) : undefined
49
128
  if (!match) return false
50
129
  const actualVersion = parseVersion(actual)
51
130
  const minimum = parseVersion(match[1])
131
+ if (!actualVersion || !minimum) return false
132
+ if (match[2] === undefined) return compareVersions(actualVersion, minimum) >= 0
52
133
  const maximum = parseVersion(match[2])
53
- if (!actualVersion || !minimum || !maximum) return false
134
+ if (!maximum) return false
54
135
  return compareVersions(actualVersion, minimum) >= 0 && compareVersions(actualVersion, maximum) <= 0
55
136
  }
56
137
 
package/version.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "pluginVersion": "0.2.0-beta.1",
3
- "dshCompatibility": ">=0.2.0-rc.1 <=0.2.0-rc.1",
4
- "dshTestedVersion": "0.2.0-rc.1",
2
+ "pluginVersion": "0.2.0-beta.2",
3
+ "dshCompatibility": ">=0.2.0-rc.2 <=0.2.0-rc.2",
4
+ "dshTestedVersion": "0.2.0-rc.2",
5
5
  "dshProtocolVersion": 1
6
6
  }
@@ -1,29 +0,0 @@
1
- import type { AggregateHostResult, AggregateWorkspaceSummary, PeerHostSessionRecord } from '../shared/contracts/peer-host.js';
2
- export interface HostNavigationSessionItem {
3
- readonly key: string;
4
- readonly sessionId: string;
5
- readonly title: string;
6
- readonly status: string;
7
- readonly scope: PeerHostSessionRecord['scope'];
8
- }
9
- export interface HostNavigationWorkspaceItem {
10
- readonly key: string;
11
- readonly workspaceId: string;
12
- readonly label: string;
13
- readonly hostLabel: string;
14
- readonly availability: AggregateWorkspaceSummary['availability'];
15
- readonly sessions: readonly HostNavigationSessionItem[];
16
- }
17
- export interface HostNavigationHostItem {
18
- readonly key: string;
19
- readonly hostId: string;
20
- readonly targetHostId: string | null;
21
- readonly label: string;
22
- readonly availability: AggregateHostResult['availability'];
23
- readonly errorCode: AggregateHostResult['errorCode'];
24
- readonly workspaces: readonly HostNavigationWorkspaceItem[];
25
- }
26
- /** 将聚合 DTO 转成原生导航可消费的数据;标签不参与资源身份。 */
27
- export declare function buildHostNavigation(results: readonly AggregateHostResult[]): readonly HostNavigationHostItem[];
28
- export declare function hostKey(hostId: string, targetHostId: string | null): string;
29
- //# sourceMappingURL=host-navigation.d.ts.map
@@ -1,29 +0,0 @@
1
- /** 将聚合 DTO 转成原生导航可消费的数据;标签不参与资源身份。 */
2
- export function buildHostNavigation(results) {
3
- return results.map((host) => ({
4
- key: hostKey(host.hostId, host.targetHostId),
5
- hostId: host.hostId,
6
- targetHostId: host.targetHostId,
7
- label: host.hostLabel,
8
- availability: host.availability,
9
- errorCode: host.errorCode,
10
- workspaces: host.workspaces.map((workspace) => ({
11
- key: workspace.key,
12
- workspaceId: workspace.workspaceId,
13
- label: `${workspace.displayName} (${workspace.hostLabel})`,
14
- hostLabel: workspace.hostLabel,
15
- availability: workspace.availability,
16
- sessions: workspace.sessions.map((session) => ({
17
- key: `${workspace.key}:${session.scope.sessionId ?? 'none'}`,
18
- sessionId: session.scope.sessionId ?? '',
19
- title: session.title,
20
- status: session.status,
21
- scope: session.scope,
22
- })),
23
- })),
24
- }));
25
- }
26
- export function hostKey(hostId, targetHostId) {
27
- return `${hostId}:${targetHostId ?? 'current'}`;
28
- }
29
- //# sourceMappingURL=host-navigation.js.map
@@ -1,60 +0,0 @@
1
- import type { AggregateHostResult, HostScope } from '../shared/contracts/peer-host.js';
2
- import type { PeerHostEventSocketFactory, PeerHostScopedClient } from './peer-host-scoped-client.js';
3
- import type { PeerHostSessionController } from './peer-host-session-controller.js';
4
- export declare const PEER_HOST_NAVIGATION_ATTRIBUTE = "data-codingns-peer-host-navigation";
5
- export declare const PEER_HOST_SESSION_ATTRIBUTE = "data-codingns-peer-host-session";
6
- export declare const PEER_HOST_STATUS_ATTRIBUTE = "data-codingns-peer-host-status";
7
- export type PeerHostNativeUiStatus = 'ready' | 'degraded' | 'unavailable';
8
- export interface PeerHostNativeUiState {
9
- readonly status: PeerHostNativeUiStatus;
10
- readonly reason: string;
11
- }
12
- export interface PeerHostNativeNavigationOptions {
13
- readonly document?: Document;
14
- readonly controller: PeerHostSessionController;
15
- readonly onSelect?: (scope: HostScope) => void | Promise<void>;
16
- readonly onStatus?: (state: PeerHostNativeUiState) => void;
17
- }
18
- export interface PeerHostNativeNavigationController {
19
- refresh(results: readonly AggregateHostResult[]): void;
20
- setStatus(state: PeerHostNativeUiState): void;
21
- dispose(): void;
22
- readonly state: PeerHostNativeUiState;
23
- }
24
- /** 仅探测,不修改 DOM;供能力诊断和版本 fixture 使用。 */
25
- export declare function probePeerHostNativeNavigation(dom?: Document): PeerHostNativeUiState;
26
- /** 仅探测会话容器,不触发请求。 */
27
- export declare function probePeerHostNativeSession(dom?: Document): PeerHostNativeUiState;
28
- /**
29
- * 将聚合导航挂到 DSH 已声明的 tree 容器。
30
- *
31
- * 这里不猜 React Fiber 或版本专属 class。只有同时存在 tree 和至少一个
32
- * treeitem 才认为原生导航扩展点可用;否则保留明确的降级状态,不创建伪造
33
- * 的工作区数据。
34
- */
35
- export declare function startPeerHostNativeNavigation(options: PeerHostNativeNavigationOptions): PeerHostNativeNavigationController;
36
- export interface PeerHostNativeSessionOptions {
37
- readonly document?: Document;
38
- readonly controller: PeerHostSessionController;
39
- readonly client: PeerHostScopedClient;
40
- readonly socketFactory?: PeerHostEventSocketFactory;
41
- readonly onStatus?: (state: PeerHostNativeUiState) => void;
42
- }
43
- export interface PeerHostNativeSessionController {
44
- open(scope: HostScope): Promise<void>;
45
- close(): void;
46
- send(body: string): Promise<void>;
47
- stop(): Promise<void>;
48
- replyPermission(body: string): Promise<void>;
49
- answerQuestion(body: string): Promise<void>;
50
- readonly state: PeerHostNativeUiState;
51
- }
52
- /**
53
- * 远端会话的原生三栏适配器。
54
- *
55
- * DSH 目前没有公开的 HostScope 会话 store 注入点,因此消息先落到当前
56
- * conversation 容器中的插件节点。这个节点与原生布局同层渲染,明确标记
57
- * 来源和作用域;若容器探测失败则报告 degraded,不把 iframe 当作原生 UI。
58
- */
59
- export declare function startPeerHostNativeSession(options: PeerHostNativeSessionOptions): PeerHostNativeSessionController;
60
- //# sourceMappingURL=peer-host-native-session-ui.d.ts.map
@@ -1,372 +0,0 @@
1
- import { buildHostNavigation } from './host-navigation.js';
2
- export const PEER_HOST_NAVIGATION_ATTRIBUTE = 'data-codingns-peer-host-navigation';
3
- export const PEER_HOST_SESSION_ATTRIBUTE = 'data-codingns-peer-host-session';
4
- export const PEER_HOST_STATUS_ATTRIBUTE = 'data-codingns-peer-host-status';
5
- /** 仅探测,不修改 DOM;供能力诊断和版本 fixture 使用。 */
6
- export function probePeerHostNativeNavigation(dom) {
7
- return resolveNavigationState(dom);
8
- }
9
- /** 仅探测会话容器,不触发请求。 */
10
- export function probePeerHostNativeSession(dom) {
11
- return resolveSessionState(dom);
12
- }
13
- /**
14
- * 将聚合导航挂到 DSH 已声明的 tree 容器。
15
- *
16
- * 这里不猜 React Fiber 或版本专属 class。只有同时存在 tree 和至少一个
17
- * treeitem 才认为原生导航扩展点可用;否则保留明确的降级状态,不创建伪造
18
- * 的工作区数据。
19
- */
20
- export function startPeerHostNativeNavigation(options) {
21
- const dom = options.document ?? (typeof document === 'undefined' ? undefined : document);
22
- let currentState = resolveNavigationState(dom);
23
- let disposed = false;
24
- let latestResults = [];
25
- let overrideState;
26
- const report = (state) => {
27
- currentState = state;
28
- options.onStatus?.(state);
29
- };
30
- const render = () => {
31
- if (disposed || dom === undefined)
32
- return;
33
- const state = overrideState ?? resolveNavigationState(dom);
34
- report(state);
35
- removeNodes(dom, PEER_HOST_NAVIGATION_ATTRIBUTE);
36
- // 清理旧版本曾插入的状态节点;降级信息不应残留在 DSH 原生工作区树顶部。
37
- removeNodes(dom, PEER_HOST_STATUS_ATTRIBUTE);
38
- if (state.status !== 'ready') {
39
- // 原生工作区树属于 DSH 宿主;降级信息只通过 controller.state/onStatus
40
- // 暴露,不能把插件错误节点插入宿主导航顶部,避免污染单 Host UI。
41
- return;
42
- }
43
- const tree = findNativeTree(dom);
44
- if (tree === undefined)
45
- return;
46
- const root = dom.createElement('section');
47
- root.setAttribute(PEER_HOST_NAVIGATION_ATTRIBUTE, '');
48
- root.setAttribute('aria-label', 'PeerHost 工作区与会话');
49
- root.style.display = 'contents';
50
- const navigation = buildHostNavigation(latestResults);
51
- for (const host of navigation)
52
- root.appendChild(renderHost(dom, host, options.onSelect));
53
- tree.appendChild(root);
54
- };
55
- const controller = {
56
- get state() { return currentState; },
57
- refresh(results) {
58
- latestResults = results;
59
- overrideState = undefined;
60
- render();
61
- },
62
- setStatus(state) {
63
- overrideState = state;
64
- render();
65
- },
66
- dispose() {
67
- if (disposed)
68
- return;
69
- disposed = true;
70
- if (dom !== undefined) {
71
- removeNodes(dom, PEER_HOST_NAVIGATION_ATTRIBUTE);
72
- removeNodes(dom, PEER_HOST_STATUS_ATTRIBUTE);
73
- removeNodes(dom, PEER_HOST_SESSION_ATTRIBUTE);
74
- }
75
- },
76
- };
77
- render();
78
- return controller;
79
- }
80
- /**
81
- * 远端会话的原生三栏适配器。
82
- *
83
- * DSH 目前没有公开的 HostScope 会话 store 注入点,因此消息先落到当前
84
- * conversation 容器中的插件节点。这个节点与原生布局同层渲染,明确标记
85
- * 来源和作用域;若容器探测失败则报告 degraded,不把 iframe 当作原生 UI。
86
- */
87
- export function startPeerHostNativeSession(options) {
88
- const dom = options.document ?? (typeof document === 'undefined' ? undefined : document);
89
- let activeScope = null;
90
- let subscription;
91
- let currentState = resolveSessionState(dom);
92
- let panel;
93
- const report = (state) => {
94
- currentState = state;
95
- options.onStatus?.(state);
96
- };
97
- const open = async (scope) => {
98
- close();
99
- activeScope = scope;
100
- const root = findConversationRoot(dom);
101
- if (root === undefined) {
102
- report({ status: 'degraded', reason: '未探测到 DSH 原生 conversation 容器' });
103
- return;
104
- }
105
- panel = createSessionPanel(dom, scope);
106
- root.prepend(panel);
107
- panel.appendChild(createChatControls(dom, async (action, body) => {
108
- try {
109
- const response = action === 'send'
110
- ? await options.controller.sendMessage(scope, body)
111
- : action === 'stop'
112
- ? await options.controller.stop(scope)
113
- : action === 'permission'
114
- ? await options.controller.replyPermission(scope, body)
115
- : await options.controller.answerQuestion(scope, body);
116
- if (isActive(scope))
117
- appendNotice(panel, response.body || '已提交');
118
- }
119
- catch (error) {
120
- if (isActive(scope))
121
- appendNotice(panel, `操作失败:${error instanceof Error ? error.message : String(error)}`);
122
- }
123
- }));
124
- report({ status: 'ready', reason: '已绑定 PeerHost 原生会话容器' });
125
- try {
126
- const response = await options.controller.loadHistory(scope);
127
- if (!isActive(scope))
128
- return;
129
- appendHistory(panel, response.body);
130
- if (options.socketFactory !== undefined) {
131
- subscription = await options.controller.subscribe(scope, options.socketFactory, (event) => {
132
- if (isActive(scope))
133
- appendEvent(panel, event);
134
- });
135
- // 建立连接后立即登记会话订阅;ScopedClient 会在重连后只重放此类幂等订阅。
136
- subscription.send('session.subscribe');
137
- panel.appendChild(createToolControls(dom, async (kind, body) => {
138
- try {
139
- if (!isActive(scope) || subscription === undefined)
140
- return;
141
- if (kind === 'terminal.subscribe')
142
- subscription.send('terminal.subscribe', parseJsonObject(body));
143
- else if (kind === 'terminal.input')
144
- subscription.terminalInput(parseJsonPayload(body, 'data'));
145
- else if (kind === 'terminal.resize')
146
- subscription.terminalResize(parseJsonPayload(body, 'cols'));
147
- else if (kind === 'terminal.close')
148
- subscription.terminalClose(parseJsonObject(body));
149
- else if (kind === 'rightTool.subscribe')
150
- subscription.rightToolSubscribe(parseJsonObject(body));
151
- else if (kind === 'rightTool.refresh')
152
- subscription.rightToolRefresh(parseJsonObject(body));
153
- else
154
- subscription.rightToolClose(parseJsonObject(body));
155
- }
156
- catch (error) {
157
- if (isActive(scope))
158
- appendNotice(panel, `工具操作失败:${error instanceof Error ? error.message : String(error)}`);
159
- }
160
- }));
161
- }
162
- else {
163
- appendNotice(panel, 'PeerHost 实时工具通道不可用,终端和右侧工具保持降级');
164
- }
165
- }
166
- catch (error) {
167
- if (isActive(scope))
168
- appendNotice(panel, `远端会话加载失败:${error instanceof Error ? error.message : String(error)}`);
169
- }
170
- };
171
- const close = () => {
172
- subscription?.close();
173
- subscription = undefined;
174
- panel?.remove();
175
- panel = undefined;
176
- activeScope = null;
177
- };
178
- const run = async (operation) => {
179
- const scope = activeScope;
180
- if (scope === null)
181
- throw new Error('尚未选择 PeerHost 会话');
182
- await operation(scope);
183
- };
184
- const api = {
185
- get state() { return currentState; },
186
- open,
187
- close,
188
- send: (body) => run((scope) => options.controller.sendMessage(scope, body)),
189
- stop: () => run((scope) => options.controller.stop(scope)),
190
- replyPermission: (body) => run((scope) => options.controller.replyPermission(scope, body)),
191
- answerQuestion: (body) => run((scope) => options.controller.answerQuestion(scope, body)),
192
- };
193
- report(currentState);
194
- return api;
195
- function isActive(scope) {
196
- return activeScope !== null && activeScope.scopeGeneration === scope.scopeGeneration
197
- && activeScope.hostId === scope.hostId && activeScope.targetHostId === scope.targetHostId
198
- && activeScope.workspaceId === scope.workspaceId && activeScope.sessionId === scope.sessionId;
199
- }
200
- }
201
- function resolveNavigationState(dom) {
202
- return findNativeTree(dom) === undefined
203
- ? { status: 'degraded', reason: '未探测到 DSH 原生工作区树,PeerHost 导航暂不可用' }
204
- : { status: 'ready', reason: '已探测到 DSH 原生工作区树' };
205
- }
206
- function resolveSessionState(dom) {
207
- return findConversationRoot(dom) === undefined
208
- ? { status: 'degraded', reason: '未探测到 DSH 原生 conversation 容器' }
209
- : { status: 'ready', reason: '已探测到 DSH 原生 conversation 容器' };
210
- }
211
- function findNativeTree(dom) {
212
- if (dom === undefined)
213
- return undefined;
214
- const trees = [...dom.querySelectorAll('[role="tree"]')];
215
- return trees.find((tree) => tree.querySelector('[role="treeitem"]') !== null);
216
- }
217
- function findConversationRoot(dom) {
218
- if (dom === undefined)
219
- return undefined;
220
- const composer = dom.querySelector('[data-composer-card]');
221
- if (composer === null)
222
- return undefined;
223
- return composer.closest('[data-conversation-content],main') ?? composer.parentElement ?? undefined;
224
- }
225
- function renderHost(dom, host, onSelect) {
226
- const section = dom.createElement('div');
227
- section.dataset.hostKey = host.key;
228
- section.dataset.hostAvailability = host.availability;
229
- section.style.display = 'contents';
230
- const heading = dom.createElement('div');
231
- heading.textContent = host.label;
232
- heading.setAttribute('data-codingns-peer-host-host', '');
233
- section.appendChild(heading);
234
- for (const workspace of host.workspaces) {
235
- const workspaceNode = dom.createElement('div');
236
- workspaceNode.textContent = workspace.label;
237
- workspaceNode.setAttribute('data-codingns-peer-host-workspace', workspace.key);
238
- section.appendChild(workspaceNode);
239
- for (const session of workspace.sessions) {
240
- const button = dom.createElement('button');
241
- button.type = 'button';
242
- button.textContent = session.title;
243
- button.dataset.codingnsPeerHostScope = JSON.stringify(session.scope);
244
- button.setAttribute(PEER_HOST_SESSION_ATTRIBUTE, '');
245
- button.addEventListener('click', () => { void onSelect?.(session.scope); });
246
- section.appendChild(button);
247
- }
248
- }
249
- return section;
250
- }
251
- function createSessionPanel(dom, scope) {
252
- const panel = dom.createElement('section');
253
- panel.setAttribute(PEER_HOST_SESSION_ATTRIBUTE, '');
254
- panel.setAttribute('aria-label', `PeerHost 会话 ${scope.sessionId ?? ''}`);
255
- panel.dataset.codingnsPeerHostScope = JSON.stringify(scope);
256
- panel.style.padding = '8px 12px';
257
- panel.style.borderBottom = '1px solid var(--dsw-alias-border-l2, currentColor)';
258
- return panel;
259
- }
260
- function createChatControls(dom, run) {
261
- const controls = dom.createElement('div');
262
- controls.setAttribute('data-codingns-peer-host-chat', '');
263
- const input = dom.createElement('textarea');
264
- input.setAttribute('aria-label', 'PeerHost 消息');
265
- input.rows = 2;
266
- input.style.width = '100%';
267
- input.style.resize = 'vertical';
268
- const send = button(dom, '发送', 'send');
269
- const stop = button(dom, '停止', 'stop');
270
- const permission = button(dom, '权限回复', 'permission');
271
- const question = button(dom, '回答问题', 'question');
272
- const submit = (action) => {
273
- const body = input.value.trim();
274
- if (action !== 'stop' && body === '')
275
- return;
276
- if (action !== 'stop')
277
- input.value = '';
278
- void run(action, body);
279
- };
280
- send.addEventListener('click', () => submit('send'));
281
- stop.addEventListener('click', () => submit('stop'));
282
- permission.addEventListener('click', () => submit('permission'));
283
- question.addEventListener('click', () => submit('question'));
284
- input.addEventListener('keydown', (event) => {
285
- if (event.key !== 'Enter' || event.shiftKey || event.isComposing)
286
- return;
287
- event.preventDefault();
288
- submit('send');
289
- });
290
- controls.append(input, send, stop, permission, question);
291
- return controls;
292
- }
293
- function button(dom, label, action) {
294
- const element = dom.createElement('button');
295
- element.type = 'button';
296
- element.textContent = label;
297
- element.dataset.codingnsPeerHostAction = action;
298
- return element;
299
- }
300
- function appendHistory(panel, body) {
301
- let value;
302
- try {
303
- value = JSON.parse(body);
304
- }
305
- catch {
306
- appendNotice(panel, '远端历史响应不是合法 JSON');
307
- return;
308
- }
309
- const records = Array.isArray(value) ? value : isRecord(value) && Array.isArray(value.messages) ? value.messages : [];
310
- for (const record of records)
311
- appendRecord(panel, record);
312
- }
313
- function appendEvent(panel, event) {
314
- if (panel === undefined)
315
- return;
316
- appendRecord(panel, event);
317
- }
318
- function appendRecord(panel, value) {
319
- const item = panel.ownerDocument.createElement('div');
320
- item.setAttribute('data-codingns-peer-host-message', '');
321
- item.textContent = isRecord(value)
322
- ? typeof value.text === 'string' ? value.text : typeof value.content === 'string' ? value.content : JSON.stringify(value)
323
- : String(value);
324
- panel.appendChild(item);
325
- }
326
- function appendNotice(panel, text) {
327
- if (panel === undefined)
328
- return;
329
- appendRecord(panel, { text });
330
- }
331
- function createToolControls(dom, run) {
332
- const root = dom.createElement('div');
333
- root.setAttribute('data-codingns-peer-host-tools', '');
334
- const input = dom.createElement('input');
335
- input.type = 'text';
336
- input.setAttribute('aria-label', 'PeerHost 工具参数');
337
- input.placeholder = '{"terminalId":"...","data":"ls\\n"}';
338
- const actions = [
339
- ['terminal.subscribe', '订阅终端'], ['terminal.input', '终端输入'], ['terminal.resize', '终端调整'], ['terminal.close', '关闭终端'],
340
- ['rightTool.subscribe', '打开右侧工具'], ['rightTool.refresh', '刷新右侧工具'], ['rightTool.close', '关闭右侧工具'],
341
- ];
342
- for (const [action, label] of actions) {
343
- const control = dom.createElement('button');
344
- control.type = 'button';
345
- control.textContent = label;
346
- control.dataset.codingnsPeerHostToolAction = action;
347
- control.addEventListener('click', () => { void run(action, input.value.trim() || '{}'); });
348
- root.appendChild(control);
349
- }
350
- root.prepend(input);
351
- return root;
352
- }
353
- function parseJsonObject(body) {
354
- try {
355
- const value = JSON.parse(body);
356
- return isRecord(value) ? value : {};
357
- }
358
- catch {
359
- return {};
360
- }
361
- }
362
- function parseJsonPayload(body, fallbackKey) {
363
- const value = parseJsonObject(body);
364
- return Object.keys(value).length > 0 ? value : { [fallbackKey]: body };
365
- }
366
- function removeNodes(dom, attribute) {
367
- dom.querySelectorAll(`[${attribute}]`).forEach((node) => node.remove());
368
- }
369
- function isRecord(value) {
370
- return typeof value === 'object' && value !== null && !Array.isArray(value);
371
- }
372
- //# sourceMappingURL=peer-host-native-session-ui.js.map