@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
@@ -1,8 +1,34 @@
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";
13
+ /**
14
+ * How a tool policy `ask` resolves on an attested QA agent. `blocked` refuses
15
+ * the call with the surface's own reason; `interactive` parks it until the
16
+ * operator answers in the QA view.
17
+ */
18
+ export type QaApprovalInteraction = "blocked" | "interactive";
19
+ /**
20
+ * How a user-questions request resolves on an attested QA agent. `unsupported`
21
+ * refuses the ask outright; `interactive` answers it from the QA view.
22
+ */
23
+ export type QaQuestionInteraction = "unsupported" | "interactive";
24
+ /** The operator's answer to one parked tool call. */
25
+ export type QaApprovalDecision = "allowed-once" | "rejected";
26
+ /** One answered question; `custom` is free text, and may accompany `selected`. */
27
+ export interface QaQuestionAnswerItem {
28
+ readonly id: string;
29
+ readonly selected: readonly string[];
30
+ readonly custom?: string;
31
+ }
6
32
  export type QaAccountRole = "user" | "admin";
7
33
  /** The account fields projected to browsers; never includes credentials. */
8
34
  export interface QaAccountUserPublic {
@@ -15,6 +41,8 @@ export interface QaAccountUserPublic {
15
41
  readonly disabled: boolean;
16
42
  /** Self-declared identity the QA prompt renders; empty until edited. */
17
43
  readonly profile: QaAccountProfile;
44
+ /** The account's own starter buttons; empty until customized. */
45
+ readonly starters: QaAccountStarters;
18
46
  }
19
47
  /** One external system the deployment collects a handle for. */
20
48
  export interface QaAccountIdentityField {
@@ -44,6 +72,26 @@ export interface QaAccountProfileInput {
44
72
  readonly identities: Readonly<Record<string, string>>;
45
73
  readonly instructions: string;
46
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
+ }
47
95
  /** One successful login/registration: the bearer token plus the user. */
48
96
  export interface QaAccountSession {
49
97
  readonly token: string;
@@ -72,6 +120,90 @@ export interface QaOwnershipEntry {
72
120
  readonly displayName: string;
73
121
  readonly claimedAt: string;
74
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
+ }
75
207
  export interface QaSourcesConfig {
76
208
  readonly enabled?: boolean;
77
209
  readonly collect?: {
@@ -107,6 +239,11 @@ export interface QaSourcesConfig {
107
239
  readonly inheritSources?: boolean;
108
240
  readonly enableReportToolFallback?: boolean;
109
241
  readonly markIncompleteOpaqueRuns?: boolean;
242
+ /**
243
+ * Whether a source the model writes into `qa_report_sources` must carry a
244
+ * usable path or URL. Off records the model's own type, title and snippet.
245
+ */
246
+ readonly validateReportedSources?: boolean;
110
247
  };
111
248
  readonly legacy?: {
112
249
  readonly parseAssistantSourcesBlock?: boolean;
@@ -150,6 +287,11 @@ export interface QaSurfaceConfig {
150
287
  /** Floor for the visitor-resizable transcript/composer width; the page caps it. */
151
288
  readonly minContentWidth?: number;
152
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;
153
295
  };
154
296
  readonly suggestedQuestions?: readonly string[];
155
297
  /**
@@ -158,8 +300,29 @@ export interface QaSurfaceConfig {
158
300
  */
159
301
  readonly thinkingPhrases?: readonly string[];
160
302
  readonly interaction?: {
161
- readonly approvals?: "blocked";
162
- readonly questions?: "unsupported";
303
+ readonly approvals?: QaApprovalInteraction;
304
+ readonly questions?: QaQuestionInteraction;
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[];
163
326
  };
164
327
  readonly lockdown?: {
165
328
  readonly enabled?: boolean;
@@ -180,6 +343,8 @@ export interface QaSurfaceConfig {
180
343
  readonly mode?: QaToolPolicyMode;
181
344
  readonly allow?: readonly string[];
182
345
  };
346
+ /** Shared directories available to read-only filesystem tools. */
347
+ readonly sharedReadOnlyRoots?: readonly string[];
183
348
  };
184
349
  readonly embedding?: {
185
350
  readonly frameAncestors?: string | null;
@@ -196,6 +361,20 @@ export interface QaSurfaceConfig {
196
361
  * The child directory is not registered as a separate DSH workspace.
197
362
  */
198
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
+ };
199
378
  /** Self-declared profile: storage, the owner's form, and prompt injection. */
200
379
  readonly profile?: {
201
380
  readonly enabled?: boolean;
@@ -209,6 +388,10 @@ export interface QaSurfaceConfig {
209
388
  /** Character cap on the user's free-form agent guidance. */
210
389
  readonly instructionsMaxLength?: number;
211
390
  };
391
+ /** Per-account starter buttons above an empty composer. */
392
+ readonly starters?: {
393
+ readonly enabled?: boolean;
394
+ };
212
395
  };
213
396
  readonly entry?: {
214
397
  /** Inject the root → /qa redirect for non-loopback hostnames. */
@@ -218,6 +401,8 @@ export interface QaSurfaceConfig {
218
401
  };
219
402
  readonly sources?: QaSourcesConfig;
220
403
  readonly attachments?: QaAttachmentsConfig;
404
+ /** Document pipeline: creation, conversion and extraction (see documents/). */
405
+ readonly documents?: QaDocumentsConfig;
221
406
  }
222
407
  /** What a QA visitor may attach to one message. */
223
408
  export interface QaAttachmentsConfig {
@@ -273,12 +458,13 @@ export interface ResolvedQaSurfaceConfig {
273
458
  readonly renderMarkdown: boolean;
274
459
  readonly minContentWidth: number;
275
460
  readonly showSessionList: boolean;
461
+ readonly subagentCodenames: boolean;
276
462
  };
277
463
  readonly suggestedQuestions: readonly string[];
278
464
  readonly thinkingPhrases: readonly string[];
279
465
  readonly interaction: {
280
- readonly approvals: "blocked";
281
- readonly questions: "unsupported";
466
+ readonly approvals: QaApprovalInteraction;
467
+ readonly questions: QaQuestionInteraction;
282
468
  };
283
469
  readonly lockdown: {
284
470
  readonly enabled: boolean;
@@ -299,6 +485,7 @@ export interface ResolvedQaSurfaceConfig {
299
485
  readonly mode: QaToolPolicyMode;
300
486
  readonly allow: readonly string[];
301
487
  };
488
+ readonly sharedReadOnlyRoots: readonly string[];
302
489
  };
303
490
  readonly embedding: {
304
491
  readonly frameAncestors: string | null;
@@ -315,11 +502,33 @@ export interface ResolvedQaSurfaceConfig {
315
502
  readonly identities: readonly QaAccountIdentityField[];
316
503
  readonly instructionsMaxLength: number;
317
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
+ };
318
521
  };
319
522
  readonly entry: {
320
523
  readonly redirectNonLoopback: boolean;
321
524
  readonly cookieBootstrap: boolean;
322
525
  };
526
+ readonly tools: {
527
+ readonly dynamicActivation: boolean;
528
+ readonly activationSkill: string;
529
+ readonly activationMode: QaToolActivationMode;
530
+ readonly activationPresets: readonly string[];
531
+ };
323
532
  readonly sources: {
324
533
  readonly enabled: boolean;
325
534
  readonly collect: {
@@ -355,6 +564,7 @@ export interface ResolvedQaSurfaceConfig {
355
564
  readonly inheritSources: boolean;
356
565
  readonly enableReportToolFallback: boolean;
357
566
  readonly markIncompleteOpaqueRuns: boolean;
567
+ readonly validateReportedSources: boolean;
358
568
  };
359
569
  readonly legacy: {
360
570
  readonly parseAssistantSourcesBlock: boolean;
@@ -367,6 +577,7 @@ export interface ResolvedQaSurfaceConfig {
367
577
  readonly maxPending: number;
368
578
  readonly extensions: readonly string[];
369
579
  };
580
+ readonly documents: ResolvedQaDocumentsConfig;
370
581
  }
371
582
  export interface QaSourceFilePreview {
372
583
  readonly path: string;
@@ -389,11 +600,12 @@ export interface QaLockdownProof {
389
600
  readonly toolPolicyLoaded: boolean;
390
601
  readonly toolAllowList: readonly string[];
391
602
  }
392
- export type QaMessage = {
603
+ export interface QaUserMessage {
393
604
  readonly id: string;
394
605
  readonly role: "user";
395
606
  readonly text: string;
396
- readonly status: "committed";
607
+ /** `pending` is a browser-only optimistic row until the Host emits it. */
608
+ readonly status: "pending" | "committed";
397
609
  readonly timestamp?: number;
398
610
  readonly images?: readonly QaImageView[];
399
611
  /** Durable files the user attached to this message, in prompt order. */
@@ -403,7 +615,12 @@ export type QaMessage = {
403
615
  * chat; the owner themself sees their messages unlabeled.
404
616
  */
405
617
  readonly author?: string;
406
- } | {
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 | {
407
624
  readonly id: string;
408
625
  readonly role: "assistant";
409
626
  readonly text: string;
@@ -434,6 +651,8 @@ export type QaMessage = {
434
651
  readonly notice?: {
435
652
  readonly title: string;
436
653
  readonly body: string;
654
+ /** Muted correlation line above the body (task name, session id). */
655
+ readonly meta?: string;
437
656
  };
438
657
  } | {
439
658
  readonly id: string;
@@ -500,6 +719,8 @@ export type QaAttachmentDraft = QaImageDraft | QaFileDraft;
500
719
  export interface QaImageView {
501
720
  readonly attachmentId: string;
502
721
  readonly mediaType: QaImageMediaType;
722
+ /** Browser-local thumbnail URL, present only on an optimistic message. */
723
+ readonly previewUrl?: string;
503
724
  }
504
725
  /**
505
726
  * A durable file attached to a sent message. The browser never reads these
@@ -516,10 +737,56 @@ export interface QaSubagentView {
516
737
  readonly id: string;
517
738
  readonly title: string;
518
739
  }
740
+ /**
741
+ * One tool call waiting for the operator. The browser lists these over its own
742
+ * remote and answers them one by one; nothing here is answered automatically.
743
+ */
744
+ export interface QaPendingApproval {
745
+ readonly id: string;
746
+ /** The chat the request belongs to: a delegated child asks under its root. */
747
+ readonly sessionId: string;
748
+ readonly toolName: string;
749
+ /** The reason the composed gate gave for asking, when it gave one. */
750
+ readonly reason: string | null;
751
+ readonly createdAt: number;
752
+ /** True when a delegated child of the chat made the call. */
753
+ readonly delegated: boolean;
754
+ }
755
+ /**
756
+ * One question waiting for the operator, normalized for the form the QA view
757
+ * renders. The protocol fields are the harness user-questions contract; absent
758
+ * ones become explicit nulls so the browser never branches on undefined.
759
+ */
760
+ export interface QaPendingQuestionItem {
761
+ readonly id: string;
762
+ readonly question: string;
763
+ readonly header: string | null;
764
+ readonly detail: string | null;
765
+ readonly options: readonly QaPendingQuestionOption[];
766
+ readonly multiSelect: boolean;
767
+ }
768
+ export interface QaPendingQuestionOption {
769
+ readonly label: string;
770
+ readonly description: string | null;
771
+ }
772
+ /**
773
+ * One user-questions request parked for the operator. A single request carries
774
+ * every question the model asked in one call, so the card is a form with a
775
+ * pager, not a list of independent prompts.
776
+ */
777
+ export interface QaPendingQuestion {
778
+ readonly id: string;
779
+ /** The chat the request belongs to. */
780
+ readonly sessionId: string;
781
+ readonly questions: readonly QaPendingQuestionItem[];
782
+ readonly createdAt: number;
783
+ }
519
784
  export interface QaSessionState {
520
785
  readonly phase: QaSessionPhase;
521
786
  readonly sessionId: string | null;
522
787
  readonly messages: readonly QaMessage[];
788
+ /** Immediate send feedback, kept outside the durable transcript. */
789
+ readonly pendingMessage: QaPendingUserMessage | null;
523
790
  readonly error: string | null;
524
791
  readonly canSend: boolean;
525
792
  readonly canStop: boolean;
@@ -531,5 +798,13 @@ export interface QaSessionState {
531
798
  readonly incompleteSourceOrigins: QaTurnSources["incompleteOrigins"];
532
799
  /** Set while the bound session is a subagent watched from the panel. */
533
800
  readonly viewingSubagent: QaSubagentView | null;
801
+ /** Tool calls parked for the operator's answer, oldest first. */
802
+ readonly approvals: readonly QaPendingApproval[];
803
+ /** Question requests parked for the operator's answer, oldest first. */
804
+ readonly questions: readonly QaPendingQuestion[];
805
+ }
806
+ /** Minimal server-trusted identity exposed to principal-scoped plugins. */
807
+ export interface QaPrincipal {
808
+ readonly userId: string;
534
809
  }
535
810
  //# sourceMappingURL=types.d.ts.map
@@ -7,6 +7,10 @@ export interface QaToolExecutionLike {
7
7
  readonly name: string;
8
8
  readonly arguments: unknown;
9
9
  }
10
+ export interface QaUserWorkspaceReadPolicy {
11
+ /** Shared directories exposed only to read-only filesystem tools. */
12
+ readonly sharedReadOnlyRoots?: readonly string[];
13
+ }
10
14
  export declare function pathIsInside(target: string, root: string): boolean;
11
15
  /**
12
16
  * Resolve the deepest existing ancestor, preserving the missing suffix. This
@@ -34,5 +38,5 @@ export declare function existingQaUserWorkspace(workspaceRoot: string, userId: s
34
38
  * directory-wide tools stay confined because the store is shared by every
35
39
  * account, and writes are never exempted.
36
40
  */
37
- export declare function qaUserWorkspaceDenial(execution: QaToolExecutionLike, root: string, attachmentRoot?: string): string | undefined;
41
+ export declare function qaUserWorkspaceDenial(execution: QaToolExecutionLike, root: string, attachmentRoot?: string, readPolicy?: QaUserWorkspaceReadPolicy): string | undefined;
38
42
  //# sourceMappingURL=user-workspace.d.ts.map
@@ -132,7 +132,17 @@ function requestedPaths(execution) {
132
132
  * for reads: the attachment store is shared by every account, and only the
133
133
  * exact file an upload produced is meant to be reachable.
134
134
  */
135
- function isReadOnlyPathTool(execution) {
135
+ function readsSharedRoot(execution) {
136
+ if (execution.name === "read" ||
137
+ execution.name === "read_image" ||
138
+ execution.name === "glob" ||
139
+ execution.name === "grep") {
140
+ return true;
141
+ }
142
+ return (execution.name === "str_replace_editor" &&
143
+ record(execution.arguments)?.command === "view");
144
+ }
145
+ function readsSingleFile(execution) {
136
146
  if (execution.name === "read" || execution.name === "read_image")
137
147
  return true;
138
148
  return (execution.name === "str_replace_editor" &&
@@ -176,7 +186,7 @@ function requestedWriteBytes(execution) {
176
186
  * directory-wide tools stay confined because the store is shared by every
177
187
  * account, and writes are never exempted.
178
188
  */
179
- export function qaUserWorkspaceDenial(execution, root, attachmentRoot) {
189
+ export function qaUserWorkspaceDenial(execution, root, attachmentRoot, readPolicy = {}) {
180
190
  const args = record(execution.arguments);
181
191
  if (args?.sandbox_permissions !== undefined ||
182
192
  (execution.name === "edit" &&
@@ -189,12 +199,13 @@ export function qaUserWorkspaceDenial(execution, root, attachmentRoot) {
189
199
  execution.name.startsWith("job_") ||
190
200
  execution.name === "run_code" ||
191
201
  execution.name === "lsp" ||
192
- execution.name === "apply_patch" ||
193
- execution.name.startsWith("dsh_git_")) {
202
+ execution.name === "apply_patch") {
194
203
  return PATH_DENIAL;
195
204
  }
196
- const readsOnly = isReadOnlyPathTool(execution);
205
+ const readsShared = readsSharedRoot(execution);
206
+ const readsOneFile = readsSingleFile(execution);
197
207
  try {
208
+ const sharedReadOnlyRoots = (readPolicy.sharedReadOnlyRoots ?? []).map(canonicalCandidate);
198
209
  for (const requested of requestedPaths(execution)) {
199
210
  const absolute = path.isAbsolute(requested)
200
211
  ? requested
@@ -202,9 +213,13 @@ export function qaUserWorkspaceDenial(execution, root, attachmentRoot) {
202
213
  const canonical = canonicalCandidate(absolute);
203
214
  if (pathIsInside(canonical, root))
204
215
  continue;
216
+ if (readsShared &&
217
+ sharedReadOnlyRoots.some((readRoot) => pathIsInside(canonical, readRoot))) {
218
+ continue;
219
+ }
205
220
  // Resolved only for a path the fence would otherwise refuse, so the
206
221
  // common case pays no extra filesystem walk.
207
- if (readsOnly &&
222
+ if (readsOneFile &&
208
223
  attachmentRoot !== undefined &&
209
224
  pathIsInside(canonical, canonicalCandidate(attachmentRoot))) {
210
225
  continue;
@@ -1 +1 @@
1
- {"version":3,"file":"user-workspace.js","sourceRoot":"","sources":["../src/user-workspace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,SAAS,EACT,SAAS,EACT,WAAW,EACX,YAAY,EACZ,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,iFAAiF;AACjF,MAAM,CAAC,MAAM,4BAA4B,GAAG,WAAW,CAAC;AAExD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,CAAC;AAC7D,MAAM,CAAC,MAAM,iCAAiC,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAElE,MAAM,eAAe,GACnB,6EAA6E,CAAC;AAChF,MAAM,WAAW,GACf,+DAA+D,CAAC;AAClE,MAAM,YAAY,GAAG,gDAAgD,CAAC;AAOtE,SAAS,QAAQ,CAAC,IAAY,EAAE,KAAa;IAC3C,OAAO,OAAO,CAAC,QAAQ,KAAK,OAAO;QACjC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC,WAAW,EAAE;QAC5C,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC;AACrB,CAAC;AAED,MAAM,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AAK,SAAS;gBAC5B,YAAY,CAAC,SAAS,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC,EAC3D,CAAC;gBACD,SAAS;YACX,CAAC;YACD,OAAO,WAAW,CAAC;QACrB,CAAC;QACD,IACE,SAAS,CAAC,IAAI,KAAK,OAAO;YAC1B,SAAS,CAAC,IAAI,KAAK,MAAM;YACzB,CAAC,SAAS,CAAC,IAAI,KAAK,oBAAoB;gBACtC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC,EAClD,CAAC;YACD,MAAM,SAAS,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;YACjD,IACE,SAAS,GAAG,iCAAiC;gBAC7C,cAAc,CAAC,IAAI,EAAE,2BAA2B,CAAC,GAAG,SAAS;oBAC3D,2BAA2B,EAC7B,CAAC;gBACD,OAAO,YAAY,CAAC;YACtB,CAAC;QACH,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,WAAW,CAAC;IACrB,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yadsh/dsh-qa-surface",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "A focused end-user QA surface backed by native DeepSeek Harness sessions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,7 +15,8 @@
15
15
  "main": "./lib/index.js",
16
16
  "types": "./lib/types/index.d.ts",
17
17
  "bin": {
18
- "qa-accounts": "./lib/cli.js"
18
+ "qa-accounts": "./lib/cli.js",
19
+ "qa-repair-sessions": "./scripts/repair-session-events.mjs"
19
20
  },
20
21
  "exports": {
21
22
  ".": {
@@ -26,6 +27,14 @@
26
27
  "types": "./lib/types/client/index.d.ts",
27
28
  "default": "./lib/client.js"
28
29
  },
30
+ "./client/panels": {
31
+ "types": "./lib/types/client/panels/index.d.ts",
32
+ "default": "./lib/client/panels/index.js"
33
+ },
34
+ "./client/settings": {
35
+ "types": "./lib/types/client/settings-extensions/index.d.ts",
36
+ "default": "./lib/client/settings-extensions/index.js"
37
+ },
29
38
  "./remote": {
30
39
  "types": "./lib/typert.remote-client.d.ts",
31
40
  "default": "./lib/typert.remote-client.js"
@@ -66,6 +75,7 @@
66
75
  "lib/**/*.js",
67
76
  "lib/**/*.js.map",
68
77
  "lib/**/*.d.ts",
78
+ "scripts/repair-session-events.mjs",
69
79
  "cordis.patch.yml",
70
80
  "compatibility.json",
71
81
  "capability-policy.json",
@@ -110,6 +120,7 @@
110
120
  "@deepseek-ai/dsh-permission-presets": ">=0.1.5-rc.2 <0.2.0",
111
121
  "@deepseek-ai/dsh-session": ">=0.1.5-rc.2 <0.2.0",
112
122
  "@deepseek-ai/dsh-settings": ">=0.1.5-rc.2 <0.2.0",
123
+ "@deepseek-ai/dsh-skill": ">=0.1.5-rc.2 <0.2.0",
113
124
  "@deepseek-ai/dsh-system-prompt": ">=0.1.5-rc.2 <0.2.0",
114
125
  "@deepseek-ai/dsh-tools": ">=0.1.5-rc.2 <0.2.0",
115
126
  "@deepseek-ai/dsh-typert-protocol": ">=0.1.5-rc.2 <0.2.0",
@@ -118,8 +129,9 @@
118
129
  "react-dom": "^18.2.0"
119
130
  },
120
131
  "dependencies": {
132
+ "yaml": "^2.9.0",
121
133
  "zod": "^4.4.3",
122
- "@yadsh/dsh-plugin-log": "^0.3.0"
134
+ "@yadsh/dsh-plugin-log": "^0.3.1"
123
135
  },
124
136
  "devDependencies": {
125
137
  "@deepseek-ai/cordis": "4.0.2",
@@ -141,8 +153,10 @@
141
153
  "@deepseek-ai/dsh-host-webserver": "0.1.5-rc.2",
142
154
  "@deepseek-ai/dsh-llm": "0.1.5-rc.2",
143
155
  "@deepseek-ai/dsh-permission-presets": "0.1.5-rc.2",
156
+ "@deepseek-ai/dsh-scope": "0.1.5-rc.2",
144
157
  "@deepseek-ai/dsh-session": "0.1.5-rc.2",
145
158
  "@deepseek-ai/dsh-settings": "0.1.5-rc.2",
159
+ "@deepseek-ai/dsh-skill": "0.1.5-rc.2",
146
160
  "@deepseek-ai/dsh-system-prompt": "0.1.5-rc.2",
147
161
  "@deepseek-ai/dsh-tools": "0.1.5-rc.2",
148
162
  "@deepseek-ai/dsh-typert-generator": "0.1.5-rc.2",
@@ -155,7 +169,6 @@
155
169
  "eslint": "10.9.1",
156
170
  "jsdom": "^26.1.0",
157
171
  "playwright": "1.62.1",
158
- "prettier": "^3.6.2",
159
172
  "react": "18.3.1",
160
173
  "react-dom": "18.3.1",
161
174
  "tsdown": "^0.22.14",
@@ -171,15 +184,15 @@
171
184
  },
172
185
  "scripts": {
173
186
  "clean": "node -e \"require('node:fs').rmSync('lib', { recursive: true, force: true })\"",
174
- "build": "pnpm run lint && pnpm run clean && node scripts/generate-typert.mjs && tsc -p tsconfig.build.json && tsdown",
187
+ "build": "pnpm run clean && node scripts/generate-typert.mjs && tsc -p tsconfig.build.json && tsdown",
175
188
  "lint": "eslint src tests scripts tsdown.config.ts",
176
- "format": "prettier --check . --end-of-line auto",
177
- "format:write": "prettier --write . --end-of-line auto",
178
189
  "typecheck": "tsc -p tsconfig.json --noEmit",
179
190
  "test": "vitest run",
180
- "verify": "node scripts/verify-package.mjs",
191
+ "verify:package": "node scripts/verify-package.mjs",
192
+ "verify": "pnpm run verify:package && pnpm run verify:consumer",
193
+ "verify:consumer": "tsc -p scripts/fixtures/tsconfig.json --noEmit",
181
194
  "smoke:packed": "node scripts/smoke-packed-dsh.mjs",
182
195
  "e2e:browser": "node scripts/smoke-packed-dsh.mjs --browser",
183
- "check": "pnpm run format && pnpm run lint && pnpm run typecheck && pnpm run test && pnpm run build && pnpm run verify"
196
+ "check": "pnpm run lint && pnpm run typecheck && pnpm run test && pnpm run build && pnpm run verify"
184
197
  }
185
198
  }