@yadsh/dsh-qa-surface 0.4.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 (421) hide show
  1. package/README.md +235 -14
  2. package/compatibility.json +10 -1
  3. package/cordis.patch.yml +17 -0
  4. package/lib/account-remotes.js +10 -0
  5. package/lib/account-remotes.js.map +1 -1
  6. package/lib/accounts/credentials.js +12 -4
  7. package/lib/accounts/credentials.js.map +1 -1
  8. package/lib/accounts/errors.js.map +1 -1
  9. package/lib/accounts/file.js.map +1 -1
  10. package/lib/accounts/store.js +38 -1
  11. package/lib/accounts/store.js.map +1 -1
  12. package/lib/approvals.js +179 -0
  13. package/lib/approvals.js.map +1 -0
  14. package/lib/cli.js +10 -0
  15. package/lib/cli.js.map +1 -1
  16. package/lib/client/QaAccountsController.js +29 -0
  17. package/lib/client/QaAccountsController.js.map +1 -1
  18. package/lib/client/QaSessionController.js +261 -48
  19. package/lib/client/QaSessionController.js.map +1 -1
  20. package/lib/client/QaSurface.js +138 -56
  21. package/lib/client/QaSurface.js.map +1 -1
  22. package/lib/client/QaSurfaceGuard.js +96 -0
  23. package/lib/client/QaSurfaceGuard.js.map +1 -0
  24. package/lib/client/QaTranscriptAdapter.js +11 -5
  25. package/lib/client/QaTranscriptAdapter.js.map +1 -1
  26. package/lib/client/approvals.js +104 -0
  27. package/lib/client/approvals.js.map +1 -0
  28. package/lib/client/attestation.js +3 -0
  29. package/lib/client/attestation.js.map +1 -1
  30. package/lib/client/components/QaApproval.js +23 -0
  31. package/lib/client/components/QaApproval.js.map +1 -0
  32. package/lib/client/components/QaChangelog.js +55 -0
  33. package/lib/client/components/QaChangelog.js.map +1 -1
  34. package/lib/client/components/QaComposer.js +1 -1
  35. package/lib/client/components/QaComposer.js.map +1 -1
  36. package/lib/client/components/QaHeader.js +2 -8
  37. package/lib/client/components/QaHeader.js.map +1 -1
  38. package/lib/client/components/QaMessage.js +20 -7
  39. package/lib/client/components/QaMessage.js.map +1 -1
  40. package/lib/client/components/QaModal.js +24 -6
  41. package/lib/client/components/QaModal.js.map +1 -1
  42. package/lib/client/components/QaQuestions.js +96 -0
  43. package/lib/client/components/QaQuestions.js.map +1 -0
  44. package/lib/client/components/QaSidebar.js +2 -6
  45. package/lib/client/components/QaSidebar.js.map +1 -1
  46. package/lib/client/components/QaSourcesPanel.js +6 -5
  47. package/lib/client/components/QaSourcesPanel.js.map +1 -1
  48. package/lib/client/components/QaWidthHandle.js +21 -1
  49. package/lib/client/components/QaWidthHandle.js.map +1 -1
  50. package/lib/client/components/surface-utils.js +2 -0
  51. package/lib/client/components/surface-utils.js.map +1 -1
  52. package/lib/client/index.js +81 -22
  53. package/lib/client/index.js.map +1 -1
  54. package/lib/client/panels/PanelHost.js +209 -0
  55. package/lib/client/panels/PanelHost.js.map +1 -0
  56. package/lib/client/panels/PanelLauncher.js +39 -0
  57. package/lib/client/panels/PanelLauncher.js.map +1 -0
  58. package/lib/client/panels/contract.js +2 -0
  59. package/lib/client/panels/contract.js.map +1 -0
  60. package/lib/client/panels/index.js +2 -0
  61. package/lib/client/panels/index.js.map +1 -0
  62. package/lib/client/panels/registry.js +171 -0
  63. package/lib/client/panels/registry.js.map +1 -0
  64. package/lib/client/project-session-state.js +8 -3
  65. package/lib/client/project-session-state.js.map +1 -1
  66. package/lib/client/questions.js +114 -0
  67. package/lib/client/questions.js.map +1 -0
  68. package/lib/client/settings/card.js +2 -2
  69. package/lib/client/settings/card.js.map +1 -1
  70. package/lib/client/settings/sections/accounts.js +3 -1
  71. package/lib/client/settings/sections/accounts.js.map +1 -1
  72. package/lib/client/settings/sections/documents.js +88 -0
  73. package/lib/client/settings/sections/documents.js.map +1 -0
  74. package/lib/client/settings/sections/interface.js +2 -0
  75. package/lib/client/settings/sections/interface.js.map +1 -1
  76. package/lib/client/settings/sections/sources.js +2 -0
  77. package/lib/client/settings/sections/sources.js.map +1 -1
  78. package/lib/client/settings/sections.js +1 -0
  79. package/lib/client/settings/sections.js.map +1 -1
  80. package/lib/client/settings-extensions/contract.js +2 -0
  81. package/lib/client/settings-extensions/contract.js.map +1 -0
  82. package/lib/client/settings-extensions/index.js +2 -0
  83. package/lib/client/settings-extensions/index.js.map +1 -0
  84. package/lib/client/settings-extensions/registry.js +63 -0
  85. package/lib/client/settings-extensions/registry.js.map +1 -0
  86. package/lib/client/settlement.js +51 -5
  87. package/lib/client/settlement.js.map +1 -1
  88. package/lib/client/source-preview.js +24 -0
  89. package/lib/client/source-preview.js.map +1 -0
  90. package/lib/client/styles.js +199 -32
  91. package/lib/client/styles.js.map +1 -1
  92. package/lib/client/subagent-codenames.js +109 -0
  93. package/lib/client/subagent-codenames.js.map +1 -0
  94. package/lib/client/types.js +3 -0
  95. package/lib/client/types.js.map +1 -1
  96. package/lib/client/user-settings/GeneralSettingsPage.js +13 -0
  97. package/lib/client/user-settings/GeneralSettingsPage.js.map +1 -0
  98. package/lib/client/user-settings/ProfileSettingsPage.js +59 -0
  99. package/lib/client/user-settings/ProfileSettingsPage.js.map +1 -0
  100. package/lib/client/user-settings/SkillCatalog.js +23 -0
  101. package/lib/client/user-settings/SkillCatalog.js.map +1 -0
  102. package/lib/client/user-settings/SkillEditor.js +89 -0
  103. package/lib/client/user-settings/SkillEditor.js.map +1 -0
  104. package/lib/client/user-settings/SkillToolPicker.js +58 -0
  105. package/lib/client/user-settings/SkillToolPicker.js.map +1 -0
  106. package/lib/client/user-settings/SkillsSettingsPage.js +171 -0
  107. package/lib/client/user-settings/SkillsSettingsPage.js.map +1 -0
  108. package/lib/client/user-settings/StartersSettingsPage.js +78 -0
  109. package/lib/client/user-settings/StartersSettingsPage.js.map +1 -0
  110. package/lib/client/user-settings/UserSettingsDialog.js +50 -0
  111. package/lib/client/user-settings/UserSettingsDialog.js.map +1 -0
  112. package/lib/client/user-settings/copy.js +84 -0
  113. package/lib/client/user-settings/copy.js.map +1 -0
  114. package/lib/client/user-settings/draft.js +127 -0
  115. package/lib/client/user-settings/draft.js.map +1 -0
  116. package/lib/client/user-settings/fields.js +24 -0
  117. package/lib/client/user-settings/fields.js.map +1 -0
  118. package/lib/client.js +6629 -1579
  119. package/lib/client.js.map +1 -1
  120. package/lib/config-resolvers/accounts.js +30 -0
  121. package/lib/config-resolvers/accounts.js.map +1 -1
  122. package/lib/config-resolvers/basics.js +4 -2
  123. package/lib/config-resolvers/basics.js.map +1 -1
  124. package/lib/config-resolvers/defaults.js +27 -0
  125. package/lib/config-resolvers/defaults.js.map +1 -1
  126. package/lib/config-resolvers/lockdown.js +11 -0
  127. package/lib/config-resolvers/lockdown.js.map +1 -1
  128. package/lib/config-resolvers/session.js +2 -2
  129. package/lib/config-resolvers/session.js.map +1 -1
  130. package/lib/config-resolvers/shared.js +9 -0
  131. package/lib/config-resolvers/shared.js.map +1 -1
  132. package/lib/config-resolvers/sources.js +2 -0
  133. package/lib/config-resolvers/sources.js.map +1 -1
  134. package/lib/config-resolvers/tools.js +37 -0
  135. package/lib/config-resolvers/tools.js.map +1 -0
  136. package/lib/config-resolvers/ui.js +2 -0
  137. package/lib/config-resolvers/ui.js.map +1 -1
  138. package/lib/config.js +299 -2
  139. package/lib/config.js.map +1 -1
  140. package/lib/documents/artifacts/ids.js +43 -0
  141. package/lib/documents/artifacts/ids.js.map +1 -0
  142. package/lib/documents/artifacts/manifest.js +66 -0
  143. package/lib/documents/artifacts/manifest.js.map +1 -0
  144. package/lib/documents/artifacts/store.js +169 -0
  145. package/lib/documents/artifacts/store.js.map +1 -0
  146. package/lib/documents/capabilities.js +93 -0
  147. package/lib/documents/capabilities.js.map +1 -0
  148. package/lib/documents/config.js +302 -0
  149. package/lib/documents/config.js.map +1 -0
  150. package/lib/documents/defaults.js +78 -0
  151. package/lib/documents/defaults.js.map +1 -0
  152. package/lib/documents/errors.js +101 -0
  153. package/lib/documents/errors.js.map +1 -0
  154. package/lib/documents/index.js +80 -0
  155. package/lib/documents/index.js.map +1 -0
  156. package/lib/documents/inspect/facts.js +161 -0
  157. package/lib/documents/inspect/facts.js.map +1 -0
  158. package/lib/documents/inspect/zip.js +108 -0
  159. package/lib/documents/inspect/zip.js.map +1 -0
  160. package/lib/documents/markdown/directives.js +135 -0
  161. package/lib/documents/markdown/directives.js.map +1 -0
  162. package/lib/documents/markdown/frontmatter.js +35 -0
  163. package/lib/documents/markdown/frontmatter.js.map +1 -0
  164. package/lib/documents/markdown/normalize.js +113 -0
  165. package/lib/documents/markdown/normalize.js.map +1 -0
  166. package/lib/documents/orchestrator/assets.js +243 -0
  167. package/lib/documents/orchestrator/assets.js.map +1 -0
  168. package/lib/documents/orchestrator/convert-document.js +186 -0
  169. package/lib/documents/orchestrator/convert-document.js.map +1 -0
  170. package/lib/documents/orchestrator/create-document.js +292 -0
  171. package/lib/documents/orchestrator/create-document.js.map +1 -0
  172. package/lib/documents/orchestrator/extract-document.js +162 -0
  173. package/lib/documents/orchestrator/extract-document.js.map +1 -0
  174. package/lib/documents/orchestrator/inspect-document.js +89 -0
  175. package/lib/documents/orchestrator/inspect-document.js.map +1 -0
  176. package/lib/documents/orchestrator/runtime-deps.js +59 -0
  177. package/lib/documents/orchestrator/runtime-deps.js.map +1 -0
  178. package/lib/documents/orchestrator/scope.js +132 -0
  179. package/lib/documents/orchestrator/scope.js.map +1 -0
  180. package/lib/documents/providers/docling.js +247 -0
  181. package/lib/documents/providers/docling.js.map +1 -0
  182. package/lib/documents/providers/libreoffice.js +130 -0
  183. package/lib/documents/providers/libreoffice.js.map +1 -0
  184. package/lib/documents/providers/markitdown.js +89 -0
  185. package/lib/documents/providers/markitdown.js.map +1 -0
  186. package/lib/documents/providers/pandoc.js +161 -0
  187. package/lib/documents/providers/pandoc.js.map +1 -0
  188. package/lib/documents/providers/process.js +164 -0
  189. package/lib/documents/providers/process.js.map +1 -0
  190. package/lib/documents/providers/registry.js +152 -0
  191. package/lib/documents/providers/registry.js.map +1 -0
  192. package/lib/documents/providers/shared.js +75 -0
  193. package/lib/documents/providers/shared.js.map +1 -0
  194. package/lib/documents/runtime.js +114 -0
  195. package/lib/documents/runtime.js.map +1 -0
  196. package/lib/documents/security/file-types.js +188 -0
  197. package/lib/documents/security/file-types.js.map +1 -0
  198. package/lib/documents/security/limits.js +78 -0
  199. package/lib/documents/security/limits.js.map +1 -0
  200. package/lib/documents/security/mime.js +43 -0
  201. package/lib/documents/security/mime.js.map +1 -0
  202. package/lib/documents/security/paths.js +133 -0
  203. package/lib/documents/security/paths.js.map +1 -0
  204. package/lib/documents/templates/registry.js +147 -0
  205. package/lib/documents/templates/registry.js.map +1 -0
  206. package/lib/documents/templates/resolver.js +59 -0
  207. package/lib/documents/templates/resolver.js.map +1 -0
  208. package/lib/documents/tools/convert.js +125 -0
  209. package/lib/documents/tools/convert.js.map +1 -0
  210. package/lib/documents/tools/create.js +187 -0
  211. package/lib/documents/tools/create.js.map +1 -0
  212. package/lib/documents/tools/index.js +41 -0
  213. package/lib/documents/tools/index.js.map +1 -0
  214. package/lib/documents/tools/inspect.js +135 -0
  215. package/lib/documents/tools/inspect.js.map +1 -0
  216. package/lib/documents/tools/shared.js +88 -0
  217. package/lib/documents/tools/shared.js.map +1 -0
  218. package/lib/documents/tools/to-markdown.js +125 -0
  219. package/lib/documents/tools/to-markdown.js.map +1 -0
  220. package/lib/documents/types.js +12 -0
  221. package/lib/documents/types.js.map +1 -0
  222. package/lib/index.js +299 -24
  223. package/lib/index.js.map +1 -1
  224. package/lib/integration-principals.js +22 -0
  225. package/lib/integration-principals.js.map +1 -0
  226. package/lib/lockdown-policy.js +15 -3
  227. package/lib/lockdown-policy.js.map +1 -1
  228. package/lib/personal-skills/errors.js +9 -0
  229. package/lib/personal-skills/errors.js.map +1 -0
  230. package/lib/personal-skills/host.js +80 -0
  231. package/lib/personal-skills/host.js.map +1 -0
  232. package/lib/personal-skills/index.js +10 -0
  233. package/lib/personal-skills/index.js.map +1 -0
  234. package/lib/personal-skills/paths.js +127 -0
  235. package/lib/personal-skills/paths.js.map +1 -0
  236. package/lib/personal-skills/provider.js +109 -0
  237. package/lib/personal-skills/provider.js.map +1 -0
  238. package/lib/personal-skills/remotes.js +40 -0
  239. package/lib/personal-skills/remotes.js.map +1 -0
  240. package/lib/personal-skills/service.js +686 -0
  241. package/lib/personal-skills/service.js.map +1 -0
  242. package/lib/personal-skills/skill-file.js +278 -0
  243. package/lib/personal-skills/skill-file.js.map +1 -0
  244. package/lib/personal-skills/skill-format.js +202 -0
  245. package/lib/personal-skills/skill-format.js.map +1 -0
  246. package/lib/personal-skills/watcher.js +96 -0
  247. package/lib/personal-skills/watcher.js.map +1 -0
  248. package/lib/profile.js +6 -4
  249. package/lib/profile.js.map +1 -1
  250. package/lib/prompt-notes.js +19 -0
  251. package/lib/prompt-notes.js.map +1 -1
  252. package/lib/provenance/file-preview.js +68 -21
  253. package/lib/provenance/file-preview.js.map +1 -1
  254. package/lib/provenance/host-store.js +69 -20
  255. package/lib/provenance/host-store.js.map +1 -1
  256. package/lib/provenance/index.js +1 -0
  257. package/lib/provenance/index.js.map +1 -1
  258. package/lib/provenance/normalize.js +3 -1
  259. package/lib/provenance/normalize.js.map +1 -1
  260. package/lib/provenance/reported.js +37 -12
  261. package/lib/provenance/reported.js.map +1 -1
  262. package/lib/provenance/snapshot-store.js +154 -0
  263. package/lib/provenance/snapshot-store.js.map +1 -0
  264. package/lib/qa-tools/activation-detector.js +53 -0
  265. package/lib/qa-tools/activation-detector.js.map +1 -0
  266. package/lib/qa-tools/activation-manager.js +111 -0
  267. package/lib/qa-tools/activation-manager.js.map +1 -0
  268. package/lib/qa-tools/catalog.js +108 -0
  269. package/lib/qa-tools/catalog.js.map +1 -0
  270. package/lib/qa-tools/durable-marker.js +115 -0
  271. package/lib/qa-tools/durable-marker.js.map +1 -0
  272. package/lib/qa-tools/index.js +83 -0
  273. package/lib/qa-tools/index.js.map +1 -0
  274. package/lib/qa-tools/lifecycle.js +64 -0
  275. package/lib/qa-tools/lifecycle.js.map +1 -0
  276. package/lib/qa-tools/types.js +2 -0
  277. package/lib/qa-tools/types.js.map +1 -0
  278. package/lib/questions.js +185 -0
  279. package/lib/questions.js.map +1 -0
  280. package/lib/resolve-config.js +5 -0
  281. package/lib/resolve-config.js.map +1 -1
  282. package/lib/secure-session.js +104 -20
  283. package/lib/secure-session.js.map +1 -1
  284. package/lib/session-ownership.js +55 -0
  285. package/lib/session-ownership.js.map +1 -0
  286. package/lib/starters.js +117 -0
  287. package/lib/starters.js.map +1 -0
  288. package/lib/typert.host.js +1162 -77
  289. package/lib/typert.remote-client.d.ts +27 -1
  290. package/lib/typert.remote-client.js +879 -14
  291. package/lib/types/account-remotes.d.ts +3 -1
  292. package/lib/types/accounts/credentials.d.ts +6 -0
  293. package/lib/types/accounts/errors.d.ts +1 -1
  294. package/lib/types/accounts/file.d.ts +10 -0
  295. package/lib/types/accounts/store.d.ts +15 -1
  296. package/lib/types/approvals.d.ts +65 -0
  297. package/lib/types/client/QaAccountsController.d.ts +7 -1
  298. package/lib/types/client/QaSessionController.d.ts +50 -1
  299. package/lib/types/client/QaSurface.d.ts +21 -4
  300. package/lib/types/client/QaSurfaceGuard.d.ts +27 -0
  301. package/lib/types/client/QaTranscriptAdapter.d.ts +7 -0
  302. package/lib/types/client/approvals.d.ts +39 -0
  303. package/lib/types/client/components/QaApproval.d.ts +13 -0
  304. package/lib/types/client/components/QaComposer.d.ts +3 -1
  305. package/lib/types/client/components/QaHeader.d.ts +3 -1
  306. package/lib/types/client/components/QaModal.d.ts +5 -4
  307. package/lib/types/client/components/QaQuestions.d.ts +13 -0
  308. package/lib/types/client/components/QaSidebar.d.ts +8 -11
  309. package/lib/types/client/components/QaWidthHandle.d.ts +13 -0
  310. package/lib/types/client/index.d.ts +1 -0
  311. package/lib/types/client/panels/PanelHost.d.ts +18 -0
  312. package/lib/types/client/panels/PanelLauncher.d.ts +5 -0
  313. package/lib/types/client/panels/contract.d.ts +83 -0
  314. package/lib/types/client/panels/index.d.ts +3 -0
  315. package/lib/types/client/panels/registry.d.ts +40 -0
  316. package/lib/types/client/project-session-state.d.ts +13 -1
  317. package/lib/types/client/questions.d.ts +45 -0
  318. package/lib/types/client/settings/sections/documents.d.ts +13 -0
  319. package/lib/types/client/settings/sections.d.ts +1 -0
  320. package/lib/types/client/settings-extensions/contract.d.ts +32 -0
  321. package/lib/types/client/settings-extensions/index.d.ts +3 -0
  322. package/lib/types/client/settings-extensions/registry.d.ts +15 -0
  323. package/lib/types/client/settlement.d.ts +41 -5
  324. package/lib/types/client/source-preview.d.ts +8 -0
  325. package/lib/types/client/styles.d.ts +2 -0
  326. package/lib/types/client/subagent-codenames.d.ts +18 -0
  327. package/lib/types/client/types.d.ts +82 -3
  328. package/lib/types/client/user-settings/GeneralSettingsPage.d.ts +14 -0
  329. package/lib/types/client/user-settings/ProfileSettingsPage.d.ts +18 -0
  330. package/lib/types/client/user-settings/SkillCatalog.d.ts +16 -0
  331. package/lib/types/client/user-settings/SkillEditor.d.ts +42 -0
  332. package/lib/types/client/user-settings/SkillToolPicker.d.ts +17 -0
  333. package/lib/types/client/user-settings/SkillsSettingsPage.d.ts +15 -0
  334. package/lib/types/client/user-settings/StartersSettingsPage.d.ts +14 -0
  335. package/lib/types/client/user-settings/UserSettingsDialog.d.ts +43 -0
  336. package/lib/types/client/user-settings/copy.d.ts +25 -0
  337. package/lib/types/client/user-settings/draft.d.ts +51 -0
  338. package/lib/types/client/user-settings/fields.d.ts +43 -0
  339. package/lib/types/config-resolvers/shared.d.ts +7 -0
  340. package/lib/types/config-resolvers/tools.d.ts +6 -0
  341. package/lib/types/documents/artifacts/ids.d.ts +14 -0
  342. package/lib/types/documents/artifacts/manifest.d.ts +32 -0
  343. package/lib/types/documents/artifacts/store.d.ts +67 -0
  344. package/lib/types/documents/capabilities.d.ts +32 -0
  345. package/lib/types/documents/config.d.ts +27 -0
  346. package/lib/types/documents/defaults.d.ts +161 -0
  347. package/lib/types/documents/errors.d.ts +42 -0
  348. package/lib/types/documents/index.d.ts +63 -0
  349. package/lib/types/documents/inspect/facts.d.ts +43 -0
  350. package/lib/types/documents/inspect/zip.d.ts +28 -0
  351. package/lib/types/documents/markdown/directives.d.ts +39 -0
  352. package/lib/types/documents/markdown/frontmatter.d.ts +15 -0
  353. package/lib/types/documents/markdown/normalize.d.ts +30 -0
  354. package/lib/types/documents/orchestrator/assets.d.ts +55 -0
  355. package/lib/types/documents/orchestrator/convert-document.d.ts +25 -0
  356. package/lib/types/documents/orchestrator/create-document.d.ts +18 -0
  357. package/lib/types/documents/orchestrator/extract-document.d.ts +24 -0
  358. package/lib/types/documents/orchestrator/inspect-document.d.ts +12 -0
  359. package/lib/types/documents/orchestrator/runtime-deps.d.ts +43 -0
  360. package/lib/types/documents/orchestrator/scope.d.ts +52 -0
  361. package/lib/types/documents/providers/docling.d.ts +54 -0
  362. package/lib/types/documents/providers/libreoffice.d.ts +40 -0
  363. package/lib/types/documents/providers/markitdown.d.ts +28 -0
  364. package/lib/types/documents/providers/pandoc.d.ts +42 -0
  365. package/lib/types/documents/providers/process.d.ts +54 -0
  366. package/lib/types/documents/providers/registry.d.ts +68 -0
  367. package/lib/types/documents/providers/shared.d.ts +27 -0
  368. package/lib/types/documents/runtime.d.ts +59 -0
  369. package/lib/types/documents/security/file-types.d.ts +39 -0
  370. package/lib/types/documents/security/limits.d.ts +24 -0
  371. package/lib/types/documents/security/mime.d.ts +13 -0
  372. package/lib/types/documents/security/paths.d.ts +38 -0
  373. package/lib/types/documents/templates/registry.d.ts +50 -0
  374. package/lib/types/documents/templates/resolver.d.ts +30 -0
  375. package/lib/types/documents/tools/convert.d.ts +9 -0
  376. package/lib/types/documents/tools/create.d.ts +14 -0
  377. package/lib/types/documents/tools/index.d.ts +33 -0
  378. package/lib/types/documents/tools/inspect.d.ts +9 -0
  379. package/lib/types/documents/tools/shared.d.ts +77 -0
  380. package/lib/types/documents/tools/to-markdown.d.ts +12 -0
  381. package/lib/types/documents/types.d.ts +294 -0
  382. package/lib/types/index.d.ts +103 -5
  383. package/lib/types/integration-principals.d.ts +9 -0
  384. package/lib/types/lockdown-policy.d.ts +12 -2
  385. package/lib/types/personal-skills/errors.d.ts +11 -0
  386. package/lib/types/personal-skills/host.d.ts +42 -0
  387. package/lib/types/personal-skills/index.d.ts +10 -0
  388. package/lib/types/personal-skills/paths.d.ts +39 -0
  389. package/lib/types/personal-skills/provider.d.ts +33 -0
  390. package/lib/types/personal-skills/remotes.d.ts +35 -0
  391. package/lib/types/personal-skills/service.d.ts +131 -0
  392. package/lib/types/personal-skills/skill-file.d.ts +64 -0
  393. package/lib/types/personal-skills/skill-format.d.ts +100 -0
  394. package/lib/types/personal-skills/watcher.d.ts +39 -0
  395. package/lib/types/profile.d.ts +13 -0
  396. package/lib/types/prompt-notes.d.ts +9 -0
  397. package/lib/types/provenance/file-preview.d.ts +47 -4
  398. package/lib/types/provenance/host-store.d.ts +7 -1
  399. package/lib/types/provenance/index.d.ts +1 -0
  400. package/lib/types/provenance/reported.d.ts +9 -1
  401. package/lib/types/provenance/snapshot-store.d.ts +23 -0
  402. package/lib/types/qa-tools/activation-detector.d.ts +29 -0
  403. package/lib/types/qa-tools/activation-manager.d.ts +47 -0
  404. package/lib/types/qa-tools/catalog.d.ts +40 -0
  405. package/lib/types/qa-tools/durable-marker.d.ts +16 -0
  406. package/lib/types/qa-tools/index.d.ts +40 -0
  407. package/lib/types/qa-tools/lifecycle.d.ts +44 -0
  408. package/lib/types/qa-tools/types.d.ts +45 -0
  409. package/lib/types/questions.d.ts +83 -0
  410. package/lib/types/secure-session.d.ts +45 -4
  411. package/lib/types/session-ownership.d.ts +30 -0
  412. package/lib/types/starters.d.ts +45 -0
  413. package/lib/types/types.d.ts +282 -7
  414. package/lib/types/user-workspace.d.ts +5 -1
  415. package/lib/user-workspace.js +21 -6
  416. package/lib/user-workspace.js.map +1 -1
  417. package/package.json +22 -9
  418. package/scripts/repair-session-events.mjs +260 -0
  419. package/lib/client/components/QaProfile.js +0 -64
  420. package/lib/client/components/QaProfile.js.map +0 -1
  421. package/lib/types/client/components/QaProfile.d.ts +0 -25
@@ -0,0 +1,294 @@
1
+ /**
2
+ * Public types of the QA Surface document pipeline.
3
+ *
4
+ * The shapes here are the contract the agent sees (tool inputs and results),
5
+ * the contract the artifact store persists (manifest), and the contract the
6
+ * providers implement. They are deliberately free of any backend vocabulary:
7
+ * a tool result never names pandoc, LibreOffice or Docling, so a provider can
8
+ * be replaced without touching a prompt, a skill or a workflow
9
+ * (docs/specs/document-pipeline.md §4.1, §22).
10
+ */
11
+ /** Formats the pipeline can read and write. */
12
+ export type DocumentFormat = "md" | "docx" | "pdf";
13
+ /** Formats a document can be created in. */
14
+ export type CreateFormat = "docx" | "pdf";
15
+ /** PDF production route (§14). */
16
+ export type PdfMode = "office" | "typst" | "auto";
17
+ /** Extraction quality/route selector (§9). */
18
+ export type ExtractionMode = "auto" | "fast" | "accurate";
19
+ /** OCR policy (§15.2). */
20
+ export type OcrMode = "auto" | "off" | "force";
21
+ /** Structural classification of an inspected input (§11). */
22
+ export type DetectedFormat = "pdf" | "docx" | "docm" | "markdown" | "unknown";
23
+ /** Stable warning codes; a warning never turns a success into a failure (§25). */
24
+ export type DocumentWarningCode = "OCR_USED" | "TABLE_EXTRACTION_DEGRADED" | "UNSUPPORTED_EMBEDDED_OBJECT" | "FONT_SUBSTITUTED" | "IMAGE_SKIPPED" | "PAGE_LIMIT_REACHED" | "METADATA_PARTIALLY_EXTRACTED" | "BACKEND_FALLBACK_USED" | "FORMAT_FAILED" | "MARKDOWN_TRUNCATED" | "PAGE_SIZE_NOT_APPLIED" | "ASSET_MISSING" | "SOURCE_NOT_RETAINED" | "TEMPLATE_DEFAULTED";
25
+ export interface DocumentWarning {
26
+ readonly code: DocumentWarningCode;
27
+ readonly message: string;
28
+ readonly backend?: string;
29
+ readonly details?: Readonly<Record<string, unknown>>;
30
+ }
31
+ /** One artifact file as reported to the agent. */
32
+ export interface DocumentFileResult {
33
+ readonly format: CreateFormat | "md";
34
+ /** Absolute path, inside the session workspace. */
35
+ readonly path: string;
36
+ readonly mediaType: string;
37
+ readonly size: number;
38
+ readonly sha256: string;
39
+ readonly status: "created" | "failed";
40
+ /** Present when `status` is `failed`; the format's own error code. */
41
+ readonly error?: string;
42
+ }
43
+ export interface DocumentAssetInput {
44
+ readonly id: string;
45
+ /** Workspace-relative or absolute path inside the session scope. */
46
+ readonly path?: string;
47
+ /** Inline asset content: base64 data URI or raw base64. */
48
+ readonly dataRef?: string;
49
+ readonly filename?: string;
50
+ readonly mimeType?: string;
51
+ }
52
+ export interface DocumentCreateOptions {
53
+ readonly pdfMode?: PdfMode;
54
+ readonly pageSize?: string;
55
+ readonly locale?: string;
56
+ readonly toc?: boolean;
57
+ readonly preserveSource?: boolean;
58
+ }
59
+ export interface DocumentCreateInput {
60
+ readonly content: string;
61
+ readonly filename?: string;
62
+ readonly formats: readonly CreateFormat[];
63
+ readonly template?: string;
64
+ readonly title?: string;
65
+ readonly metadata?: Readonly<Record<string, string>>;
66
+ readonly assets?: readonly DocumentAssetInput[];
67
+ readonly options?: DocumentCreateOptions;
68
+ }
69
+ export interface DocumentCreateResult {
70
+ readonly artifactId: string;
71
+ readonly source?: {
72
+ readonly path: string;
73
+ readonly mediaType: "text/markdown";
74
+ };
75
+ readonly files: readonly DocumentFileResult[];
76
+ readonly template?: string;
77
+ readonly warnings: readonly DocumentWarning[];
78
+ readonly manifestPath: string;
79
+ }
80
+ export interface DocumentToMarkdownInput {
81
+ readonly file: string;
82
+ readonly mode?: ExtractionMode;
83
+ readonly ocr?: OcrMode;
84
+ readonly ocrLanguages?: readonly string[];
85
+ readonly extractImages?: boolean;
86
+ readonly extractTables?: boolean;
87
+ readonly preservePageMarkers?: boolean;
88
+ readonly outputFilename?: string;
89
+ }
90
+ export interface DocumentToMarkdownResult {
91
+ readonly artifactId: string;
92
+ /** Extracted Markdown; truncated to the configured inline budget. */
93
+ readonly markdown: string;
94
+ readonly markdownPath: string;
95
+ readonly assets?: readonly {
96
+ readonly path: string;
97
+ readonly mediaType: string;
98
+ }[];
99
+ readonly pages?: number;
100
+ readonly backend: string;
101
+ readonly warnings: readonly DocumentWarning[];
102
+ readonly manifestPath: string;
103
+ }
104
+ export interface DocumentConvertInput {
105
+ readonly file: string;
106
+ readonly targetFormat: CreateFormat | "md";
107
+ readonly template?: string;
108
+ readonly filename?: string;
109
+ /** Artifact name of the extracted Markdown when the target is `md`. */
110
+ readonly outputFilename?: string;
111
+ readonly options?: {
112
+ readonly pdfMode?: PdfMode;
113
+ readonly ocr?: OcrMode;
114
+ };
115
+ }
116
+ export interface DocumentConvertResult {
117
+ readonly artifactId: string;
118
+ readonly files: readonly DocumentFileResult[];
119
+ readonly source: {
120
+ readonly path: string;
121
+ readonly format: DocumentFormat;
122
+ };
123
+ readonly warnings: readonly DocumentWarning[];
124
+ readonly manifestPath: string;
125
+ }
126
+ export interface DocumentInspectInput {
127
+ readonly file: string;
128
+ }
129
+ export interface DocumentInspectResult {
130
+ readonly filename: string;
131
+ readonly format: DetectedFormat;
132
+ readonly mediaType: string;
133
+ readonly size: number;
134
+ readonly sha256: string;
135
+ readonly metadata?: {
136
+ readonly title?: string;
137
+ readonly author?: string;
138
+ readonly createdAt?: string;
139
+ readonly modifiedAt?: string;
140
+ };
141
+ readonly structure?: {
142
+ readonly pages?: number;
143
+ readonly headings?: number;
144
+ readonly tables?: number;
145
+ readonly images?: number;
146
+ };
147
+ readonly encrypted?: boolean;
148
+ readonly macroEnabled?: boolean;
149
+ readonly warnings: readonly DocumentWarning[];
150
+ }
151
+ /** Identifies the backend that produced one output, for the manifest (§19). */
152
+ export interface BackendInfo {
153
+ readonly provider: string;
154
+ readonly version?: string;
155
+ }
156
+ /** Returned by providers that write a file. */
157
+ export interface RenderedArtifact {
158
+ readonly path: string;
159
+ readonly size: number;
160
+ readonly sha256: string;
161
+ readonly backend: BackendInfo;
162
+ readonly warnings: readonly DocumentWarning[];
163
+ }
164
+ export interface RenderDocxInput {
165
+ readonly sourcePath: string;
166
+ readonly outputPath: string;
167
+ readonly workDir: string;
168
+ readonly assetsDir?: string;
169
+ /** Reference DOCX resolved from a template, when the template has one. */
170
+ readonly referenceDocPath?: string;
171
+ readonly templateName?: string;
172
+ readonly title?: string;
173
+ readonly metadata?: Readonly<Record<string, string>>;
174
+ readonly toc?: boolean;
175
+ readonly locale?: string;
176
+ readonly signal?: AbortSignal;
177
+ }
178
+ export interface RenderPdfInput {
179
+ readonly sourcePath: string;
180
+ readonly outputPath: string;
181
+ readonly workDir: string;
182
+ readonly assetsDir?: string;
183
+ readonly templateName?: string;
184
+ readonly typstTemplateDir?: string;
185
+ readonly pageSize?: string;
186
+ readonly title?: string;
187
+ readonly metadata?: Readonly<Record<string, string>>;
188
+ readonly toc?: boolean;
189
+ readonly signal?: AbortSignal;
190
+ }
191
+ export interface ExtractInput {
192
+ readonly inputPath: string;
193
+ readonly workDir: string;
194
+ /** Directory extracted images are written into, when extraction asks for them. */
195
+ readonly assetsDir: string;
196
+ readonly ocr: OcrMode;
197
+ readonly ocrLanguages?: readonly string[];
198
+ readonly extractImages: boolean;
199
+ readonly extractTables: boolean;
200
+ readonly preservePageMarkers: boolean;
201
+ readonly maxPages?: number;
202
+ readonly maxImages?: number;
203
+ readonly signal?: AbortSignal;
204
+ }
205
+ export interface ExtractedDocument {
206
+ readonly markdown: string;
207
+ readonly assets: readonly {
208
+ readonly path: string;
209
+ readonly mediaType: string;
210
+ }[];
211
+ readonly pages?: number;
212
+ readonly backend: BackendInfo;
213
+ readonly warnings: readonly DocumentWarning[];
214
+ }
215
+ export interface ConvertPdfInput {
216
+ readonly inputPath: string;
217
+ readonly outputPath: string;
218
+ readonly workDir: string;
219
+ readonly signal?: AbortSignal;
220
+ }
221
+ export interface ConvertedDocument {
222
+ readonly path: string;
223
+ readonly size: number;
224
+ readonly sha256: string;
225
+ readonly backend: BackendInfo;
226
+ readonly warnings: readonly DocumentWarning[];
227
+ }
228
+ /** §22 provider interfaces. A tool never imports a concrete implementation. */
229
+ export interface DocxRenderer {
230
+ readonly name: string;
231
+ render(input: RenderDocxInput): Promise<RenderedArtifact>;
232
+ }
233
+ export interface PdfRenderer {
234
+ readonly name: string;
235
+ render(input: RenderPdfInput): Promise<RenderedArtifact>;
236
+ }
237
+ export interface DocumentExtractor {
238
+ readonly name: string;
239
+ supports(format: DocumentFormat): boolean;
240
+ extract(input: ExtractInput): Promise<ExtractedDocument>;
241
+ }
242
+ export interface DocumentConverter {
243
+ readonly name: string;
244
+ supports(source: DocumentFormat, target: DocumentFormat): boolean;
245
+ convert(input: ConvertPdfInput): Promise<ConvertedDocument>;
246
+ }
247
+ /** Manifest document, written beside every artifact (§19). */
248
+ export interface DocumentManifest {
249
+ readonly schemaVersion: 1;
250
+ readonly artifactId: string;
251
+ readonly operation: "document_create" | "document_to_markdown" | "document_convert";
252
+ readonly createdAt: string;
253
+ readonly input: {
254
+ readonly format: DocumentFormat | "unknown";
255
+ readonly sha256: string;
256
+ readonly filename?: string;
257
+ readonly bytes?: number;
258
+ };
259
+ readonly outputs: readonly {
260
+ readonly format: CreateFormat | "md";
261
+ readonly path: string;
262
+ readonly sha256: string;
263
+ readonly size: number;
264
+ readonly status: "created" | "failed";
265
+ readonly error?: string;
266
+ }[];
267
+ readonly template?: string;
268
+ readonly templateSha256?: string;
269
+ readonly backends: Readonly<Record<string, BackendInfo>>;
270
+ readonly warnings: readonly DocumentWarning[];
271
+ /** Authorization context (§40): what this artifact belongs to. */
272
+ readonly scope: {
273
+ readonly sessionId?: string;
274
+ readonly workspace?: string;
275
+ };
276
+ }
277
+ /** Backend availability, reported by capacity discovery and health (§42). */
278
+ export type BackendStatus = "ok" | "unavailable" | "disabled";
279
+ export interface DocumentHealth {
280
+ readonly status: "ok" | "degraded" | "unavailable";
281
+ readonly required: Readonly<Record<string, BackendStatus>>;
282
+ readonly optional: Readonly<Record<string, BackendStatus>>;
283
+ }
284
+ /** Capability discovery (§43). */
285
+ export interface DocumentCapabilities {
286
+ readonly enabled: boolean;
287
+ readonly create: readonly CreateFormat[];
288
+ readonly extract: readonly DocumentFormat[];
289
+ readonly convert: readonly (readonly [DocumentFormat, DocumentFormat])[];
290
+ readonly ocr: boolean;
291
+ readonly templates: readonly string[];
292
+ readonly pdfModes: readonly PdfMode[];
293
+ }
294
+ //# sourceMappingURL=types.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
2
2
  import type { Context } from "@deepseek-ai/cordis";
3
3
  import type { QaTurnSources } from "./provenance/types.js";
4
- import type { QaAccountProfileInput, QaAccountSession, QaAccountUserPublic, QaClaimResult, QaLockdownProof, QaOwnershipEntry, QaSurfaceConfig, ResolvedQaSurfaceConfig, QaSourceFilePreview, QaWhoamiResult } from "./types.js";
4
+ import type { QaAccountProfileInput, QaAccountSession, QaAccountStartersInput, QaAccountUserPublic, QaApprovalDecision, QaClaimResult, QaLockdownProof, QaOwnershipEntry, QaPendingApproval, QaPendingQuestion, QaQuestionAnswerItem, QaSurfaceConfig, ResolvedQaSurfaceConfig, QaSkillDocument, QaSkillDraftInput, QaSkillRemoval, QaSkillSummary, QaSkillToolDescriptor, QaSkillValidation, QaSourceFilePreview, QaWhoamiResult, QaPrincipal } from "./types.js";
5
5
  export declare const name = "qa-surface";
6
6
  export declare const inject: string[];
7
7
  import { QA_SURFACE_SETTINGS_NAMESPACE } from "./shared/settings.js";
@@ -19,15 +19,38 @@ export declare class QaSurface extends TypertRemoteService {
19
19
  private source;
20
20
  private readonly logger;
21
21
  private readonly admission;
22
+ private readonly approvals;
23
+ private readonly userQuestions;
22
24
  private readonly provenance;
23
25
  private readonly notes;
26
+ /** Assigned after the admission gate; that gate only reads it per execution. */
27
+ private readonly tools;
24
28
  /** Account-remote bodies; the wire signatures stay on this class. */
25
29
  private readonly accountRemotes;
30
+ /** Personal skills: storage, the DSH provider and the manual-edit watcher. */
31
+ private readonly personalSkills;
32
+ /** Personal-skill remote bodies; the wire signatures stay on this class. */
33
+ private readonly skillRemotes;
26
34
  private readonly launchToken;
35
+ /** Root session principals attested for their owner, never for admin viewing. */
36
+ private readonly integrationPrincipals;
27
37
  private webServer;
28
38
  private disposeRoute;
29
39
  private routeKey;
40
+ /**
41
+ * The document subsystem: its own runtime and the four tool registrations.
42
+ * Rebuilt when the document configuration changes and torn down while the
43
+ * subsystem or the whole surface is disabled.
44
+ */
45
+ private documents;
46
+ private documentsKey;
30
47
  constructor(ctx: Context, entry?: QaSurfaceConfig);
48
+ /** Resolve browser authentication to the caller only; never accepts an id. */
49
+ principalForToken(token: string): QaPrincipal | undefined;
50
+ /** Resolve only a directly QA-owned root session; delegated children fail closed. */
51
+ principalForSession(sessionId: string): QaPrincipal | undefined;
52
+ /** Admit tools that independently enforce the same QA principal boundary. */
53
+ registerPrincipalScopedTools(names: readonly string[]): () => void;
31
54
  getConfig(): ResolvedQaSurfaceConfig;
32
55
  /**
33
56
  * Self-service signup; the first account ever created becomes admin. The
@@ -59,6 +82,12 @@ export declare class QaSurface extends TypertRemoteService {
59
82
  * store before anything is written.
60
83
  */
61
84
  accountsUpdateProfile(token: string, input: QaAccountProfileInput): QaAccountUserPublic;
85
+ /**
86
+ * Replace the caller's own starter buttons. Same self-service contract as
87
+ * the profile write: the token names the only editable account, and the
88
+ * deployment's limits are enforced in the store before anything is written.
89
+ */
90
+ accountsUpdateStarters(token: string, input: QaAccountStartersInput): QaAccountUserPublic;
62
91
  /**
63
92
  * Serve the effective QA configuration to the browser. The DSH gateway pins
64
93
  * settings RPCs to loopback, so a browser served over the LAN always sees
@@ -74,12 +103,79 @@ export declare class QaSurface extends TypertRemoteService {
74
103
  */
75
104
  createSession(token: string): Promise<string>;
76
105
  /** Pin and attest the effective policy. The browser supplies identity only. */
77
- secureSession(token: string, sessionId: string): QaLockdownProof;
78
- /** Return canonical Host snapshots; replay is rebuilt from qa/sources events. */
79
- sources(token: string, sessionId: string): readonly QaTurnSources[];
80
- /** Narrow read-only preview capability for files already present as sources. */
106
+ secureSession(token: string, sessionId: string): Promise<QaLockdownProof>;
107
+ /** Return canonical Host snapshots from plugin-owned durable provenance. */
108
+ sources(token: string, sessionId: string): Promise<readonly QaTurnSources[]>;
109
+ /**
110
+ * The tool calls of one chat that wait for the operator. Read-only: a
111
+ * deployment with blocked approvals answers with an empty list.
112
+ */
113
+ pendingApprovals(token: string, sessionId: string): Promise<readonly QaPendingApproval[]>;
114
+ /**
115
+ * Apply the operator's answer to one parked call. The id must belong to a
116
+ * request of this chat; an answer that lost the race (the turn was stopped,
117
+ * the agent went away) is refused with `false`.
118
+ */
119
+ answerApproval(token: string, sessionId: string, requestId: string, decision: QaApprovalDecision): Promise<boolean>;
120
+ /**
121
+ * The questions of one chat that wait for the operator. Read-only: a
122
+ * deployment with unsupported questions answers with an empty list.
123
+ */
124
+ pendingQuestions(token: string, sessionId: string): Promise<readonly QaPendingQuestion[]>;
125
+ /**
126
+ * Apply the operator's answers to one parked question request. Every question
127
+ * of the request must be present in `answers`; one the browser omits reads as
128
+ * a skip.
129
+ */
130
+ answerQuestion(token: string, sessionId: string, requestId: string, answers: readonly QaQuestionAnswerItem[]): Promise<boolean>;
131
+ /** Close a parked question request without answering it. */
132
+ cancelQuestion(token: string, sessionId: string, requestId: string): Promise<boolean>;
133
+ /**
134
+ * Narrow read-only preview capability for files already present as sources.
135
+ *
136
+ * The readable roots mirror the per-user execution guard: the chat's own cwd
137
+ * plus the deployment's shared read-only directories and the attachment
138
+ * store. Without that mirroring a source the model was explicitly allowed to
139
+ * read — the normal case for a deployment whose docs and code live beside
140
+ * the per-account scratch directory — could never be opened in the panel.
141
+ */
81
142
  readSourceFile(token: string, sessionId: string, sourcePath: string): Promise<QaSourceFilePreview>;
143
+ /** Every personal skill of the token's account, sorted by name. */
144
+ skillsList(token: string): {
145
+ readonly skills: readonly QaSkillSummary[];
146
+ };
147
+ /** One personal skill with the body, its preserved frontmatter and revision. */
148
+ skillsGet(token: string, name: string): QaSkillDocument;
149
+ /** Create one skill directory below the account's own workspace. */
150
+ skillsCreate(token: string, input: QaSkillDraftInput): QaSkillDocument;
151
+ /**
152
+ * Replace one skill. `expectedRevision` is the revision the editor read; a
153
+ * mismatch is refused rather than overwriting an edit made elsewhere.
154
+ */
155
+ skillsUpdate(token: string, name: string, input: QaSkillDraftInput): QaSkillDocument;
156
+ /** Remove one skill into the account's own trash directory. */
157
+ skillsRemove(token: string, name: string, expectedRevision: string | null): QaSkillRemoval;
158
+ /**
159
+ * Check an unsaved draft: the file a save would write and the diagnostics
160
+ * for it. `name` names the stored skill being edited, or null to create one.
161
+ */
162
+ skillsValidate(token: string, name: string | null, input: QaSkillDraftInput): QaSkillValidation;
163
+ /**
164
+ * The tool catalog the picker offers, with availability computed against
165
+ * this deployment's QA scope. Declaring a tool here never grants it.
166
+ */
167
+ skillsTools(token: string): {
168
+ readonly tools: readonly QaSkillToolDescriptor[];
169
+ };
82
170
  private refreshRoute;
171
+ /**
172
+ * Install, rebuild or tear down the document subsystem. The raw entry is
173
+ * resolved with the documented environment overrides applied, so a
174
+ * deployment can point `QA_DOCLING_BASE_URL` at its own service without
175
+ * touching the settings namespace; the settings layer stays authoritative
176
+ * for everything it declares.
177
+ */
178
+ private refreshDocuments;
83
179
  }
84
180
  export { ConfigSchema, DEFAULT_QA_SURFACE_CONFIG, normalizeRoutePath, resolveConfig, } from "./config.js";
85
181
  export { QaAttestationError } from "./attestation.js";
@@ -87,7 +183,9 @@ export type { QaAttestationReason } from "./attestation.js";
87
183
  export { QaAccounts, QaAccountsError } from "./accounts/store.js";
88
184
  export { entryRedirectRow, entryRedirectScript } from "./entry-redirect.js";
89
185
  export { registerQaNavigationRoute } from "./host-route.js";
186
+ export { QaIntegrationPrincipalBindings } from "./integration-principals.js";
90
187
  export { qaToolDenial, qaToolPolicyPlan } from "./lockdown-policy.js";
188
+ export * from "./documents/index.js";
91
189
  export { QaPolicyAdmission } from "./secure-session.js";
92
190
  export { QaPromptNotes, renderUserIdentity, QA_IDENTITY_NOTE, QA_SOURCES_NOTE, } from "./prompt-notes.js";
93
191
  export * from "./provenance/index.js";
@@ -0,0 +1,9 @@
1
+ import type { QaPrincipal } from "./types.js";
2
+ /** Runtime-only proof that a QA root session was attested by its own user. */
3
+ export declare class QaIntegrationPrincipalBindings {
4
+ private readonly principals;
5
+ attest(sessionId: string, actorUserId: string | undefined, ownerUserId: string | undefined): void;
6
+ resolve(sessionId: string, currentOwnerUserId: string | undefined): QaPrincipal | undefined;
7
+ clear(): void;
8
+ }
9
+ //# sourceMappingURL=integration-principals.d.ts.map
@@ -13,6 +13,16 @@ export interface QaToolPolicyPlan {
13
13
  * successful first attestation and make the next attestation fail.
14
14
  */
15
15
  export declare function qaToolPolicyPlan(allow: readonly string[], isMounted: (toolName: string) => boolean): QaToolPolicyPlan;
16
- /** Monotonic execution decision shared by inherited, scoped and transport tools. */
17
- export declare function qaToolDenial(allowed: ReadonlySet<string>, toolName: string): string | undefined;
16
+ /**
17
+ * Monotonic execution decision shared by inherited, scoped and transport tools.
18
+ * @param allowed - the operator's configured allow-list for this agent.
19
+ * @param toolName - the tool the model is trying to call.
20
+ * @param dynamicNames - names this plugin attached for the calling agent after
21
+ * a successful skill load. They are deliberately absent from the allow-list:
22
+ * that list is validated against the mounted catalog at attestation time, and
23
+ * a tool that appears only later cannot be named there without failing the
24
+ * check. The guard is therefore where they are authorized — a dynamic tool
25
+ * stays as unchecked as any allow-listed one, and no less.
26
+ */
27
+ export declare function qaToolDenial(allowed: ReadonlySet<string>, toolName: string, dynamicNames?: readonly string[]): string | undefined;
18
28
  //# sourceMappingURL=lockdown-policy.d.ts.map
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Coarse, wire-safe personal-skill failure codes. They ride the same
3
+ * `(reason: <code>)` marker the account remotes established: the browser maps
4
+ * them to audience-safe copy, while the precise cause stays in the Host log.
5
+ */
6
+ export type QaPersonalSkillErrorReason = "skills-disabled" | "workspace-unavailable" | "skill-not-found" | "skill-exists" | "skill-conflict" | "skill-name-invalid" | "skill-invalid" | "storage-unavailable";
7
+ export declare class QaPersonalSkillError extends Error {
8
+ readonly reason: QaPersonalSkillErrorReason;
9
+ constructor(reason: QaPersonalSkillErrorReason, message: string);
10
+ }
11
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1,42 @@
1
+ import type { Context } from "@deepseek-ai/cordis";
2
+ import type { PluginLogger } from "@yadsh/dsh-plugin-log";
3
+ import type { ResolvedQaSurfaceConfig } from "../types.js";
4
+ import { QaPersonalSkills } from "./service.js";
5
+ export interface QaPersonalSkillsHostOptions {
6
+ readonly ctx: Context;
7
+ readonly getConfig: () => ResolvedQaSurfaceConfig;
8
+ readonly logger: PluginLogger;
9
+ }
10
+ /**
11
+ * Host owner of the personal-skills feature: the storage service, the DSH
12
+ * provider registration and the manual-edit watcher.
13
+ *
14
+ * The three are one unit because they share a single liveness contract — every
15
+ * write through the service, and every filesystem event the watcher observes,
16
+ * invalidates the same provider registration, so the catalog the model reads
17
+ * and the catalog the editor writes cannot drift apart. The provider is
18
+ * registered through `ctx.inject`, so a deployment without the skills service
19
+ * keeps the editor working and simply publishes nothing to DSH.
20
+ */
21
+ export declare class QaPersonalSkillsHost {
22
+ readonly service: QaPersonalSkills;
23
+ private readonly watcher;
24
+ private readonly options;
25
+ /**
26
+ * The registry's own invalidation callback, guarded by registration
27
+ * identity on its side: a reference kept past disposal is a no-op.
28
+ */
29
+ private invalidateCatalog;
30
+ private disposeRegistration;
31
+ constructor(options: QaPersonalSkillsHostOptions);
32
+ /** Whether the DSH registry currently owns this deployment's provider. */
33
+ get registered(): boolean;
34
+ dispose(): void;
35
+ /**
36
+ * The registered workspace path the per-account directories live under.
37
+ * Resolved per call: a deployment may register the workspace after this
38
+ * plugin loads.
39
+ */
40
+ private registeredWorkspacePath;
41
+ }
42
+ //# sourceMappingURL=host.d.ts.map
@@ -0,0 +1,10 @@
1
+ export { QaPersonalSkillError, type QaPersonalSkillErrorReason, } from "./errors.js";
2
+ export { QA_SKILL_TRASH_SUFFIX, resolveSkillRoots, skillDirectory, skillFilePath, type QaSkillRoots, } from "./paths.js";
3
+ export { normalizeAllowedTools, parseSkillFile, serializeSkillFile, skillFileBody, skillNameProblem, toJsonValue, type QaSkillFileContents, type QaSkillFileDraft, type QaSkillFileParse, } from "./skill-file.js";
4
+ export { skillFileBytes, skillRelativeRootProblem, skillRelativeRootSegments, validateSkillDraft, QA_SKILL_DEFAULT_RELATIVE_ROOT, QA_SKILL_DESCRIPTION_MAX, QA_SKILL_ENABLED_BY_DEFAULT, QA_SKILL_FILE_MAX_BYTES, QA_SKILL_MAX_BYTES_MAX, QA_SKILL_MAX_BYTES_MIN, QA_SKILL_MAX_TOOLS, QA_SKILL_NAME_MAX, QA_SKILL_NAME_PATTERN, QA_SKILL_WHEN_TO_USE_MAX, type QaSkillValidationInput, } from "./skill-format.js";
5
+ export { QA_USER_SKILLS_PROVIDER, QA_USER_SKILLS_RANK, QA_USER_SKILLS_SOURCE, createQaUserSkillProvider, } from "./provider.js";
6
+ export { QaPersonalSkills, type QaPersonalSkillContext, type QaPersonalSkillsOptions, type QaStoredSkill, } from "./service.js";
7
+ export { createQaPersonalSkillRemotes, type QaPersonalSkillRemotes, } from "./remotes.js";
8
+ export { QaPersonalSkillsHost } from "./host.js";
9
+ export { QaSkillWatcher } from "./watcher.js";
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Filesystem boundary of the personal-skills feature.
3
+ *
4
+ * Every path is derived, never accepted: the browser names a skill, the Host
5
+ * combines the authenticated account's own workspace directory with the
6
+ * configured relative root, and each step re-checks that the canonical result
7
+ * still sits below that account's root. Symlinked directories are refused
8
+ * rather than followed, so a link planted inside the personal root cannot
9
+ * move reads or writes to another account's storage.
10
+ *
11
+ * `.dsh/skills-trash` is the removal destination: the last segment of the
12
+ * configured relative root with a `-trash` suffix, so a deployment that moved
13
+ * its skill directory keeps the trash beside it.
14
+ */
15
+ export declare const QA_SKILL_TRASH_SUFFIX = "-trash";
16
+ export interface QaSkillRoots {
17
+ /** The canonical account root every derived path must stay inside. */
18
+ readonly personalRoot: string;
19
+ /** The canonical directory holding one subdirectory per skill. */
20
+ readonly skills: string;
21
+ /** The canonical directory a removed skill directory is moved into. */
22
+ readonly trash: string;
23
+ }
24
+ /** Derive and verify every directory the feature touches for one account. */
25
+ export declare function resolveSkillRoots(personalRoot: string, relativeRoot: string): QaSkillRoots;
26
+ /** The directory of one skill, validated against the account's skills root. */
27
+ export declare function skillDirectory(roots: QaSkillRoots, name: string): string;
28
+ export declare function skillFilePath(roots: QaSkillRoots, name: string): string;
29
+ /** Whether the directory exists at all, without following a symlink. */
30
+ export declare function directoryExists(input: string): boolean;
31
+ /**
32
+ * Materialize the skills root inside one account's personal root. Creation is
33
+ * followed by a re-canonicalization, so a directory that appeared as a link
34
+ * between the check and the `mkdir` is still refused.
35
+ */
36
+ export declare function ensureSkillRoots(roots: QaSkillRoots): void;
37
+ /** The skill subdirectories present for one account, sorted by name. */
38
+ export declare function listSkillDirectories(roots: QaSkillRoots): readonly string[];
39
+ //# sourceMappingURL=paths.d.ts.map
@@ -0,0 +1,33 @@
1
+ import type { SkillProvider, SkillProviderControl } from "@deepseek-ai/dsh-skill";
2
+ import type { QaPersonalSkills } from "./service.js";
3
+ /**
4
+ * Discovery provider for one QA account's own skills.
5
+ *
6
+ * It exists because the shipped filesystem provider resolves the project root
7
+ * through the nearest `.git`, which for a personal QA directory inside a larger
8
+ * checkout would climb above the account and mix users together. This provider
9
+ * reads exactly one place — `<cwd>/.dsh/skills` where the cwd is a provisioned
10
+ * `.qa-users/<uuid>` directory — and replaces the filesystem layer inside the
11
+ * QA scope rather than adding a second one beside it.
12
+ */
13
+ export declare const QA_USER_SKILLS_PROVIDER = "qa-user-skills";
14
+ /** Prompt-visible provenance label for a skill stored in an account directory. */
15
+ export declare const QA_USER_SKILLS_SOURCE = "qa-user";
16
+ /**
17
+ * Rank below the project layer (100) and the bundled layer (600): inside the
18
+ * QA scope a personal skill wins a same-named duplicate from any other layer.
19
+ */
20
+ export declare const QA_USER_SKILLS_RANK = 50;
21
+ /**
22
+ * Build the provider for one registration. The factory runs synchronously
23
+ * during `registerProvider` and all filesystem work stays inside
24
+ * `list`/`get`, which the registry calls per read.
25
+ *
26
+ * Note what the registry caches and what it does not: a loaded definition is
27
+ * never cached, so an edited body is visible to the next `get` immediately,
28
+ * while the candidate list behind a catalog summary is cached until something
29
+ * invalidates it. A save goes through the service, which invalidates; a file
30
+ * edited by hand is what the watcher exists for.
31
+ */
32
+ export declare function createQaUserSkillProvider(control: SkillProviderControl, skills: QaPersonalSkills): SkillProvider;
33
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1,35 @@
1
+ import type { PluginLogger } from "@yadsh/dsh-plugin-log";
2
+ import type { QaAccountRemotes } from "../account-remotes.js";
3
+ import type { QaSkillDocument, QaSkillDraftInput, QaSkillRemoval, QaSkillSummary, QaSkillToolDescriptor, QaSkillValidation, ResolvedQaSurfaceConfig } from "../types.js";
4
+ import type { QaPersonalSkills } from "./service.js";
5
+ /**
6
+ * Host-side bodies of the personal-skill remotes. The `@Remote`-decorated
7
+ * signatures stay on the `QaSurface` service class (typert code generation
8
+ * reads the class shape); this context owns everything behind them: turning
9
+ * the wire's account token into the storage context, and mapping a refusal
10
+ * onto the shared `(reason: <code>)` marker the browser renders copy for.
11
+ *
12
+ * The browser never names a filesystem location. It names a skill; the account
13
+ * id behind the token decides where that name resolves.
14
+ */
15
+ export interface QaPersonalSkillRemotes {
16
+ list(token: string): {
17
+ readonly skills: readonly QaSkillSummary[];
18
+ };
19
+ get(token: string, name: string): QaSkillDocument;
20
+ create(token: string, input: QaSkillDraftInput): QaSkillDocument;
21
+ update(token: string, name: string, input: QaSkillDraftInput): QaSkillDocument;
22
+ remove(token: string, name: string, expectedRevision: string | null): QaSkillRemoval;
23
+ validate(token: string, name: string | null, input: QaSkillDraftInput): QaSkillValidation;
24
+ tools(token: string): {
25
+ readonly tools: readonly QaSkillToolDescriptor[];
26
+ };
27
+ validate(token: string, name: string | null, input: QaSkillDraftInput): QaSkillValidation;
28
+ }
29
+ export declare function createQaPersonalSkillRemotes(options: {
30
+ getConfig: () => ResolvedQaSurfaceConfig;
31
+ logger: PluginLogger;
32
+ skills: QaPersonalSkills;
33
+ accounts: QaAccountRemotes;
34
+ }): QaPersonalSkillRemotes;
35
+ //# sourceMappingURL=remotes.d.ts.map