@yadsh/dsh-qa-surface 0.5.0 → 0.6.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 (374) hide show
  1. package/README.md +194 -9
  2. package/compatibility.json +10 -1
  3. package/cordis.patch.yml +9 -0
  4. package/lib/account-remotes.js +10 -0
  5. package/lib/account-remotes.js.map +1 -1
  6. package/lib/accounts/errors.js.map +1 -1
  7. package/lib/accounts/file.js.map +1 -1
  8. package/lib/accounts/store.js +22 -0
  9. package/lib/accounts/store.js.map +1 -1
  10. package/lib/client/QaAccountsController.js +29 -0
  11. package/lib/client/QaAccountsController.js.map +1 -1
  12. package/lib/client/QaSessionController.js +168 -48
  13. package/lib/client/QaSessionController.js.map +1 -1
  14. package/lib/client/QaSurface.js +125 -56
  15. package/lib/client/QaSurface.js.map +1 -1
  16. package/lib/client/QaSurfaceGuard.js +96 -0
  17. package/lib/client/QaSurfaceGuard.js.map +1 -0
  18. package/lib/client/QaTranscriptAdapter.js +11 -5
  19. package/lib/client/QaTranscriptAdapter.js.map +1 -1
  20. package/lib/client/components/QaChangelog.js +31 -0
  21. package/lib/client/components/QaChangelog.js.map +1 -1
  22. package/lib/client/components/QaComposer.js +1 -1
  23. package/lib/client/components/QaComposer.js.map +1 -1
  24. package/lib/client/components/QaHeader.js +2 -8
  25. package/lib/client/components/QaHeader.js.map +1 -1
  26. package/lib/client/components/QaMessage.js +20 -7
  27. package/lib/client/components/QaMessage.js.map +1 -1
  28. package/lib/client/components/QaModal.js +24 -6
  29. package/lib/client/components/QaModal.js.map +1 -1
  30. package/lib/client/components/QaSidebar.js +2 -6
  31. package/lib/client/components/QaSidebar.js.map +1 -1
  32. package/lib/client/components/QaSourcesPanel.js +6 -5
  33. package/lib/client/components/QaSourcesPanel.js.map +1 -1
  34. package/lib/client/components/QaWidthHandle.js +21 -1
  35. package/lib/client/components/QaWidthHandle.js.map +1 -1
  36. package/lib/client/components/surface-utils.js +2 -0
  37. package/lib/client/components/surface-utils.js.map +1 -1
  38. package/lib/client/index.js +72 -24
  39. package/lib/client/index.js.map +1 -1
  40. package/lib/client/panels/PanelHost.js +209 -0
  41. package/lib/client/panels/PanelHost.js.map +1 -0
  42. package/lib/client/panels/PanelLauncher.js +39 -0
  43. package/lib/client/panels/PanelLauncher.js.map +1 -0
  44. package/lib/client/panels/contract.js +2 -0
  45. package/lib/client/panels/contract.js.map +1 -0
  46. package/lib/client/panels/index.js +2 -0
  47. package/lib/client/panels/index.js.map +1 -0
  48. package/lib/client/panels/registry.js +171 -0
  49. package/lib/client/panels/registry.js.map +1 -0
  50. package/lib/client/project-session-state.js +3 -0
  51. package/lib/client/project-session-state.js.map +1 -1
  52. package/lib/client/settings/card.js +2 -2
  53. package/lib/client/settings/card.js.map +1 -1
  54. package/lib/client/settings/sections/accounts.js +3 -1
  55. package/lib/client/settings/sections/accounts.js.map +1 -1
  56. package/lib/client/settings/sections/documents.js +88 -0
  57. package/lib/client/settings/sections/documents.js.map +1 -0
  58. package/lib/client/settings/sections/interface.js +2 -0
  59. package/lib/client/settings/sections/interface.js.map +1 -1
  60. package/lib/client/settings/sections.js +1 -0
  61. package/lib/client/settings/sections.js.map +1 -1
  62. package/lib/client/settings-extensions/contract.js +2 -0
  63. package/lib/client/settings-extensions/contract.js.map +1 -0
  64. package/lib/client/settings-extensions/index.js +2 -0
  65. package/lib/client/settings-extensions/index.js.map +1 -0
  66. package/lib/client/settings-extensions/registry.js +63 -0
  67. package/lib/client/settings-extensions/registry.js.map +1 -0
  68. package/lib/client/settlement.js +51 -5
  69. package/lib/client/settlement.js.map +1 -1
  70. package/lib/client/source-preview.js +24 -0
  71. package/lib/client/source-preview.js.map +1 -0
  72. package/lib/client/styles.js +157 -32
  73. package/lib/client/styles.js.map +1 -1
  74. package/lib/client/subagent-codenames.js +109 -0
  75. package/lib/client/subagent-codenames.js.map +1 -0
  76. package/lib/client/types.js +1 -0
  77. package/lib/client/types.js.map +1 -1
  78. package/lib/client/user-settings/GeneralSettingsPage.js +13 -0
  79. package/lib/client/user-settings/GeneralSettingsPage.js.map +1 -0
  80. package/lib/client/user-settings/ProfileSettingsPage.js +59 -0
  81. package/lib/client/user-settings/ProfileSettingsPage.js.map +1 -0
  82. package/lib/client/user-settings/SkillCatalog.js +23 -0
  83. package/lib/client/user-settings/SkillCatalog.js.map +1 -0
  84. package/lib/client/user-settings/SkillEditor.js +89 -0
  85. package/lib/client/user-settings/SkillEditor.js.map +1 -0
  86. package/lib/client/user-settings/SkillToolPicker.js +58 -0
  87. package/lib/client/user-settings/SkillToolPicker.js.map +1 -0
  88. package/lib/client/user-settings/SkillsSettingsPage.js +171 -0
  89. package/lib/client/user-settings/SkillsSettingsPage.js.map +1 -0
  90. package/lib/client/user-settings/StartersSettingsPage.js +78 -0
  91. package/lib/client/user-settings/StartersSettingsPage.js.map +1 -0
  92. package/lib/client/user-settings/UserSettingsDialog.js +50 -0
  93. package/lib/client/user-settings/UserSettingsDialog.js.map +1 -0
  94. package/lib/client/user-settings/copy.js +84 -0
  95. package/lib/client/user-settings/copy.js.map +1 -0
  96. package/lib/client/user-settings/draft.js +127 -0
  97. package/lib/client/user-settings/draft.js.map +1 -0
  98. package/lib/client/user-settings/fields.js +24 -0
  99. package/lib/client/user-settings/fields.js.map +1 -0
  100. package/lib/client.js +5467 -1379
  101. package/lib/client.js.map +1 -1
  102. package/lib/config-resolvers/accounts.js +30 -0
  103. package/lib/config-resolvers/accounts.js.map +1 -1
  104. package/lib/config-resolvers/defaults.js +23 -0
  105. package/lib/config-resolvers/defaults.js.map +1 -1
  106. package/lib/config-resolvers/tools.js +37 -0
  107. package/lib/config-resolvers/tools.js.map +1 -0
  108. package/lib/config-resolvers/ui.js +2 -0
  109. package/lib/config-resolvers/ui.js.map +1 -1
  110. package/lib/config.js +288 -0
  111. package/lib/config.js.map +1 -1
  112. package/lib/documents/artifacts/ids.js +43 -0
  113. package/lib/documents/artifacts/ids.js.map +1 -0
  114. package/lib/documents/artifacts/manifest.js +66 -0
  115. package/lib/documents/artifacts/manifest.js.map +1 -0
  116. package/lib/documents/artifacts/store.js +169 -0
  117. package/lib/documents/artifacts/store.js.map +1 -0
  118. package/lib/documents/capabilities.js +93 -0
  119. package/lib/documents/capabilities.js.map +1 -0
  120. package/lib/documents/config.js +302 -0
  121. package/lib/documents/config.js.map +1 -0
  122. package/lib/documents/defaults.js +78 -0
  123. package/lib/documents/defaults.js.map +1 -0
  124. package/lib/documents/errors.js +101 -0
  125. package/lib/documents/errors.js.map +1 -0
  126. package/lib/documents/index.js +80 -0
  127. package/lib/documents/index.js.map +1 -0
  128. package/lib/documents/inspect/facts.js +161 -0
  129. package/lib/documents/inspect/facts.js.map +1 -0
  130. package/lib/documents/inspect/zip.js +108 -0
  131. package/lib/documents/inspect/zip.js.map +1 -0
  132. package/lib/documents/markdown/directives.js +135 -0
  133. package/lib/documents/markdown/directives.js.map +1 -0
  134. package/lib/documents/markdown/frontmatter.js +35 -0
  135. package/lib/documents/markdown/frontmatter.js.map +1 -0
  136. package/lib/documents/markdown/normalize.js +113 -0
  137. package/lib/documents/markdown/normalize.js.map +1 -0
  138. package/lib/documents/orchestrator/assets.js +243 -0
  139. package/lib/documents/orchestrator/assets.js.map +1 -0
  140. package/lib/documents/orchestrator/convert-document.js +186 -0
  141. package/lib/documents/orchestrator/convert-document.js.map +1 -0
  142. package/lib/documents/orchestrator/create-document.js +292 -0
  143. package/lib/documents/orchestrator/create-document.js.map +1 -0
  144. package/lib/documents/orchestrator/extract-document.js +162 -0
  145. package/lib/documents/orchestrator/extract-document.js.map +1 -0
  146. package/lib/documents/orchestrator/inspect-document.js +89 -0
  147. package/lib/documents/orchestrator/inspect-document.js.map +1 -0
  148. package/lib/documents/orchestrator/runtime-deps.js +59 -0
  149. package/lib/documents/orchestrator/runtime-deps.js.map +1 -0
  150. package/lib/documents/orchestrator/scope.js +132 -0
  151. package/lib/documents/orchestrator/scope.js.map +1 -0
  152. package/lib/documents/providers/docling.js +247 -0
  153. package/lib/documents/providers/docling.js.map +1 -0
  154. package/lib/documents/providers/libreoffice.js +130 -0
  155. package/lib/documents/providers/libreoffice.js.map +1 -0
  156. package/lib/documents/providers/markitdown.js +89 -0
  157. package/lib/documents/providers/markitdown.js.map +1 -0
  158. package/lib/documents/providers/pandoc.js +161 -0
  159. package/lib/documents/providers/pandoc.js.map +1 -0
  160. package/lib/documents/providers/process.js +164 -0
  161. package/lib/documents/providers/process.js.map +1 -0
  162. package/lib/documents/providers/registry.js +152 -0
  163. package/lib/documents/providers/registry.js.map +1 -0
  164. package/lib/documents/providers/shared.js +75 -0
  165. package/lib/documents/providers/shared.js.map +1 -0
  166. package/lib/documents/runtime.js +114 -0
  167. package/lib/documents/runtime.js.map +1 -0
  168. package/lib/documents/security/file-types.js +188 -0
  169. package/lib/documents/security/file-types.js.map +1 -0
  170. package/lib/documents/security/limits.js +78 -0
  171. package/lib/documents/security/limits.js.map +1 -0
  172. package/lib/documents/security/mime.js +43 -0
  173. package/lib/documents/security/mime.js.map +1 -0
  174. package/lib/documents/security/paths.js +133 -0
  175. package/lib/documents/security/paths.js.map +1 -0
  176. package/lib/documents/templates/registry.js +147 -0
  177. package/lib/documents/templates/registry.js.map +1 -0
  178. package/lib/documents/templates/resolver.js +59 -0
  179. package/lib/documents/templates/resolver.js.map +1 -0
  180. package/lib/documents/tools/convert.js +125 -0
  181. package/lib/documents/tools/convert.js.map +1 -0
  182. package/lib/documents/tools/create.js +187 -0
  183. package/lib/documents/tools/create.js.map +1 -0
  184. package/lib/documents/tools/index.js +41 -0
  185. package/lib/documents/tools/index.js.map +1 -0
  186. package/lib/documents/tools/inspect.js +135 -0
  187. package/lib/documents/tools/inspect.js.map +1 -0
  188. package/lib/documents/tools/shared.js +88 -0
  189. package/lib/documents/tools/shared.js.map +1 -0
  190. package/lib/documents/tools/to-markdown.js +125 -0
  191. package/lib/documents/tools/to-markdown.js.map +1 -0
  192. package/lib/documents/types.js +12 -0
  193. package/lib/documents/types.js.map +1 -0
  194. package/lib/index.js +225 -20
  195. package/lib/index.js.map +1 -1
  196. package/lib/integration-principals.js +22 -0
  197. package/lib/integration-principals.js.map +1 -0
  198. package/lib/lockdown-policy.js +15 -3
  199. package/lib/lockdown-policy.js.map +1 -1
  200. package/lib/personal-skills/errors.js +9 -0
  201. package/lib/personal-skills/errors.js.map +1 -0
  202. package/lib/personal-skills/host.js +80 -0
  203. package/lib/personal-skills/host.js.map +1 -0
  204. package/lib/personal-skills/index.js +10 -0
  205. package/lib/personal-skills/index.js.map +1 -0
  206. package/lib/personal-skills/paths.js +127 -0
  207. package/lib/personal-skills/paths.js.map +1 -0
  208. package/lib/personal-skills/provider.js +109 -0
  209. package/lib/personal-skills/provider.js.map +1 -0
  210. package/lib/personal-skills/remotes.js +40 -0
  211. package/lib/personal-skills/remotes.js.map +1 -0
  212. package/lib/personal-skills/service.js +686 -0
  213. package/lib/personal-skills/service.js.map +1 -0
  214. package/lib/personal-skills/skill-file.js +278 -0
  215. package/lib/personal-skills/skill-file.js.map +1 -0
  216. package/lib/personal-skills/skill-format.js +202 -0
  217. package/lib/personal-skills/skill-format.js.map +1 -0
  218. package/lib/personal-skills/watcher.js +96 -0
  219. package/lib/personal-skills/watcher.js.map +1 -0
  220. package/lib/profile.js +6 -4
  221. package/lib/profile.js.map +1 -1
  222. package/lib/prompt-notes.js +19 -0
  223. package/lib/prompt-notes.js.map +1 -1
  224. package/lib/provenance/file-preview.js +68 -21
  225. package/lib/provenance/file-preview.js.map +1 -1
  226. package/lib/provenance/host-store.js +44 -11
  227. package/lib/provenance/host-store.js.map +1 -1
  228. package/lib/provenance/index.js +1 -0
  229. package/lib/provenance/index.js.map +1 -1
  230. package/lib/provenance/normalize.js +3 -1
  231. package/lib/provenance/normalize.js.map +1 -1
  232. package/lib/provenance/snapshot-store.js +154 -0
  233. package/lib/provenance/snapshot-store.js.map +1 -0
  234. package/lib/qa-tools/activation-detector.js +53 -0
  235. package/lib/qa-tools/activation-detector.js.map +1 -0
  236. package/lib/qa-tools/activation-manager.js +111 -0
  237. package/lib/qa-tools/activation-manager.js.map +1 -0
  238. package/lib/qa-tools/catalog.js +108 -0
  239. package/lib/qa-tools/catalog.js.map +1 -0
  240. package/lib/qa-tools/durable-marker.js +115 -0
  241. package/lib/qa-tools/durable-marker.js.map +1 -0
  242. package/lib/qa-tools/index.js +83 -0
  243. package/lib/qa-tools/index.js.map +1 -0
  244. package/lib/qa-tools/lifecycle.js +64 -0
  245. package/lib/qa-tools/lifecycle.js.map +1 -0
  246. package/lib/qa-tools/types.js +2 -0
  247. package/lib/qa-tools/types.js.map +1 -0
  248. package/lib/resolve-config.js +5 -0
  249. package/lib/resolve-config.js.map +1 -1
  250. package/lib/secure-session.js +35 -3
  251. package/lib/secure-session.js.map +1 -1
  252. package/lib/starters.js +117 -0
  253. package/lib/starters.js.map +1 -0
  254. package/lib/typert.host.js +767 -22
  255. package/lib/typert.remote-client.d.ts +17 -1
  256. package/lib/typert.remote-client.js +609 -17
  257. package/lib/types/account-remotes.d.ts +3 -1
  258. package/lib/types/accounts/errors.d.ts +1 -1
  259. package/lib/types/accounts/file.d.ts +10 -0
  260. package/lib/types/accounts/store.d.ts +7 -1
  261. package/lib/types/client/QaAccountsController.d.ts +7 -1
  262. package/lib/types/client/QaSessionController.d.ts +12 -0
  263. package/lib/types/client/QaSurface.d.ts +14 -4
  264. package/lib/types/client/QaSurfaceGuard.d.ts +27 -0
  265. package/lib/types/client/QaTranscriptAdapter.d.ts +7 -0
  266. package/lib/types/client/components/QaComposer.d.ts +3 -1
  267. package/lib/types/client/components/QaHeader.d.ts +3 -1
  268. package/lib/types/client/components/QaModal.d.ts +5 -4
  269. package/lib/types/client/components/QaSidebar.d.ts +8 -11
  270. package/lib/types/client/components/QaWidthHandle.d.ts +13 -0
  271. package/lib/types/client/index.d.ts +1 -0
  272. package/lib/types/client/panels/PanelHost.d.ts +18 -0
  273. package/lib/types/client/panels/PanelLauncher.d.ts +5 -0
  274. package/lib/types/client/panels/contract.d.ts +83 -0
  275. package/lib/types/client/panels/index.d.ts +3 -0
  276. package/lib/types/client/panels/registry.d.ts +40 -0
  277. package/lib/types/client/project-session-state.d.ts +5 -0
  278. package/lib/types/client/settings/sections/documents.d.ts +13 -0
  279. package/lib/types/client/settings/sections.d.ts +1 -0
  280. package/lib/types/client/settings-extensions/contract.d.ts +32 -0
  281. package/lib/types/client/settings-extensions/index.d.ts +3 -0
  282. package/lib/types/client/settings-extensions/registry.d.ts +15 -0
  283. package/lib/types/client/settlement.d.ts +41 -5
  284. package/lib/types/client/source-preview.d.ts +8 -0
  285. package/lib/types/client/styles.d.ts +2 -0
  286. package/lib/types/client/subagent-codenames.d.ts +18 -0
  287. package/lib/types/client/types.d.ts +35 -3
  288. package/lib/types/client/user-settings/GeneralSettingsPage.d.ts +14 -0
  289. package/lib/types/client/user-settings/ProfileSettingsPage.d.ts +18 -0
  290. package/lib/types/client/user-settings/SkillCatalog.d.ts +16 -0
  291. package/lib/types/client/user-settings/SkillEditor.d.ts +42 -0
  292. package/lib/types/client/user-settings/SkillToolPicker.d.ts +17 -0
  293. package/lib/types/client/user-settings/SkillsSettingsPage.d.ts +15 -0
  294. package/lib/types/client/user-settings/StartersSettingsPage.d.ts +14 -0
  295. package/lib/types/client/user-settings/UserSettingsDialog.d.ts +43 -0
  296. package/lib/types/client/user-settings/copy.d.ts +25 -0
  297. package/lib/types/client/user-settings/draft.d.ts +51 -0
  298. package/lib/types/client/user-settings/fields.d.ts +43 -0
  299. package/lib/types/config-resolvers/tools.d.ts +6 -0
  300. package/lib/types/documents/artifacts/ids.d.ts +14 -0
  301. package/lib/types/documents/artifacts/manifest.d.ts +32 -0
  302. package/lib/types/documents/artifacts/store.d.ts +67 -0
  303. package/lib/types/documents/capabilities.d.ts +32 -0
  304. package/lib/types/documents/config.d.ts +27 -0
  305. package/lib/types/documents/defaults.d.ts +161 -0
  306. package/lib/types/documents/errors.d.ts +42 -0
  307. package/lib/types/documents/index.d.ts +63 -0
  308. package/lib/types/documents/inspect/facts.d.ts +43 -0
  309. package/lib/types/documents/inspect/zip.d.ts +28 -0
  310. package/lib/types/documents/markdown/directives.d.ts +39 -0
  311. package/lib/types/documents/markdown/frontmatter.d.ts +15 -0
  312. package/lib/types/documents/markdown/normalize.d.ts +30 -0
  313. package/lib/types/documents/orchestrator/assets.d.ts +55 -0
  314. package/lib/types/documents/orchestrator/convert-document.d.ts +25 -0
  315. package/lib/types/documents/orchestrator/create-document.d.ts +18 -0
  316. package/lib/types/documents/orchestrator/extract-document.d.ts +24 -0
  317. package/lib/types/documents/orchestrator/inspect-document.d.ts +12 -0
  318. package/lib/types/documents/orchestrator/runtime-deps.d.ts +43 -0
  319. package/lib/types/documents/orchestrator/scope.d.ts +52 -0
  320. package/lib/types/documents/providers/docling.d.ts +54 -0
  321. package/lib/types/documents/providers/libreoffice.d.ts +40 -0
  322. package/lib/types/documents/providers/markitdown.d.ts +28 -0
  323. package/lib/types/documents/providers/pandoc.d.ts +42 -0
  324. package/lib/types/documents/providers/process.d.ts +54 -0
  325. package/lib/types/documents/providers/registry.d.ts +68 -0
  326. package/lib/types/documents/providers/shared.d.ts +27 -0
  327. package/lib/types/documents/runtime.d.ts +59 -0
  328. package/lib/types/documents/security/file-types.d.ts +39 -0
  329. package/lib/types/documents/security/limits.d.ts +24 -0
  330. package/lib/types/documents/security/mime.d.ts +13 -0
  331. package/lib/types/documents/security/paths.d.ts +38 -0
  332. package/lib/types/documents/templates/registry.d.ts +50 -0
  333. package/lib/types/documents/templates/resolver.d.ts +30 -0
  334. package/lib/types/documents/tools/convert.d.ts +9 -0
  335. package/lib/types/documents/tools/create.d.ts +14 -0
  336. package/lib/types/documents/tools/index.d.ts +33 -0
  337. package/lib/types/documents/tools/inspect.d.ts +9 -0
  338. package/lib/types/documents/tools/shared.d.ts +77 -0
  339. package/lib/types/documents/tools/to-markdown.d.ts +12 -0
  340. package/lib/types/documents/types.d.ts +294 -0
  341. package/lib/types/index.d.ts +75 -3
  342. package/lib/types/integration-principals.d.ts +9 -0
  343. package/lib/types/lockdown-policy.d.ts +12 -2
  344. package/lib/types/personal-skills/errors.d.ts +11 -0
  345. package/lib/types/personal-skills/host.d.ts +42 -0
  346. package/lib/types/personal-skills/index.d.ts +10 -0
  347. package/lib/types/personal-skills/paths.d.ts +39 -0
  348. package/lib/types/personal-skills/provider.d.ts +33 -0
  349. package/lib/types/personal-skills/remotes.d.ts +35 -0
  350. package/lib/types/personal-skills/service.d.ts +131 -0
  351. package/lib/types/personal-skills/skill-file.d.ts +64 -0
  352. package/lib/types/personal-skills/skill-format.d.ts +100 -0
  353. package/lib/types/personal-skills/watcher.d.ts +39 -0
  354. package/lib/types/profile.d.ts +13 -0
  355. package/lib/types/prompt-notes.d.ts +9 -0
  356. package/lib/types/provenance/file-preview.d.ts +47 -4
  357. package/lib/types/provenance/host-store.d.ts +7 -1
  358. package/lib/types/provenance/index.d.ts +1 -0
  359. package/lib/types/provenance/snapshot-store.d.ts +23 -0
  360. package/lib/types/qa-tools/activation-detector.d.ts +29 -0
  361. package/lib/types/qa-tools/activation-manager.d.ts +47 -0
  362. package/lib/types/qa-tools/catalog.d.ts +40 -0
  363. package/lib/types/qa-tools/durable-marker.d.ts +16 -0
  364. package/lib/types/qa-tools/index.d.ts +40 -0
  365. package/lib/types/qa-tools/lifecycle.d.ts +44 -0
  366. package/lib/types/qa-tools/types.d.ts +45 -0
  367. package/lib/types/secure-session.d.ts +24 -2
  368. package/lib/types/starters.d.ts +45 -0
  369. package/lib/types/types.d.ts +202 -3
  370. package/package.json +24 -11
  371. package/scripts/repair-session-events.mjs +260 -0
  372. package/lib/client/components/QaProfile.js +0 -64
  373. package/lib/client/components/QaProfile.js.map +0 -1
  374. package/lib/types/client/components/QaProfile.d.ts +0 -25
@@ -0,0 +1,47 @@
1
+ import type { Agent } from "@deepseek-ai/dsh-agent";
2
+ import type { PluginLogger } from "@yadsh/dsh-plugin-log";
3
+ import type { QaToolActivation, QaToolActivationOrigin, QaToolActivationResult, QaToolDescriptor } from "./types.js";
4
+ export interface QaToolActivationManagerOptions {
5
+ /** Live catalog; read per activation so a reload sees the new set. */
6
+ readonly catalog: readonly QaToolDescriptor[];
7
+ readonly catalogVersion: string;
8
+ readonly logger: PluginLogger;
9
+ }
10
+ /**
11
+ * Per-agent runtime ownership of the QA tool registrations.
12
+ *
13
+ * One agent's tools exist only while that agent is live: activation registers
14
+ * the whole catalog through the agent's own scoped context, and disposal
15
+ * unwinds the exact disposers `tools.register()` returned. State is a WeakMap
16
+ * keyed by the live agent, so nothing has to be keyed by id and a stale agent
17
+ * can never be mistaken for a resumed one.
18
+ */
19
+ export declare class QaToolActivationManager implements QaToolActivation {
20
+ private readonly options;
21
+ private readonly states;
22
+ constructor(options: QaToolActivationManagerOptions);
23
+ /**
24
+ * Register the whole catalog on one agent, all or nothing.
25
+ *
26
+ * A failed registration unwinds every tool this attempt registered and leaves
27
+ * the agent inactive: a partially attached QA surface would be worse than
28
+ * none, because the model would see a tool it cannot rely on.
29
+ * @param agent - the live agent receiving the tools.
30
+ * @param origin - why activation ran, for the operator log.
31
+ * @returns the outcome; `failed` carries the original error for the caller to report.
32
+ */
33
+ activate(agent: Agent, origin: QaToolActivationOrigin): QaToolActivationResult;
34
+ /** Whether this agent currently has the QA tools registered. */
35
+ isActive(agent: Agent): boolean;
36
+ /** Names registered on this agent; the admission guard evaluates this per call. */
37
+ activeToolNames(agent: Agent): readonly string[];
38
+ /**
39
+ * Unregister one agent's QA tools and forget its state. Safe to call more
40
+ * than once, and safe for an agent that never activated.
41
+ * @param agent - the agent whose registrations must be unwound.
42
+ */
43
+ disposeAgent(agent: Agent): void;
44
+ /** Dispose in reverse registration order, containing individual failures. */
45
+ private rollback;
46
+ }
47
+ //# sourceMappingURL=activation-manager.d.ts.map
@@ -0,0 +1,40 @@
1
+ import type { Agent } from "@deepseek-ai/dsh-agent";
2
+ import type { QaToolDescriptor } from "./types.js";
3
+ /**
4
+ * Deterministic catalog identity. The durable activation marker is derived from
5
+ * the session log rather than stored, so this version is not compared against a
6
+ * persisted record; it is reported by `qa_tools_selfcheck` and by the operator
7
+ * log so a catalog change is visible in a running deployment.
8
+ *
9
+ * Bump it whenever the catalog's tool set or their schemas change.
10
+ */
11
+ export declare const QA_TOOL_CATALOG_VERSION = "1";
12
+ /** One QA tool reports the activation state of whichever agent calls it. */
13
+ export interface QaToolsSelfcheckDeps {
14
+ readonly catalogVersion: string;
15
+ readonly activationMode: string;
16
+ /** Names the catalog contributes, in catalog order. */
17
+ readonly catalogTools: () => readonly string[];
18
+ /** Names currently registered on the calling agent. */
19
+ readonly activeTools: (agent: Agent) => readonly string[];
20
+ /** Whether the calling agent's session shows the activation skill was loaded. */
21
+ readonly skillLoaded: (agent: Agent) => boolean;
22
+ }
23
+ /**
24
+ * Build the shipped QA tool catalog.
25
+ *
26
+ * Side-effect free: constructing it registers nothing with `ctx.tools`. The
27
+ * activation manager owns every registration.
28
+ */
29
+ export declare function createQaToolCatalog(deps: QaToolsSelfcheckDeps): readonly QaToolDescriptor[];
30
+ /** QA tool names, in catalog order; the admission gate treats them as dynamic. */
31
+ export declare function qaToolNames(catalog: readonly QaToolDescriptor[]): string[];
32
+ /**
33
+ * Validate the catalog before it is registered anywhere: names must be unique
34
+ * and non-empty. Called once at activation preflight so a broken catalog fails
35
+ * before the first registration rather than halfway through.
36
+ * @param catalog - descriptors to validate.
37
+ * @throws when two descriptors share a name or a name is empty.
38
+ */
39
+ export declare function assertValidQaToolCatalog(catalog: readonly QaToolDescriptor[]): void;
40
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1,16 @@
1
+ import type { Session } from "@deepseek-ai/dsh-session";
2
+ /**
3
+ * Whether one session's log shows the configured skill was successfully loaded.
4
+ *
5
+ * Pairs each `tool/call` for the `skill` tool with its `tool/result`, then reads
6
+ * the loaded skill's name from the canonical rendered content. The rendered
7
+ * block is the only record of the returned skill identity that survives to the
8
+ * log — `tool/result` stores the model-facing message, not the tool's canonical
9
+ * value — and the pair closes only on a non-error result, so a refused or
10
+ * failed load never counts.
11
+ * @param session - the live session to inspect.
12
+ * @param skillName - the configured activation skill name.
13
+ * @returns whether that skill was loaded and its result succeeded.
14
+ */
15
+ export declare function sessionLoadedSkill(session: Pick<Session, "snapshotEvents">, skillName: string): boolean;
16
+ //# sourceMappingURL=durable-marker.d.ts.map
@@ -0,0 +1,40 @@
1
+ import type { Agent } from "@deepseek-ai/dsh-agent";
2
+ import type { Context } from "@deepseek-ai/cordis";
3
+ import type { PluginLogger } from "@yadsh/dsh-plugin-log";
4
+ import type { QaToolActivation } from "./types.js";
5
+ export interface QaToolsOptions {
6
+ readonly logger: PluginLogger;
7
+ readonly dynamicActivation: boolean;
8
+ readonly activationSkill: string;
9
+ readonly activationMode: string;
10
+ readonly activationPresets: readonly string[];
11
+ }
12
+ /**
13
+ * The QA tool subsystem: one catalog, one per-agent activation manager, and the
14
+ * two edges that drive it — the skill-result detector and the agent lifecycle.
15
+ *
16
+ * `dsh-qa-surface` owns the tools but never registers them at boot. Nothing in
17
+ * the catalog reaches the model until an agent it belongs to loads the
18
+ * activation skill, so the initial request of a session carries only the
19
+ * composition's own schemas.
20
+ */
21
+ export declare class QaTools implements QaToolActivation {
22
+ private readonly ctx;
23
+ private readonly options;
24
+ private readonly manager;
25
+ private readonly detector;
26
+ private readonly lifecycle;
27
+ private readonly catalogTools;
28
+ constructor(ctx: Context, options: QaToolsOptions);
29
+ /** Names currently registered on one agent; the admission guard reads this per call. */
30
+ activeToolNames(agent: Agent): readonly string[];
31
+ dispose(): void;
32
+ /**
33
+ * The preset gate. An empty `activationPresets` leaves it open, which is only
34
+ * coherent when this plugin serves a single agent composition; naming the QA
35
+ * preset keeps an unrelated DSH agent from unlocking the same catalog by
36
+ * loading a skill of the same name.
37
+ */
38
+ private isManagedAgent;
39
+ }
40
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,44 @@
1
+ import type { Agent } from "@deepseek-ai/dsh-agent";
2
+ import type { Context } from "@deepseek-ai/cordis";
3
+ import type { PluginLogger } from "@yadsh/dsh-plugin-log";
4
+ import type { QaToolActivationManager } from "./activation-manager.js";
5
+ export interface QaToolActivationLifecycleOptions {
6
+ readonly manager: QaToolActivationManager;
7
+ readonly logger: PluginLogger;
8
+ /** Whether this agent's composition participates in QA tool activation. */
9
+ readonly isManagedAgent: (agent: Agent) => boolean;
10
+ /**
11
+ * `true` waits for the activation skill; `false` attaches the catalog to
12
+ * every managed agent as soon as it is created.
13
+ */
14
+ readonly dynamicActivation: boolean;
15
+ /** The skill name whose load unlocks the tools in dynamic mode. */
16
+ readonly activationSkill: string;
17
+ }
18
+ /**
19
+ * Owns the arrival and departure edges of one agent's QA tool surface.
20
+ *
21
+ * Arrival: in dynamic mode a resumed session is recognized by the durable
22
+ * marker in its own log and gets its current catalog back before the first
23
+ * model step, while a fresh session waits for the detector. In immediate mode
24
+ * every managed agent is served at creation.
25
+ *
26
+ * Departure: the exact registrations this plugin made are unwound when the
27
+ * agent is disposed, so an agent that leaves never leaves a scoped tool behind.
28
+ */
29
+ export declare class QaToolActivationLifecycle {
30
+ private readonly ctx;
31
+ private readonly options;
32
+ private readonly disposers;
33
+ constructor(ctx: Context, options: QaToolActivationLifecycleOptions);
34
+ /**
35
+ * Restore a resumed activation, or attach immediately in the compatibility
36
+ * mode. A fresh managed session ends this handler inactive by design: the
37
+ * tools arrive when the model loads the activation skill.
38
+ */
39
+ private onAgentCreated;
40
+ private attach;
41
+ private onAgentDisposed;
42
+ dispose(): void;
43
+ }
44
+ //# sourceMappingURL=lifecycle.d.ts.map
@@ -0,0 +1,45 @@
1
+ import type { Agent } from "@deepseek-ai/dsh-agent";
2
+ import type { ToolDefinition } from "@deepseek-ai/dsh-tools";
3
+ /**
4
+ * One entry of the QA tool catalog.
5
+ *
6
+ * `group` and `tags` are passive metadata: the MVP activation policy activates
7
+ * the whole catalog and never filters on them. They exist so a later
8
+ * `activationMode` can select subsets without touching the tool definitions.
9
+ */
10
+ export interface QaToolDescriptor {
11
+ readonly definition: ToolDefinition;
12
+ /** Capability bucket reserved for a future grouped activation mode. */
13
+ readonly group?: string;
14
+ /** Free-form labels reserved for a future search/unlock mode. */
15
+ readonly tags?: readonly string[];
16
+ }
17
+ /** Why one activation ran; the origin only shapes logging and the event guard. */
18
+ export type QaToolActivationOrigin = "skill" | "restore" | "immediate";
19
+ /** Runtime activation state of one live agent. */
20
+ export interface QaToolActivationState {
21
+ status: "inactive" | "activating" | "active";
22
+ /** Catalog version whose tools are registered; set once `status` is active. */
23
+ catalogVersion?: string | undefined;
24
+ /** Exact disposers returned by `tools.register()`, in registration order. */
25
+ disposers: (() => void)[];
26
+ }
27
+ /** Outcome of one activation attempt. */
28
+ export type QaToolActivationResult = {
29
+ readonly status: "activated";
30
+ readonly count: number;
31
+ } | {
32
+ readonly status: "already-active";
33
+ } | {
34
+ readonly status: "failed";
35
+ readonly error: unknown;
36
+ };
37
+ /** The activation subsystem's observable surface, injected into the admission gate. */
38
+ export interface QaToolActivation {
39
+ /**
40
+ * Names currently registered on one live agent. The admission guard evaluates
41
+ * this per execution, so a tool becomes callable exactly when it appears here.
42
+ */
43
+ activeToolNames(agent: Agent): readonly string[];
44
+ }
45
+ //# sourceMappingURL=types.d.ts.map
@@ -1,3 +1,4 @@
1
+ import type { Agent } from "@deepseek-ai/dsh-agent";
1
2
  import type { Context } from "@deepseek-ai/cordis";
2
3
  import type { PluginLogger } from "@yadsh/dsh-plugin-log";
3
4
  import type { QaLockdownProof, ResolvedQaSurfaceConfig } from "./types.js";
@@ -25,7 +26,15 @@ export declare class QaPolicyAdmission {
25
26
  private readonly config;
26
27
  private readonly logger;
27
28
  private readonly accounts?;
29
+ /**
30
+ * Names the QA tool catalog attached to one agent after its activation
31
+ * skill loaded. Read per execution, so a tool becomes callable exactly when
32
+ * it is registered and stops being callable once the agent is disposed.
33
+ */
34
+ private readonly dynamicToolNames;
28
35
  private readonly appliedPolicies;
36
+ /** Host-trusted principal-scoped plugin tools enabled outside static config. */
37
+ private readonly principalScopedTools;
29
38
  /**
30
39
  * Sessions the QA surface has attested. The provenance note is written for
31
40
  * exactly these, and a delegated child resolves through its root session, so
@@ -34,15 +43,28 @@ export declare class QaPolicyAdmission {
34
43
  private readonly attested;
35
44
  private readonly workspaceAccess;
36
45
  private readonly disposeWorkspaceGuard;
37
- constructor(ctx: Context, config: () => ResolvedQaSurfaceConfig, logger: PluginLogger, accounts?: QaAccountsGate | undefined);
46
+ constructor(ctx: Context, config: () => ResolvedQaSurfaceConfig, logger: PluginLogger, accounts?: QaAccountsGate | undefined,
47
+ /**
48
+ * Names the QA tool catalog attached to one agent after its activation
49
+ * skill loaded. Read per execution, so a tool becomes callable exactly when
50
+ * it is registered and stops being callable once the agent is disposed.
51
+ */
52
+ dynamicToolNames?: (agent: Agent) => readonly string[]);
53
+ /**
54
+ * Add tools whose own executor resolves the QA principal server-side.
55
+ * Enabling the contributing plugin is the operator decision; model arguments
56
+ * still cannot select an owner. The returned disposer mirrors tool lifetime.
57
+ */
58
+ registerPrincipalScopedTools(names: readonly string[]): () => void;
38
59
  /**
39
60
  * The mounted attachment store's verbatim root, when the backend exposes
40
61
  * one. It sits outside every workspace, so the per-user fence would
41
62
  * otherwise deny the model the exact file an upload produced and the prompt
42
63
  * points it at. A backend without a resolvable root simply keeps the fence
43
64
  * closed — attachments then only work where reads are not fenced per user.
65
+ * Source preview asks for the same root, so one upload is readable by both.
44
66
  */
45
- private attachmentRoot;
67
+ attachmentRoot(): string | undefined;
46
68
  /**
47
69
  * The live agent for one session, resuming a Session the Host has not
48
70
  * materialized in this process.
@@ -0,0 +1,45 @@
1
+ import type { QaAccountStarters, QaAccountStartersInput, QaAccountStarter } from "./types.js";
2
+ /**
3
+ * Per-account starter messages: the labeled buttons above an empty composer,
4
+ * and what each of them sends. Shape, limits, and the normalization both
5
+ * halves of the plugin agree on. Deliberately free of Node built-ins — the
6
+ * accounts store and the browser-side form import these same rules, the same
7
+ * way profile.ts does for the self-declared identity.
8
+ */
9
+ /** Most starter buttons one account may store. */
10
+ export declare const QA_STARTERS_MAX_ITEMS = 12;
11
+ /** Longest accepted button label. */
12
+ export declare const QA_STARTERS_MAX_LABEL = 80;
13
+ /** Longest accepted prompt one button sends. */
14
+ export declare const QA_STARTERS_MAX_PROMPT = 2000;
15
+ /** The starters of an account that never customized them. */
16
+ export declare function emptyStarters(): QaAccountStarters;
17
+ /**
18
+ * Read one stored (or wire-delivered) starters record into its public shape.
19
+ * Unknown or hand-edited input degrades to the readable subset instead of
20
+ * throwing, mirroring the profile read path: a malformed record must never
21
+ * cost the account its session.
22
+ */
23
+ export declare function normalizeStarters(value: unknown): QaAccountStarters;
24
+ /** Validated starters values, before the store persists them. */
25
+ export type QaStartersWrite = QaAccountStartersInput;
26
+ export type QaStartersWriteResult = {
27
+ readonly ok: true;
28
+ readonly value: QaStartersWrite;
29
+ } | {
30
+ readonly ok: false;
31
+ readonly message: string;
32
+ };
33
+ /**
34
+ * Validate one full-replace starters write. Values are cleaned the same way
35
+ * the read path cleans them, but limits are refused with a message instead of
36
+ * truncated, so a user pasting an essay learns why it was not stored.
37
+ */
38
+ export declare function validateStartersWrite(input: unknown): QaStartersWriteResult;
39
+ /**
40
+ * The buttons an empty composer shows: the account's own starters first,
41
+ * then the deployment's suggestions unless the account hid them. An anonymous
42
+ * visitor (no starters of their own) sees exactly the deployment's list.
43
+ */
44
+ export declare function effectiveQuickQuestions(own: QaAccountStarters | undefined, defaults: readonly string[]): readonly QaAccountStarter[];
45
+ //# sourceMappingURL=starters.d.ts.map
@@ -1,8 +1,15 @@
1
+ import type { QaDocumentsConfig, ResolvedQaDocumentsConfig } from "./documents/config.js";
1
2
  import type { QaTurnSources } from "./provenance/types.js";
2
3
  export type QaSessionPolicy = "browser-persistent" | "new-on-load" | "fixed";
3
4
  export type QaSandboxMode = "read-only" | "workspace-write";
4
5
  export type QaApprovalPolicy = "never";
5
6
  export type QaToolPolicyMode = "allow-list";
7
+ /**
8
+ * How the QA tool catalog is attached. `all` attaches the whole catalog once
9
+ * the activation skill loads; the field is reserved so a future grouped or
10
+ * searched mode needs no config redesign.
11
+ */
12
+ export type QaToolActivationMode = "all";
6
13
  /**
7
14
  * How a tool policy `ask` resolves on an attested QA agent. `blocked` refuses
8
15
  * the call with the surface's own reason; `interactive` parks it until the
@@ -34,6 +41,8 @@ export interface QaAccountUserPublic {
34
41
  readonly disabled: boolean;
35
42
  /** Self-declared identity the QA prompt renders; empty until edited. */
36
43
  readonly profile: QaAccountProfile;
44
+ /** The account's own starter buttons; empty until customized. */
45
+ readonly starters: QaAccountStarters;
37
46
  }
38
47
  /** One external system the deployment collects a handle for. */
39
48
  export interface QaAccountIdentityField {
@@ -63,6 +72,26 @@ export interface QaAccountProfileInput {
63
72
  readonly identities: Readonly<Record<string, string>>;
64
73
  readonly instructions: string;
65
74
  }
75
+ /** One starter button: what it reads and what pressing it sends. */
76
+ export interface QaAccountStarter {
77
+ readonly label: string;
78
+ readonly prompt: string;
79
+ }
80
+ /**
81
+ * An account's own starter buttons plus the choice about the deployment's
82
+ * built-in suggestions. Pure UI preferences: unlike the profile, none of this
83
+ * reaches the agent prompt.
84
+ */
85
+ export interface QaAccountStarters {
86
+ readonly items: readonly QaAccountStarter[];
87
+ /** Hide the deployment's suggested questions in this account's composer. */
88
+ readonly hideDefaults: boolean;
89
+ }
90
+ /** Full-replace starters write: an absent value clears the stored one. */
91
+ export interface QaAccountStartersInput {
92
+ readonly items: readonly QaAccountStarter[];
93
+ readonly hideDefaults: boolean;
94
+ }
66
95
  /** One successful login/registration: the bearer token plus the user. */
67
96
  export interface QaAccountSession {
68
97
  readonly token: string;
@@ -91,6 +120,90 @@ export interface QaOwnershipEntry {
91
120
  readonly displayName: string;
92
121
  readonly claimedAt: string;
93
122
  }
123
+ /**
124
+ * Why one skill draft cannot be saved, or why it saves with a caveat. Codes
125
+ * stay stable on the wire; the browser owns the Russian copy.
126
+ */
127
+ export type QaSkillDiagnosticCode = "name-required" | "name-invalid" | "name-mismatch" | "description-required" | "description-too-long" | "when-to-use-too-long" | "field-type-invalid" | "invocation-never" | "invocation-invalid" | "invocation-legacy-key" | "allowed-tools-invalid" | "tool-name-invalid" | "tool-unavailable" | "tools-too-many" | "file-too-large" | "frontmatter-missing" | "skill-file-missing" | "frontmatter-invalid" | "unknown-field" | "resource-unsupported";
128
+ /** One finding about a skill file or an editor draft. */
129
+ export interface QaSkillDiagnostic {
130
+ readonly code: QaSkillDiagnosticCode;
131
+ readonly severity: "error" | "warning";
132
+ /** The editor field the message belongs to, or null for a file-wide one. */
133
+ readonly field: string | null;
134
+ /** The offending value: a tool name, a frontmatter key, a limit. */
135
+ readonly detail: string | null;
136
+ }
137
+ /**
138
+ * A JSON-representable frontmatter value. The editor receives the preserved
139
+ * foreign fields verbatim over the Host bridge, which carries JSON only, so
140
+ * the parser drops anything a YAML document can hold but JSON cannot.
141
+ */
142
+ export type QaSkillJsonValue = string | number | boolean | null | readonly QaSkillJsonValue[] | {
143
+ readonly [key: string]: QaSkillJsonValue;
144
+ };
145
+ /** One personal skill as the catalog list renders it. */
146
+ export interface QaSkillSummary {
147
+ readonly name: string;
148
+ readonly description: string;
149
+ readonly whenToUse: string | null;
150
+ readonly modelInvocable: boolean;
151
+ readonly userInvocable: boolean;
152
+ /** Declared tools, in canonical order; unknown ones included. */
153
+ readonly allowedTools: readonly string[];
154
+ /** Declared tools the current QA scope cannot use; still stored as declared. */
155
+ readonly unavailableTools: readonly string[];
156
+ /** Entries in the skill directory besides SKILL.md (references, assets, …). */
157
+ readonly resourceCount: number;
158
+ readonly valid: boolean;
159
+ readonly diagnostics: readonly QaSkillDiagnostic[];
160
+ readonly updatedAt: string | null;
161
+ /** sha256 of the stored bytes; an update must echo the revision it read. */
162
+ readonly revision: string;
163
+ }
164
+ /** One personal skill with everything the editor needs. */
165
+ export interface QaSkillDocument extends QaSkillSummary {
166
+ readonly body: string;
167
+ /** Frontmatter the editor preserves but does not own. */
168
+ readonly extraFrontmatter: Readonly<Record<string, QaSkillJsonValue>>;
169
+ /** Absolute SKILL.md path; rendered read-only for advanced users. */
170
+ readonly sourcePath: string;
171
+ /** The canonical file the serializer writes, built from the parsed content. */
172
+ readonly preview: string;
173
+ }
174
+ /** One tool the picker can offer, with this deployment's availability. */
175
+ export interface QaSkillToolDescriptor {
176
+ readonly name: string;
177
+ readonly description: string;
178
+ /** False when the QA session's own scope cannot use the tool. */
179
+ readonly available: boolean;
180
+ }
181
+ /** The editor's save payload. */
182
+ export interface QaSkillDraftInput {
183
+ readonly name: string;
184
+ readonly description: string;
185
+ readonly whenToUse: string | null;
186
+ readonly modelInvocable: boolean;
187
+ readonly userInvocable: boolean;
188
+ readonly allowedTools: readonly string[];
189
+ readonly body: string;
190
+ /** Echo of the revision the editor read; a stale one is refused. */
191
+ readonly expectedRevision: string | null;
192
+ }
193
+ /**
194
+ * The Host's answer about one unsaved draft: the file a save would write and
195
+ * the diagnostics it found. The editor shows its own subset immediately and
196
+ * this authoritative set as soon as it arrives.
197
+ */
198
+ export interface QaSkillValidation {
199
+ readonly preview: string;
200
+ readonly diagnostics: readonly QaSkillDiagnostic[];
201
+ }
202
+ /** What one delete did: v1 keeps the directory recoverable. */
203
+ export interface QaSkillRemoval {
204
+ readonly name: string;
205
+ readonly trashed: boolean;
206
+ }
94
207
  export interface QaSourcesConfig {
95
208
  readonly enabled?: boolean;
96
209
  readonly collect?: {
@@ -174,6 +287,11 @@ export interface QaSurfaceConfig {
174
287
  /** Floor for the visitor-resizable transcript/composer width; the page caps it. */
175
288
  readonly minContentWidth?: number;
176
289
  readonly showSessionList?: boolean;
290
+ /**
291
+ * Sign subagent completion notices with deterministic codenames
292
+ * («Дотошный Барсук») instead of the child's readable name or raw id.
293
+ */
294
+ readonly subagentCodenames?: boolean;
177
295
  };
178
296
  readonly suggestedQuestions?: readonly string[];
179
297
  /**
@@ -185,6 +303,27 @@ export interface QaSurfaceConfig {
185
303
  readonly approvals?: QaApprovalInteraction;
186
304
  readonly questions?: QaQuestionInteraction;
187
305
  };
306
+ /**
307
+ * QA tool delivery. Dynamic activation keeps the QA tool schemas out of the
308
+ * model request until the activation skill has actually been loaded.
309
+ */
310
+ readonly tools?: {
311
+ /**
312
+ * `true` attaches the QA tools only after the activation skill loads;
313
+ * `false` attaches them to every managed agent at creation.
314
+ */
315
+ readonly dynamicActivation?: boolean;
316
+ /** The skill name whose successful load attaches the QA tools. */
317
+ readonly activationSkill?: string;
318
+ /** Accepted activation policy; only `all` is implemented. */
319
+ readonly activationMode?: QaToolActivationMode;
320
+ /**
321
+ * Agent presets whose sessions participate. An empty list leaves the gate
322
+ * open, which is only safe when this plugin serves one agent composition —
323
+ * name the QA preset in any deployment that composes more than one.
324
+ */
325
+ readonly activationPresets?: readonly string[];
326
+ };
188
327
  readonly lockdown?: {
189
328
  readonly enabled?: boolean;
190
329
  readonly enforceFixedAgentPreset?: boolean;
@@ -222,6 +361,20 @@ export interface QaSurfaceConfig {
222
361
  * The child directory is not registered as a separate DSH workspace.
223
362
  */
224
363
  readonly perUserWorkspace?: boolean;
364
+ /**
365
+ * Personal Skills: the user's own `.dsh/skills` below their QA workspace,
366
+ * surfaced through a skill provider this plugin owns.
367
+ */
368
+ readonly skills?: {
369
+ readonly enabled?: boolean;
370
+ /** Directory below the personal root; relative, never escaping it. */
371
+ readonly relativeRoot?: string;
372
+ /** Follow manual file edits and refresh the DSH catalog. */
373
+ readonly watch?: boolean;
374
+ readonly maxSkillBytes?: number;
375
+ /** Reserved for the resource editor; v1 edits SKILL.md only. */
376
+ readonly allowResourceEditing?: boolean;
377
+ };
225
378
  /** Self-declared profile: storage, the owner's form, and prompt injection. */
226
379
  readonly profile?: {
227
380
  readonly enabled?: boolean;
@@ -235,6 +388,10 @@ export interface QaSurfaceConfig {
235
388
  /** Character cap on the user's free-form agent guidance. */
236
389
  readonly instructionsMaxLength?: number;
237
390
  };
391
+ /** Per-account starter buttons above an empty composer. */
392
+ readonly starters?: {
393
+ readonly enabled?: boolean;
394
+ };
238
395
  };
239
396
  readonly entry?: {
240
397
  /** Inject the root → /qa redirect for non-loopback hostnames. */
@@ -244,6 +401,8 @@ export interface QaSurfaceConfig {
244
401
  };
245
402
  readonly sources?: QaSourcesConfig;
246
403
  readonly attachments?: QaAttachmentsConfig;
404
+ /** Document pipeline: creation, conversion and extraction (see documents/). */
405
+ readonly documents?: QaDocumentsConfig;
247
406
  }
248
407
  /** What a QA visitor may attach to one message. */
249
408
  export interface QaAttachmentsConfig {
@@ -299,6 +458,7 @@ export interface ResolvedQaSurfaceConfig {
299
458
  readonly renderMarkdown: boolean;
300
459
  readonly minContentWidth: number;
301
460
  readonly showSessionList: boolean;
461
+ readonly subagentCodenames: boolean;
302
462
  };
303
463
  readonly suggestedQuestions: readonly string[];
304
464
  readonly thinkingPhrases: readonly string[];
@@ -342,11 +502,33 @@ export interface ResolvedQaSurfaceConfig {
342
502
  readonly identities: readonly QaAccountIdentityField[];
343
503
  readonly instructionsMaxLength: number;
344
504
  };
505
+ /** Per-account starter buttons above an empty composer. */
506
+ readonly starters: {
507
+ readonly enabled: boolean;
508
+ };
509
+ /**
510
+ * Personal Skills. Resolution turns the flag off on any deployment that
511
+ * cannot give every account its own directory: the storage root is the
512
+ * account's own workspace, so there is no safe shared fallback.
513
+ */
514
+ skills: {
515
+ readonly enabled: boolean;
516
+ readonly relativeRoot: string;
517
+ readonly watch: boolean;
518
+ readonly maxSkillBytes: number;
519
+ readonly allowResourceEditing: boolean;
520
+ };
345
521
  };
346
522
  readonly entry: {
347
523
  readonly redirectNonLoopback: boolean;
348
524
  readonly cookieBootstrap: boolean;
349
525
  };
526
+ readonly tools: {
527
+ readonly dynamicActivation: boolean;
528
+ readonly activationSkill: string;
529
+ readonly activationMode: QaToolActivationMode;
530
+ readonly activationPresets: readonly string[];
531
+ };
350
532
  readonly sources: {
351
533
  readonly enabled: boolean;
352
534
  readonly collect: {
@@ -395,6 +577,7 @@ export interface ResolvedQaSurfaceConfig {
395
577
  readonly maxPending: number;
396
578
  readonly extensions: readonly string[];
397
579
  };
580
+ readonly documents: ResolvedQaDocumentsConfig;
398
581
  }
399
582
  export interface QaSourceFilePreview {
400
583
  readonly path: string;
@@ -417,11 +600,12 @@ export interface QaLockdownProof {
417
600
  readonly toolPolicyLoaded: boolean;
418
601
  readonly toolAllowList: readonly string[];
419
602
  }
420
- export type QaMessage = {
603
+ export interface QaUserMessage {
421
604
  readonly id: string;
422
605
  readonly role: "user";
423
606
  readonly text: string;
424
- readonly status: "committed";
607
+ /** `pending` is a browser-only optimistic row until the Host emits it. */
608
+ readonly status: "pending" | "committed";
425
609
  readonly timestamp?: number;
426
610
  readonly images?: readonly QaImageView[];
427
611
  /** Durable files the user attached to this message, in prompt order. */
@@ -431,7 +615,12 @@ export type QaMessage = {
431
615
  * chat; the owner themself sees their messages unlabeled.
432
616
  */
433
617
  readonly author?: string;
434
- } | {
618
+ }
619
+ /** Browser-only user row shown while the Host prepares the accepted turn. */
620
+ export type QaPendingUserMessage = Omit<QaUserMessage, "status"> & {
621
+ readonly status: "pending";
622
+ };
623
+ export type QaMessage = QaUserMessage | {
435
624
  readonly id: string;
436
625
  readonly role: "assistant";
437
626
  readonly text: string;
@@ -462,6 +651,8 @@ export type QaMessage = {
462
651
  readonly notice?: {
463
652
  readonly title: string;
464
653
  readonly body: string;
654
+ /** Muted correlation line above the body (task name, session id). */
655
+ readonly meta?: string;
465
656
  };
466
657
  } | {
467
658
  readonly id: string;
@@ -528,6 +719,8 @@ export type QaAttachmentDraft = QaImageDraft | QaFileDraft;
528
719
  export interface QaImageView {
529
720
  readonly attachmentId: string;
530
721
  readonly mediaType: QaImageMediaType;
722
+ /** Browser-local thumbnail URL, present only on an optimistic message. */
723
+ readonly previewUrl?: string;
531
724
  }
532
725
  /**
533
726
  * A durable file attached to a sent message. The browser never reads these
@@ -592,6 +785,8 @@ export interface QaSessionState {
592
785
  readonly phase: QaSessionPhase;
593
786
  readonly sessionId: string | null;
594
787
  readonly messages: readonly QaMessage[];
788
+ /** Immediate send feedback, kept outside the durable transcript. */
789
+ readonly pendingMessage: QaPendingUserMessage | null;
595
790
  readonly error: string | null;
596
791
  readonly canSend: boolean;
597
792
  readonly canStop: boolean;
@@ -608,4 +803,8 @@ export interface QaSessionState {
608
803
  /** Question requests parked for the operator's answer, oldest first. */
609
804
  readonly questions: readonly QaPendingQuestion[];
610
805
  }
806
+ /** Minimal server-trusted identity exposed to principal-scoped plugins. */
807
+ export interface QaPrincipal {
808
+ readonly userId: string;
809
+ }
611
810
  //# sourceMappingURL=types.d.ts.map