@yadsh/dsh-qa-surface 0.15.7 → 0.17.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 (348) hide show
  1. package/README.md +27 -2
  2. package/lib/access/capability-catalog.js +11 -4
  3. package/lib/access/capability-catalog.js.map +1 -1
  4. package/lib/access/service.js +46 -5
  5. package/lib/access/service.js.map +1 -1
  6. package/lib/account-remotes.js +9 -0
  7. package/lib/account-remotes.js.map +1 -1
  8. package/lib/accounts/database.js +34 -3
  9. package/lib/accounts/database.js.map +1 -1
  10. package/lib/accounts/store.js +22 -2
  11. package/lib/accounts/store.js.map +1 -1
  12. package/lib/admin/service.js +4 -2
  13. package/lib/admin/service.js.map +1 -1
  14. package/lib/admin/session-log.js +3 -0
  15. package/lib/admin/session-log.js.map +1 -1
  16. package/lib/agent-scope.js +9 -0
  17. package/lib/agent-scope.js.map +1 -0
  18. package/lib/chat-sharing/native-fence.js +120 -0
  19. package/lib/chat-sharing/native-fence.js.map +1 -0
  20. package/lib/chat-sharing/resources.js +57 -0
  21. package/lib/chat-sharing/resources.js.map +1 -0
  22. package/lib/chat-sharing/store.js +199 -0
  23. package/lib/chat-sharing/store.js.map +1 -0
  24. package/lib/chat-sharing/transport.js +329 -0
  25. package/lib/chat-sharing/transport.js.map +1 -0
  26. package/lib/chat-sharing/turn-guard.js +154 -0
  27. package/lib/chat-sharing/turn-guard.js.map +1 -0
  28. package/lib/chat-sharing/types.js +2 -0
  29. package/lib/chat-sharing/types.js.map +1 -0
  30. package/lib/chat-sharing/uploads.js +55 -0
  31. package/lib/chat-sharing/uploads.js.map +1 -0
  32. package/lib/client/QaAccountsController.js +47 -2
  33. package/lib/client/QaAccountsController.js.map +1 -1
  34. package/lib/client/QaConfigController.js +7 -12
  35. package/lib/client/QaConfigController.js.map +1 -1
  36. package/lib/client/QaSessionController.js +195 -19
  37. package/lib/client/QaSessionController.js.map +1 -1
  38. package/lib/client/QaSurface.js +156 -14
  39. package/lib/client/QaSurface.js.map +1 -1
  40. package/lib/client/QaSurfaceGuard.js +6 -1
  41. package/lib/client/QaSurfaceGuard.js.map +1 -1
  42. package/lib/client/QaTranscriptAdapter.js +28 -5
  43. package/lib/client/QaTranscriptAdapter.js.map +1 -1
  44. package/lib/client/account-conversation.js +33 -0
  45. package/lib/client/account-conversation.js.map +1 -0
  46. package/lib/client/account-sessions.js +106 -0
  47. package/lib/client/account-sessions.js.map +1 -0
  48. package/lib/client/account-upload.js +30 -0
  49. package/lib/client/account-upload.js.map +1 -0
  50. package/lib/client/answer-review.js +89 -0
  51. package/lib/client/answer-review.js.map +1 -0
  52. package/lib/client/chat-artifacts.js +18 -3
  53. package/lib/client/chat-artifacts.js.map +1 -1
  54. package/lib/client/chat-sharing-api.js +2 -0
  55. package/lib/client/chat-sharing-api.js.map +1 -0
  56. package/lib/client/components/QaAnswerReviewStatus.js +45 -0
  57. package/lib/client/components/QaAnswerReviewStatus.js.map +1 -0
  58. package/lib/client/components/QaChangelog.js +92 -3
  59. package/lib/client/components/QaChangelog.js.map +1 -1
  60. package/lib/client/components/QaChatActions.js +52 -0
  61. package/lib/client/components/QaChatActions.js.map +1 -0
  62. package/lib/client/components/QaChatSharing.js +95 -0
  63. package/lib/client/components/QaChatSharing.js.map +1 -0
  64. package/lib/client/components/QaComposer.js +8 -4
  65. package/lib/client/components/QaComposer.js.map +1 -1
  66. package/lib/client/components/QaFileAttachment.js +12 -3
  67. package/lib/client/components/QaFileAttachment.js.map +1 -1
  68. package/lib/client/components/QaFilesPanel.js +11 -4
  69. package/lib/client/components/QaFilesPanel.js.map +1 -1
  70. package/lib/client/components/QaHeader.js +3 -3
  71. package/lib/client/components/QaHeader.js.map +1 -1
  72. package/lib/client/components/QaMarkdownPreview.js +86 -0
  73. package/lib/client/components/QaMarkdownPreview.js.map +1 -0
  74. package/lib/client/components/QaMessage.js +41 -10
  75. package/lib/client/components/QaMessage.js.map +1 -1
  76. package/lib/client/components/QaModal.js +17 -0
  77. package/lib/client/components/QaModal.js.map +1 -1
  78. package/lib/client/components/QaRightRail.js +6 -4
  79. package/lib/client/components/QaRightRail.js.map +1 -1
  80. package/lib/client/components/QaRightRailResize.js +129 -0
  81. package/lib/client/components/QaRightRailResize.js.map +1 -0
  82. package/lib/client/components/QaSidebar.js +11 -2
  83. package/lib/client/components/QaSidebar.js.map +1 -1
  84. package/lib/client/components/QaSourceFilters.js +22 -0
  85. package/lib/client/components/QaSourceFilters.js.map +1 -0
  86. package/lib/client/components/QaSourcesPanel.js +66 -14
  87. package/lib/client/components/QaSourcesPanel.js.map +1 -1
  88. package/lib/client/components/QaSpreadsheetPreview.js +56 -0
  89. package/lib/client/components/QaSpreadsheetPreview.js.map +1 -0
  90. package/lib/client/components/QaWelcomeNotice.js +2 -2
  91. package/lib/client/components/QaWelcomeNotice.js.map +1 -1
  92. package/lib/client/components/QaWorkspaceBrowser.js +46 -12
  93. package/lib/client/components/QaWorkspaceBrowser.js.map +1 -1
  94. package/lib/client/components/QaZoomImage.js +56 -0
  95. package/lib/client/components/QaZoomImage.js.map +1 -0
  96. package/lib/client/components/source-refs.js +57 -24
  97. package/lib/client/components/source-refs.js.map +1 -1
  98. package/lib/client/index.js +76 -8
  99. package/lib/client/index.js.map +1 -1
  100. package/lib/client/lineage.js +4 -3
  101. package/lib/client/lineage.js.map +1 -1
  102. package/lib/client/markdown/SourceImage.js +52 -0
  103. package/lib/client/markdown/SourceImage.js.map +1 -0
  104. package/lib/client/markdown/blocks.js +150 -115
  105. package/lib/client/markdown/blocks.js.map +1 -1
  106. package/lib/client/markdown/katex-css.js +1 -1
  107. package/lib/client/markdown/render.js +26 -9
  108. package/lib/client/markdown/render.js.map +1 -1
  109. package/lib/client/markdown/source-chip.js +6 -2
  110. package/lib/client/markdown/source-chip.js.map +1 -1
  111. package/lib/client/notifications/notification-dispatcher.js +50 -11
  112. package/lib/client/notifications/notification-dispatcher.js.map +1 -1
  113. package/lib/client/notifications/use-turn-notifications.js +107 -18
  114. package/lib/client/notifications/use-turn-notifications.js.map +1 -1
  115. package/lib/client/project-session-state.js +28 -13
  116. package/lib/client/project-session-state.js.map +1 -1
  117. package/lib/client/session-admission.js +9 -1
  118. package/lib/client/session-admission.js.map +1 -1
  119. package/lib/client/session-sources.js +44 -3
  120. package/lib/client/session-sources.js.map +1 -1
  121. package/lib/client/settings/sections/sources.js +1 -1
  122. package/lib/client/settings/sections/sources.js.map +1 -1
  123. package/lib/client/settings/styles.js +18 -28
  124. package/lib/client/settings/styles.js.map +1 -1
  125. package/lib/client/slash/useSlashNavigation.js +8 -5
  126. package/lib/client/slash/useSlashNavigation.js.map +1 -1
  127. package/lib/client/source-filters-styles.js +11 -0
  128. package/lib/client/source-filters-styles.js.map +1 -0
  129. package/lib/client/source-preview.js +1 -1
  130. package/lib/client/source-preview.js.map +1 -1
  131. package/lib/client/styles.js +62 -4
  132. package/lib/client/styles.js.map +1 -1
  133. package/lib/client/turn-sources.js +2 -1
  134. package/lib/client/turn-sources.js.map +1 -1
  135. package/lib/client/types.js.map +1 -1
  136. package/lib/client/use-right-rail.js +1 -1
  137. package/lib/client/use-right-rail.js.map +1 -1
  138. package/lib/client/user-settings/IntegrationTokensPage.js +30 -6
  139. package/lib/client/user-settings/IntegrationTokensPage.js.map +1 -1
  140. package/lib/client/workspace-download.js +42 -2
  141. package/lib/client/workspace-download.js.map +1 -1
  142. package/lib/client.js +6481 -2234
  143. package/lib/client.js.map +1 -1
  144. package/lib/config-resolvers/defaults.js +4 -3
  145. package/lib/config-resolvers/defaults.js.map +1 -1
  146. package/lib/config-resolvers/sources.js +2 -0
  147. package/lib/config-resolvers/sources.js.map +1 -1
  148. package/lib/config.js +3 -0
  149. package/lib/config.js.map +1 -1
  150. package/lib/enforcement/skill-policy.js +29 -4
  151. package/lib/enforcement/skill-policy.js.map +1 -1
  152. package/lib/enforcement/skill-resource-paths.js +32 -0
  153. package/lib/enforcement/skill-resource-paths.js.map +1 -0
  154. package/lib/enforcement/structured-result.js +38 -0
  155. package/lib/enforcement/structured-result.js.map +1 -0
  156. package/lib/enforcement/tool-grants.js +3 -1
  157. package/lib/enforcement/tool-grants.js.map +1 -1
  158. package/lib/index.js +447 -17
  159. package/lib/index.js.map +1 -1
  160. package/lib/integration/host-runner.js +1 -0
  161. package/lib/integration/host-runner.js.map +1 -1
  162. package/lib/integration/question-policy.js +126 -0
  163. package/lib/integration/question-policy.js.map +1 -0
  164. package/lib/integration/service.js +2 -0
  165. package/lib/integration/service.js.map +1 -1
  166. package/lib/llm-identity.js +27 -0
  167. package/lib/llm-identity.js.map +1 -0
  168. package/lib/markdown-frontmatter.js +47 -0
  169. package/lib/markdown-frontmatter.js.map +1 -0
  170. package/lib/markdown-images.js +33 -0
  171. package/lib/markdown-images.js.map +1 -0
  172. package/lib/prompt-notes.js +19 -2
  173. package/lib/prompt-notes.js.map +1 -1
  174. package/lib/provenance/collector.js +15 -1
  175. package/lib/provenance/collector.js.map +1 -1
  176. package/lib/provenance/connectors.js +57 -27
  177. package/lib/provenance/connectors.js.map +1 -1
  178. package/lib/provenance/dedupe.js +25 -1
  179. package/lib/provenance/dedupe.js.map +1 -1
  180. package/lib/provenance/document-preview.js +31 -3
  181. package/lib/provenance/document-preview.js.map +1 -1
  182. package/lib/provenance/extractors.js +88 -4
  183. package/lib/provenance/extractors.js.map +1 -1
  184. package/lib/provenance/file-download.js +56 -0
  185. package/lib/provenance/file-download.js.map +1 -0
  186. package/lib/provenance/file-preview.js +20 -2
  187. package/lib/provenance/file-preview.js.map +1 -1
  188. package/lib/provenance/host-store.js +59 -10
  189. package/lib/provenance/host-store.js.map +1 -1
  190. package/lib/provenance/integration-extractor.js +62 -0
  191. package/lib/provenance/integration-extractor.js.map +1 -0
  192. package/lib/provenance/snapshot-store.js +2 -0
  193. package/lib/provenance/snapshot-store.js.map +1 -1
  194. package/lib/provenance/source-content.js +103 -0
  195. package/lib/provenance/source-content.js.map +1 -0
  196. package/lib/provenance/source-image.js +57 -0
  197. package/lib/provenance/source-image.js.map +1 -0
  198. package/lib/provenance/spreadsheet-preview.js +52 -0
  199. package/lib/provenance/spreadsheet-preview.js.map +1 -0
  200. package/lib/qa-tools/docs-tools.js +14 -0
  201. package/lib/qa-tools/docs-tools.js.map +1 -1
  202. package/lib/questions.js +6 -1
  203. package/lib/questions.js.map +1 -1
  204. package/lib/secure-session.js +9 -3
  205. package/lib/secure-session.js.map +1 -1
  206. package/lib/session-fork-host.js +157 -0
  207. package/lib/session-fork-host.js.map +1 -0
  208. package/lib/session-fork.js +34 -0
  209. package/lib/session-fork.js.map +1 -0
  210. package/lib/session-ownership.js +5 -1
  211. package/lib/session-ownership.js.map +1 -1
  212. package/lib/shared/documents.js +12 -0
  213. package/lib/shared/documents.js.map +1 -1
  214. package/lib/shared/session-lineage.js +6 -0
  215. package/lib/shared/session-lineage.js.map +1 -0
  216. package/lib/slash/draft-target.js +21 -0
  217. package/lib/slash/draft-target.js.map +1 -0
  218. package/lib/slash/remotes.js +39 -4
  219. package/lib/slash/remotes.js.map +1 -1
  220. package/lib/typert.host.js +1869 -163
  221. package/lib/typert.remote-client.d.ts +56 -5
  222. package/lib/typert.remote-client.js +1678 -154
  223. package/lib/types/access/capability-catalog.d.ts +1 -1
  224. package/lib/types/access/service.d.ts +7 -0
  225. package/lib/types/access.js +2 -0
  226. package/lib/types/access.js.map +1 -0
  227. package/lib/types/account-remotes.d.ts +3 -0
  228. package/lib/types/accounts/database.d.ts +5 -0
  229. package/lib/types/accounts/store.d.ts +7 -2
  230. package/lib/types/accounts.js +2 -0
  231. package/lib/types/accounts.js.map +1 -0
  232. package/lib/types/admin/session-log.d.ts +2 -0
  233. package/lib/types/admin.js +2 -0
  234. package/lib/types/admin.js.map +1 -0
  235. package/lib/types/agent-scope.d.ts +4 -0
  236. package/lib/types/answer-review.js +2 -0
  237. package/lib/types/answer-review.js.map +1 -0
  238. package/lib/types/capability.js +2 -0
  239. package/lib/types/capability.js.map +1 -0
  240. package/lib/types/chat-sharing/native-fence.d.ts +11 -0
  241. package/lib/types/chat-sharing/resources.d.ts +5 -0
  242. package/lib/types/chat-sharing/store.d.ts +29 -0
  243. package/lib/types/chat-sharing/transport.d.ts +32 -0
  244. package/lib/types/chat-sharing/turn-guard.d.ts +21 -0
  245. package/lib/types/chat-sharing/types.d.ts +25 -0
  246. package/lib/types/chat-sharing/uploads.d.ts +5 -0
  247. package/lib/types/client/QaAccountsController.d.ts +4 -0
  248. package/lib/types/client/QaConfigController.d.ts +3 -2
  249. package/lib/types/client/QaSessionController.d.ts +17 -3
  250. package/lib/types/client/QaSurface.d.ts +6 -1
  251. package/lib/types/client/account-conversation.d.ts +6 -0
  252. package/lib/types/client/account-sessions.d.ts +7 -0
  253. package/lib/types/client/account-upload.d.ts +15 -0
  254. package/lib/types/client/answer-review.d.ts +16 -0
  255. package/lib/types/client/chat-sharing-api.d.ts +35 -0
  256. package/lib/types/client/components/QaAnswerReviewStatus.d.ts +8 -0
  257. package/lib/types/client/components/QaChatActions.d.ts +7 -0
  258. package/lib/types/client/components/QaChatSharing.d.ts +12 -0
  259. package/lib/types/client/components/QaComposer.d.ts +2 -0
  260. package/lib/types/client/components/QaFileAttachment.d.ts +3 -2
  261. package/lib/types/client/components/QaFilesPanel.d.ts +4 -1
  262. package/lib/types/client/components/QaMarkdownPreview.d.ts +13 -0
  263. package/lib/types/client/components/QaMessage.d.ts +5 -2
  264. package/lib/types/client/components/QaModal.d.ts +9 -0
  265. package/lib/types/client/components/QaRightRail.d.ts +3 -2
  266. package/lib/types/client/components/QaRightRailResize.d.ts +9 -0
  267. package/lib/types/client/components/QaSidebar.d.ts +2 -0
  268. package/lib/types/client/components/QaSourceFilters.d.ts +12 -0
  269. package/lib/types/client/components/QaSpreadsheetPreview.d.ts +8 -0
  270. package/lib/types/client/components/QaWelcomeNotice.d.ts +1 -1
  271. package/lib/types/client/components/QaWorkspaceBrowser.d.ts +8 -1
  272. package/lib/types/client/components/QaZoomImage.d.ts +38 -0
  273. package/lib/types/client/components/source-refs.d.ts +1 -0
  274. package/lib/types/client/lineage.d.ts +2 -2
  275. package/lib/types/client/markdown/SourceImage.d.ts +7 -0
  276. package/lib/types/client/markdown/blocks.d.ts +8 -1
  277. package/lib/types/client/markdown/render.d.ts +5 -1
  278. package/lib/types/client/markdown/source-chip.d.ts +1 -0
  279. package/lib/types/client/notifications/notification-dispatcher.d.ts +10 -6
  280. package/lib/types/client/notifications/use-turn-notifications.d.ts +4 -0
  281. package/lib/types/client/project-session-state.d.ts +1 -0
  282. package/lib/types/client/session-admission.d.ts +2 -0
  283. package/lib/types/client/session-sources.d.ts +1 -0
  284. package/lib/types/client/settings/styles.d.ts +2 -5
  285. package/lib/types/client/source-filters-styles.d.ts +2 -0
  286. package/lib/types/client/turn-sources.d.ts +1 -1
  287. package/lib/types/client/types.d.ts +18 -5
  288. package/lib/types/client/workspace-download.d.ts +9 -1
  289. package/lib/types/config.js +2 -0
  290. package/lib/types/config.js.map +1 -0
  291. package/lib/types/documents.js +2 -0
  292. package/lib/types/documents.js.map +1 -0
  293. package/lib/types/enforcement/skill-resource-paths.d.ts +5 -0
  294. package/lib/types/enforcement/structured-result.d.ts +11 -0
  295. package/lib/types/expert-memory.js +2 -0
  296. package/lib/types/expert-memory.js.map +1 -0
  297. package/lib/types/index.d.ts +42 -3
  298. package/lib/types/integration/contract.d.ts +1 -0
  299. package/lib/types/integration/question-policy.d.ts +20 -0
  300. package/lib/types/integration/service.d.ts +1 -0
  301. package/lib/types/llm-identity.d.ts +20 -0
  302. package/lib/types/markdown-frontmatter.d.ts +10 -0
  303. package/lib/types/markdown-images.d.ts +3 -0
  304. package/lib/types/policy.js +2 -0
  305. package/lib/types/policy.js.map +1 -0
  306. package/lib/types/prompt-notes.d.ts +3 -1
  307. package/lib/types/provenance/connectors.d.ts +4 -1
  308. package/lib/types/provenance/document-preview.d.ts +5 -2
  309. package/lib/types/provenance/extractors.d.ts +2 -0
  310. package/lib/types/provenance/file-download.d.ts +10 -0
  311. package/lib/types/provenance/file-preview.d.ts +2 -1
  312. package/lib/types/provenance/host-store.d.ts +2 -0
  313. package/lib/types/provenance/integration-extractor.d.ts +5 -0
  314. package/lib/types/provenance/source-content.d.ts +19 -0
  315. package/lib/types/provenance/source-image.d.ts +4 -0
  316. package/lib/types/provenance/spreadsheet-preview.d.ts +5 -0
  317. package/lib/types/provenance/types.d.ts +5 -0
  318. package/lib/types/qa-tools/docs-tools.d.ts +2 -0
  319. package/lib/types/quality.js +7 -0
  320. package/lib/types/quality.js.map +1 -0
  321. package/lib/types/questions.d.ts +2 -1
  322. package/lib/types/session-fork-host.d.ts +27 -0
  323. package/lib/types/session-fork.d.ts +7 -0
  324. package/lib/types/session.js +2 -0
  325. package/lib/types/session.js.map +1 -0
  326. package/lib/types/shared/documents.d.ts +2 -0
  327. package/lib/types/shared/session-lineage.d.ts +7 -0
  328. package/lib/types/skills.js +2 -0
  329. package/lib/types/skills.js.map +1 -0
  330. package/lib/types/slash/draft-target.d.ts +7 -0
  331. package/lib/types/slash/remotes.d.ts +7 -0
  332. package/lib/types/slash.js +2 -0
  333. package/lib/types/slash.js.map +1 -0
  334. package/lib/types/types/access.d.ts +43 -0
  335. package/lib/types/types/accounts.d.ts +177 -0
  336. package/lib/types/types/admin.d.ts +286 -0
  337. package/lib/types/types/answer-review.d.ts +11 -0
  338. package/lib/types/types/capability.d.ts +230 -0
  339. package/lib/types/types/config.d.ts +597 -0
  340. package/lib/types/types/documents.d.ts +34 -0
  341. package/lib/types/types/expert-memory.d.ts +35 -0
  342. package/lib/types/types/policy.d.ts +54 -0
  343. package/lib/types/types/quality.d.ts +100 -0
  344. package/lib/types/types/session.d.ts +397 -0
  345. package/lib/types/types/skills.d.ts +143 -0
  346. package/lib/types/types/slash.d.ts +159 -0
  347. package/lib/types/types.d.ts +14 -2180
  348. package/package.json +8 -7
@@ -1,6 +1,6 @@
1
1
  import type { Agent } from "@deepseek-ai/dsh-agent";
2
2
  import type { Context } from "@deepseek-ai/cordis";
3
- import type { ScopeKey } from "@deepseek-ai/dsh-scope";
3
+ import { type ScopeKey } from "@deepseek-ai/dsh-scope";
4
4
  import type { SkillSummary } from "@deepseek-ai/dsh-skill";
5
5
  import type { QaCapabilityDescriptor, QaSkillDescriptor } from "../types.js";
6
6
  export interface CapabilityCatalogSnapshot {
@@ -126,6 +126,11 @@ export declare class QaAccessService {
126
126
  reclaimDelegatedSessions(): Promise<void>;
127
127
  /** Throttled, off the critical path, and never awaited by a request. */
128
128
  private maybeSweepDelegatedSessions;
129
+ /** Read-only preview for the role a draft will materialize; reserves nothing. */
130
+ slashDraftSkills(token: string, requestedSubrole: string | null, adminPreview: boolean): Promise<{
131
+ skills: import("@deepseek-ai/dsh-skill").SkillSummary[];
132
+ policy: QaEffectiveCapabilityPolicy | undefined;
133
+ }>;
129
134
  current(token: string): QaCurrentAccess;
130
135
  session(token: string, sessionId: string): QaSessionAccess;
131
136
  reserveSession(token: string, sessionId: string, requestedSubrole: string | null, adminPreview: boolean): QaAccountUserPublic;
@@ -185,6 +190,8 @@ export declare class QaAccessService {
185
190
  * foreign browser never reaches it.
186
191
  */
187
192
  policyForColdSession(token: string, sessionId: string): Promise<QaEffectiveCapabilityPolicy>;
193
+ /** A participant's own live ceiling, without claiming or changing the chat. */
194
+ participantPolicy(userId: string, sessionId: string): Promise<QaEffectiveCapabilityPolicy>;
188
195
  /** The browser's entry point: the token resolves the owning account. */
189
196
  policyForSession(token: string, sessionId: string, agent: Agent): Promise<QaResolvedSessionPolicy | undefined>;
190
197
  /** Activation history of one session, for review and quality analysis. */
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=access.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access.js","sourceRoot":"","sources":["../../src/types/access.ts"],"names":[],"mappings":""}
@@ -81,6 +81,9 @@ export interface QaAccountRemotes {
81
81
  revokeServiceToken(token: string, tokenId: string): {
82
82
  readonly revoked: boolean;
83
83
  };
84
+ setServiceTokenClarifications(token: string, tokenId: string, allowed: boolean): {
85
+ readonly updated: boolean;
86
+ };
84
87
  }
85
88
  /** Build the account-remotes context for one `QaSurface` service instance. */
86
89
  export declare function createQaAccountRemotes(options: {
@@ -13,6 +13,7 @@ interface PasswordResetRow {
13
13
  * nowhere else.
14
14
  */
15
15
  export interface StoredServiceToken {
16
+ readonly allowClarifications: boolean;
16
17
  readonly id: string;
17
18
  readonly userId: string;
18
19
  readonly label: string;
@@ -95,6 +96,10 @@ export declare class QaAccountsDatabase {
95
96
  deleteOwnership(sessionIds: readonly string[]): void;
96
97
  /** Record one freshly minted integration token (digest only, never a secret). */
97
98
  insertServiceToken(token: StoredServiceToken): void;
99
+ /** Store the authenticated token policy before admitting its request to the inbox. */
100
+ recordIntegrationRequestPolicy(sessionId: string, requestId: string, allowed: boolean): void;
101
+ integrationClarificationsAllowed(sessionId: string, requestId: string): boolean;
102
+ setServiceTokenClarifications(userId: string, tokenId: string, allowed: boolean): boolean;
98
103
  /**
99
104
  * One integration token by id, revoked and expired ones included.
100
105
  *
@@ -41,8 +41,9 @@ export interface QaSessionFacts {
41
41
  export interface QaServiceTokenIssueInput {
42
42
  /** A note for the operator's token list; empty becomes a generic label. */
43
43
  readonly label?: string;
44
- /** Requested scopes; unknown ones are dropped, empty falls back to `ask`. */
44
+ /** Requested scopes; unknown ones are dropped, explicit empty grants none. */
45
45
  readonly scopes?: readonly string[];
46
+ readonly allowClarifications?: boolean;
46
47
  /** How long the token lives; bounded, and the session TTL when omitted. */
47
48
  readonly ttlDays?: number;
48
49
  /**
@@ -54,6 +55,7 @@ export interface QaServiceTokenIssueInput {
54
55
  }
55
56
  /** What a presented integration token resolved to. */
56
57
  export interface QaVerifiedServiceToken {
58
+ readonly allowClarifications: boolean;
57
59
  readonly tokenId: string;
58
60
  readonly userId: string;
59
61
  readonly scopes: readonly QaServiceTokenScope[];
@@ -421,6 +423,9 @@ export declare class QaAccounts {
421
423
  * @returns true when a live token was revoked.
422
424
  */
423
425
  revokeServiceToken(token: string, tokenId: string): boolean;
426
+ recordIntegrationRequestPolicy(sessionId: string, requestId: string, allowed: boolean): void;
427
+ setServiceTokenClarifications(token: string, tokenId: string, allowed: boolean): boolean;
428
+ integrationClarificationsAllowed(sessionId: string, requestId: string): boolean;
424
429
  /** Revoke one integration token of an account the caller has established. */
425
430
  revokeServiceTokenFor(user: QaAccountUserPublic, tokenId: string): boolean;
426
431
  /** The caller if it administers the deployment, or a refusal. */
@@ -448,7 +453,7 @@ export declare class QaAccounts {
448
453
  * API, which resolves its own service token — need the public shape the
449
454
  * token-shaped entries return, without a browser token to hand.
450
455
  */
451
- accountById(userId: string): QaAccountUserPublic | undefined;
456
+ accountById(userId: string, includeDisabled?: boolean): QaAccountUserPublic | undefined;
452
457
  findUser(email: string): QaAccountUserPublic | undefined;
453
458
  /**
454
459
  * Operator write: replace one account's profile, addressed by email. The
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=accounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../src/types/accounts.ts"],"names":[],"mappings":""}
@@ -26,6 +26,8 @@ export interface QaStoredSessionHeader {
26
26
  readonly cwd?: string;
27
27
  /** Set on a subagent's session; such sessions are not conversations. */
28
28
  readonly parentSessionId?: string;
29
+ /** Ordinary seeded branch; never a delegated run. */
30
+ readonly isFork?: boolean;
29
31
  readonly agentPreset?: string;
30
32
  }
31
33
  export type QaSessionReadResult = {
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=admin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"admin.js","sourceRoot":"","sources":["../../src/types/admin.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import { type ScopeKey } from "@deepseek-ai/dsh-scope";
2
+ /** Resolve the context's native scope, with Agent identity as a legacy fallback. */
3
+ export declare function qaAgentScope(agent: unknown): ScopeKey | undefined;
4
+ //# sourceMappingURL=agent-scope.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=answer-review.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"answer-review.js","sourceRoot":"","sources":["../../src/types/answer-review.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=capability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capability.js","sourceRoot":"","sources":["../../src/types/capability.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ import type { IncomingMessage, ServerResponse } from "node:http";
3
+ declare module "@deepseek-ai/cordis" {
4
+ interface Events {
5
+ "connection/request"(request: IncomingMessage, response: ServerResponse, next: () => Promise<void>): Promise<void>;
6
+ }
7
+ }
8
+ export declare function qaNativeEndpointDenied(endpoint: string): boolean;
9
+ /** Native operator APIs carry no QA identity. Accounts use the QA transport. */
10
+ export declare function installQaNativeFence(ctx: Context, enabled: () => boolean): () => void;
11
+ //# sourceMappingURL=native-fence.d.ts.map
@@ -0,0 +1,5 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ /** Paths reach recipients only through the chat's sources or reported outputs. */
3
+ export declare function qaChatPublishedFile(ctx: Context, id: string, requested: string, sourceAllowed: (id: string, path: string) => boolean): boolean;
4
+ export declare function qaChatAttachmentPath(ctx: Context, id: string, attachmentId: string): string;
5
+ //# sourceMappingURL=resources.d.ts.map
@@ -0,0 +1,29 @@
1
+ import { SqliteDatabase } from "@yadsh/dsh-plugin-kit/sqlite";
2
+ import type { QaAccounts } from "../accounts/store.js";
3
+ import type { QaChatAccess, QaChatGrant, QaChatMode, QaChatAuthor } from "./types.js";
4
+ /** Separate schema: installing sharing does not upgrade the accounts CLI's DB. */
5
+ export declare class QaChatSharingStore {
6
+ private readonly accounts;
7
+ readonly storage: SqliteDatabase;
8
+ constructor(filePath: string, accounts: () => QaAccounts);
9
+ access(token: string, sessionId: string): QaChatAccess;
10
+ private accessForActor;
11
+ owner(token: string, sessionId: string): QaChatAccess;
12
+ write(token: string, sessionId: string): QaChatAccess;
13
+ /** Exact address lookup after ownership, never an account directory. */
14
+ set(token: string, sessionId: string, email: string, mode: QaChatMode | null): readonly QaChatGrant[];
15
+ grants(token: string, sessionId: string): readonly QaChatGrant[];
16
+ visible(token: string): readonly QaChatAccess[];
17
+ revalidate(token: string, previous: QaChatAccess): QaChatAccess;
18
+ recordAuthor(token: string, access: QaChatAccess, requestId: string): void;
19
+ authors(token: string, sessionId: string): readonly QaChatAuthor[];
20
+ requestActor(sessionId: string, requestId: string): {
21
+ userId: string;
22
+ revision: number | null;
23
+ } | undefined;
24
+ /** Copy only immutable attribution for the native prefix, never memberships. */
25
+ forkAuthors(sourceId: string, targetId: string, requests: readonly string[]): void;
26
+ dropSession(id: string): void;
27
+ actorStillAllowed(sessionId: string, userId: string, revision: number): boolean;
28
+ }
29
+ //# sourceMappingURL=store.d.ts.map
@@ -0,0 +1,32 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ import type { SessionControlFrame, SessionFollowFrame, SessionFollowRequest, SessionPageRequest, SessionPage, SessionListValue, SessionProjectionsValue, SessionPromptRequest, SessionPromptValue, SessionAttachmentRequest, SessionAttachmentValue, SessionRenameRequest, SessionRenameValue, SessionCancelValue, SessionUpdateQueueRequest, SessionUpdateQueueValue, SessionSearchRequest, SessionSearchValue, SessionSelectModelRequest, SessionSelectModelValue } from "@deepseek-ai/dsh-api-session-controller/types";
3
+ import type { QaChatSharingStore } from "./store.js";
4
+ /** Durable access is checked before and after asynchronous reads and per frame. */
5
+ export declare class QaChatTransport {
6
+ private readonly ctx;
7
+ private readonly store;
8
+ private readonly admit;
9
+ private readonly participantPolicy?;
10
+ private readonly locks;
11
+ constructor(ctx: Context, store: () => QaChatSharingStore, admit: (token: string, id: string) => Promise<unknown>, participantPolicy?: ((userId: string, id: string) => Promise<unknown>) | undefined);
12
+ list(token: string, signal: AbortSignal): Promise<SessionListValue>;
13
+ private filterListing;
14
+ page(token: string, request: SessionPageRequest, signal: AbortSignal): Promise<SessionPage>;
15
+ search(token: string, request: SessionSearchRequest, signal: AbortSignal): Promise<SessionSearchValue>;
16
+ projections(token: string, id: string, signal: AbortSignal): Promise<SessionProjectionsValue>;
17
+ follow(token: string, request: SessionFollowRequest, signal: AbortSignal): AsyncIterable<SessionFollowFrame>;
18
+ control(token: string, signal: AbortSignal): AsyncIterable<SessionControlFrame>;
19
+ /** Queue admission is serialized, rechecked after resume, and signed before insertion. */
20
+ prompt(token: string, request: SessionPromptRequest, signal: AbortSignal): Promise<SessionPromptValue>;
21
+ attachment(token: string, request: SessionAttachmentRequest): Promise<SessionAttachmentValue>;
22
+ rename(token: string, request: SessionRenameRequest): Promise<SessionRenameValue>;
23
+ selectModel(token: string, request: SessionSelectModelRequest): Promise<SessionSelectModelValue>;
24
+ cancel(token: string, id: string): Promise<SessionCancelValue>;
25
+ updateQueue(token: string, request: SessionUpdateQueueRequest): Promise<SessionUpdateQueueValue>;
26
+ private ownerOperation;
27
+ private serial;
28
+ private sessionAccess;
29
+ private addressAccess;
30
+ private signRecord;
31
+ }
32
+ //# sourceMappingURL=transport.d.ts.map
@@ -0,0 +1,21 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ import type { QaChatSharingStore } from "./store.js";
3
+ import type { QaEffectiveCapabilityPolicy } from "../types.js";
4
+ /** A mixed batch receives the intersection, never the union, of actor rights. */
5
+ export declare class QaChatTurnGuard {
6
+ private readonly ctx;
7
+ private readonly store;
8
+ private readonly policy;
9
+ private readonly enabled;
10
+ private readonly resourceSafe;
11
+ private readonly actors;
12
+ private readonly disposers;
13
+ constructor(ctx: Context, store: () => QaChatSharingStore, policy: (userId: string, sessionId: string) => Promise<QaEffectiveCapabilityPolicy>, enabled?: () => boolean, resourceSafe?: (tool: string) => boolean);
14
+ private root;
15
+ private participants;
16
+ collaborative(sessionId: string): boolean;
17
+ /** Called after permission mutation. Only a turn carrying stale input stops. */
18
+ revoke(sessionId: string): void;
19
+ dispose(): void;
20
+ }
21
+ //# sourceMappingURL=turn-guard.d.ts.map
@@ -0,0 +1,25 @@
1
+ export type QaChatMode = "read" | "collaborate";
2
+ export interface QaChatAccess {
3
+ readonly sessionId: string;
4
+ readonly ownerId: string;
5
+ readonly ownerName: string;
6
+ readonly actorId: string;
7
+ readonly mode: QaChatMode | "owner";
8
+ readonly revision: number;
9
+ }
10
+ export interface QaChatGrant {
11
+ readonly userId: string;
12
+ readonly email: string;
13
+ readonly displayName: string;
14
+ readonly mode: QaChatMode;
15
+ }
16
+ export interface QaChatAuthor {
17
+ readonly requestId: string;
18
+ readonly userId: string;
19
+ readonly displayName: string;
20
+ }
21
+ /** JSON-shaped native frames; the local recursive codec owns the wire schema. */
22
+ export type QaChatJson = null | string | number | boolean | readonly QaChatJson[] | {
23
+ readonly [key: string]: QaChatJson;
24
+ };
25
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1,5 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ import type { QaChatSharingStore } from "./store.js";
3
+ /** Authenticate before transferring the body, and fence every uploaded chunk. */
4
+ export declare function installQaChatUploads(ctx: Context, store: () => QaChatSharingStore, admit: (token: string, id: string) => Promise<unknown>): () => Promise<void>;
5
+ //# sourceMappingURL=uploads.d.ts.map
@@ -37,6 +37,7 @@ export type QaAccountsSnapshot = {
37
37
  readonly ownership: readonly QaOwnershipEntry[];
38
38
  /** Bumped whenever ownedIds, ownIds or ownership changes; re-projects lists. */
39
39
  readonly ownedRevision: number;
40
+ readonly sharedChats?: readonly import("../chat-sharing/types.js").QaChatAccess[];
40
41
  };
41
42
  /** The Host's password floor, mirrored so a refusal and its copy name the same number. */
42
43
  export declare const QA_MIN_PASSWORD_LENGTH = 8;
@@ -180,6 +181,7 @@ export declare class QaAccountsController {
180
181
  * authority on whose token it is; a refusal is shown as it arrives.
181
182
  */
182
183
  revokeServiceToken(tokenId: string): Promise<QaIntegrationTokenResult<null>>;
184
+ setServiceTokenClarifications(tokenId: string, allowed: boolean): Promise<QaIntegrationTokenResult<null>>;
183
185
  private authenticate;
184
186
  /** Own the account, migrate the legacy index, replay held ratings, then auth. */
185
187
  private enterSession;
@@ -188,6 +190,8 @@ export declare class QaAccountsController {
188
190
  /** The admin cross-user ownership view; failures degrade to an empty map. */
189
191
  private fetchOwnership;
190
192
  /** Session id → owner display name; empty unless an admin is signed in. */
193
+ private fetchSharedChats;
194
+ /** Session id → owner display name; empty unless an admin is signed in. */
191
195
  ownerNames(): ReadonlyMap<string, string>;
192
196
  /**
193
197
  * The chat owner's display name for author labels: admins see it on
@@ -13,7 +13,8 @@ export type QaConfigFallback = () => Promise<ResolvedQaSurfaceConfig>;
13
13
  * The DSH gateway pins settings RPCs to loopback, so a browser served over the
14
14
  * LAN always sees the namespace as `unavailable`. When the caller supplies the
15
15
  * `qaSurface/describe` Remote as a fallback, that channel answers instead: the
16
- * projection waits in `loading` until it settles, then reports the Host-owned
16
+ * projection asks this channel even while a fenced settings request remains
17
+ * in `loading`, then reports the Host-owned
17
18
  * configuration as `ready`. A rejected fallback returns the projection to
18
19
  * `unavailable`, exactly as when no fallback exists.
19
20
  */
@@ -43,7 +44,7 @@ export declare class QaConfigController {
43
44
  refreshFallback(): void;
44
45
  /**
45
46
  * The fallback trigger rides every refresh: the scope flips to
46
- * `unavailable` whenever the browser is served over the LAN, which a
47
+ * `unavailable` or stuck in `loading` when the gateway fences settings, which a
47
48
  * constructor-time check can miss. The state guard makes repeats a no-op,
48
49
  * so one fetch runs per controller lifetime; the recursive refresh lets the
49
50
  * pending state surface before the first notification pass.
@@ -1,6 +1,7 @@
1
1
  import type { ConnectionGenerationState } from "@deepseek-ai/dsh-client-connection/client";
2
+ import type { QaSharingApi } from "./chat-sharing-api.js";
2
3
  import type { QaAttachmentDraft, QaQueueOperation, QaSessionState, ResolvedQaSurfaceConfig } from "../types.js";
3
- import type { QaApprovalApi, QaConversation, QaCreateSession, QaFileUpload, QaQueueStatusRemote, QaSecureSession, QaSessions, QaSessionsApi, QaQuestionApi, QaSlashApi, QaSourceApi, StorageLike } from "./types.js";
4
+ import type { QaApprovalApi, QaConversation, QaCreateSession, QaForkSession, QaFileUpload, QaQueueStatusRemote, QaSecureSession, QaSessions, QaSessionsApi, QaQuestionApi, QaSlashApi, QaSourceApi, StorageLike } from "./types.js";
4
5
  import type { QaApprovalDecision, QaQuestionAnswerItem } from "../types.js";
5
6
  declare module "@deepseek-ai/dsh-api-session-controller/client" {
6
7
  interface SessionReferenceSourceMap {
@@ -24,9 +25,11 @@ export interface QaAccountsFacade {
24
25
  readonly onAuthRequired: () => void;
25
26
  }
26
27
  export interface QaSessionControllerOptions {
28
+ readonly sharingApi?: QaSharingApi;
27
29
  readonly sessions: QaSessions;
28
30
  readonly api: QaSessionsApi;
29
31
  readonly createSession: QaCreateSession;
32
+ readonly forkSession?: QaForkSession;
30
33
  /** Conversation assembly feeding the transcript projection. */
31
34
  readonly conversation: QaConversation;
32
35
  readonly connection: ConnectionGenerationState;
@@ -87,6 +90,9 @@ export declare class QaSessionController {
87
90
  private readonly listeners;
88
91
  private readonly sessions;
89
92
  private readonly createSessionRemote;
93
+ private readonly forkSessionRemote?;
94
+ private forking;
95
+ private inheritedThroughSeq;
90
96
  private readonly conversation;
91
97
  private readonly connection;
92
98
  private readonly config;
@@ -139,6 +145,9 @@ export declare class QaSessionController {
139
145
  private viewingSubagent;
140
146
  private connectedOnce;
141
147
  private disposed;
148
+ private chatAccess;
149
+ private readonly sharingApi;
150
+ private accessPoll;
142
151
  private generation;
143
152
  /**
144
153
  * The session the current chat identity names, or null while the chat it
@@ -192,6 +201,7 @@ export declare class QaSessionController {
192
201
  private slashError;
193
202
  private slashLoadedAt;
194
203
  private slashLoading;
204
+ private slashReadRevision;
195
205
  /** Last published view; its identity is the render signal. */
196
206
  private slashViewCache;
197
207
  /** Bumped to re-open a palette the user dismissed; see `QaSlashView`. */
@@ -221,7 +231,7 @@ export declare class QaSessionController {
221
231
  * call this surface makes — while a human command goes to the Host's command
222
232
  * runtime and never becomes a model message.
223
233
  */
224
- send(text: string, attachments?: readonly QaAttachmentDraft[], pick?: string | null): Promise<boolean>;
234
+ send(text: string, attachments?: readonly QaAttachmentDraft[], pick?: string | null, fastReview?: boolean): Promise<boolean>;
225
235
  /**
226
236
  * What the stand answers about its load, or null when it does not answer.
227
237
  *
@@ -253,6 +263,7 @@ export declare class QaSessionController {
253
263
  * skill registry has no browser-facing change event, so a skill installed
254
264
  * while the page is open is only discovered by asking again.
255
265
  */
266
+ private slashReadTarget;
256
267
  refreshSlashCatalog(force?: boolean): Promise<void>;
257
268
  /**
258
269
  * Install one catalog answer. `null` means the deployment runs with the
@@ -281,7 +292,7 @@ export declare class QaSessionController {
281
292
  * hides the marker message, and the consecutive turns read as variants of
282
293
  * the original question (switched in the surface).
283
294
  */
284
- regenerate(): Promise<boolean>;
295
+ regenerate(fastReview?: boolean): Promise<boolean>;
285
296
  stop(): Promise<void>;
286
297
  /**
287
298
  * Edit, send now, or drop one message that still waits for its turn. Every
@@ -327,6 +338,8 @@ export declare class QaSessionController {
327
338
  * deployment's only chance to learn the reason.
328
339
  */
329
340
  private materializeDraft;
341
+ /** Branch a completed answer without submitting or cancelling a turn. */
342
+ forkFromAnswer(answerSeq: number): Promise<void>;
330
343
  /**
331
344
  * Open one of this browser's indexed chats. The id must be present in the
332
345
  * host session list and pass policy attestation; an unknown id is forgotten
@@ -557,6 +570,7 @@ export declare class QaSessionController {
557
570
  */
558
571
  private attestPolicy;
559
572
  private emit;
573
+ private refreshChatAccess;
560
574
  /**
561
575
  * Answer a request the Host parked for this chat. The Host re-checks the
562
576
  * request against the chat, so an answer that lost its race is a no-op; the
@@ -3,19 +3,24 @@ import type { InjectFace, PropsRenderSlots, PropsRuntime } from "@deepseek-ai/ds
3
3
  import type { QaConfigController } from "./QaConfigController.js";
4
4
  import type { QaRouteController } from "./QaRouteController.js";
5
5
  import type { QaAccountsController } from "./QaAccountsController.js";
6
- import type { QaApprovalApi, QaAccessApi, QaAdminApi, QaConversation, QaCreateSession, QaFileUpload, QaQueueStatusRemote, QaSecureSession, QaSessions, QaSessionsApi, QaQuestionApi, QaSkillApi, QaSlashApi, QaSourceApi } from "./types.js";
6
+ import type { QaApprovalApi, QaAccessApi, QaAdminApi, QaConversation, QaCreateSession, QaForkSession, QaFileUpload, QaQueueStatusRemote, QaSecureSession, QaSessions, QaSessionsApi, QaQuestionApi, QaSkillApi, QaSlashApi, QaSourceApi } from "./types.js";
7
7
  import type { QaSurfacePanelRegistry } from "./panels/registry.js";
8
8
  import type { QaUserSettingsSections } from "./settings-extensions/index.js";
9
9
  import type { QaAuditController } from "./audit/controller.js";
10
+ import type { QaSharingApi } from "./chat-sharing-api.js";
10
11
  export interface QaSurfaceFace {
12
+ readonly sharingApi?: QaSharingApi;
11
13
  readonly route: QaRouteController;
12
14
  readonly config: QaConfigController;
13
15
  readonly sessions: QaSessions;
14
16
  readonly conversation: QaConversation;
17
+ /** Select the authenticated transport after asynchronous Host config loads. */
18
+ readonly resolveRuntime?: (accountsEnabled: boolean) => Pick<QaSurfaceFace, "sessions" | "conversation">;
15
19
  readonly api: QaSessionsApi;
16
20
  readonly connection: ConnectionGenerationState;
17
21
  readonly secureSession: QaSecureSession;
18
22
  readonly createSession: QaCreateSession;
23
+ readonly forkSession?: QaForkSession;
19
24
  readonly accessApi: QaAccessApi;
20
25
  /**
21
26
  * The administrative console's surface. Optional so an older Host that does
@@ -0,0 +1,6 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ import type { UiConversation } from "@deepseek-ai/dsh-client-ui-conversation/client";
3
+ import type { QaSessions } from "./types.js";
4
+ /** Native assembly must use the same Session scope as the secured transport. */
5
+ export declare function createQaAccountConversation(ctx: Context, sessions: QaSessions, source: UiConversation): UiConversation;
6
+ //# sourceMappingURL=account-conversation.d.ts.map
@@ -0,0 +1,7 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ import type { QaSessions } from "./types.js";
3
+ import type { QaChatWire, QaSessionRemotes } from "./chat-sharing-api.js";
4
+ import type { ConnectionGenerationState } from "@deepseek-ai/dsh-client-connection/client";
5
+ /** Use the installed native Session class and projections with a tokenized transport. */
6
+ export declare function createQaAccountSessions(ctx: Context, root: QaSessions, remote: QaSessionRemotes, wire: QaChatWire, token: () => string | null, generation: ConnectionGenerationState, subscribeAccount: (listener: () => void) => () => void): QaSessions;
7
+ //# sourceMappingURL=account-sessions.d.ts.map
@@ -0,0 +1,15 @@
1
+ import type { QaFileUpload } from "./types.js";
2
+ export interface QaUploadCarrier {
3
+ post(request: {
4
+ path: string;
5
+ body: Blob;
6
+ headers: Record<string, string>;
7
+ signal?: AbortSignal;
8
+ }): Promise<{
9
+ status: number;
10
+ body: string;
11
+ }>;
12
+ }
13
+ /** Use the native background carrier, addressed to the authenticated QA route. */
14
+ export declare function createQaAccountUpload(carrier: () => QaUploadCarrier | undefined, token: () => string | null): QaFileUpload;
15
+ //# sourceMappingURL=account-upload.d.ts.map
@@ -0,0 +1,16 @@
1
+ import type { SessionEventLike } from "@deepseek-ai/dsh-api-session-controller/client";
2
+ import type { ConversationNodeDefinition, ConversationSnapshot } from "@deepseek-ai/dsh-client-ui-conversation/client";
3
+ import type { QaAnswerReview } from "../types/answer-review.js";
4
+ export declare const QA_REVIEW_NODE = "qa-answer-review";
5
+ declare module "@deepseek-ai/dsh-client-ui-chat/client" {
6
+ interface ChatNodeDataMap {
7
+ "qa-answer-review": QaAnswerReview;
8
+ }
9
+ }
10
+ /** Read only the gate's producer metadata; answer prose never supplies a verdict. */
11
+ export declare function readAnswerReview(event: SessionEventLike): QaAnswerReview | null;
12
+ export declare function parseAnswerReview(receipt: unknown): QaAnswerReview | null;
13
+ /** One current result per human request, with the latest answer's anchor. */
14
+ export declare const answerReviewConversationDefinition: ConversationNodeDefinition<QaAnswerReview>;
15
+ export declare function answerReviewsOf(snapshot: ConversationSnapshot | undefined): ReadonlyMap<number, QaAnswerReview>;
16
+ //# sourceMappingURL=answer-review.d.ts.map
@@ -0,0 +1,35 @@
1
+ import type { createSessionControlStream } from "@deepseek-ai/dsh-api-session-controller/client";
2
+ import type { RemoteResult, RemoteStreamHandle } from "@deepseek-ai/dsh-typert-protocol";
3
+ import type * as Native from "@deepseek-ai/dsh-api-session-controller/types";
4
+ import type { QaChatAccess, QaChatAuthor, QaChatGrant, QaChatMode, QaChatJson } from "../chat-sharing/types.js";
5
+ export interface QaSharingApi {
6
+ attachmentPath?(token: string, id: string, attachmentId: string): Promise<RemoteResult<string>>;
7
+ access(token: string, id: string): Promise<RemoteResult<QaChatAccess>>;
8
+ visible(token: string): Promise<RemoteResult<readonly QaChatAccess[]>>;
9
+ grants(token: string, id: string): Promise<RemoteResult<readonly QaChatGrant[]>>;
10
+ set(token: string, id: string, email: string, mode: QaChatMode | null): Promise<RemoteResult<readonly QaChatGrant[]>>;
11
+ }
12
+ /** Handwritten face is checked against the generated transport at package build. */
13
+ export interface QaChatWire {
14
+ chatAudit(token: string, id: string, full: boolean): Promise<RemoteResult<QaChatJson>>;
15
+ chatAttachmentPath(token: string, id: string, attachmentId: string): Promise<RemoteResult<string>>;
16
+ chatAccess(token: string, id: string): ReturnType<QaSharingApi["access"]>;
17
+ chatVisible(token: string): ReturnType<QaSharingApi["visible"]>;
18
+ chatGrants(token: string, id: string): ReturnType<QaSharingApi["grants"]>;
19
+ chatSetGrant(token: string, id: string, email: string, mode: QaChatMode | null): ReturnType<QaSharingApi["set"]>;
20
+ chatAuthors(token: string, id: string): Promise<RemoteResult<readonly QaChatAuthor[]>>;
21
+ chatList(token: string, signal?: AbortSignal): Promise<RemoteResult<Native.SessionListValue>>;
22
+ chatSearch(token: string, request: Native.SessionSearchRequest, signal?: AbortSignal): Promise<RemoteResult<Native.SessionSearchValue>>;
23
+ chatSelectModel(token: string, request: Native.SessionSelectModelRequest): Promise<RemoteResult<Native.SessionSelectModelValue>>;
24
+ chatPage(token: string, request: Native.SessionPageRequest, signal?: AbortSignal): Promise<RemoteResult<Native.SessionPage>>;
25
+ chatFollow(token: string, request: Native.SessionFollowRequest, signal?: AbortSignal): RemoteStreamHandle<Native.SessionFollowFrame, never>;
26
+ chatControl(token: string, signal?: AbortSignal): RemoteStreamHandle<Native.SessionControlFrame, never>;
27
+ chatProjections(token: string, id: string, signal?: AbortSignal): Promise<RemoteResult<Native.SessionProjectionsValue>>;
28
+ chatPrompt(token: string, request: Native.SessionPromptRequest, signal?: AbortSignal): Promise<RemoteResult<Native.SessionPromptValue>>;
29
+ chatAttachment(token: string, request: Native.SessionAttachmentRequest): Promise<RemoteResult<Native.SessionAttachmentValue>>;
30
+ chatRename(token: string, request: Native.SessionRenameRequest): Promise<RemoteResult<Native.SessionRenameValue>>;
31
+ chatCancel(token: string, id: string): Promise<RemoteResult<Native.SessionCancelValue>>;
32
+ chatUpdateQueue(token: string, request: Native.SessionUpdateQueueRequest): Promise<RemoteResult<Native.SessionUpdateQueueValue>>;
33
+ }
34
+ export type QaSessionRemotes = Parameters<typeof createSessionControlStream>[0];
35
+ //# sourceMappingURL=chat-sharing-api.d.ts.map
@@ -0,0 +1,8 @@
1
+ import type { PropsRuntime } from "@deepseek-ai/dsh-client-ui-slots";
2
+ import type { QaAnswerReview } from "../../types/answer-review.js";
3
+ export declare function QaAnswerReviewStatus({ review, }: {
4
+ readonly review: QaAnswerReview;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ export declare function QaNativeAnswerReviewStatus({ node, }: PropsRuntime<"conversation.chat.node", "qa-answer-review">): import("react/jsx-runtime").JSX.Element;
7
+ export declare const QA_REVIEW_STYLES = "\n.dsh-qa-review-row{padding:4px 0 12px}\n.dsh-qa-review{display:inline-flex;align-items:center;gap:6px;max-width:100%;margin:8px 0 0;padding:4px 9px;border:1px solid var(--dsw-alias-border-l2);border-radius:999px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);font-size:12px;line-height:18px}\n.dsh-qa-review svg{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}\n.dsh-qa-review[data-status=pass]{color:var(--dsw-alias-state-success-primary,var(--dsw-alias-label-primary))}\n";
8
+ //# sourceMappingURL=QaAnswerReviewStatus.d.ts.map
@@ -0,0 +1,7 @@
1
+ /** Quiet actions attached to one owned chat, outside the conversation header. */
2
+ export declare function QaChatActions(props: {
3
+ name: string;
4
+ onShare: () => void;
5
+ onDelete?: (trigger: HTMLButtonElement) => void;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=QaChatActions.d.ts.map
@@ -0,0 +1,12 @@
1
+ import type { QaSharingApi } from "../chat-sharing-api.js";
2
+ import type { QaChatAccess } from "../../chat-sharing/types.js";
3
+ export declare const qaChatModeLabel: (mode: QaChatAccess["mode"]) => string;
4
+ export declare function QaChatSharing(props: {
5
+ access: QaChatAccess;
6
+ token: string;
7
+ api: QaSharingApi;
8
+ open: boolean;
9
+ onClose: () => void;
10
+ }): import("react/jsx-runtime").JSX.Element | null;
11
+ export declare const QA_SHARING_STYLES = "\n.dsh-qa-sharing__body{font-size:13px;color:var(--dsw-alias-label-secondary)}\n.dsh-qa-sharing__intro{margin:0 0 8px;line-height:1.5}\n.dsh-qa-sharing__details{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.5}\n.dsh-qa-sharing__details summary{cursor:pointer}\n.dsh-qa-sharing__body .dsh-qa-btn{appearance:none;cursor:pointer;min-height:36px;font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:8px;padding:7px 12px}\n.dsh-qa-sharing__body .dsh-qa-btn:hover{background:var(--dsw-alias-bg-layer-3)}\n.dsh-qa-sharing__body .dsh-qa-btn:disabled{cursor:default;opacity:.55}\n.dsh-qa-sharing__body .dsh-qa-btn:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-brand-primary));outline-offset:2px}\n.dsh-qa-sharing__form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,160px);gap:12px;margin:20px 0}\n.dsh-qa-sharing__form>.dsh-qa-btn{grid-column:1/-1;justify-self:start}\n.dsh-qa-sharing__body label{display:flex;flex-direction:column;gap:6px}\n.dsh-qa-sharing__body input,.dsh-qa-sharing__body select{font:inherit;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:8px;padding:8px;min-width:0;max-width:100%}\n.dsh-qa-sharing__people{list-style:none;padding:0;margin:16px 0}\n.dsh-qa-sharing__people li{display:flex;gap:10px;align-items:center;flex-wrap:wrap;padding:12px 0;border-top:1px solid var(--dsw-alias-border-l2)}\n.dsh-qa-sharing__people span{flex:1;min-width:140px;overflow-wrap:anywhere}\n.dsh-qa-sharing__people small{display:block;color:var(--dsw-alias-label-tertiary)}\n@media(max-width:480px){.dsh-qa-sharing__form{grid-template-columns:minmax(0,1fr)}}\n";
12
+ //# sourceMappingURL=QaChatSharing.d.ts.map
@@ -2,6 +2,8 @@ import type { QaAttachmentDraft, QaSlashView, ResolvedQaSlashCommands } from "..
2
2
  import { type QaAttachmentLimits } from "../attachments.js";
3
3
  import type { QaQuickQuestion } from "../types.js";
4
4
  export interface QaComposerProps {
5
+ readonly fastMode?: boolean;
6
+ readonly onFastModeChange?: (enabled: boolean) => void;
5
7
  readonly placeholder: string;
6
8
  /** Shown while the chat is empty; the label reads, the prompt sends. */
7
9
  readonly quickQuestions?: readonly QaQuickQuestion[];
@@ -1,6 +1,6 @@
1
1
  export interface QaFileAttachmentProps {
2
2
  readonly name: string;
3
- readonly bytes: number;
3
+ readonly bytes: number | null;
4
4
  /** Pending draft vs already-sent attachment: pending offers removal. */
5
5
  readonly tone: "draft" | "sent";
6
6
  readonly onRemove?: () => void;
@@ -12,6 +12,7 @@ export interface QaFileAttachmentProps {
12
12
  readonly onOpen?: () => void;
13
13
  /** Save the file. Omitted where the surface cannot read its bytes. */
14
14
  readonly onDownload?: () => void;
15
+ readonly onApprove?: () => Promise<void>;
15
16
  }
16
17
  /**
17
18
  * One attached file: the extension badge, the name and the size. A sent
@@ -19,5 +20,5 @@ export interface QaFileAttachmentProps {
19
20
  * re-reads its bytes; a file the turn produced is the same chip with the two
20
21
  * controls that make it usable — open it, or take it away.
21
22
  */
22
- export declare function QaFileAttachment({ name, bytes, tone, onRemove, onOpen, onDownload, }: QaFileAttachmentProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function QaFileAttachment({ name, bytes, tone, onRemove, onOpen, onDownload, onApprove, }: QaFileAttachmentProps): import("react/jsx-runtime").JSX.Element;
23
24
  //# sourceMappingURL=QaFileAttachment.d.ts.map