@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
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Interface: what the visitor sees of the conversation. The show-reset toggle
3
+ * stays disabled while the lockdown section withholds session reset — the
4
+ * Host refuses one without the other.
5
+ */
6
+ import { type ConfigProps } from "./common.js";
7
+ /** What the visitor sees of the conversation. */
8
+ export declare function InterfaceSection(props: ConfigProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=interface.d.ts.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Lockdown: the execution policy every QA chat is pinned to. Its fixed
3
+ * choices are not editable on purpose — the Host rejects any configuration
4
+ * that relaxes them, so the card explains rather than offers.
5
+ */
6
+ import { type ConfigProps } from "./common.js";
7
+ /** The execution policy every QA chat is pinned to. */
8
+ export declare function LockdownSection(props: ConfigProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=lockdown.d.ts.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Session: which chat a visitor gets, and which agent and model serve it.
3
+ * Provider and model are written as one mutation because the Host refuses
4
+ * either of them alone.
5
+ */
6
+ import { type ConfigProps } from "./common.js";
7
+ /** Which chat a visitor gets, and which agent and model serve it. */
8
+ export declare function SessionSection(props: ConfigProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Sources: which sources the assistant may cite and how they are shown. Most
3
+ * of the controls live behind "advanced" disclosures so the default view
4
+ * carries only the collection switches a deployment actually argues about.
5
+ */
6
+ import { type ConfigProps } from "./common.js";
7
+ /** Which sources the assistant may cite, and how they are shown. */
8
+ export declare function SourcesSection(props: ConfigProps): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=sources.d.ts.map
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The status view: what the deployment actually serves, read from the running
3
+ * Host rather than from the settings snapshot.
4
+ */
5
+ import type { QaSurfaceConfig, ResolvedQaSurfaceConfig } from "../../../types.js";
6
+ export interface StatusProps {
7
+ /** Effective configuration the running Host answered with, when it did. */
8
+ readonly effective: ResolvedQaSurfaceConfig | null;
9
+ /** Settings snapshot shown while the Host has not answered. */
10
+ readonly config: QaSurfaceConfig | undefined;
11
+ readonly refreshing: boolean;
12
+ readonly refreshedAt: number | undefined;
13
+ readonly overrides: number;
14
+ readonly onRefresh: () => void;
15
+ }
16
+ /**
17
+ * What the deployment is actually serving: the route, the session policy, the
18
+ * execution policy, and the account gate, as the Host resolved them. The card
19
+ * polls this while it is open, so a saved change is confirmed here.
20
+ */
21
+ export declare function StatusSection(props: StatusProps): import("react/jsx-runtime").JSX.Element;
22
+ //# sourceMappingURL=status.d.ts.map
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Body sections of the QA Surface settings card.
3
+ *
4
+ * Each section owns its controls and derives every value from the settings
5
+ * snapshot (the effective configuration) or, for the status view, from the
6
+ * running Host through the `qaSurface/describe` Remote. The controls mirror
7
+ * the Host's own validation: combinations the resolver refuses are either
8
+ * written together in one mutation or explained rather than offered.
9
+ *
10
+ * One file per section lives in `sections/`, with what the config sections
11
+ * share in `sections/common.tsx`; this module is the barrel the card imports.
12
+ */
13
+ export type { ConfigProps } from "./sections/common.js";
14
+ export { AccessSection } from "./sections/access.js";
15
+ export { AccountsSection } from "./sections/accounts.js";
16
+ export { AttachmentsSection } from "./sections/attachments.js";
17
+ export { BrandingSection } from "./sections/branding.js";
18
+ export { EmbeddingSection } from "./sections/embedding.js";
19
+ export { InterfaceSection } from "./sections/interface.js";
20
+ export { LockdownSection } from "./sections/lockdown.js";
21
+ export { SessionSection } from "./sections/session.js";
22
+ export { SourcesSection } from "./sections/sources.js";
23
+ export { StatusSection } from "./sections/status.js";
24
+ export type { StatusProps } from "./sections/status.js";
25
+ //# sourceMappingURL=sections.d.ts.map
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Card stylesheet: the canonical shell (AGENTS.md contract) plus body rules
3
+ * for this plugin's own controls. Every surface, border, and colour comes from
4
+ * `--dsw-alias-*` tokens so light, dark, and system themes stay coherent; the
5
+ * QA page's own palette stays out of the settings page.
6
+ */
7
+ export declare const QA_SETTINGS_STYLES: string;
8
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1,6 @@
1
+ /** Fold the host settlement wording into a title plus the closing message. */
2
+ export declare function parseSettlement(text: string): {
3
+ title: string;
4
+ body: string;
5
+ } | undefined;
6
+ //# sourceMappingURL=settlement.d.ts.map
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Spacing for a running turn's stream frames. A running turn's frames arrive
3
+ * at animation-frame cadence, so re-projections are spaced at least the
4
+ * configured interval apart: the first frame of a window projects at once and
5
+ * further frames are absorbed (the memoized render path replays nothing, so
6
+ * absorbing a frame only defers it). Everything outside a running turn —
7
+ * phase flips, errors, turn completion — projects immediately, and a
8
+ * non-running notification also cancels an absorbed window so the final
9
+ * state never waits for it. Zero disables the spacing entirely.
10
+ */
11
+ export declare class StreamPublisher {
12
+ private readonly intervalMs;
13
+ private timer;
14
+ constructor(intervalMs: number);
15
+ /**
16
+ * Deliver one notification. `running` says whether the bound session is
17
+ * mid-turn; `emit` performs the actual projection and must stay cheap to
18
+ * defer.
19
+ */
20
+ publish(running: boolean, emit: () => void): void;
21
+ /**
22
+ * Cancel an absorbed window so the next frame projects at once. Called
23
+ * when the binding goes away or the controller winds down: a stale window
24
+ * must not swallow the first frame of a fresh binding.
25
+ */
26
+ clear(): void;
27
+ }
28
+ //# sourceMappingURL=stream-publisher.d.ts.map
@@ -0,0 +1,6 @@
1
+ import type { ToolResultNode } from "@deepseek-ai/dsh-client-ui-conversation/client";
2
+ import type { QaWorkItem } from "../types.js";
3
+ export declare function flattenToolOutput(node: ToolResultNode): string | null;
4
+ export declare function toolStatus(node: ToolResultNode): "ok" | "error" | "stopped";
5
+ export declare function workTool(callId: string, name: string, argsRaw: string, status: "running" | "ok" | "error" | "stopped", startedAt: number | undefined, endedAt: number | undefined, output: string | null): QaWorkItem;
6
+ //# sourceMappingURL=tool-presentation.d.ts.map
@@ -0,0 +1,14 @@
1
+ import type { ConversationSnapshot } from "@deepseek-ai/dsh-client-ui-conversation/client";
2
+ import type { LegacyConversationSlice } from "@deepseek-ai/dsh-client-ui-chat/client";
3
+ import type { QaSource, QaTurnSources } from "../types.js";
4
+ /** The transcript-bearing Chat slice of one Conversation snapshot (absent before the view activates). */
5
+ export declare function chatLegacyOf(snapshot: ConversationSnapshot | undefined): LegacyConversationSlice;
6
+ /**
7
+ * Rebuild canonical turn bundles from durable tool-result metadata. Since the
8
+ * metadata is persisted by DSH, this projection is identical on live updates
9
+ * and replay and requires no assistant-authored bibliography.
10
+ */
11
+ export declare function projectTurnSources(snapshot: ConversationSnapshot | undefined, sessionId?: string, workspaceRoot?: string): readonly QaTurnSources[];
12
+ /** Visible evidence sources for the latest turn, shared by the drawer/footer. */
13
+ export declare function projectSources(snapshot: ConversationSnapshot | undefined, sessionId?: string, workspaceRoot?: string): readonly QaSource[];
14
+ //# sourceMappingURL=turn-sources.d.ts.map
@@ -1,23 +1,114 @@
1
- import type { IApiClient } from "@deepseek-ai/dsh-client-connection/client";
2
- import type { ISessions, SessionRuntime } from "@deepseek-ai/dsh-client-runtime/client";
3
- import type { QaLockdownProof, QaSessionState } from "../types.js";
4
- import type { SessionFace } from "@deepseek-ai/dsh-client-runtime/client";
1
+ import type { ClientRemote } from "@deepseek-ai/dsh-api-gateway/client";
2
+ import type { ISessions, SessionFace } from "@deepseek-ai/dsh-api-session-controller/client";
3
+ import type { UiConversation } from "@deepseek-ai/dsh-client-ui-conversation/client";
4
+ import type { QaAccountProfileInput, QaAccountSession, QaAccountUserPublic, QaClaimResult, QaLockdownProof, QaOwnershipEntry, QaSessionState, QaSourceFilePreview, QaTurnSources, QaWhoamiResult } from "../types.js";
5
5
  /** Wire content one prompt carries: text plus base64 image uploads. */
6
6
  export type QaPromptContent = Parameters<SessionFace["prompt"]>[0];
7
7
  /** DSH session runtime surface the QA controller is allowed to touch. */
8
- export type QaSessions = ISessions & Pick<SessionRuntime, "create">;
8
+ export type QaSessions = ISessions;
9
9
  /** Narrow client API slice used to pin the preset and model of a fresh chat. */
10
- export type QaSessionsApi = Pick<IApiClient["sessions"], "selectModel"> & {
11
- readonly selectAgentPreset: IApiClient["agentPresets"]["select"];
10
+ export type QaSessionsApi = {
11
+ selectModel: ClientRemote["session"]["selectModel"];
12
+ selectAgentPreset: ClientRemote["agentPresets"]["select"];
12
13
  };
13
- /** Attestation channel to the Host admission boundary (`qaSurface/secureSession`). */
14
- export type QaSecureSession = (sessionId: string) => Promise<{
14
+ /**
15
+ * Conversation assembly the QA transcript is projected from: the per-Session
16
+ * binding carries the assembled Chat view (nodes, partials, tool calls).
17
+ */
18
+ export type QaConversation = Pick<UiConversation, "binding">;
19
+ /**
20
+ * Attestation channel to the Host admission boundary
21
+ * (`qaSurface/secureSession`). The account token rides as the first argument
22
+ * when accounts are enabled; an empty string is the anonymous caller.
23
+ */
24
+ export type QaSecureSession = (token: string, sessionId: string) => Promise<{
15
25
  readonly ok: true;
16
26
  readonly value: QaLockdownProof;
17
27
  } | {
18
28
  readonly ok: false;
19
29
  readonly error: unknown;
20
30
  }>;
31
+ /** Host-authoritative creation: identity, cwd and policy never come from the browser. */
32
+ export type QaCreateSession = (token: string) => Promise<RemoteResult<string>>;
33
+ /**
34
+ * Browser file-upload service (`ctx.fileUpload`), described structurally on
35
+ * purpose: files do not ride the prompt inline the way images do, they are
36
+ * staged through the Host upload route and cited by receipt. The QA bundle
37
+ * must not link the upload package — a deployment may not serve it — so the
38
+ * service is read off the context at send time and this is the only shape the
39
+ * surface relies on.
40
+ */
41
+ export interface QaFileUpload {
42
+ upload(sessionId: string, data: Blob | Uint8Array, name?: string, signal?: AbortSignal): Promise<{
43
+ readonly ok: true;
44
+ readonly value: {
45
+ readonly receiptId: string;
46
+ readonly file: {
47
+ readonly attachmentId: string;
48
+ readonly name: string;
49
+ readonly bytes: number;
50
+ };
51
+ };
52
+ } | {
53
+ readonly ok: false;
54
+ readonly error: unknown;
55
+ }>;
56
+ }
57
+ export interface QaSourceApi {
58
+ sources(token: string, sessionId: string): Promise<{
59
+ readonly ok: true;
60
+ readonly value: readonly QaTurnSources[];
61
+ } | {
62
+ readonly ok: false;
63
+ readonly error: unknown;
64
+ }>;
65
+ readSourceFile(token: string, sessionId: string, sourcePath: string): Promise<{
66
+ readonly ok: true;
67
+ readonly value: QaSourceFilePreview;
68
+ } | {
69
+ readonly ok: false;
70
+ readonly error: unknown;
71
+ }>;
72
+ }
73
+ /** A source API with the account token already bound at the call site. */
74
+ export type QaBoundSourceApi = {
75
+ sources(sessionId: string): Promise<{
76
+ readonly ok: true;
77
+ readonly value: readonly QaTurnSources[];
78
+ } | {
79
+ readonly ok: false;
80
+ readonly error: unknown;
81
+ }>;
82
+ readSourceFile(sessionId: string, sourcePath: string): Promise<{
83
+ readonly ok: true;
84
+ readonly value: QaSourceFilePreview;
85
+ } | {
86
+ readonly ok: false;
87
+ readonly error: unknown;
88
+ }>;
89
+ };
90
+ /** Account remotes exposed by the plugin's own typert namespace. */
91
+ export interface QaAccountsApi {
92
+ accountsWhoami(token: string): Promise<RemoteResult<QaWhoamiResult>>;
93
+ accountsLogin(email: string, password: string): Promise<RemoteResult<QaAccountSession>>;
94
+ accountsRegister(email: string, password: string): Promise<RemoteResult<QaAccountSession>>;
95
+ accountsClaimSessions(token: string, sessionIds: readonly string[]): Promise<RemoteResult<QaClaimResult>>;
96
+ accountsOwnedSessions(token: string): Promise<RemoteResult<{
97
+ readonly ids: readonly string[];
98
+ }>>;
99
+ accountsListOwnership(token: string): Promise<RemoteResult<{
100
+ readonly entries: readonly QaOwnershipEntry[];
101
+ }>>;
102
+ /** Replace the caller's own self-declared profile; the token is the identity. */
103
+ accountsUpdateProfile(token: string, input: QaAccountProfileInput): Promise<RemoteResult<QaAccountUserPublic>>;
104
+ }
105
+ type RemoteResult<Value> = {
106
+ readonly ok: true;
107
+ readonly value: Value;
108
+ } | {
109
+ readonly ok: false;
110
+ readonly error: unknown;
111
+ };
21
112
  /** Minimal persistence contract; backed by `window.localStorage` in the app. */
22
113
  export interface StorageLike {
23
114
  getItem(key: string): string | null;
@@ -26,4 +117,5 @@ export interface StorageLike {
26
117
  }
27
118
  /** The state projected while no QA chat is bound (route inactive or booting). */
28
119
  export declare const QA_SESSION_IDLE_STATE: QaSessionState;
120
+ export {};
29
121
  //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,56 @@
1
+ import { type Dispatch, type SetStateAction } from "react";
2
+ import type { QaSource, QaTurnSources } from "../types.js";
3
+ import type { QaDrawerCompleteness, QaRailTab } from "./use-session-ui-state.js";
4
+ /**
5
+ * The rail-related slice of `useSessionUiState`, declared structurally so the
6
+ * controller consumes exactly what it drives and the rest of the chat-local
7
+ * state (draft text, variant offsets, the turn mark) stays with the surface.
8
+ */
9
+ export interface QaRightRailState {
10
+ readonly railOpen: boolean;
11
+ readonly setRailOpen: Dispatch<SetStateAction<boolean>>;
12
+ readonly railTab: QaRailTab;
13
+ readonly setRailTab: Dispatch<SetStateAction<QaRailTab>>;
14
+ readonly drawerSources: readonly QaSource[] | null;
15
+ readonly setDrawerSources: Dispatch<SetStateAction<readonly QaSource[] | null>>;
16
+ readonly drawerCompleteness: QaDrawerCompleteness | null;
17
+ readonly setDrawerCompleteness: Dispatch<SetStateAction<QaDrawerCompleteness | null>>;
18
+ readonly drawerDetail: QaSource | null;
19
+ readonly setDrawerDetail: Dispatch<SetStateAction<QaSource | null>>;
20
+ readonly setAgentsOpen: Dispatch<SetStateAction<boolean>>;
21
+ }
22
+ /** What QaSurface reads and hands to the rail, the panels and the header. */
23
+ export interface QaRightRailFacade {
24
+ readonly railOpen: boolean;
25
+ readonly railTab: QaRailTab;
26
+ /** Message-scoped source pin, or null for the whole-chat list. */
27
+ readonly drawerSources: readonly QaSource[] | null;
28
+ readonly drawerCompleteness: QaDrawerCompleteness | null;
29
+ readonly drawerDetail: QaSource | null;
30
+ /** A message footer's sources control: pin the message-scoped subset. */
31
+ readonly openSources: (sources: readonly QaSource[], complete: boolean, incompleteOrigins: QaTurnSources["incompleteOrigins"]) => void;
32
+ /** A message's source chip: show that source's detail instead of a list. */
33
+ readonly openSourceDetail: (source: QaSource) => void;
34
+ /** Back to the whole-chat source list, dropping the pin. */
35
+ readonly showAllSources: () => void;
36
+ /** Closing the rail also discards the pinned sources, as the drawer did. */
37
+ readonly close: () => void;
38
+ /**
39
+ * The header buttons: a second click on the active tab's button closes the
40
+ * rail; opening the sources tab shows the full list, dropping any pin.
41
+ */
42
+ readonly openTab: (tab: QaRailTab) => void;
43
+ /** The rail strip's plain tab switch. */
44
+ readonly selectTab: (tab: QaRailTab) => void;
45
+ /** The agents drawer and the rail are mutually exclusive; this is its side. */
46
+ readonly toggleAgents: () => void;
47
+ }
48
+ /**
49
+ * Right-rail controller over the chat-local drawer state: every transition
50
+ * between the whole-chat list, a pinned message subset and a single source's
51
+ * detail lives here, so the surface only wires controls to intents. The
52
+ * callbacks stay referentially stable — they close over `useState` setters,
53
+ * whose identities never change.
54
+ */
55
+ export declare function useRightRail(ui: QaRightRailState): QaRightRailFacade;
56
+ //# sourceMappingURL=use-right-rail.d.ts.map
@@ -0,0 +1,41 @@
1
+ import { type Dispatch, type SetStateAction } from "react";
2
+ import type { QaAttachmentDraft, QaSource, QaTurnSources } from "../types.js";
3
+ /** Snapshot completeness captured when a drawer was opened from a message. */
4
+ export interface QaDrawerCompleteness {
5
+ readonly complete: boolean;
6
+ readonly incompleteOrigins?: QaTurnSources["incompleteOrigins"];
7
+ }
8
+ /** The rail tab ids; the agents drawer has not become a tab yet. */
9
+ export type QaRailTab = "sources" | "files";
10
+ export interface QaSessionUiState {
11
+ /** Per group: how many answers back from the newest is shown (0 = newest). */
12
+ readonly variantOffsets: Record<string, number>;
13
+ readonly setVariantOffsets: Dispatch<SetStateAction<Record<string, number>>>;
14
+ /** The turn the transcript's reading line currently owns. */
15
+ readonly activeTurn: number | null;
16
+ readonly setActiveTurn: Dispatch<SetStateAction<number | null>>;
17
+ readonly agentsOpen: boolean;
18
+ readonly setAgentsOpen: Dispatch<SetStateAction<boolean>>;
19
+ /** Whether the right rail column is shown. */
20
+ readonly railOpen: boolean;
21
+ readonly setRailOpen: Dispatch<SetStateAction<boolean>>;
22
+ /** Which rail tab is active; meaningful only while the rail is open. */
23
+ readonly railTab: QaRailTab;
24
+ readonly setRailTab: Dispatch<SetStateAction<QaRailTab>>;
25
+ readonly drawerSources: readonly QaSource[] | null;
26
+ readonly setDrawerSources: Dispatch<SetStateAction<readonly QaSource[] | null>>;
27
+ readonly drawerCompleteness: QaDrawerCompleteness | null;
28
+ readonly setDrawerCompleteness: Dispatch<SetStateAction<QaDrawerCompleteness | null>>;
29
+ readonly drawerDetail: QaSource | null;
30
+ readonly setDrawerDetail: Dispatch<SetStateAction<QaSource | null>>;
31
+ readonly pendingAttachments: readonly QaAttachmentDraft[];
32
+ readonly setPendingAttachments: (next: readonly QaAttachmentDraft[]) => void;
33
+ }
34
+ /**
35
+ * Per-chat UI state: composer attachments, variant offsets, the rail mark and
36
+ * the drawers. Everything here describes the chat it was made in, so a
37
+ * session change clears it instead of leaking a draft, an attachment or a
38
+ * drawer from one conversation into the next.
39
+ */
40
+ export declare function useSessionUiState(sessionId: string | null): QaSessionUiState;
41
+ //# sourceMappingURL=use-session-ui-state.d.ts.map
@@ -0,0 +1,20 @@
1
+ import type { QaMessage } from "../types.js";
2
+ import { type QaTurnRailItem } from "./components/QaTurnRail.js";
3
+ import { type QaVariantGroup } from "./components/VariantSwitcher.js";
4
+ export interface QaTranscriptView {
5
+ readonly visibleMessages: readonly QaMessage[];
6
+ /** Answer groups by the user message id that opens them. */
7
+ readonly groupByPromptId: ReadonlyMap<string, QaVariantGroup>;
8
+ /** Per group: the turn the current variant offset selects. */
9
+ readonly selectedTurn: ReadonlyMap<string, number>;
10
+ readonly railItems: readonly QaTurnRailItem[];
11
+ }
12
+ /**
13
+ * Memoized transcript view model. The controller republishes state with a
14
+ * fresh messages array on every stream frame, but re-renders that keep the
15
+ * transcript unchanged (drawers, the active turn mark, variant offsets) must
16
+ * not re-run the projections — and per-row group lookups go through a map
17
+ * instead of a linear find inside the render loop.
18
+ */
19
+ export declare function useTranscriptView(messages: readonly QaMessage[], variantOffsets: Record<string, number>): QaTranscriptView;
20
+ //# sourceMappingURL=use-transcript-view.d.ts.map
@@ -0,0 +1,15 @@
1
+ import type { QaSurfaceConfig, ResolvedQaSurfaceConfig } from "../types.js";
2
+ type AccountsSlice = ResolvedQaSurfaceConfig["accounts"];
3
+ /** Resolved neighbors the per-user workspace boundary is checked against. */
4
+ export interface AccountsDependencies {
5
+ readonly session: ResolvedQaSurfaceConfig["session"];
6
+ readonly lockdown: ResolvedQaSurfaceConfig["lockdown"];
7
+ }
8
+ /**
9
+ * Resolve the accounts domain. The per-user workspace boundary spans session
10
+ * and lockdown, so their resolved slices arrive as dependencies and the
11
+ * boundary checks run here, next to the flag they guard.
12
+ */
13
+ export declare function resolveAccounts(input: QaSurfaceConfig, dependencies: AccountsDependencies): AccountsSlice;
14
+ export {};
15
+ //# sourceMappingURL=accounts.d.ts.map
@@ -0,0 +1,6 @@
1
+ import type { QaSurfaceConfig, ResolvedQaSurfaceConfig } from "../types.js";
2
+ type AttachmentsSlice = ResolvedQaSurfaceConfig["attachments"];
3
+ /** Resolve the attachments domain: intake toggles and byte/line bounds. */
4
+ export declare function resolveAttachments(input: QaSurfaceConfig): AttachmentsSlice;
5
+ export {};
6
+ //# sourceMappingURL=attachments.d.ts.map
@@ -0,0 +1,8 @@
1
+ import type { QaSurfaceConfig, ResolvedQaSurfaceConfig } from "../types.js";
2
+ export declare function normalizeRoutePath(value: string): string;
3
+ /** The scalar domains that carry no table-shaped or cross-domain rules. */
4
+ type BasicsSlice = Pick<ResolvedQaSurfaceConfig, "enabled" | "route" | "branding" | "embedding" | "entry" | "interaction">;
5
+ /** Resolve the master switch, route, branding, embedding, and entry domains. */
6
+ export declare function resolveBasics(input: QaSurfaceConfig): BasicsSlice;
7
+ export {};
8
+ //# sourceMappingURL=basics.d.ts.map
@@ -0,0 +1,4 @@
1
+ import type { ResolvedQaSurfaceConfig } from "../types.js";
2
+ /** The canonical resolved config; every domain resolver defaults from it. */
3
+ export declare const DEFAULT_QA_SURFACE_CONFIG: ResolvedQaSurfaceConfig;
4
+ //# sourceMappingURL=defaults.d.ts.map
@@ -0,0 +1,10 @@
1
+ import type { QaSurfaceConfig, ResolvedQaSurfaceConfig } from "../types.js";
2
+ type LockdownSlice = ResolvedQaSurfaceConfig["lockdown"];
3
+ /**
4
+ * Resolve the lockdown domain. The capability flags are clamped shut, and
5
+ * showing the reset control needs an explicit authorization here, so the
6
+ * resolved UI slice arrives as a neighbor.
7
+ */
8
+ export declare function resolveLockdown(input: QaSurfaceConfig, ui: ResolvedQaSurfaceConfig["ui"]): LockdownSlice;
9
+ export {};
10
+ //# sourceMappingURL=lockdown.d.ts.map
@@ -0,0 +1,6 @@
1
+ import type { QaSurfaceConfig, ResolvedQaSurfaceConfig } from "../types.js";
2
+ type SessionSlice = ResolvedQaSurfaceConfig["session"];
3
+ /** Resolve the session domain: policy, pinning, and model selection. */
4
+ export declare function resolveSession(input: QaSurfaceConfig): SessionSlice;
5
+ export {};
6
+ //# sourceMappingURL=session.d.ts.map
@@ -0,0 +1,16 @@
1
+ /** Trim an optional string; a blank value collapses to null. */
2
+ export declare function optionalText(value: string | null | undefined): string | null;
3
+ /**
4
+ * Shared numeric guard for operator-tuned limits: the value has to be a safe
5
+ * integer inside [min, max], and every rejection carries the same message.
6
+ */
7
+ export declare function assertIntInRange(name: string, value: number, min: number, max: number): void;
8
+ /** Deduplicate and trim the operator's quick questions. */
9
+ export declare function uniqueQuestions(values: readonly string[]): readonly string[];
10
+ /**
11
+ * Normalize the operator's phrase list. Unlike quick questions, an empty list
12
+ * cannot mean "hide the control": the running indicator has to say something,
13
+ * so emptiness restores the built-in phrases.
14
+ */
15
+ export declare function uniquePhrases(values: readonly string[]): readonly string[];
16
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1,6 @@
1
+ import type { QaSurfaceConfig, ResolvedQaSurfaceConfig } from "../types.js";
2
+ type SourcesSlice = ResolvedQaSurfaceConfig["sources"];
3
+ /** Resolve the sources domain: collection, display, and preview bounds. */
4
+ export declare function resolveSources(input: QaSurfaceConfig): SourcesSlice;
5
+ export {};
6
+ //# sourceMappingURL=sources.d.ts.map
@@ -0,0 +1,6 @@
1
+ import type { QaSurfaceConfig, ResolvedQaSurfaceConfig } from "../types.js";
2
+ type UiSlice = ResolvedQaSurfaceConfig["ui"];
3
+ /** Resolve the UI domain: widget visibility and the content width floor. */
4
+ export declare function resolveUi(input: QaSurfaceConfig): UiSlice;
5
+ export {};
6
+ //# sourceMappingURL=ui.d.ts.map
@@ -0,0 +1,20 @@
1
+ import type { ResolvedQaSurfaceConfig } from "./types.js";
2
+ /**
3
+ * The operator/LAN split is decided client-side on `location.hostname` on
4
+ * purpose: behind the qa-deploy proxy every request appears loopback to the
5
+ * Host, and the deployment convention is "operator uses localhost, QA users
6
+ * use the LAN address". `?ui=admin` persists the operator escape hatch under
7
+ * the deployment's storage key; `?ui=qa` clears it again.
8
+ */
9
+ export declare function entryRedirectScript(config: ResolvedQaSurfaceConfig): string;
10
+ export interface EntryRedirectRow {
11
+ readonly kind: "script";
12
+ readonly placement: "head";
13
+ readonly text: string;
14
+ }
15
+ /**
16
+ * The structured index-injection row for one config snapshot, or undefined
17
+ * when the plugin is disabled or the redirect flag is off.
18
+ */
19
+ export declare function entryRedirectRow(config: ResolvedQaSurfaceConfig): EntryRedirectRow | undefined;
20
+ //# sourceMappingURL=entry-redirect.d.ts.map
@@ -1,9 +1,22 @@
1
+ import type { IncomingMessage } from "node:http";
1
2
  import type { WebServer } from "@deepseek-ai/dsh-host-webserver";
2
3
  import type { ResolvedQaSurfaceConfig } from "./types.js";
4
+ import type { LaunchTokenSource } from "./launch-token.js";
5
+ export interface QaNavigationRouteOptions {
6
+ /**
7
+ * Resolves the process launch token; when supplied and the browser carries
8
+ * no host-auth cookie, the route defers the marker hand-off in favor of the
9
+ * one-time `/?token=` exchange (relative location: the browser mints the
10
+ * cookie on the origin it actually used).
11
+ */
12
+ readonly launchToken?: LaunchTokenSource;
13
+ }
14
+ /** Presence-only check: an invalid cookie still fails the root gate later. */
15
+ export declare function hasHostAuthCookie(request: IncomingMessage): boolean;
3
16
  /**
4
17
  * DSH 0.1.1 static hosting returns 404 for missing paths. Redirect a browser
5
18
  * navigation through its canonical index entry; the client restores the
6
19
  * requested pathname before activating the QA overlay.
7
20
  */
8
- export declare function registerQaNavigationRoute(webServer: Pick<WebServer, "register">, config: ResolvedQaSurfaceConfig): () => void;
21
+ export declare function registerQaNavigationRoute(webServer: Pick<WebServer, "register">, config: ResolvedQaSurfaceConfig, options?: QaNavigationRouteOptions): () => void;
9
22
  //# sourceMappingURL=host-route.d.ts.map