@yadsh/dsh-qa-surface 0.16.0 → 0.18.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 +34 -5
  2. package/compatibility.json +1 -1
  3. package/lib/account-remotes.js +13 -0
  4. package/lib/account-remotes.js.map +1 -1
  5. package/lib/accounts/database.js +120 -4
  6. package/lib/accounts/database.js.map +1 -1
  7. package/lib/accounts/file.js.map +1 -1
  8. package/lib/accounts/store.js +131 -5
  9. package/lib/accounts/store.js.map +1 -1
  10. package/lib/accounts/token.js +8 -2
  11. package/lib/accounts/token.js.map +1 -1
  12. package/lib/admin/metrics.js +15 -2
  13. package/lib/admin/metrics.js.map +1 -1
  14. package/lib/admin/read-budget.js +28 -0
  15. package/lib/admin/read-budget.js.map +1 -0
  16. package/lib/admin/service.js +135 -40
  17. package/lib/admin/service.js.map +1 -1
  18. package/lib/admin/session-log.js +63 -4
  19. package/lib/admin/session-log.js.map +1 -1
  20. package/lib/chat-sharing/native-fence.js +31 -2
  21. package/lib/chat-sharing/native-fence.js.map +1 -1
  22. package/lib/chat-sharing/store.js +9 -3
  23. package/lib/chat-sharing/store.js.map +1 -1
  24. package/lib/chat-sharing/transport.js +74 -13
  25. package/lib/chat-sharing/transport.js.map +1 -1
  26. package/lib/chat-sharing/uploads.js +79 -6
  27. package/lib/chat-sharing/uploads.js.map +1 -1
  28. package/lib/cli.js +13 -0
  29. package/lib/cli.js.map +1 -1
  30. package/lib/client/QaAccountsController.js +79 -0
  31. package/lib/client/QaAccountsController.js.map +1 -1
  32. package/lib/client/QaRouteController.js +3 -1
  33. package/lib/client/QaRouteController.js.map +1 -1
  34. package/lib/client/QaSessionController.js +102 -29
  35. package/lib/client/QaSessionController.js.map +1 -1
  36. package/lib/client/QaSurface.js +89 -19
  37. package/lib/client/QaSurface.js.map +1 -1
  38. package/lib/client/QaTranscriptAdapter.js +15 -2
  39. package/lib/client/QaTranscriptAdapter.js.map +1 -1
  40. package/lib/client/account-sessions.js +74 -8
  41. package/lib/client/account-sessions.js.map +1 -1
  42. package/lib/client/admin/CapabilityPicker.js +50 -0
  43. package/lib/client/admin/CapabilityPicker.js.map +1 -0
  44. package/lib/client/admin/CoverageNotice.js +9 -0
  45. package/lib/client/admin/CoverageNotice.js.map +1 -0
  46. package/lib/client/admin/QaAdmin.js +3 -150
  47. package/lib/client/admin/QaAdmin.js.map +1 -1
  48. package/lib/client/admin/RoleEditor.js +46 -0
  49. package/lib/client/admin/RoleEditor.js.map +1 -0
  50. package/lib/client/admin/capability-selection.js +63 -0
  51. package/lib/client/admin/capability-selection.js.map +1 -0
  52. package/lib/client/admin/pages/Conversations.js +35 -17
  53. package/lib/client/admin/pages/Conversations.js.map +1 -1
  54. package/lib/client/admin/pages/Overview.js +3 -2
  55. package/lib/client/admin/pages/Overview.js.map +1 -1
  56. package/lib/client/admin/pages/Quality.js +77 -20
  57. package/lib/client/admin/pages/Quality.js.map +1 -1
  58. package/lib/client/admin/pages/SkillFiles.js +14 -3
  59. package/lib/client/admin/pages/SkillFiles.js.map +1 -1
  60. package/lib/client/admin/shared.js +68 -3
  61. package/lib/client/admin/shared.js.map +1 -1
  62. package/lib/client/answer-review.js +89 -0
  63. package/lib/client/answer-review.js.map +1 -0
  64. package/lib/client/chat-artifacts.js +1 -0
  65. package/lib/client/chat-artifacts.js.map +1 -1
  66. package/lib/client/components/QaAnswerReviewStatus.js +45 -0
  67. package/lib/client/components/QaAnswerReviewStatus.js.map +1 -0
  68. package/lib/client/components/QaAuthGate.js +31 -28
  69. package/lib/client/components/QaAuthGate.js.map +1 -1
  70. package/lib/client/components/QaChangelog.js +79 -0
  71. package/lib/client/components/QaChangelog.js.map +1 -1
  72. package/lib/client/components/QaChatActions.js +52 -0
  73. package/lib/client/components/QaChatActions.js.map +1 -0
  74. package/lib/client/components/QaChatSharing.js +22 -19
  75. package/lib/client/components/QaChatSharing.js.map +1 -1
  76. package/lib/client/components/QaComposer.js +27 -4
  77. package/lib/client/components/QaComposer.js.map +1 -1
  78. package/lib/client/components/QaFormItem.js +63 -0
  79. package/lib/client/components/QaFormItem.js.map +1 -0
  80. package/lib/client/components/QaInputForm.js +281 -0
  81. package/lib/client/components/QaInputForm.js.map +1 -0
  82. package/lib/client/components/QaMarkdownPreview.js +86 -0
  83. package/lib/client/components/QaMarkdownPreview.js.map +1 -0
  84. package/lib/client/components/QaMessage.js +8 -2
  85. package/lib/client/components/QaMessage.js.map +1 -1
  86. package/lib/client/components/QaModal.js +34 -4
  87. package/lib/client/components/QaModal.js.map +1 -1
  88. package/lib/client/components/QaRightRail.js +6 -4
  89. package/lib/client/components/QaRightRail.js.map +1 -1
  90. package/lib/client/components/QaRightRailResize.js +129 -0
  91. package/lib/client/components/QaRightRailResize.js.map +1 -0
  92. package/lib/client/components/QaSidebar.js +10 -1
  93. package/lib/client/components/QaSidebar.js.map +1 -1
  94. package/lib/client/components/QaSourceFilters.js +22 -0
  95. package/lib/client/components/QaSourceFilters.js.map +1 -0
  96. package/lib/client/components/QaSourcesPanel.js +57 -13
  97. package/lib/client/components/QaSourcesPanel.js.map +1 -1
  98. package/lib/client/components/QaSpreadsheetPreview.js +56 -0
  99. package/lib/client/components/QaSpreadsheetPreview.js.map +1 -0
  100. package/lib/client/components/QaWelcomeNotice.js +2 -2
  101. package/lib/client/components/QaWelcomeNotice.js.map +1 -1
  102. package/lib/client/components/QaWorkspaceBrowser.js +22 -9
  103. package/lib/client/components/QaWorkspaceBrowser.js.map +1 -1
  104. package/lib/client/components/QaZoomImage.js +56 -0
  105. package/lib/client/components/QaZoomImage.js.map +1 -0
  106. package/lib/client/components/source-refs.js +18 -4
  107. package/lib/client/components/source-refs.js.map +1 -1
  108. package/lib/client/forms-styles.js +14 -0
  109. package/lib/client/forms-styles.js.map +1 -0
  110. package/lib/client/forms.js +40 -0
  111. package/lib/client/forms.js.map +1 -0
  112. package/lib/client/index.js +31 -3
  113. package/lib/client/index.js.map +1 -1
  114. package/lib/client/markdown/SourceImage.js +52 -0
  115. package/lib/client/markdown/SourceImage.js.map +1 -0
  116. package/lib/client/markdown/blocks.js +150 -115
  117. package/lib/client/markdown/blocks.js.map +1 -1
  118. package/lib/client/markdown/render.js +23 -5
  119. package/lib/client/markdown/render.js.map +1 -1
  120. package/lib/client/markdown/source-chip.js +2 -1
  121. package/lib/client/markdown/source-chip.js.map +1 -1
  122. package/lib/client/oidc-browser.js +39 -0
  123. package/lib/client/oidc-browser.js.map +1 -0
  124. package/lib/client/panels/PanelHost.js +23 -1
  125. package/lib/client/panels/PanelHost.js.map +1 -1
  126. package/lib/client/settings/sections/interface.js +2 -1
  127. package/lib/client/settings/sections/interface.js.map +1 -1
  128. package/lib/client/settings/sections/sources.js +1 -1
  129. package/lib/client/settings/sections/sources.js.map +1 -1
  130. package/lib/client/settings/sections/status.js +3 -1
  131. package/lib/client/settings/sections/status.js.map +1 -1
  132. package/lib/client/settings/styles.js +18 -28
  133. package/lib/client/settings/styles.js.map +1 -1
  134. package/lib/client/source-filters-styles.js +11 -0
  135. package/lib/client/source-filters-styles.js.map +1 -0
  136. package/lib/client/styles.js +56 -5
  137. package/lib/client/styles.js.map +1 -1
  138. package/lib/client/types.js.map +1 -1
  139. package/lib/client/use-right-rail.js +1 -1
  140. package/lib/client/use-right-rail.js.map +1 -1
  141. package/lib/client/user-settings/IntegrationTokensPage.js +30 -6
  142. package/lib/client/user-settings/IntegrationTokensPage.js.map +1 -1
  143. package/lib/client.js +540 -71128
  144. package/lib/client.js.map +1 -1
  145. package/lib/config-resolvers/accounts.js +5 -4
  146. package/lib/config-resolvers/accounts.js.map +1 -1
  147. package/lib/config-resolvers/defaults.js +20 -3
  148. package/lib/config-resolvers/defaults.js.map +1 -1
  149. package/lib/config-resolvers/oidc.js +53 -0
  150. package/lib/config-resolvers/oidc.js.map +1 -0
  151. package/lib/config-resolvers/sources.js +2 -0
  152. package/lib/config-resolvers/sources.js.map +1 -1
  153. package/lib/config.js +74 -0
  154. package/lib/config.js.map +1 -1
  155. package/lib/forms/attachments.js +214 -0
  156. package/lib/forms/attachments.js.map +1 -0
  157. package/lib/forms/errors.js +37 -0
  158. package/lib/forms/errors.js.map +1 -0
  159. package/lib/forms/fingerprint.js +21 -0
  160. package/lib/forms/fingerprint.js.map +1 -0
  161. package/lib/forms/gate.js +125 -0
  162. package/lib/forms/gate.js.map +1 -0
  163. package/lib/forms/schema.js +182 -0
  164. package/lib/forms/schema.js.map +1 -0
  165. package/lib/forms/service.js +220 -0
  166. package/lib/forms/service.js.map +1 -0
  167. package/lib/forms/store.js +194 -0
  168. package/lib/forms/store.js.map +1 -0
  169. package/lib/forms/types.js +2 -0
  170. package/lib/forms/types.js.map +1 -0
  171. package/lib/forms/validation.js +113 -0
  172. package/lib/forms/validation.js.map +1 -0
  173. package/lib/index.js +276 -5
  174. package/lib/index.js.map +1 -1
  175. package/lib/integration/host-runner.js +1 -0
  176. package/lib/integration/host-runner.js.map +1 -1
  177. package/lib/integration/question-policy.js +126 -0
  178. package/lib/integration/question-policy.js.map +1 -0
  179. package/lib/integration/service.js +2 -0
  180. package/lib/integration/service.js.map +1 -1
  181. package/lib/llm-identity.js +27 -0
  182. package/lib/llm-identity.js.map +1 -0
  183. package/lib/markdown-frontmatter.js +47 -0
  184. package/lib/markdown-frontmatter.js.map +1 -0
  185. package/lib/markdown-images.js +33 -0
  186. package/lib/markdown-images.js.map +1 -0
  187. package/lib/oidc/http.js +30 -0
  188. package/lib/oidc/http.js.map +1 -0
  189. package/lib/oidc/service.js +250 -0
  190. package/lib/oidc/service.js.map +1 -0
  191. package/lib/prompt-notes.js +1 -1
  192. package/lib/prompt-notes.js.map +1 -1
  193. package/lib/provenance/collector.js +2 -0
  194. package/lib/provenance/collector.js.map +1 -1
  195. package/lib/provenance/connectors.js +25 -19
  196. package/lib/provenance/connectors.js.map +1 -1
  197. package/lib/provenance/dedupe.js +17 -0
  198. package/lib/provenance/dedupe.js.map +1 -1
  199. package/lib/provenance/document-preview.js +12 -2
  200. package/lib/provenance/document-preview.js.map +1 -1
  201. package/lib/provenance/extractors.js +23 -5
  202. package/lib/provenance/extractors.js.map +1 -1
  203. package/lib/provenance/file-preview.js +9 -2
  204. package/lib/provenance/file-preview.js.map +1 -1
  205. package/lib/provenance/integration-extractor.js +5 -6
  206. package/lib/provenance/integration-extractor.js.map +1 -1
  207. package/lib/provenance/snapshot-store.js +2 -0
  208. package/lib/provenance/snapshot-store.js.map +1 -1
  209. package/lib/provenance/source-content.js +103 -0
  210. package/lib/provenance/source-content.js.map +1 -0
  211. package/lib/provenance/source-image.js +57 -0
  212. package/lib/provenance/source-image.js.map +1 -0
  213. package/lib/provenance/spreadsheet-preview.js +52 -0
  214. package/lib/provenance/spreadsheet-preview.js.map +1 -0
  215. package/lib/qa-tools/activation-manager.js +24 -2
  216. package/lib/qa-tools/activation-manager.js.map +1 -1
  217. package/lib/qa-tools/catalog.js +11 -1
  218. package/lib/qa-tools/catalog.js.map +1 -1
  219. package/lib/qa-tools/index.js +27 -0
  220. package/lib/qa-tools/index.js.map +1 -1
  221. package/lib/qa-tools/request-user-form.js +121 -0
  222. package/lib/qa-tools/request-user-form.js.map +1 -0
  223. package/lib/questions.js +6 -1
  224. package/lib/questions.js.map +1 -1
  225. package/lib/resolve-config.js +2 -0
  226. package/lib/resolve-config.js.map +1 -1
  227. package/lib/secure-session.js +14 -8
  228. package/lib/secure-session.js.map +1 -1
  229. package/lib/shared/documents.js +12 -0
  230. package/lib/shared/documents.js.map +1 -1
  231. package/lib/typert.host.js +5136 -1341
  232. package/lib/typert.remote-client.d.ts +141 -7
  233. package/lib/typert.remote-client.js +5896 -2255
  234. package/lib/types/account-remotes.d.ts +3 -0
  235. package/lib/types/accounts/database.d.ts +13 -0
  236. package/lib/types/accounts/file.d.ts +2 -0
  237. package/lib/types/accounts/store.d.ts +23 -1
  238. package/lib/types/accounts/token.d.ts +3 -1
  239. package/lib/types/admin/metrics.d.ts +5 -1
  240. package/lib/types/admin/read-budget.d.ts +8 -0
  241. package/lib/types/admin/service.d.ts +17 -0
  242. package/lib/types/admin/session-log.d.ts +30 -1
  243. package/lib/types/answer-review.js +2 -0
  244. package/lib/types/answer-review.js.map +1 -0
  245. package/lib/types/chat-sharing/store.d.ts +1 -0
  246. package/lib/types/chat-sharing/transport.d.ts +1 -0
  247. package/lib/types/chat-sharing/uploads.d.ts +2 -1
  248. package/lib/types/client/QaAccountsController.d.ts +5 -0
  249. package/lib/types/client/QaRouteController.d.ts +1 -0
  250. package/lib/types/client/QaSessionController.d.ts +12 -3
  251. package/lib/types/client/QaSurface.d.ts +2 -0
  252. package/lib/types/client/admin/CapabilityPicker.d.ts +14 -0
  253. package/lib/types/client/admin/CoverageNotice.d.ts +6 -0
  254. package/lib/types/client/admin/RoleEditor.d.ts +15 -0
  255. package/lib/types/client/admin/capability-selection.d.ts +27 -0
  256. package/lib/types/client/admin/shared.d.ts +39 -1
  257. package/lib/types/client/answer-review.d.ts +16 -0
  258. package/lib/types/client/components/QaAnswerReviewStatus.d.ts +8 -0
  259. package/lib/types/client/components/QaAuthGate.d.ts +2 -0
  260. package/lib/types/client/components/QaChatActions.d.ts +7 -0
  261. package/lib/types/client/components/QaChatSharing.d.ts +4 -2
  262. package/lib/types/client/components/QaFormItem.d.ts +20 -0
  263. package/lib/types/client/components/QaInputForm.d.ts +18 -0
  264. package/lib/types/client/components/QaMarkdownPreview.d.ts +13 -0
  265. package/lib/types/client/components/QaModal.d.ts +9 -0
  266. package/lib/types/client/components/QaRightRail.d.ts +3 -2
  267. package/lib/types/client/components/QaRightRailResize.d.ts +9 -0
  268. package/lib/types/client/components/QaSidebar.d.ts +2 -0
  269. package/lib/types/client/components/QaSourceFilters.d.ts +12 -0
  270. package/lib/types/client/components/QaSpreadsheetPreview.d.ts +8 -0
  271. package/lib/types/client/components/QaWelcomeNotice.d.ts +1 -1
  272. package/lib/types/client/components/QaZoomImage.d.ts +38 -0
  273. package/lib/types/client/forms-styles.d.ts +2 -0
  274. package/lib/types/client/forms.d.ts +23 -0
  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/oidc-browser.d.ts +12 -0
  280. package/lib/types/client/settings/styles.d.ts +2 -5
  281. package/lib/types/client/source-filters-styles.d.ts +2 -0
  282. package/lib/types/client/types.d.ts +18 -6
  283. package/lib/types/config-resolvers/oidc.d.ts +3 -0
  284. package/lib/types/forms/attachments.d.ts +48 -0
  285. package/lib/types/forms/errors.d.ts +11 -0
  286. package/lib/types/forms/fingerprint.d.ts +9 -0
  287. package/lib/types/forms/gate.d.ts +33 -0
  288. package/lib/types/forms/schema.d.ts +72 -0
  289. package/lib/types/forms/service.d.ts +15 -0
  290. package/lib/types/forms/store.d.ts +25 -0
  291. package/lib/types/forms/types.d.ts +215 -0
  292. package/lib/types/forms/validation.d.ts +20 -0
  293. package/lib/types/index.d.ts +36 -3
  294. package/lib/types/integration/contract.d.ts +1 -0
  295. package/lib/types/integration/question-policy.d.ts +20 -0
  296. package/lib/types/integration/service.d.ts +1 -0
  297. package/lib/types/llm-identity.d.ts +20 -0
  298. package/lib/types/markdown-frontmatter.d.ts +10 -0
  299. package/lib/types/markdown-images.d.ts +3 -0
  300. package/lib/types/oidc/http.d.ts +5 -0
  301. package/lib/types/oidc/service.d.ts +30 -0
  302. package/lib/types/oidc.js +2 -0
  303. package/lib/types/oidc.js.map +1 -0
  304. package/lib/types/prompt-notes.d.ts +1 -1
  305. package/lib/types/provenance/document-preview.d.ts +3 -2
  306. package/lib/types/provenance/file-preview.d.ts +2 -1
  307. package/lib/types/provenance/source-content.d.ts +19 -0
  308. package/lib/types/provenance/source-image.d.ts +4 -0
  309. package/lib/types/provenance/spreadsheet-preview.d.ts +5 -0
  310. package/lib/types/provenance/types.d.ts +3 -0
  311. package/lib/types/qa-tools/activation-manager.d.ts +5 -0
  312. package/lib/types/qa-tools/catalog.d.ts +4 -1
  313. package/lib/types/qa-tools/index.d.ts +5 -1
  314. package/lib/types/qa-tools/request-user-form.d.ts +5 -0
  315. package/lib/types/questions.d.ts +2 -1
  316. package/lib/types/secure-session.d.ts +1 -0
  317. package/lib/types/shared/documents.d.ts +2 -0
  318. package/lib/types/types/accounts.d.ts +7 -1
  319. package/lib/types/types/admin.d.ts +6 -0
  320. package/lib/types/types/answer-review.d.ts +11 -0
  321. package/lib/types/types/config.d.ts +9 -0
  322. package/lib/types/types/oidc.d.ts +36 -0
  323. package/lib/types/types/session.d.ts +18 -3
  324. package/lib/types/types.d.ts +3 -0
  325. package/package.json +58 -56
@@ -6,6 +6,15 @@ import { type ReactNode } from "react";
6
6
  * the dialog is turned back into a page under the scrim.
7
7
  */
8
8
  export declare function isQaModalOpen(): boolean;
9
+ /**
10
+ * Join the stack from a shell that draws its own chrome rather than this
11
+ * panel — the image lightbox is such a shell. One Escape press then closes the
12
+ * innermost layer instead of every dialog under it.
13
+ */
14
+ export declare function joinQaDialogStack(): {
15
+ readonly innermost: () => boolean;
16
+ readonly leave: () => void;
17
+ };
9
18
  export interface QaModalProps {
10
19
  readonly open: boolean;
11
20
  /** Dialog title; also the dialog's accessible name. */
@@ -13,9 +13,10 @@ export interface QaRightRailProps {
13
13
  readonly activeTab: QaRailTab;
14
14
  readonly onTabSelect: (tab: QaRailTab) => void;
15
15
  readonly onClose: () => void;
16
+ readonly stateKey?: string;
16
17
  }
17
18
  /**
18
- * The chat's right rail: a fixed column whose top edge is the tab strip,
19
+ * The chat's right rail: a resizable column whose top edge is the tab strip,
19
20
  * mirroring the Harness right Sidebar's chrome. Tabs are plain chips with
20
21
  * counts; the strip's last control collapses the whole column.
21
22
  *
@@ -25,5 +26,5 @@ export interface QaRightRailProps {
25
26
  * the rail keeps the key: the innermost thing on the page is what the reader
26
27
  * means to dismiss.
27
28
  */
28
- export declare function QaRightRail({ tabs, activeTab, onTabSelect, onClose, }: QaRightRailProps): import("react/jsx-runtime").JSX.Element | null;
29
+ export declare function QaRightRail({ tabs, activeTab, onTabSelect, onClose, stateKey, }: QaRightRailProps): import("react/jsx-runtime").JSX.Element | null;
29
30
  //# sourceMappingURL=QaRightRail.d.ts.map
@@ -0,0 +1,9 @@
1
+ import { type RefObject } from "react";
2
+ export declare function resolveQaRightRailWidth(requested: number | null, available: number): number;
3
+ /** A one-sided border drag: moving left widens the panel on the right. */
4
+ export declare function QaRightRailResize(props: {
5
+ root: RefObject<HTMLElement | null>;
6
+ storage: Pick<Storage, "getItem" | "setItem">;
7
+ storageKey: string;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=QaRightRailResize.d.ts.map
@@ -2,6 +2,7 @@ import type { SessionSummary } from "@deepseek-ai/dsh-api-session-controller/cli
2
2
  import { type QaAuditSummary } from "../audit/types.js";
3
3
  /** One renderable row of the chat-history sidebar. */
4
4
  export interface QaChatRow {
5
+ readonly shareable?: boolean;
5
6
  readonly id: string;
6
7
  readonly title: string;
7
8
  readonly running: boolean;
@@ -59,6 +60,7 @@ export interface QaSidebarProps {
59
60
  readonly onNewChat: () => void;
60
61
  /** Removes a chat from this browser's index; omit to hide the control. */
61
62
  readonly onDelete?: (sessionId: string) => void;
63
+ readonly onShare?: (sessionId: string) => void;
62
64
  /**
63
65
  * Whether the phone layout shows this sidebar as a drawer over the
64
66
  * conversation. The state is the surface's, not the sidebar's: the control
@@ -0,0 +1,12 @@
1
+ import type { QaSource } from "../../types.js";
2
+ export declare function matchesSourceText(source: QaSource, query: string): boolean;
3
+ export declare function QaSourceFilters({ sources, query, kind, count, onQuery, onKind, onReset, }: {
4
+ readonly sources: readonly QaSource[];
5
+ readonly query: string;
6
+ readonly kind: QaSource["kind"] | "all";
7
+ readonly count: number;
8
+ readonly onQuery: (value: string) => void;
9
+ readonly onKind: (value: QaSource["kind"] | "all") => void;
10
+ readonly onReset: () => void;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=QaSourceFilters.d.ts.map
@@ -0,0 +1,8 @@
1
+ import type { QaSpreadsheetPreview as Preview, QaSpreadsheetPreviewSelection as Selection } from "../../types.js";
2
+ export interface QaSpreadsheetPreviewProps {
3
+ readonly initial: Preview;
4
+ readonly load: (selection: Selection) => Promise<Preview>;
5
+ }
6
+ /** Read-only cells, with explicit paging on both axes and no formula execution. */
7
+ export declare function QaSpreadsheetPreview({ initial, load, }: QaSpreadsheetPreviewProps): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=QaSpreadsheetPreview.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import type { SettingsOnboardingOwnerProps } from "@deepseek-ai/dsh-client-ui-settings/client";
2
2
  import type { StorageLike } from "../types.js";
3
3
  /** Bump when the notice changes materially and must be acknowledged again. */
4
- export declare const QA_WELCOME_NOTICE_VERSION = "2026-09-12.1";
4
+ export declare const QA_WELCOME_NOTICE_VERSION = "2026-10-11.1";
5
5
  export declare const QA_WELCOME_NOTICE_COPY: Readonly<{
6
6
  title: "Перед началом тестирования";
7
7
  paragraphs: readonly string[];
@@ -0,0 +1,38 @@
1
+ import type { ImgHTMLAttributes } from "react";
2
+ /**
3
+ * A surface image at its reading size, plus the overlay it opens into.
4
+ *
5
+ * A transcript thumbnail is 132 px wide: enough to recognise a figure, not
6
+ * enough to read one. The thumbnail used to be an anchor to its own `blob:`
7
+ * address, and a browser that refuses top-level navigation to a blob answers
8
+ * the click with nothing at all, so the reader had no way to see the image the
9
+ * question was about.
10
+ */
11
+ export declare function QaZoomImage({ src, alt, className, testId, openLabel, zoomable, ...image }: {
12
+ readonly src: string;
13
+ readonly alt: string;
14
+ readonly className: string;
15
+ readonly testId: string;
16
+ readonly openLabel?: string;
17
+ /**
18
+ * Whether the image answers a click. An image that sits inside a link does
19
+ * not: a control nested in an anchor is invalid, and the activation the
20
+ * reader meant for the link would reach the zoom as well.
21
+ */
22
+ readonly zoomable?: boolean;
23
+ } & Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "alt" | "className">): import("react/jsx-runtime").JSX.Element;
24
+ /**
25
+ * The overlay itself: the image contained to the viewport over a mask. Escape,
26
+ * the mask and the close control end it, and the close control takes focus on
27
+ * open so a keyboard reader leaves the same way it entered.
28
+ *
29
+ * The root is a span because an answer's image sits inside its paragraph, and
30
+ * a block-level root there is invalid nesting the browser repairs by lifting it
31
+ * out of the text that owns it.
32
+ */
33
+ export declare function QaImageLightbox({ src, alt, onClose, }: {
34
+ readonly src: string;
35
+ readonly alt: string;
36
+ readonly onClose: () => void;
37
+ }): import("react/jsx-runtime").JSX.Element;
38
+ //# sourceMappingURL=QaZoomImage.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const QA_FORM_STYLES = "\n.dsh-qa-form{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:12px;padding:16px;max-height:75vh;overflow:hidden;overflow-wrap:anywhere;color:var(--dsw-alias-label-primary);display:flex;flex-direction:column}\n.dsh-qa-form__content{overflow:auto;min-height:0;padding:0 2px}.dsh-qa-form>header,.dsh-qa-form>footer,.dsh-qa-form>nav,.dsh-qa-form>p{flex-shrink:0}.dsh-qa-form>footer{border-top:1px solid var(--dsw-alias-border-l2);padding-top:12px;margin-top:8px}\n.dsh-qa-form>header{max-height:96px;overflow:auto}\n.dsh-qa-form header,.dsh-qa-form footer,.dsh-qa-form nav{display:flex;gap:8px;align-items:center;flex-wrap:wrap}\n.dsh-qa-form header{justify-content:space-between}.dsh-qa-form nav{margin:12px 0}.dsh-qa-form h3{margin:12px 0}\n.dsh-qa-form button{font:inherit;color:inherit;background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-border-l2);border-radius:8px;padding:8px 12px;cursor:pointer}\n.dsh-qa-form button:disabled{opacity:.55;cursor:default}.dsh-qa-form button:focus-visible,.dsh-qa-form input:focus-visible,.dsh-qa-form textarea:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}\n.dsh-qa-form__item{min-width:0;border:0;border-bottom:1px solid var(--dsw-alias-border-l2);padding:12px 0;margin:0 0 12px}.dsh-qa-form legend{font-weight:600}.dsh-qa-form small{font-weight:400;display:block;color:var(--dsw-alias-label-tertiary)}\n.dsh-qa-form__hint{font-size:13px;color:var(--dsw-alias-label-secondary)}.dsh-qa-form label{display:block}.dsh-qa-form input[type=text],.dsh-qa-form textarea{display:block;box-sizing:border-box;width:100%;font:inherit;color:inherit;background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-border-l2);border-radius:8px;padding:10px;margin:6px 0}\n.dsh-qa-form__choices>label{display:flex;gap:8px;align-items:baseline;margin:8px 0}.dsh-qa-form__files{border:1px dashed var(--dsw-alias-border-l2);border-radius:8px;padding:12px;margin-top:12px}.dsh-qa-form input[type=file]{max-width:100%;display:block;margin:8px 0}.dsh-qa-form__files ul{padding-left:18px}.dsh-qa-form__files li{margin:10px 0}.dsh-qa-form__files button{margin:4px}.dsh-qa-form__review>div{border-bottom:1px solid var(--dsw-alias-border-l2);margin-bottom:12px}.dsh-qa-form [role=alert]{color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-border-l2);padding:10px;border-radius:8px}\n@media(max-width:600px){.dsh-qa-form{padding:12px;max-height:80vh}.dsh-qa-form footer button{flex:1 1 auto}.dsh-qa-form nav button{font-size:12px}}\n";
2
+ //# sourceMappingURL=forms-styles.d.ts.map
@@ -0,0 +1,23 @@
1
+ import type { QaFormCommand, QaFormResult, QaFormView } from "../forms/types.js";
2
+ import type { RemoteResult } from "./types.js";
3
+ import type { QaUploadCarrier } from "./account-upload.js";
4
+ /** Typert adds an outer transport result; domain refusals remain stable codes. */
5
+ export interface QaFormApi {
6
+ list(token: string, session: string): Promise<RemoteResult<QaFormResult<QaFormView[]>>>;
7
+ get(token: string, session: string, id: string): Promise<RemoteResult<QaFormResult<QaFormView>>>;
8
+ mutate(token: string, session: string, command: QaFormCommand): Promise<RemoteResult<QaFormResult<QaFormView>>>;
9
+ upload(token: string, session: string, id: string, file: File, signal: AbortSignal): Promise<void>;
10
+ file(token: string, session: string, formId: string, resourceId: string): Promise<RemoteResult<QaFormResult<{
11
+ name: string;
12
+ media_type: string;
13
+ data: string;
14
+ }>>>;
15
+ }
16
+ export declare class QaFormClientError extends Error {
17
+ readonly code: string;
18
+ constructor(code: string, message: string);
19
+ }
20
+ export declare function unwrapForm<T>(result: RemoteResult<QaFormResult<T>>): T;
21
+ /** Same protected carrier and route as ordinary QA uploads; no fabricated percentage. */
22
+ export declare function uploadQaFormFile(carrier: QaUploadCarrier | undefined, token: string, session: string, uploadId: string, file: File, signal: AbortSignal): Promise<void>;
23
+ //# sourceMappingURL=forms.d.ts.map
@@ -0,0 +1,7 @@
1
+ /** Illustrations are fetched on approach to the viewport, never in a document-wide burst. */
2
+ export declare function SourceImage({ src, alt, load, }: {
3
+ readonly src: string;
4
+ readonly alt: string;
5
+ readonly load: (path: string) => Promise<string | undefined>;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=SourceImage.d.ts.map
@@ -74,6 +74,10 @@ export type MarkdownBlock = {
74
74
  };
75
75
  /** A parsed document: its blocks plus the reference targets they resolve. */
76
76
  export interface ParsedMarkdown {
77
+ readonly ranges: readonly {
78
+ readonly start: number;
79
+ readonly end: number;
80
+ }[];
77
81
  readonly blocks: readonly MarkdownBlock[];
78
82
  /** Link/image definitions by upper-cased identifier. */
79
83
  readonly definitions: ReadonlyMap<string, string>;
@@ -111,5 +115,8 @@ export declare function parseMarkdown(text: string, options?: MarkdownParseOptio
111
115
  * line may still be typed.
112
116
  * @returns The container's blocks.
113
117
  */
114
- export declare function parseBlocks(lines: readonly string[], definitions: Map<string, string>, footnotes: Map<string, readonly MarkdownBlock[]>, depth: number, streaming?: boolean): MarkdownBlock[];
118
+ export declare function parseBlocks(lines: readonly string[], definitions: Map<string, string>, footnotes: Map<string, readonly MarkdownBlock[]>, depth: number, streaming?: boolean, ranges?: {
119
+ start: number;
120
+ end: number;
121
+ }[]): MarkdownBlock[];
115
122
  //# sourceMappingURL=blocks.d.ts.map
@@ -13,5 +13,9 @@ import { type MarkdownSourceContext } from "./source-chip.js";
13
13
  * @returns The document's blocks, plus the footnote section when the document
14
14
  * references a defined footnote.
15
15
  */
16
- export declare function renderMarkdown(text: string, context: MarkdownSourceContext, options?: MarkdownParseOptions): ReactNode[];
16
+ export declare function renderMarkdown(text: string, context: MarkdownSourceContext, options?: MarkdownParseOptions, sourceLines?: {
17
+ readonly offset: number;
18
+ readonly start?: number;
19
+ readonly end?: number;
20
+ }): ReactNode[];
17
21
  //# sourceMappingURL=render.d.ts.map
@@ -3,6 +3,7 @@ import type { QaSource } from "../../types.js";
3
3
  import { type QaSourceRefs } from "../components/source-refs.js";
4
4
  /** Inline source awareness handed down from the owning assistant message. */
5
5
  export interface MarkdownSourceContext {
6
+ readonly renderImage?: (src: string, alt: string) => ReactNode;
6
7
  readonly refs?: QaSourceRefs;
7
8
  /** Open a path-backed source in the sources drawer's detail view. */
8
9
  readonly onSourceOpen?: (source: QaSource) => void;
@@ -0,0 +1,12 @@
1
+ import type { QaOidcStart, ResolvedQaSurfaceConfig } from "../types.js";
2
+ export interface QaOidcBrowser {
3
+ begin(start: QaOidcStart): void;
4
+ takeHandoff(): {
5
+ handoff: string;
6
+ completionKey: string;
7
+ } | null;
8
+ logout(url: string): void;
9
+ }
10
+ /** Completion proof is isolated to the initiating tab and never goes in a URL. */
11
+ export declare function createQaOidcBrowser(browser: Pick<Window, "location" | "history" | "sessionStorage">, config: () => ResolvedQaSurfaceConfig): QaOidcBrowser;
12
+ //# sourceMappingURL=oidc-browser.d.ts.map
@@ -9,11 +9,8 @@
9
9
  * outline under pointer modality at a specificity our rule cannot win, so a
10
10
  * hard-coded ring is one that goes missing rather than one that degrades.
11
11
  *
12
- * The type scale is the surface's: text the operator reads in order to decide —
13
- * section titles, field labels, the values in the controls, the toggle copy —
14
- * is 16px, a control's own label and an outcome line are 14px, and only chrome
15
- * stays small on purpose: the «Изменено» badge (9px), the status chips (11px),
16
- * the monospace data rows (11px) and the footer note (10px).
12
+ * The body controls use the plugin kit's shared type scale. Status chips,
13
+ * data rows and the footer retain their compact page-specific presentation.
17
14
  */
18
15
  export declare const QA_SETTINGS_STYLES: string;
19
16
  //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1,2 @@
1
+ export declare const sourceFiltersStyles = "\n.dsh-qa-sourcefilters{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:2px 12px 10px;flex:none}\n.dsh-qa-sourcefilters input,.dsh-qa-sourcefilters select{min-width:0;padding:7px 9px;border:1px solid var(--dsw-alias-border-l2);border-radius:8px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);font:inherit;font-size:12px}\n.dsh-qa-sourcefilters input{flex:1 1 200px;width:100%}\n.dsh-qa-sourcefilters select{flex:1 1 150px;max-width:100%}\n.dsh-qa-sourcefilters__count{color:var(--dsw-alias-label-tertiary);font-size:11px}\n.dsh-qa-sourcefilters button{margin-left:auto;border:0;background:transparent;color:var(--dsh-qa-accent);font:inherit;font-size:12px;cursor:pointer}\n.dsh-qa-sourcefilters :is(input,select,button):focus-visible{outline:var(--dsw-focus-ring-width, 2px) solid var(--dsw-focus-ring-color, var(--dsh-qa-accent));outline-offset:2px}\n.dsh-qa-sourcedetail__content-label{margin:0 0 8px;font-size:12px;font-weight:600;color:var(--dsw-alias-label-primary)}\n";
2
+ //# sourceMappingURL=source-filters-styles.d.ts.map
@@ -1,11 +1,14 @@
1
1
  import type { ClientRemote } from "@deepseek-ai/dsh-api-gateway/client";
2
2
  import type { ISessions, SessionFace } from "@deepseek-ai/dsh-api-session-controller/client";
3
3
  import type { UiConversation } from "@deepseek-ai/dsh-client-ui-conversation/client";
4
- import type { QaAccountNotificationsInput, QaAccountProfileInput, QaAccountSession, QaAccountStartersInput, QaAccountStarter, QaAccountUserPublic, QaAccessAdminSnapshot, QaApprovalDecision, QaClaimResult, QaLockdownProof, QaModelCatalogEntry, QaOwnershipEntry, QaPasswordResetRequest, QaPendingApproval, QaPendingQuestion, QaQuestionAnswerItem, QaQueueStatus, QaIssuedServiceToken, QaServiceTokenCreateInput, QaServiceTokenSummary, QaSessionState, QaSkillDocument, QaSkillDraftInput, QaSkillRemoval, QaSkillSummary, QaSkillToolDescriptor, QaSkillValidation, QaSourceFilePreview, QaTurnSources, QaWhoamiResult, QaDocumentPreview, QaWorkspaceFile, QaWorkspaceFileChunk, QaDocumentWorkflowStatus, QaWorkspaceListing, QaCapabilitySelection, QaCurrentAccess, QaSessionAccess, QaSkillActivationRecord, QaSkillAssignmentOverride, QaSubrole, QaUserAccess, QaAdminAuditEvent, QaAdminOverview, QaAdminPage, QaAdminSkillScope, QaAdminSkillsView, QaAdminUserDetail, QaAdminUserRow, QaAdminUserUpdate, QaAuditQuery, QaConversationDetail, QaConversationDeletion, QaConversationQuery, QaConversationReview, QaConversationReviewInput, QaConversationSummary, QaExpertMemoryDraft, QaExpertMemoryPage, QaExpertMemoryRecord, QaExpertMemoryScope, QaFeedbackQuery, QaFeedbackRow, QaMessageFeedback, QaMessageFeedbackInput, QaQualityMetrics, QaReviewQueueItem, QaReviewQueueRow, QaSlashCatalog, QaSlashExecution, QaSlashSubmitAttachment, QaUserQuery } from "../types.js";
4
+ import type { QaAccountNotificationsInput, QaAccountProfileInput, QaAccountSession, QaAccountStartersInput, QaAccountStarter, QaAccountUserPublic, QaAccessAdminSnapshot, QaApprovalDecision, QaClaimResult, QaLockdownProof, QaModelCatalogEntry, QaOwnershipEntry, QaPasswordResetRequest, QaPendingApproval, QaPendingQuestion, QaQuestionAnswerItem, QaQueueStatus, QaIssuedServiceToken, QaServiceTokenCreateInput, QaServiceTokenSummary, QaSessionState, QaSkillDocument, QaSkillDraftInput, QaSkillRemoval, QaSkillSummary, QaSkillToolDescriptor, QaSkillValidation, QaSourceFilePreview, QaTurnSources, QaWhoamiResult, QaDocumentPreview, QaSpreadsheetPreviewSelection, QaWorkspaceFile, QaWorkspaceFileChunk, QaDocumentWorkflowStatus, QaWorkspaceListing, QaCapabilitySelection, QaCurrentAccess, QaSessionAccess, QaSkillActivationRecord, QaSkillAssignmentOverride, QaSubrole, QaUserAccess, QaAdminAuditEvent, QaAdminOverview, QaAdminPage, QaAdminSkillScope, QaAdminSkillsView, QaAdminUserDetail, QaAdminUserRow, QaAdminUserUpdate, QaAuditQuery, QaConversationDetail, QaConversationDeletion, QaConversationQuery, QaConversationReview, QaConversationReviewInput, QaConversationSummary, QaExpertMemoryDraft, QaExpertMemoryPage, QaExpertMemoryRecord, QaExpertMemoryScope, QaFeedbackQuery, QaFeedbackRow, QaMessageFeedback, QaMessageFeedbackInput, QaQualityMetrics, QaReviewQueueItem, QaReviewQueueRow, QaSlashCatalog, QaSlashExecution, QaSlashSubmitAttachment, QaUserQuery } 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;
8
+ export type QaSessions = ISessions & {
9
+ /** Register an exact id admitted by authenticated QA create/read before retain. */
10
+ rememberAdmitted?(sessionId: string): void;
11
+ };
9
12
  /** Narrow client API slice used to pin the preset and model of a fresh chat. */
10
13
  export type QaSessionsApi = {
11
14
  selectModel: ClientRemote["session"]["selectModel"];
@@ -158,13 +161,14 @@ export interface QaSourceApi {
158
161
  readonly ok: false;
159
162
  readonly error: unknown;
160
163
  }>;
161
- readSourceFile(token: string, sessionId: string, sourcePath: string): Promise<{
164
+ readSourceFile(token: string, sessionId: string, sourcePath: string, selection?: QaSpreadsheetPreviewSelection): Promise<{
162
165
  readonly ok: true;
163
166
  readonly value: QaSourceFilePreview;
164
167
  } | {
165
168
  readonly ok: false;
166
169
  readonly error: unknown;
167
170
  }>;
171
+ readSourceImage?(token: string, sessionId: string, sourcePath: string, imagePath: string): Promise<RemoteResult<string>>;
168
172
  /** One directory of the chat's own workspace, for the files panel. */
169
173
  listWorkspaceFiles(token: string, sessionId: string, path: string): Promise<{
170
174
  readonly ok: true;
@@ -186,7 +190,7 @@ export interface QaSourceApi {
186
190
  * document pipeline; the panel shows the PDF the browser already knows how
187
191
  * to draw instead of uploading the bytes anywhere.
188
192
  */
189
- previewWorkspaceDocument(token: string, sessionId: string, path: string): Promise<{
193
+ previewWorkspaceDocument(token: string, sessionId: string, path: string, selection?: QaSpreadsheetPreviewSelection): Promise<{
190
194
  readonly ok: true;
191
195
  readonly value: QaDocumentPreview;
192
196
  } | {
@@ -214,13 +218,14 @@ export type QaBoundSourceApi = {
214
218
  readonly ok: false;
215
219
  readonly error: unknown;
216
220
  }>;
217
- readSourceFile(sessionId: string, sourcePath: string): Promise<{
221
+ readSourceFile(sessionId: string, sourcePath: string, selection?: QaSpreadsheetPreviewSelection): Promise<{
218
222
  readonly ok: true;
219
223
  readonly value: QaSourceFilePreview;
220
224
  } | {
221
225
  readonly ok: false;
222
226
  readonly error: unknown;
223
227
  }>;
228
+ readSourceImage?(sessionId: string, sourcePath: string, imagePath: string): Promise<RemoteResult<string>>;
224
229
  listWorkspaceFiles(sessionId: string, path: string): Promise<{
225
230
  readonly ok: true;
226
231
  readonly value: QaWorkspaceListing;
@@ -235,7 +240,7 @@ export type QaBoundSourceApi = {
235
240
  readonly ok: false;
236
241
  readonly error: unknown;
237
242
  }>;
238
- previewWorkspaceDocument(sessionId: string, path: string): Promise<{
243
+ previewWorkspaceDocument(sessionId: string, path: string, selection?: QaSpreadsheetPreviewSelection): Promise<{
239
244
  readonly ok: true;
240
245
  readonly value: QaDocumentPreview;
241
246
  } | {
@@ -342,9 +347,16 @@ export interface QaIntegrationTokenApi {
342
347
  list(): Promise<QaIntegrationTokenResult<readonly QaServiceTokenSummary[]>>;
343
348
  create(input: QaServiceTokenCreateInput): Promise<QaIntegrationTokenResult<QaIssuedServiceToken>>;
344
349
  revoke(tokenId: string): Promise<QaIntegrationTokenResult<null>>;
350
+ setClarifications?(tokenId: string, allowed: boolean): Promise<QaIntegrationTokenResult<null>>;
345
351
  }
346
352
  /** Account remotes exposed by the plugin's own typert namespace. */
347
353
  export interface QaAccountsApi {
354
+ accountsSetServiceTokenClarifications?(token: string, tokenId: string, allowed: boolean): Promise<RemoteResult<{
355
+ readonly updated: boolean;
356
+ }>>;
357
+ accountsOidcStart?(): Promise<RemoteResult<import("../types.js").QaOidcStart>>;
358
+ accountsOidcComplete?(handoff: string, completionKey: string): Promise<RemoteResult<QaAccountSession>>;
359
+ accountsOidcLogout?(token: string): Promise<RemoteResult<string | null>>;
348
360
  chatVisible?(token: string): Promise<RemoteResult<readonly import("../chat-sharing/types.js").QaChatAccess[]>>;
349
361
  accountsWhoami(token: string): Promise<RemoteResult<QaWhoamiResult>>;
350
362
  accountsLogin(email: string, password: string): Promise<RemoteResult<QaAccountSession>>;
@@ -0,0 +1,3 @@
1
+ import type { QaSurfaceConfig, ResolvedQaOidcConfig } from "../types.js";
2
+ export declare function resolveOidc(input: QaSurfaceConfig): ResolvedQaOidcConfig;
3
+ //# sourceMappingURL=oidc.d.ts.map
@@ -0,0 +1,48 @@
1
+ import { z } from "zod";
2
+ import type { QaFormService } from "./service.js";
3
+ import type { QaFormRecord, QaFormSubmission } from "./types.js";
4
+ declare const fileRef: z.ZodObject<{
5
+ attachmentId: z.ZodString;
6
+ name: z.ZodString;
7
+ bytes: z.ZodNumber;
8
+ }, z.core.$strip>;
9
+ type FileRef = z.infer<typeof fileRef>;
10
+ /** Structural port to the installed Host; receipt data is runtime-validated. */
11
+ export interface QaFormHostAttachments {
12
+ readonly root: string;
13
+ readFileStream(file: FileRef, signal?: AbortSignal): AsyncIterable<Uint8Array>;
14
+ saveFile(input: {
15
+ data: Uint8Array;
16
+ name: string;
17
+ }): Promise<unknown>;
18
+ fileHostPath(file: FileRef): string | undefined;
19
+ validateImage?(input: {
20
+ data: Uint8Array;
21
+ mediaType: "image/png" | "image/jpeg";
22
+ name: string;
23
+ }): Promise<void>;
24
+ }
25
+ export declare function validateFormFile(name: string, data: Buffer): string;
26
+ /** Durable bytes belong to the form store; Host objects are verified reader projections. */
27
+ export declare class QaFormAttachmentAdapter {
28
+ private readonly service;
29
+ private readonly host;
30
+ constructor(service: () => QaFormService, host: () => QaFormHostAttachments | undefined);
31
+ available(): boolean;
32
+ check(session: string, formId: string, uploadId: string): void;
33
+ claim(session: string, uploadId: string): {
34
+ record: QaFormRecord;
35
+ upload: QaFormRecord["uploads"][number];
36
+ };
37
+ complete(session: string, formId: string, uploadId: string, raw: unknown, signal: AbortSignal, authorize: () => void): Promise<QaFormRecord>;
38
+ fail(session: string, formId: string, uploadId: string): void;
39
+ /** Exact saved bytes are re-projected through the Host on each successful resume. */
40
+ readable(submission: QaFormSubmission): Promise<QaFormSubmission & {
41
+ resources: {
42
+ resource_id: string;
43
+ read_path: string;
44
+ }[];
45
+ }>;
46
+ }
47
+ export {};
48
+ //# sourceMappingURL=attachments.d.ts.map
@@ -0,0 +1,11 @@
1
+ import type { QaFormFieldError, QaFormResult } from "./types.js";
2
+ export declare class QaFormError extends Error {
3
+ readonly code: string;
4
+ readonly revision?: number | undefined;
5
+ readonly fields?: QaFormFieldError[] | undefined;
6
+ constructor(code: string, message: string, revision?: number | undefined, fields?: QaFormFieldError[] | undefined);
7
+ }
8
+ /** Deliberately redact unexpected storage/Host exceptions at the wire boundary. */
9
+ export declare function formFailure(error: unknown): QaFormResult<never>;
10
+ export declare function formAssert(condition: unknown, code: string, message: string): asserts condition;
11
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Stable object-key ordering for schema and idempotency fingerprints.
3
+ *
4
+ * Lives apart from the sqlite store so every store implementation hashes the
5
+ * same way without importing the sqlite bridge: the client test graph mounts a
6
+ * store too, and a browser environment must not see `@yadsh/dsh-plugin-kit/sqlite`.
7
+ */
8
+ export declare function fingerprint(value: unknown): string;
9
+ //# sourceMappingURL=fingerprint.d.ts.map
@@ -0,0 +1,33 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ import type { ToolExecution } from "@deepseek-ai/dsh-tools";
3
+ import type { QaFormService } from "./service.js";
4
+ import type { QaFormRecord, QaFormSubmission } from "./types.js";
5
+ type Outcome = QaFormSubmission | {
6
+ status: "paused";
7
+ form_id: string;
8
+ reason: string;
9
+ };
10
+ /** A parked tool call is transient. Never reconstruct one from a saved draft. */
11
+ export declare class QaFormGate {
12
+ readonly service: () => QaFormService;
13
+ private readonly rootOf;
14
+ private readonly busy;
15
+ private readonly allowed;
16
+ private readonly filesAvailable;
17
+ private readonly waiters;
18
+ private readonly disposers;
19
+ private closed;
20
+ private readonly clients;
21
+ constructor(service: () => QaFormService, rootOf: (id: string) => string | undefined, busy: (id: string) => boolean, allowed: (exec: ToolExecution) => boolean, filesAvailable?: () => boolean);
22
+ install(ctx: Context): void;
23
+ waiting(id: string): boolean;
24
+ touch(session: string): void;
25
+ hasSession(session: string): boolean;
26
+ request(raw: unknown, exec: ToolExecution): Promise<Outcome>;
27
+ notify(record: QaFormRecord, pause?: boolean): void;
28
+ cancel(session: string): void;
29
+ cancelAll(): void;
30
+ dispose(): void;
31
+ }
32
+ export {};
33
+ //# sourceMappingURL=gate.d.ts.map
@@ -0,0 +1,72 @@
1
+ import { z } from "zod";
2
+ import type { QaFormPolicy, QaFormSchema } from "./types.js";
3
+ export declare const DEFAULT_FORM_POLICY: Readonly<QaFormPolicy>;
4
+ export declare const formSchemaParser: z.ZodObject<{
5
+ schema_version: z.ZodLiteral<1>;
6
+ title: z.ZodString;
7
+ description: z.ZodOptional<z.ZodString>;
8
+ submit_label: z.ZodOptional<z.ZodString>;
9
+ steps: z.ZodArray<z.ZodObject<{
10
+ id: z.ZodString;
11
+ title: z.ZodString;
12
+ description: z.ZodOptional<z.ZodString>;
13
+ items: z.ZodArray<z.ZodObject<{
14
+ id: z.ZodString;
15
+ title: z.ZodString;
16
+ description: z.ZodOptional<z.ZodString>;
17
+ answer: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
18
+ type: z.ZodLiteral<"text">;
19
+ required: z.ZodBoolean;
20
+ placeholder: z.ZodOptional<z.ZodString>;
21
+ min_length: z.ZodOptional<z.ZodNumber>;
22
+ max_length: z.ZodOptional<z.ZodNumber>;
23
+ }, z.core.$strict>, z.ZodObject<{
24
+ type: z.ZodLiteral<"textarea">;
25
+ required: z.ZodBoolean;
26
+ placeholder: z.ZodOptional<z.ZodString>;
27
+ min_length: z.ZodOptional<z.ZodNumber>;
28
+ max_length: z.ZodOptional<z.ZodNumber>;
29
+ }, z.core.$strict>, z.ZodObject<{
30
+ type: z.ZodLiteral<"single_select">;
31
+ required: z.ZodBoolean;
32
+ options: z.ZodArray<z.ZodObject<{
33
+ value: z.ZodString;
34
+ label: z.ZodString;
35
+ description: z.ZodOptional<z.ZodString>;
36
+ recommended: z.ZodOptional<z.ZodBoolean>;
37
+ }, z.core.$strict>>;
38
+ allow_other: z.ZodOptional<z.ZodBoolean>;
39
+ }, z.core.$strict>, z.ZodObject<{
40
+ type: z.ZodLiteral<"multi_select">;
41
+ required: z.ZodBoolean;
42
+ options: z.ZodArray<z.ZodObject<{
43
+ value: z.ZodString;
44
+ label: z.ZodString;
45
+ description: z.ZodOptional<z.ZodString>;
46
+ recommended: z.ZodOptional<z.ZodBoolean>;
47
+ }, z.core.$strict>>;
48
+ allow_other: z.ZodOptional<z.ZodBoolean>;
49
+ min_selected: z.ZodOptional<z.ZodNumber>;
50
+ max_selected: z.ZodOptional<z.ZodNumber>;
51
+ }, z.core.$strict>], "type">>;
52
+ files: z.ZodDiscriminatedUnion<[z.ZodObject<{
53
+ requirement: z.ZodLiteral<"none">;
54
+ }, z.core.$strict>, z.ZodObject<{
55
+ max_count: z.ZodNumber;
56
+ accept: z.ZodArray<z.ZodString>;
57
+ max_file_size_bytes: z.ZodNumber;
58
+ requirement: z.ZodLiteral<"required">;
59
+ min_count: z.ZodNumber;
60
+ }, z.core.$strict>, z.ZodObject<{
61
+ max_count: z.ZodNumber;
62
+ accept: z.ZodArray<z.ZodString>;
63
+ max_file_size_bytes: z.ZodNumber;
64
+ requirement: z.ZodLiteral<"optional">;
65
+ }, z.core.$strict>], "requirement">;
66
+ }, z.core.$strict>>;
67
+ }, z.core.$strict>>;
68
+ }, z.core.$strict>;
69
+ /** Shared by server and browser. No Node APIs or browser-supplied readiness. */
70
+ export declare function parseFormSchema(input: unknown, policy: Readonly<QaFormPolicy>): QaFormSchema;
71
+ export declare function resolveFormPolicy(input?: Partial<QaFormPolicy>): QaFormPolicy;
72
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1,15 @@
1
+ import type { QaFormPolicy, QaFormRecord, QaFormStoreApi, QaFormView } from "./types.js";
2
+ export declare class QaFormService {
3
+ readonly store: QaFormStoreApi;
4
+ readonly policy: () => Readonly<QaFormPolicy>;
5
+ private readonly ownerOf;
6
+ constructor(store: QaFormStoreApi, policy: () => Readonly<QaFormPolicy>, ownerOf?: (session: string) => string);
7
+ enabled(): void;
8
+ create(session: string, key: string, input: unknown): QaFormRecord;
9
+ view(record: QaFormRecord, waiting?: boolean): QaFormView;
10
+ get(session: string, id: string): QaFormRecord;
11
+ step(session: string, id: string, stepId: string, revision: number): void;
12
+ command(session: string, raw: unknown): QaFormRecord;
13
+ private beginUpload;
14
+ }
15
+ //# sourceMappingURL=service.d.ts.map
@@ -0,0 +1,25 @@
1
+ import { SqliteDatabase } from "@yadsh/dsh-plugin-kit/sqlite";
2
+ import type { QaFormRecord, QaFormStoreApi } from "./types.js";
3
+ export { fingerprint } from "./fingerprint.js";
4
+ /** Full synchronous commits: snapshot, revision and mutation receipt share one transaction. */
5
+ export declare class QaFormStore implements QaFormStoreApi {
6
+ readonly storage: SqliteDatabase;
7
+ constructor(file: string);
8
+ list(session: string): QaFormRecord[];
9
+ get(session: string, id: string): QaFormRecord;
10
+ put(record: QaFormRecord): void;
11
+ create(session: string, key: string, schema: QaFormRecord["schema"], creator?: string): QaFormRecord;
12
+ editableOrSubmitted(record: QaFormRecord): void;
13
+ private mutationReceipt;
14
+ replayedMutation(formId: string, mutationId: string, input: unknown): QaFormRecord | null;
15
+ mutate(session: string, id: string, revision: number, mutationId: string, input: unknown, work: (r: QaFormRecord) => void): QaFormRecord;
16
+ /** Async work happens before this short final transaction; no revision captured at upload start. */
17
+ update(session: string, id: string, work: (r: QaFormRecord) => void): QaFormRecord;
18
+ resource(formId: string, id: string): Uint8Array;
19
+ saveResource(formId: string, id: string, data: Uint8Array): void;
20
+ storedBytes(session: string): number;
21
+ identityReservedBytes(creator: string): number;
22
+ cancelSession(session: string): void;
23
+ close(): void;
24
+ }
25
+ //# sourceMappingURL=store.d.ts.map