@yadsh/dsh-qa-surface 0.2.0 → 0.4.0

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 (325) hide show
  1. package/README.md +236 -20
  2. package/compatibility.json +11 -3
  3. package/lib/account-remotes.js +100 -0
  4. package/lib/account-remotes.js.map +1 -0
  5. package/lib/accounts/credentials.js +27 -0
  6. package/lib/accounts/credentials.js.map +1 -0
  7. package/lib/accounts/errors.js +9 -0
  8. package/lib/accounts/errors.js.map +1 -0
  9. package/lib/accounts/file.js +101 -0
  10. package/lib/accounts/file.js.map +1 -0
  11. package/lib/accounts/index.js +2 -0
  12. package/lib/accounts/index.js.map +1 -0
  13. package/lib/accounts/store.js +461 -0
  14. package/lib/accounts/store.js.map +1 -0
  15. package/lib/accounts/token.js +61 -0
  16. package/lib/accounts/token.js.map +1 -0
  17. package/lib/attachment-rules.js +111 -0
  18. package/lib/attachment-rules.js.map +1 -0
  19. package/lib/attestation.js.map +1 -1
  20. package/lib/cli.js +256 -0
  21. package/lib/cli.js.map +1 -0
  22. package/lib/client/QaAccountsController.js +359 -0
  23. package/lib/client/QaAccountsController.js.map +1 -0
  24. package/lib/client/QaSessionController.js +238 -180
  25. package/lib/client/QaSessionController.js.map +1 -1
  26. package/lib/client/QaSurface.js +281 -105
  27. package/lib/client/QaSurface.js.map +1 -1
  28. package/lib/client/QaTranscriptAdapter.js +95 -244
  29. package/lib/client/QaTranscriptAdapter.js.map +1 -1
  30. package/lib/client/attachments.js +150 -0
  31. package/lib/client/attachments.js.map +1 -0
  32. package/lib/client/attestation.js +7 -1
  33. package/lib/client/attestation.js.map +1 -1
  34. package/lib/client/base64.js +16 -0
  35. package/lib/client/base64.js.map +1 -0
  36. package/lib/client/chat-files.js +48 -0
  37. package/lib/client/chat-files.js.map +1 -0
  38. package/lib/client/components/Markdown.js +54 -13
  39. package/lib/client/components/Markdown.js.map +1 -1
  40. package/lib/client/components/QaAuthGate.js +40 -0
  41. package/lib/client/components/QaAuthGate.js.map +1 -0
  42. package/lib/client/components/QaChangelog.js +131 -0
  43. package/lib/client/components/QaChangelog.js.map +1 -0
  44. package/lib/client/components/QaComposer.js +56 -74
  45. package/lib/client/components/QaComposer.js.map +1 -1
  46. package/lib/client/components/QaFileAttachment.js +19 -0
  47. package/lib/client/components/QaFileAttachment.js.map +1 -0
  48. package/lib/client/components/QaFilesPanel.js +45 -0
  49. package/lib/client/components/QaFilesPanel.js.map +1 -0
  50. package/lib/client/components/QaHeader.js +34 -0
  51. package/lib/client/components/QaHeader.js.map +1 -0
  52. package/lib/client/components/QaMessage.js +61 -18
  53. package/lib/client/components/QaMessage.js.map +1 -1
  54. package/lib/client/components/QaModal.js +31 -0
  55. package/lib/client/components/QaModal.js.map +1 -0
  56. package/lib/client/components/QaProfile.js +64 -0
  57. package/lib/client/components/QaProfile.js.map +1 -0
  58. package/lib/client/components/QaRightRail.js +15 -0
  59. package/lib/client/components/QaRightRail.js.map +1 -0
  60. package/lib/client/components/QaSidebar.js +68 -20
  61. package/lib/client/components/QaSidebar.js.map +1 -1
  62. package/lib/client/components/QaSourcesPanel.js +127 -0
  63. package/lib/client/components/QaSourcesPanel.js.map +1 -0
  64. package/lib/client/components/QaTurnRail.js +296 -0
  65. package/lib/client/components/QaTurnRail.js.map +1 -0
  66. package/lib/client/components/QaWelcomeNotice.js +125 -0
  67. package/lib/client/components/QaWelcomeNotice.js.map +1 -0
  68. package/lib/client/components/QaWidthHandle.js +147 -0
  69. package/lib/client/components/QaWidthHandle.js.map +1 -0
  70. package/lib/client/components/QaWorkGroup.js +19 -20
  71. package/lib/client/components/QaWorkGroup.js.map +1 -1
  72. package/lib/client/components/source-refs.js +78 -0
  73. package/lib/client/components/source-refs.js.map +1 -0
  74. package/lib/client/components/surface-utils.js +28 -0
  75. package/lib/client/components/surface-utils.js.map +1 -0
  76. package/lib/client/components/thinking-phrases.js +24 -0
  77. package/lib/client/components/thinking-phrases.js.map +1 -0
  78. package/lib/client/create-session.js +26 -0
  79. package/lib/client/create-session.js.map +1 -0
  80. package/lib/client/failure-copy.js +63 -0
  81. package/lib/client/failure-copy.js.map +1 -0
  82. package/lib/client/index.js +135 -16
  83. package/lib/client/index.js.map +1 -1
  84. package/lib/client/project-session-state.js +78 -0
  85. package/lib/client/project-session-state.js.map +1 -0
  86. package/lib/client/prompt-content.js +54 -0
  87. package/lib/client/prompt-content.js.map +1 -0
  88. package/lib/client/session-admission.js +38 -0
  89. package/lib/client/session-admission.js.map +1 -0
  90. package/lib/client/session-assets.js +52 -0
  91. package/lib/client/session-assets.js.map +1 -0
  92. package/lib/client/session-sources.js +61 -0
  93. package/lib/client/session-sources.js.map +1 -0
  94. package/lib/client/settings/card.js +143 -0
  95. package/lib/client/settings/card.js.map +1 -0
  96. package/lib/client/settings/fields.js +145 -0
  97. package/lib/client/settings/fields.js.map +1 -0
  98. package/lib/client/settings/format.js +255 -0
  99. package/lib/client/settings/format.js.map +1 -0
  100. package/lib/client/settings/sections/access.js +25 -0
  101. package/lib/client/settings/sections/access.js.map +1 -0
  102. package/lib/client/settings/sections/accounts.js +47 -0
  103. package/lib/client/settings/sections/accounts.js.map +1 -0
  104. package/lib/client/settings/sections/attachments.js +46 -0
  105. package/lib/client/settings/sections/attachments.js.map +1 -0
  106. package/lib/client/settings/sections/branding.js +28 -0
  107. package/lib/client/settings/sections/branding.js.map +1 -0
  108. package/lib/client/settings/sections/common.js +20 -0
  109. package/lib/client/settings/sections/common.js.map +1 -0
  110. package/lib/client/settings/sections/embedding.js +19 -0
  111. package/lib/client/settings/sections/embedding.js.map +1 -0
  112. package/lib/client/settings/sections/interface.js +60 -0
  113. package/lib/client/settings/sections/interface.js.map +1 -0
  114. package/lib/client/settings/sections/lockdown.js +82 -0
  115. package/lib/client/settings/sections/lockdown.js.map +1 -0
  116. package/lib/client/settings/sections/session.js +53 -0
  117. package/lib/client/settings/sections/session.js.map +1 -0
  118. package/lib/client/settings/sections/sources.js +72 -0
  119. package/lib/client/settings/sections/sources.js.map +1 -0
  120. package/lib/client/settings/sections/status.js +37 -0
  121. package/lib/client/settings/sections/status.js.map +1 -0
  122. package/lib/client/settings/sections.js +23 -0
  123. package/lib/client/settings/sections.js.map +1 -0
  124. package/lib/client/settings/styles.js +57 -0
  125. package/lib/client/settings/styles.js.map +1 -0
  126. package/lib/client/settlement.js +24 -0
  127. package/lib/client/settlement.js.map +1 -0
  128. package/lib/client/stream-publisher.js +47 -0
  129. package/lib/client/stream-publisher.js.map +1 -0
  130. package/lib/client/styles.js +225 -17
  131. package/lib/client/styles.js.map +1 -1
  132. package/lib/client/tool-presentation.js +102 -0
  133. package/lib/client/tool-presentation.js.map +1 -0
  134. package/lib/client/turn-sources.js +98 -0
  135. package/lib/client/turn-sources.js.map +1 -0
  136. package/lib/client/types.js +2 -0
  137. package/lib/client/types.js.map +1 -1
  138. package/lib/client/use-right-rail.js +96 -0
  139. package/lib/client/use-right-rail.js.map +1 -0
  140. package/lib/client/use-session-ui-state.js +75 -0
  141. package/lib/client/use-session-ui-state.js.map +1 -0
  142. package/lib/client/use-transcript-view.js +44 -0
  143. package/lib/client/use-transcript-view.js.map +1 -0
  144. package/lib/client.js +9052 -1345
  145. package/lib/client.js.map +1 -1
  146. package/lib/config-resolvers/accounts.js +60 -0
  147. package/lib/config-resolvers/accounts.js.map +1 -0
  148. package/lib/config-resolvers/attachments.js +28 -0
  149. package/lib/config-resolvers/attachments.js.map +1 -0
  150. package/lib/config-resolvers/basics.js +59 -0
  151. package/lib/config-resolvers/basics.js.map +1 -0
  152. package/lib/config-resolvers/defaults.js +132 -0
  153. package/lib/config-resolvers/defaults.js.map +1 -0
  154. package/lib/config-resolvers/lockdown.js +79 -0
  155. package/lib/config-resolvers/lockdown.js.map +1 -0
  156. package/lib/config-resolvers/session.js +42 -0
  157. package/lib/config-resolvers/session.js.map +1 -0
  158. package/lib/config-resolvers/shared.js +42 -0
  159. package/lib/config-resolvers/shared.js.map +1 -0
  160. package/lib/config-resolvers/sources.js +81 -0
  161. package/lib/config-resolvers/sources.js.map +1 -0
  162. package/lib/config-resolvers/ui.js +20 -0
  163. package/lib/config-resolvers/ui.js.map +1 -0
  164. package/lib/config.js +279 -102
  165. package/lib/config.js.map +1 -1
  166. package/lib/entry-redirect.js +45 -0
  167. package/lib/entry-redirect.js.map +1 -0
  168. package/lib/host-route.js +25 -1
  169. package/lib/host-route.js.map +1 -1
  170. package/lib/index.js +258 -23
  171. package/lib/index.js.map +1 -1
  172. package/lib/launch-token.js +42 -0
  173. package/lib/launch-token.js.map +1 -0
  174. package/lib/profile.js +214 -0
  175. package/lib/profile.js.map +1 -0
  176. package/lib/prompt-notes.js +231 -0
  177. package/lib/prompt-notes.js.map +1 -0
  178. package/lib/provenance/collector.js +40 -0
  179. package/lib/provenance/collector.js.map +1 -0
  180. package/lib/provenance/connectors.js +147 -0
  181. package/lib/provenance/connectors.js.map +1 -0
  182. package/lib/provenance/dedupe.js +89 -0
  183. package/lib/provenance/dedupe.js.map +1 -0
  184. package/lib/provenance/extractors.js +340 -0
  185. package/lib/provenance/extractors.js.map +1 -0
  186. package/lib/provenance/file-preview.js +39 -0
  187. package/lib/provenance/file-preview.js.map +1 -0
  188. package/lib/provenance/host-store.js +387 -0
  189. package/lib/provenance/host-store.js.map +1 -0
  190. package/lib/provenance/index.js +9 -0
  191. package/lib/provenance/index.js.map +1 -0
  192. package/lib/provenance/normalize.js +128 -0
  193. package/lib/provenance/normalize.js.map +1 -0
  194. package/lib/provenance/reported.js +53 -0
  195. package/lib/provenance/reported.js.map +1 -0
  196. package/lib/provenance/types.js +2 -0
  197. package/lib/provenance/types.js.map +1 -0
  198. package/lib/resolve-config.js +35 -249
  199. package/lib/resolve-config.js.map +1 -1
  200. package/lib/secure-session.js +122 -14
  201. package/lib/secure-session.js.map +1 -1
  202. package/lib/shared/session-key.js +18 -0
  203. package/lib/shared/session-key.js.map +1 -0
  204. package/lib/shared/settings.js +10 -0
  205. package/lib/shared/settings.js.map +1 -0
  206. package/lib/thinking-phrases.js +68 -0
  207. package/lib/thinking-phrases.js.map +1 -0
  208. package/lib/typert.host.js +749 -11
  209. package/lib/typert.remote-client.d.ts +23 -3
  210. package/lib/typert.remote-client.js +593 -6
  211. package/lib/types/account-remotes.d.ts +42 -0
  212. package/lib/types/accounts/credentials.d.ts +14 -0
  213. package/lib/types/accounts/errors.d.ts +11 -0
  214. package/lib/types/accounts/file.d.ts +82 -0
  215. package/lib/types/accounts/index.d.ts +2 -0
  216. package/lib/types/accounts/store.d.ts +144 -0
  217. package/lib/types/accounts/token.d.ts +31 -0
  218. package/lib/types/attachment-rules.d.ts +44 -0
  219. package/lib/types/attestation.d.ts +1 -1
  220. package/lib/types/cli.d.ts +9 -0
  221. package/lib/types/client/QaAccountsController.d.ts +102 -0
  222. package/lib/types/client/QaConfigController.d.ts +1 -1
  223. package/lib/types/client/QaSessionController.d.ts +61 -22
  224. package/lib/types/client/QaSurface.d.ts +14 -3
  225. package/lib/types/client/QaTranscriptAdapter.d.ts +5 -10
  226. package/lib/types/client/attachments.d.ts +54 -0
  227. package/lib/types/client/base64.d.ts +10 -0
  228. package/lib/types/client/chat-files.d.ts +30 -0
  229. package/lib/types/client/components/Markdown.d.ts +11 -1
  230. package/lib/types/client/components/QaAgentsDrawer.d.ts +1 -1
  231. package/lib/types/client/components/QaAuthGate.d.ts +15 -0
  232. package/lib/types/client/components/QaChangelog.d.ts +21 -0
  233. package/lib/types/client/components/QaComposer.d.ts +8 -4
  234. package/lib/types/client/components/QaFileAttachment.d.ts +14 -0
  235. package/lib/types/client/components/QaFilesPanel.d.ts +15 -0
  236. package/lib/types/client/components/QaHeader.d.ts +41 -0
  237. package/lib/types/client/components/QaMessage.d.ts +12 -3
  238. package/lib/types/client/components/QaModal.d.ts +26 -0
  239. package/lib/types/client/components/QaProfile.d.ts +25 -0
  240. package/lib/types/client/components/QaRightRail.d.ts +23 -0
  241. package/lib/types/client/components/QaSidebar.d.ts +44 -2
  242. package/lib/types/client/components/QaSourcesPanel.d.ts +23 -0
  243. package/lib/types/client/components/QaTurnRail.d.ts +65 -0
  244. package/lib/types/client/components/QaWelcomeNotice.d.ts +27 -0
  245. package/lib/types/client/components/QaWidthHandle.d.ts +43 -0
  246. package/lib/types/client/components/QaWorkGroup.d.ts +5 -3
  247. package/lib/types/client/components/source-refs.d.ts +16 -0
  248. package/lib/types/client/components/surface-utils.d.ts +11 -0
  249. package/lib/types/client/components/thinking-phrases.d.ts +9 -0
  250. package/lib/types/client/create-session.d.ts +13 -0
  251. package/lib/types/client/failure-copy.d.ts +19 -0
  252. package/lib/types/client/index.d.ts +1 -0
  253. package/lib/types/client/project-session-state.d.ts +30 -0
  254. package/lib/types/client/prompt-content.d.ts +30 -0
  255. package/lib/types/client/session-admission.d.ts +23 -0
  256. package/lib/types/client/session-assets.d.ts +20 -0
  257. package/lib/types/client/session-sources.d.ts +28 -0
  258. package/lib/types/client/settings/card.d.ts +23 -0
  259. package/lib/types/client/settings/fields.d.ts +139 -0
  260. package/lib/types/client/settings/format.d.ts +108 -0
  261. package/lib/types/client/settings/sections/access.d.ts +9 -0
  262. package/lib/types/client/settings/sections/accounts.d.ts +9 -0
  263. package/lib/types/client/settings/sections/attachments.d.ts +15 -0
  264. package/lib/types/client/settings/sections/branding.d.ts +8 -0
  265. package/lib/types/client/settings/sections/common.d.ts +28 -0
  266. package/lib/types/client/settings/sections/embedding.d.ts +8 -0
  267. package/lib/types/client/settings/sections/interface.d.ts +9 -0
  268. package/lib/types/client/settings/sections/lockdown.d.ts +9 -0
  269. package/lib/types/client/settings/sections/session.d.ts +9 -0
  270. package/lib/types/client/settings/sections/sources.d.ts +9 -0
  271. package/lib/types/client/settings/sections/status.d.ts +22 -0
  272. package/lib/types/client/settings/sections.d.ts +25 -0
  273. package/lib/types/client/settings/styles.d.ts +8 -0
  274. package/lib/types/client/settlement.d.ts +6 -0
  275. package/lib/types/client/stream-publisher.d.ts +28 -0
  276. package/lib/types/client/tool-presentation.d.ts +6 -0
  277. package/lib/types/client/turn-sources.d.ts +14 -0
  278. package/lib/types/client/types.d.ts +101 -9
  279. package/lib/types/client/use-right-rail.d.ts +56 -0
  280. package/lib/types/client/use-session-ui-state.d.ts +41 -0
  281. package/lib/types/client/use-transcript-view.d.ts +20 -0
  282. package/lib/types/config-resolvers/accounts.d.ts +15 -0
  283. package/lib/types/config-resolvers/attachments.d.ts +6 -0
  284. package/lib/types/config-resolvers/basics.d.ts +8 -0
  285. package/lib/types/config-resolvers/defaults.d.ts +4 -0
  286. package/lib/types/config-resolvers/lockdown.d.ts +10 -0
  287. package/lib/types/config-resolvers/session.d.ts +6 -0
  288. package/lib/types/config-resolvers/shared.d.ts +16 -0
  289. package/lib/types/config-resolvers/sources.d.ts +6 -0
  290. package/lib/types/config-resolvers/ui.d.ts +6 -0
  291. package/lib/types/entry-redirect.d.ts +20 -0
  292. package/lib/types/host-route.d.ts +14 -1
  293. package/lib/types/index.d.ts +54 -3
  294. package/lib/types/launch-token.d.ts +21 -0
  295. package/lib/types/profile.d.ts +76 -0
  296. package/lib/types/prompt-notes.d.ts +110 -0
  297. package/lib/types/provenance/collector.d.ts +26 -0
  298. package/lib/types/provenance/connectors.d.ts +11 -0
  299. package/lib/types/provenance/dedupe.d.ts +6 -0
  300. package/lib/types/provenance/extractors.d.ts +14 -0
  301. package/lib/types/provenance/file-preview.d.ts +10 -0
  302. package/lib/types/provenance/host-store.d.ts +54 -0
  303. package/lib/types/provenance/index.d.ts +10 -0
  304. package/lib/types/provenance/normalize.d.ts +13 -0
  305. package/lib/types/provenance/reported.d.ts +5 -0
  306. package/lib/types/provenance/types.d.ts +78 -0
  307. package/lib/types/resolve-config.d.ts +8 -3
  308. package/lib/types/secure-session.d.ts +36 -2
  309. package/lib/types/shared/session-key.d.ts +23 -0
  310. package/lib/types/shared/settings.d.ts +10 -0
  311. package/lib/types/thinking-phrases.d.ts +17 -0
  312. package/lib/types/types.d.ts +290 -16
  313. package/lib/types/user-workspace.d.ts +38 -0
  314. package/lib/user-workspace.js +231 -0
  315. package/lib/user-workspace.js.map +1 -0
  316. package/package.json +71 -47
  317. package/CHANGELOG.md +0 -93
  318. package/SPEC-dsh-qa-surface.md +0 -2425
  319. package/docs/ARCHITECTURE.md +0 -66
  320. package/docs/COMPATIBILITY.md +0 -14
  321. package/docs/CONFIGURATION.md +0 -112
  322. package/docs/EMBEDDING.md +0 -13
  323. package/lib/client/components/QaSourcesDrawer.js +0 -46
  324. package/lib/client/components/QaSourcesDrawer.js.map +0 -1
  325. package/lib/types/client/components/QaSourcesDrawer.d.ts +0 -8
@@ -1,66 +0,0 @@
1
- # Architecture
2
-
3
- The Host half validates the Loader configuration, registers the `qa-surface`
4
- settings namespace and owns one narrow GET/HEAD route for the configured QA
5
- path. Published DSH `0.1.1-rc.2` returns 404 for unknown frontend paths, so the
6
- route redirects navigation through the canonical `/` index with an encoded
7
- same-origin path marker. It also exposes one typed
8
- `secureSession(sessionId)` operation whose policy is read only from Host
9
- settings. The entry delegates that operation to `QaPolicyAdmission`
10
- (`secure-session.ts`), the Host-side admission boundary. It does not serve
11
- HTML, create another server, replace the frontend fallback, or touch
12
- API/plugin routes. The browser removes the
13
- marker and restores the requested path with `history.replaceState` before
14
- route matching. The Host creates no sessions itself.
15
-
16
- The browser half registers `QaSurface` in the root-scoped `shell.overlay` list.
17
- `QaRouteController` keeps that entry dormant outside the configured path and
18
- reversibly observes `pushState`, `replaceState` and `popstate`.
19
-
20
- `QaSessionController` is the only browser-side DSH session-coupled module. It uses
21
- `connection.api.sessions.create/selectModel` for creation policy and the public
22
- `SessionFace` for prompt, cancel and snapshots; the shared client contracts and
23
- the idle state live in `client/types.ts`. Its supporting modules are pure
24
- helpers: `client/wait-for.ts` waits on observable stores, `client/chat-index.ts`
25
- (`QaChatIndex`) keeps the browser-local chat index and persisted active
26
- session in storage, and `client/attestation.ts` parses Host reason markers and
27
- validates proofs against the deployed lockdown config. `QaTranscriptAdapter`
28
- projects session snapshots to plugin-local messages. "New chat" enters a
29
- draft that materializes an attested session only when the first prompt is
30
- sent, and the chat list orders by the host's `updatedAt`. The log is
31
- append-only and there is no truncation seam, so regeneration prompts a
32
- hidden instruction and projects the follow-up turns as variants of one
33
- question; the same projection flattens tool activity into the sources
34
- drawer (web targets, searches, files read). Subagent delegation, when the
35
- deployment opts it in, renders launches and settlement notices inline, and
36
- the agents drawer opens a child session as a read-only live transcript: the
37
- binding skips attestation and every send path stays closed. By default it excludes
38
- reasoning, tool arguments and tool results. When explicitly enabled, it
39
- correlates assistant blocks, paired tool results, running calls and turn
40
- timings into one plugin-local work group per turn; `QaWorkGroup` owns
41
- disclosure state and collapses the group when the turn completes. System
42
- context and raw failures remain excluded.
43
-
44
- In locked mode the Host operation verifies immutable session composition,
45
- refuses to adopt a non-QA session with user history, validates the named
46
- permission preset, installs `ToolRestriction.allow`, installs an agent-scoped
47
- monotonic execution guard, selects the permission preset, and returns only a
48
- sanitized proof. The controller remains non-writable until every proof field
49
- matches its Host-delivered config and repeats the check before prompt
50
- admission. No private RPC handler, slash command, direct provider API, or DSH
51
- core patch is used.
52
-
53
- This narrows a QA agent's effective session/tool policy, but a route overlay on
54
- a shared privileged Host is not an authorization boundary for other DSH
55
- clients. Strong isolation requires a dedicated process/profile, restricted
56
- identity and network boundary.
57
-
58
- All interaction colors come from the company interaction palette
59
- ("Цвета взаимодействия"), defined once as the `QA_BRAND_PALETTE` object at the
60
- top of `styles.ts` and emitted as `--dsh-qa-*` custom properties on the
61
- overlay root; surfaces and typography keep using the themed `--dsw-alias-*`
62
- tokens so light and dark hosts stay coherent.
63
-
64
- The overlay locks document scrolling and contains keyboard focus while active.
65
- It does not locate AppFrame through generated CSS classes and does not dispose
66
- global DSH runtime services when the route changes.
@@ -1,14 +0,0 @@
1
- # Compatibility
2
-
3
- | Plugin version | Tested DSH release | Required public contracts |
4
- | -------------- | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
5
- | 0.1.x | 0.1.1-rc.2 | `shell.overlay`, Typert remote, `agentPresets.composedPreset`, `permissionPresets`, agent-scoped `tools.restrict/guard`, `workspaceRegistry`, session/model APIs, `webServer.register` |
6
-
7
- DSH is developer-preview software. Compatibility-sensitive calls are isolated
8
- in `QaSessionController`, `QaTranscriptAdapter`, `QaConfigController` and
9
- `QaRouteController`; Host lockdown coupling is isolated in
10
- `QaSurface.secureSession`. The Host navigation adapter also works around this tested
11
- release's exact-index static serving: `/qa` is redirected through `/`, then the
12
- client restores the original pathname. Missing settings fall back to default
13
- browser config; missing required client services prevent the browser plugin
14
- from being injected rather than patching DSH internals.
@@ -1,112 +0,0 @@
1
- # Configuration reference
2
-
3
- Defaults and constraints are documented in the root README. Important runtime
4
- rules are:
5
-
6
- - `route.path` starts with `/`, has trailing slashes removed, and cannot claim
7
- `/`, `/api` or `/plugins`;
8
- - `fixed` requires `fixedSessionId`;
9
- - `provider` and `model` are either both absent or both present;
10
- - `maxContentWidth` is an integer from 480 through 1600;
11
- - duplicate/blank suggested questions are removed;
12
- - approval and question policies are fixed to safe blocking behavior;
13
- - reasoning and tool details are opt-in through `ui.showReasoning` and
14
- `ui.showToolActivity`; enable them only where those contents are appropriate
15
- for the QA audience;
16
- - lockdown defaults to enabled and requires a non-empty permission preset;
17
- - the preset must resolve on the Host to exactly `read-only` + `never`;
18
- - permission, slash-command, settings, rename, delete and arbitrary-open
19
- capability flags cannot be enabled;
20
- - `showReset` requires the independent `allowSessionReset` opt-in;
21
- - the tool policy is an allow-list; unknown configured tool names fail closed.
22
- A name only resolves while its tool is actually mounted: MCP tools
23
- (`mcp__<server>__*`) exist only while their server is reachable, so keep
24
- them out of the allow list on hosts that cannot reach the server. Tools
25
- mounted by an agent preset live in that preset's ancestor scope; the Host
26
- validates and restricts the complete agent-scoped view, not just globals.
27
-
28
- ## Pinning chats to a directory
29
-
30
- By default a QA chat is created against the Host working directory. Two
31
- mutually exclusive pins anchor every new chat (and its subagents) to the
32
- deployment's own directory:
33
-
34
- - `session.cwd: "D:/qa-docs"` - an absolute directory used directly as the
35
- session cwd; no registration needed. Attestation compares the session's
36
- recorded cwd case- and separator-insensitively on Windows.
37
- - `session.workspaceId: "<uuid>"` - a registered DSH workspace (created in
38
- the web UI or via the workspace API; the id is a generated uuid, not the
39
- path). Sessions attach to the workspace, so they group under it in the
40
- host UI. When the id does not resolve, attestation refuses with
41
- `reason: workspace-unavailable` instead of an opaque mismatch.
42
-
43
- With `lockdown.enforceFixedWorkspace: true` (the default) a chat created
44
- anywhere else refuses to attest, so the QA audience can never pull the
45
- assistant out of the pinned directory.
46
-
47
- Browser persistence stores only the DSH session id under
48
- `<storageKey>:v1:<route>:session`, plus — when `ui.showSessionList` is
49
- enabled — a per-browser chat index under `<storageKey>:v1:<route>:chats`
50
- (session ids only, capped at 50). Transcript content, credentials and tool
51
- results remain in the Host-owned DSH Session and are never copied to browser
52
- storage.
53
-
54
- When either work-detail flag is enabled, the QA transcript groups reasoning,
55
- intermediate assistant progress, and tool rows by DSH turn. Running work is
56
- expanded. Completed work is collapsed behind a duration summary and can be
57
- reopened; each tool row can separately reveal its formatted input and output.
58
- These controls change presentation only and never widen the Host allow-list.
59
-
60
- The browser cannot override lockdown settings. Before binding and immediately
61
- before every prompt, it requests a Host attestation for the selected session.
62
- Any unproved agent preset, workspace, model, permission bundle or tool policy
63
- disables Send with the generic message `Настройки помощника недоступны.`
64
- Detailed mismatch facts are written only to Host logs; the
65
- browser console additionally prints one line with a stable coarse reason code
66
- (`reason: unknown-tools`, `workspace-unavailable`, `composition-mismatch`, `permission-preset`,
67
- `adoption-refused`, `proof-mismatch` or `attestation-failed`) plus an operator
68
- hint, so a refused surface can be diagnosed without Host log access.
69
-
70
- The built-in branding, controls, status messages and accessibility labels are
71
- Russian. The default quick questions are rendered directly above the composer
72
- only while the current chat is empty. Set `suggestedQuestions: []` to hide
73
- them, or provide a deployment-specific list to replace them.
74
-
75
- When adding tools, update the deployment's reviewed capability inventory as
76
- part of the same change. The package's
77
- [default inventory](../capability-policy.json) is intentionally empty, matching
78
- the default `toolPolicy.allow`.
79
-
80
- ## Configuration channel over the LAN
81
-
82
- The browser normally reads the effective configuration from the Host-owned
83
- `qa-surface` settings namespace. DSH pins settings RPCs to loopback, so a
84
- browser served over the LAN always sees that namespace as unavailable. In
85
- that case the client calls the plugin's `qaSurface/describe` Host Remote and
86
- uses the returned effective configuration; a rejected call falls back to the
87
- client defaults with the same `unavailable` status as before. Only one
88
- describe request runs per page load, and a settled answer survives scope
89
- updates — the namespace (when readable) stays the authority and keeps
90
- delivering live changes.
91
-
92
- Host-side enforcement never depended on the browser's read path: `secureSession`
93
- attestation re-derives everything from the Host-owned configuration on every
94
- bind and every prompt.
95
-
96
- ## Skill catalog scope
97
-
98
- The deployment's agent preset controls which skills the QA assistant sees.
99
- The shipped `qa-research` preset mounts the skill filesystem with
100
- `includeDefaultRoots: false`: project-root skills (for example the harness
101
- checkout's own `.dsh/skills`) and user-home skills stay out of the catalog,
102
- and skills enter only through plugin providers or an explicit
103
- `customSkillDirs` list in the preset. Keep the QA catalog to exactly the
104
- skills the audience is meant to use.
105
-
106
- ## Deleting chats
107
-
108
- The sidebar delete control removes a chat from this browser's index only;
109
- the Host session stays on disk. Deleting the chat that is currently open
110
- continues in a fresh attested session when `lockdown.allowSessionReset` is
111
- enabled. There is no Host session-deletion API in DSH 0.1.x for the plugin
112
- to call.
package/docs/EMBEDDING.md DELETED
@@ -1,13 +0,0 @@
1
- # Embedding and reverse proxies
2
-
3
- Serve `/qa` through the normal DSH origin so it shares the established browser
4
- connection, authentication and trust policy. The plugin's narrow navigation
5
- route redirects GET/HEAD requests through DSH's canonical `/` document; the
6
- client immediately restores `/qa` before mounting. Reverse proxies must pass
7
- the configured QA path to DSH instead of replacing it with a separately hosted
8
- page.
9
-
10
- Iframe embedding is disabled or allowed by deployment headers, not by this
11
- plugin. Configure an explicit CSP `frame-ancestors` allowlist at a trusted
12
- reverse proxy and keep the DSH API same-origin. Do not enable wildcard CORS or
13
- expose settings/session APIs without the deployment's authentication layer.
@@ -1,46 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from "react";
3
- /** Split text into plain runs and safe http(s) links. */
4
- function linkify(text) {
5
- const nodes = [];
6
- const pattern = /https?:\/\/[^\s<>"')]+/gu;
7
- let offset = 0;
8
- for (const match of text.matchAll(pattern)) {
9
- const index = match.index;
10
- if (index > offset)
11
- nodes.push(text.slice(offset, index));
12
- const href = match[0];
13
- nodes.push(_jsx("a", { href: href, target: "_blank", rel: "noreferrer", children: href }, href + String(index)));
14
- offset = index + href.length;
15
- }
16
- if (offset < text.length)
17
- nodes.push(text.slice(offset));
18
- return nodes;
19
- }
20
- function SourceIcon({ kind }) {
21
- if (kind === "web") {
22
- return (_jsxs("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: [_jsx("circle", { cx: "8", cy: "8", r: "5.75" }), _jsx("path", { d: "M2.25 8h11.5M8 2.25c1.6 1.55 2.4 3.5 2.4 5.75S9.6 12.2 8 13.75C6.4 12.2 5.6 10.25 5.6 8S6.4 3.8 8 2.25Z" })] }));
23
- }
24
- if (kind === "search") {
25
- return (_jsxs("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: [_jsx("circle", { cx: "7.1", cy: "7.1", r: "4.3" }), _jsx("path", { d: "m10.3 10.3 2.9 2.9" })] }));
26
- }
27
- return (_jsxs("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: [_jsx("path", { d: "M9.25 2.5H4.75A1.25 1.25 0 0 0 3.5 3.75v8.5a1.25 1.25 0 0 0 1.25 1.25h6.5a1.25 1.25 0 0 0 1.25-1.25V5.75L9.25 2.5Z" }), _jsx("path", { d: "M9.25 2.5v3.25h3.25" })] }));
28
- }
29
- function QaSourceCard({ source, onOpen, }) {
30
- return (_jsxs("button", { type: "button", className: "dsh-qa-sources__item", onClick: onOpen, children: [_jsx("span", { className: "dsh-qa-sources__kind", "data-kind": source.kind, children: _jsx(SourceIcon, { kind: source.kind }) }), _jsxs("span", { className: "dsh-qa-sources__text", children: [_jsx("span", { className: "dsh-qa-sources__title", children: source.title }), _jsx("span", { className: "dsh-qa-sources__target", children: source.target }), source.snippet === "" ? null : _jsx("p", { children: source.snippet })] })] }));
31
- }
32
- function QaSourceDetail({ source, onBack, }) {
33
- const external = source.kind === "web" && /^https?:\/\//iu.test(source.target)
34
- ? source.target
35
- : undefined;
36
- return (_jsxs("div", { className: "dsh-qa-sourcedetail", children: [_jsxs("div", { className: "dsh-qa-sourcedetail__head", children: [_jsx("button", { type: "button", className: "dsh-qa-sourcedetail__back", "aria-label": "\u041A\u043E \u0432\u0441\u0435\u043C \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u043C", title: "\u041A\u043E \u0432\u0441\u0435\u043C \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u043C", onClick: onBack, children: _jsx("svg", { viewBox: "0 0 14 14", "aria-hidden": "true", children: _jsx("path", { d: "m8.75 3.5-3.5 3.5 3.5 3.5" }) }) }), _jsx("span", { className: "dsh-qa-sourcedetail__kind", children: _jsx(SourceIcon, { kind: source.kind }) }), _jsx("span", { className: "dsh-qa-sourcedetail__title", children: source.title }), external === undefined ? null : (_jsx("a", { className: "dsh-qa-sourcedetail__open", href: external, target: "_blank", rel: "noreferrer", children: "\u041E\u0442\u043A\u0440\u044B\u0442\u044C" }))] }), _jsx("div", { className: "dsh-qa-sourcedetail__target", children: source.target }), _jsx("div", { className: "dsh-qa-sourcedetail__body", children: source.output === "" ? (_jsx("p", { className: "dsh-qa-sourcedetail__empty", children: "\u0423 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430 \u043D\u0435\u0442 \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u043E\u0433\u043E \u0432\u044B\u0432\u043E\u0434\u0430." })) : (linkify(source.output)) })] }));
37
- }
38
- /** Right-hand panel listing tool-derived sources with a detail pane. */
39
- export function QaSourcesDrawer({ sources, onClose }) {
40
- const [detailId, setDetailId] = useState(null);
41
- const detail = detailId === null
42
- ? undefined
43
- : sources.find((source) => source.id === detailId);
44
- return (_jsxs("aside", { className: "dsh-qa-sources", "aria-label": "\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438", children: [_jsxs("div", { className: "dsh-qa-sources__head", children: [_jsx("span", { children: detail === undefined ? `Источники (${sources.length})` : "Источник" }), _jsx("button", { type: "button", "aria-label": "\u0417\u0430\u043A\u0440\u044B\u0442\u044C \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438", title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", onClick: onClose, children: _jsx("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", children: _jsx("path", { d: "m4 4 8 8m0-8-8 8" }) }) })] }), detail === undefined ? (_jsx("div", { className: "dsh-qa-sources__list", children: sources.map((source) => (_jsx(QaSourceCard, { source: source, onOpen: () => setDetailId(source.id) }, source.id))) })) : (_jsx(QaSourceDetail, { source: detail, onBack: () => setDetailId(null) }))] }));
45
- }
46
- //# sourceMappingURL=QaSourcesDrawer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"QaSourcesDrawer.js","sourceRoot":"","sources":["../../../src/client/components/QaSourcesDrawer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIjC,yDAAyD;AACzD,SAAS,OAAO,CAAC,IAAY;IAC3B,MAAM,KAAK,GAAgB,EAAE,CAAC;IAC9B,MAAM,OAAO,GAAG,0BAA0B,CAAC;IAC3C,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;QAC3C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAC1B,IAAI,KAAK,GAAG,MAAM;YAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;QAC1D,MAAM,IA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AC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvB,KAAC,YAAY,IAEX,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,IAF/B,MAAM,CAAC,EAAE,CAGd,CACH,CAAC,GACE,CACP,CAAC,CAAC,CAAC,CACF,KAAC,cAAc,IAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,GAAI,CACpE,IACK,CACT,CAAC;AACJ,CAAC"}
@@ -1,8 +0,0 @@
1
- import type { QaSource } from "../../types.js";
2
- export interface QaSourcesDrawerProps {
3
- readonly sources: readonly QaSource[];
4
- readonly onClose: () => void;
5
- }
6
- /** Right-hand panel listing tool-derived sources with a detail pane. */
7
- export declare function QaSourcesDrawer({ sources, onClose }: QaSourcesDrawerProps): import("react/jsx-runtime").JSX.Element;
8
- //# sourceMappingURL=QaSourcesDrawer.d.ts.map