@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
@@ -0,0 +1,177 @@
1
+ import type { QaAccountRole } from "./policy.js";
2
+ /** The account fields projected to browsers; never includes credentials. */
3
+ export interface QaAccountUserPublic {
4
+ readonly id: string;
5
+ readonly email: string;
6
+ readonly displayName: string;
7
+ readonly role: QaAccountRole;
8
+ readonly createdAt: string;
9
+ readonly lastLoginAt: string | null;
10
+ readonly disabled: boolean;
11
+ /** Self-declared identity the QA prompt renders; empty until edited. */
12
+ readonly profile: QaAccountProfile;
13
+ /** The account's own starter buttons; empty until customized. */
14
+ readonly starters: QaAccountStarters;
15
+ /** Which channels a finished turn may use for this reader. */
16
+ readonly notifications: QaAccountNotifications;
17
+ }
18
+ /** One external system the deployment collects a handle for. */
19
+ export interface QaAccountIdentityField {
20
+ /** Stable lowercase key: the profile's storage key and the prompt's label. */
21
+ readonly key: string;
22
+ /** Operator copy shown in the profile form. */
23
+ readonly label: string;
24
+ }
25
+ /**
26
+ * What one account says about itself. Every value is the owner's own wording,
27
+ * which is why the prompt renders it as self-declared rather than as a
28
+ * verified directory attribute.
29
+ */
30
+ export interface QaAccountProfile {
31
+ /** Full name as the user writes it; empty when unset. */
32
+ readonly fullName: string;
33
+ /** External-system handles, keyed by the declared field key. */
34
+ readonly identities: Readonly<Record<string, string>>;
35
+ /** Free-form guidance about how the user wants answers; empty when unset. */
36
+ readonly instructions: string;
37
+ /** ISO timestamp of the last edit; null while the profile is untouched. */
38
+ readonly updatedAt: string | null;
39
+ }
40
+ /** Full-replace profile write: an absent value clears the stored one. */
41
+ export interface QaAccountProfileInput {
42
+ readonly fullName: string;
43
+ readonly identities: Readonly<Record<string, string>>;
44
+ readonly instructions: string;
45
+ }
46
+ /** One starter button: what it reads and what pressing it sends. */
47
+ export interface QaAccountStarter {
48
+ readonly label: string;
49
+ readonly prompt: string;
50
+ }
51
+ /**
52
+ * An account's own starter buttons plus the choice about the deployment's
53
+ * built-in suggestions. Pure UI preferences: unlike the profile, none of this
54
+ * reaches the agent prompt.
55
+ */
56
+ export interface QaAccountStarters {
57
+ readonly items: readonly QaAccountStarter[];
58
+ /** Hide the deployment's suggested questions in this account's composer. */
59
+ readonly hideDefaults: boolean;
60
+ }
61
+ /** Full-replace starters write: an absent value clears the stored one. */
62
+ export interface QaAccountStartersInput {
63
+ readonly items: readonly QaAccountStarter[];
64
+ readonly hideDefaults: boolean;
65
+ }
66
+ /**
67
+ * What one account allows a finished turn to do to it. Pure UI preferences:
68
+ * unlike the profile, none of this reaches the agent prompt, and unlike the
69
+ * starter buttons, none of it is content — it is two switches over the
70
+ * channels the plugin already knows how to raise.
71
+ *
72
+ * The deployment's `config.notifications` sits above these: a channel the stand
73
+ * closed stays closed whatever an account asks for, which is the operator's
74
+ * answer to a laptop more than one person signs in on.
75
+ */
76
+ export interface QaAccountNotifications {
77
+ /** Show the in-page line naming the chat whose turn ended. */
78
+ readonly inApp: boolean;
79
+ /**
80
+ * Hand the same fact to the operating system while this page is hidden or
81
+ * behind another window. Needs the browser's permission as well: without it
82
+ * the line stays inside the page and nothing asks a second time.
83
+ */
84
+ readonly desktop: boolean;
85
+ }
86
+ /** Full-replace notifications write: both channels are always sent. */
87
+ export interface QaAccountNotificationsInput {
88
+ readonly inApp: boolean;
89
+ readonly desktop: boolean;
90
+ }
91
+ /** One successful login/registration: the bearer token plus the user. */
92
+ export interface QaAccountSession {
93
+ readonly token: string;
94
+ readonly user: QaAccountUserPublic;
95
+ }
96
+ /**
97
+ * One forgotten-password request waiting for an operator. The address and name
98
+ * travel with it so the console can show who is locked out without a second
99
+ * lookup; the count makes repeated taps visible instead of silent.
100
+ */
101
+ export interface QaPasswordResetRequest {
102
+ readonly userId: string;
103
+ readonly email: string;
104
+ readonly displayName: string;
105
+ readonly requestedAt: string;
106
+ readonly lastRequestedAt: string;
107
+ readonly requestCount: number;
108
+ /** True when the account is disabled: a reset will not let it sign in. */
109
+ readonly disabled: boolean;
110
+ }
111
+ export type QaWhoamiResult = {
112
+ readonly authenticated: false;
113
+ } | {
114
+ readonly authenticated: true;
115
+ readonly user: QaAccountUserPublic;
116
+ };
117
+ /** Bulk ownership claim outcome for one browser's local chat index. */
118
+ export interface QaClaimResult {
119
+ readonly claimed: number;
120
+ /** Ids already owned by a different user; the browser drops them. */
121
+ readonly conflicts: readonly string[];
122
+ }
123
+ /**
124
+ * What an integration token may do. The credential a non-browser application
125
+ * presents to the QA HTTP API carries its own scopes, so a bridge that asks
126
+ * questions cannot read back conversations it was never given.
127
+ */
128
+ export type QaServiceTokenScope = "ask" | "sessions:read";
129
+ /**
130
+ * What an account asks a new integration token to be. The credential is always
131
+ * issued to the caller: nothing a browser sends may name another account, so
132
+ * this shape has no owner field and the administrative path keeps its own.
133
+ */
134
+ export interface QaServiceTokenCreateInput {
135
+ /** A note the operator's list shows; empty becomes a generic label. */
136
+ readonly label?: string;
137
+ /** Requested scopes; unknown ones are dropped, explicit empty grants none. */
138
+ readonly scopes?: readonly string[];
139
+ /** Whether API turns may ask clarifying questions; omitted preserves existing behavior. */
140
+ readonly allowClarifications?: boolean;
141
+ /** How long the token lives, in days; bounded server-side. */
142
+ readonly ttlDays?: number;
143
+ }
144
+ /**
145
+ * One integration token as a list shows it. The plaintext is deliberately not
146
+ * part of this shape: a secret is shown once, when it is minted, and a list
147
+ * that could repeat it would be a list that leaks it.
148
+ */
149
+ export interface QaServiceTokenSummary {
150
+ readonly id: string;
151
+ readonly label: string;
152
+ readonly scopes: readonly QaServiceTokenScope[];
153
+ /** Older Hosts omit this field and keep clarifications enabled. */
154
+ readonly allowClarifications?: boolean;
155
+ readonly createdAt: string;
156
+ readonly expiresAt: string;
157
+ readonly lastUsedAt: string | null;
158
+ readonly revokedAt: string | null;
159
+ readonly useCount: number;
160
+ }
161
+ /** One freshly minted token: the plaintext is here and nowhere else, ever. */
162
+ export interface QaIssuedServiceToken extends QaServiceTokenSummary {
163
+ /** The credential to hand to the integration. Never recoverable later. */
164
+ readonly token: string;
165
+ }
166
+ /**
167
+ * One chat-ownership entry as the admin views see it: the session, its owner
168
+ * and the owner's display name resolved at read time (a disabled account
169
+ * still names its chats).
170
+ */
171
+ export interface QaOwnershipEntry {
172
+ readonly sessionId: string;
173
+ readonly userId: string;
174
+ readonly displayName: string;
175
+ readonly claimedAt: string;
176
+ }
177
+ //# sourceMappingURL=accounts.d.ts.map
@@ -0,0 +1,286 @@
1
+ import type { QaUserAccess } from "./capability.js";
2
+ import type { QaAccountRole } from "./policy.js";
3
+ import type { QaConversationReview, QaFeedbackRating, QaFeedbackReason, QaMessageFeedback, QaQualityIssueType, QaQualitySeverity, QaReviewQueueItem, QaReviewStatus } from "./quality.js";
4
+ /** Administrative actions recorded in the audit trail. */
5
+ export type QaAdminAuditAction = "user.created" | "user.updated" | "user.enabled" | "user.disabled"
6
+ /** An operator set a new password for an account that had requested one. */
7
+ | "user.password-reset" | "authorization.changed" | "subrole.assignment.changed" | "subrole.created" | "subrole.updated" | "subrole.deleted" | "common_capabilities.updated" | "conversation.reviewed" | "conversation.deleted" | "review.updated" | "review.queued" | "admin.settings.updated" | "skill.created" | "skill.updated" | "skill.deleted"
8
+ /** An operator rewrote a line an expert had remembered. */
9
+ | "memory.corrected"
10
+ /** One or several remembered lines were deleted; the count is in the target. */
11
+ | "memory.deleted"
12
+ /** A whole namespace was emptied. */
13
+ | "memory.wiped";
14
+ export interface QaAdminAuditEvent {
15
+ readonly id: string;
16
+ readonly timestamp: string;
17
+ readonly actorId: string;
18
+ readonly action: QaAdminAuditAction;
19
+ readonly targetType?: string;
20
+ readonly targetId?: string;
21
+ /** JSON snapshots serialized at the storage boundary for a strict Remote type. */
22
+ readonly before?: string;
23
+ readonly after?: string;
24
+ }
25
+ /**
26
+ * One tool call as the review viewer shows it. `arguments` and `result` are
27
+ * preview strings, not raw payloads: the admin redaction seam owns trimming.
28
+ */
29
+ export interface QaConversationToolCall {
30
+ readonly callId: string;
31
+ readonly name: string;
32
+ readonly arguments: string;
33
+ readonly result?: string;
34
+ readonly error?: string;
35
+ readonly time?: number;
36
+ readonly durationMs?: number;
37
+ }
38
+ /** Token accounting of one assistant message, when the log carries it. */
39
+ export interface QaMessageUsage {
40
+ readonly inputTokens: number;
41
+ readonly outputTokens: number;
42
+ readonly totalTokens?: number;
43
+ }
44
+ /** One message in the review viewer, in log order. */
45
+ export interface QaConversationMessage {
46
+ /** Stable message identity: the session event seq it was projected from. */
47
+ readonly id: string;
48
+ readonly seq: number;
49
+ readonly role: "user" | "assistant" | "system";
50
+ readonly text: string;
51
+ readonly time: number;
52
+ readonly model?: string;
53
+ readonly provider?: string;
54
+ readonly usage?: QaMessageUsage;
55
+ readonly interrupted?: boolean;
56
+ readonly toolCalls?: readonly QaConversationToolCall[];
57
+ /** Ratings of this message by its owner, newest first. */
58
+ readonly feedback?: readonly QaMessageFeedback[];
59
+ /** Reviewer results attached to this exact message. */
60
+ readonly reviews?: readonly QaConversationReview[];
61
+ }
62
+ /**
63
+ * What the agent could use in a conversation, frozen when the session was
64
+ * reserved. Reviewing an old answer against today's role configuration would
65
+ * answer the wrong question.
66
+ */
67
+ export interface QaConversationRuntime {
68
+ readonly subroleId: string;
69
+ readonly adminPreview: boolean;
70
+ readonly model?: string;
71
+ readonly provider?: string;
72
+ readonly agentPreset?: string;
73
+ readonly effectiveTools?: readonly string[];
74
+ readonly effectiveSkills?: readonly string[];
75
+ /** Skills the model actually loaded, derived from the log's skill tool calls. */
76
+ readonly loadedSkills?: readonly string[];
77
+ /** True when the stored log could not be read; counts stay 0 and text is absent. */
78
+ readonly transcriptUnavailable?: QaTranscriptUnavailableReason;
79
+ }
80
+ /** Why a stored transcript could not be projected for the reviewer. */
81
+ export type QaTranscriptUnavailableReason = "storage-unavailable" | "not-found" | "unreadable";
82
+ /** One conversation row of the administrative list. */
83
+ export interface QaConversationSummary {
84
+ readonly conversationId: string;
85
+ readonly userId: string;
86
+ readonly displayName: string;
87
+ readonly subroleId: string;
88
+ readonly createdAt: string;
89
+ /** Newest activity the deployment can see: creation, log tail, or a review. */
90
+ readonly updatedAt: string;
91
+ readonly title?: string;
92
+ readonly messageCount: number;
93
+ readonly positiveFeedback: number;
94
+ readonly negativeFeedback: number;
95
+ readonly reviewStatus: QaReviewStatus;
96
+ }
97
+ /** The full review payload of one conversation. */
98
+ export interface QaConversationDetail {
99
+ readonly conversationId: string;
100
+ readonly summary: QaConversationSummary;
101
+ readonly runtime: QaConversationRuntime;
102
+ readonly messages: readonly QaConversationMessage[];
103
+ readonly reviews: readonly QaConversationReview[];
104
+ readonly queueItems: readonly QaReviewQueueItem[];
105
+ }
106
+ /** What one administrative deletion removed, for the console to report. */
107
+ export interface QaConversationDeletion {
108
+ readonly conversationId: string;
109
+ /**
110
+ * Every session whose stored log is gone, the chat first: a conversation's
111
+ * subagent sessions are part of it and are removed with it.
112
+ */
113
+ readonly sessions: readonly string[];
114
+ /** Quality rows dropped with the conversation. */
115
+ readonly qualityRows: number;
116
+ }
117
+ /**
118
+ * Server-side filter for the conversation list. Every field is optional and
119
+ * accepts an explicit null: the wire carries whatever the browser has, and an
120
+ * absent filter must never be mistaken for a filter on `null`.
121
+ */
122
+ export interface QaConversationQuery {
123
+ readonly userId?: string | null;
124
+ readonly subroleId?: string | null;
125
+ readonly from?: string | null;
126
+ readonly to?: string | null;
127
+ readonly rating?: QaFeedbackRating | null;
128
+ readonly reviewStatus?: QaReviewStatus | null;
129
+ /** Search matches the conversation title and the owner's name or email. */
130
+ readonly search?: string | null;
131
+ }
132
+ /** Server-side filter for the feedback table. */
133
+ export interface QaFeedbackQuery {
134
+ readonly rating?: QaFeedbackRating | null;
135
+ readonly userId?: string | null;
136
+ readonly subroleId?: string | null;
137
+ readonly reason?: QaFeedbackReason | null;
138
+ readonly from?: string | null;
139
+ readonly to?: string | null;
140
+ readonly reviewStatus?: QaReviewStatus | null;
141
+ }
142
+ /** Server-side filter for the audit table. */
143
+ export interface QaAuditQuery {
144
+ readonly actorId?: string | null;
145
+ readonly action?: QaAdminAuditAction | null;
146
+ readonly from?: string | null;
147
+ readonly to?: string | null;
148
+ }
149
+ /** Server-side filter for the user list. */
150
+ export interface QaUserQuery {
151
+ readonly search?: string | null;
152
+ readonly status?: "active" | "disabled" | null;
153
+ readonly role?: QaAccountRole | null;
154
+ readonly subroleId?: string | null;
155
+ }
156
+ /** Cursor page of any admin list. `nextCursor` is null on the last page. */
157
+ export interface QaAdminPage<T> {
158
+ readonly items: readonly T[];
159
+ readonly nextCursor: string | null;
160
+ readonly total: number;
161
+ }
162
+ /** One pending item of the review queue, with the context to triage it. */
163
+ export interface QaReviewQueueRow extends QaReviewQueueItem {
164
+ readonly displayName: string;
165
+ readonly subroleId: string;
166
+ readonly title?: string;
167
+ readonly raisedAtLabel: string;
168
+ readonly issueSummary?: readonly QaQualityIssueType[];
169
+ readonly severity?: QaQualitySeverity;
170
+ }
171
+ /** One row of the feedback table (spec §33). */
172
+ export interface QaFeedbackRow extends QaMessageFeedback {
173
+ readonly displayName: string;
174
+ readonly subroleId: string;
175
+ readonly conversationTitle?: string;
176
+ readonly reviewStatus: QaReviewStatus;
177
+ }
178
+ /** Aggregated quality counters (spec §27). */
179
+ export interface QaQualityIssueCount {
180
+ readonly issue: QaQualityIssueType;
181
+ readonly count: number;
182
+ }
183
+ export interface QaQualityRatingBreakdown {
184
+ readonly key: string;
185
+ readonly label: string;
186
+ readonly rated: number;
187
+ readonly positive: number;
188
+ readonly negative: number;
189
+ readonly positiveRate: number | null;
190
+ }
191
+ export interface QaQualityTrendPoint {
192
+ /** ISO date (UTC) of the bucket. */
193
+ readonly date: string;
194
+ readonly rated: number;
195
+ readonly positive: number;
196
+ readonly negative: number;
197
+ }
198
+ export interface QaQualityMetrics {
199
+ readonly conversations: number;
200
+ readonly activeUsers: number;
201
+ readonly assistantMessages: number;
202
+ readonly ratedMessages: number;
203
+ readonly positiveRatings: number;
204
+ readonly negativeRatings: number;
205
+ /** Share of assistant messages that carry a rating; null without messages. */
206
+ readonly ratingRate: number | null;
207
+ /** Share of positive ratings among rated messages; null without ratings. */
208
+ readonly positiveRate: number | null;
209
+ readonly unreviewedNegatives: number;
210
+ readonly reviewedItems: number;
211
+ readonly issues: readonly QaQualityIssueCount[];
212
+ readonly bySubrole: readonly QaQualityRatingBreakdown[];
213
+ readonly trend: readonly QaQualityTrendPoint[];
214
+ }
215
+ /**
216
+ * One attention line on the admin overview. The Host reports the condition and
217
+ * its numbers; the browser owns the wording, so an operator's language never
218
+ * depends on the deployment's locale.
219
+ */
220
+ export interface QaOverviewAlert {
221
+ readonly level: "critical" | "warning" | "info";
222
+ readonly code: "unreviewed-negatives" | "subrole-satisfaction" | "recurring-reason";
223
+ readonly count: number;
224
+ /** Subrole id or feedback reason, when the condition names one. */
225
+ readonly subject?: string;
226
+ /** Positive-feedback share of the subject, when the condition measured one. */
227
+ readonly rate?: number;
228
+ }
229
+ /** The /qa/admin landing payload. */
230
+ export interface QaAdminOverview {
231
+ readonly metrics: QaQualityMetrics;
232
+ readonly alerts: readonly QaOverviewAlert[];
233
+ readonly recentFeedback: readonly QaFeedbackRow[];
234
+ readonly queue: readonly QaReviewQueueRow[];
235
+ }
236
+ /** The account columns the store owns, without any joined counters. */
237
+ export interface QaAdminAccountRow {
238
+ readonly id: string;
239
+ readonly email: string;
240
+ readonly displayName: string;
241
+ readonly fullName: string;
242
+ readonly role: QaAccountRole;
243
+ readonly disabled: boolean;
244
+ readonly createdAt: string;
245
+ readonly lastLoginAt: string | null;
246
+ readonly access: QaUserAccess;
247
+ }
248
+ /** One user row of the admin user list (spec §5). */
249
+ export interface QaAdminUserRow extends QaAdminAccountRow {
250
+ readonly conversations: number;
251
+ readonly feedbackGiven: number;
252
+ }
253
+ /** Everything the user detail page renders, in one payload (spec §6). */
254
+ export interface QaAdminUserDetail {
255
+ readonly user: QaAdminUserRow;
256
+ /** Effective capability counts per assigned subrole, for the access preview. */
257
+ readonly effective: readonly {
258
+ readonly subroleId: string;
259
+ readonly name: string;
260
+ /** Visible from the first step: system-required, Common and the role. */
261
+ readonly tools: number;
262
+ /** The role's ceiling for tools a loaded skill requires. */
263
+ readonly grantableTools: number;
264
+ /** Tools the profile withdraws, whatever else grants them. */
265
+ readonly deniedTools: number;
266
+ readonly skills: number;
267
+ }[];
268
+ readonly activity: {
269
+ readonly conversations: number;
270
+ /**
271
+ * Unknown until the conversations page is opened: the count needs every
272
+ * conversation's log read, so the detail card reports null instead of
273
+ * blocking its payload on the scan.
274
+ */
275
+ readonly messages: number | null;
276
+ readonly positiveRatings: number;
277
+ readonly negativeRatings: number;
278
+ };
279
+ }
280
+ /** The administrative write of one account; absent fields stay unchanged. */
281
+ export interface QaAdminUserUpdate {
282
+ readonly role?: QaAccountRole | null;
283
+ readonly disabled?: boolean | null;
284
+ readonly access?: QaUserAccess | null;
285
+ }
286
+ //# sourceMappingURL=admin.d.ts.map
@@ -0,0 +1,11 @@
1
+ /** Host-recorded review of one immutable assistant message. */
2
+ export interface QaAnswerReview {
3
+ readonly version: 1;
4
+ readonly candidateSeq: number;
5
+ readonly candidateHash: string;
6
+ readonly requestSeq: number | null;
7
+ readonly round: number;
8
+ readonly status: "reviewing" | "recovering" | "pass" | "revise" | "failure" | "cancelled" | "waived";
9
+ readonly at: number;
10
+ }
11
+ //# sourceMappingURL=answer-review.d.ts.map