@yadsh/dsh-qa-surface 0.9.0 → 0.11.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 (250) hide show
  1. package/README.md +269 -2
  2. package/lib/access/service.js +49 -10
  3. package/lib/access/service.js.map +1 -1
  4. package/lib/account-remotes.js +41 -0
  5. package/lib/account-remotes.js.map +1 -1
  6. package/lib/accounts/database.js +140 -0
  7. package/lib/accounts/database.js.map +1 -1
  8. package/lib/accounts/errors.js.map +1 -1
  9. package/lib/accounts/service-token.js +103 -0
  10. package/lib/accounts/service-token.js.map +1 -0
  11. package/lib/accounts/store.js +291 -5
  12. package/lib/accounts/store.js.map +1 -1
  13. package/lib/admin/conversation-log.js +14 -8
  14. package/lib/admin/conversation-log.js.map +1 -1
  15. package/lib/admin/permissions.js +5 -0
  16. package/lib/admin/permissions.js.map +1 -1
  17. package/lib/admin/quality-store.js +4 -0
  18. package/lib/admin/quality-store.js.map +1 -1
  19. package/lib/admin/service.js +180 -7
  20. package/lib/admin/service.js.map +1 -1
  21. package/lib/admin/session-log.js +39 -8
  22. package/lib/admin/session-log.js.map +1 -1
  23. package/lib/attachment-rules.js +39 -6
  24. package/lib/attachment-rules.js.map +1 -1
  25. package/lib/cli.js +83 -1
  26. package/lib/cli.js.map +1 -1
  27. package/lib/client/QaAccountsController.js +213 -4
  28. package/lib/client/QaAccountsController.js.map +1 -1
  29. package/lib/client/QaSessionController.js +49 -21
  30. package/lib/client/QaSessionController.js.map +1 -1
  31. package/lib/client/QaSurface.js +51 -9
  32. package/lib/client/QaSurface.js.map +1 -1
  33. package/lib/client/QaSurfaceGuard.js +12 -5
  34. package/lib/client/QaSurfaceGuard.js.map +1 -1
  35. package/lib/client/admin/QaAdmin.js +14 -2
  36. package/lib/client/admin/QaAdmin.js.map +1 -1
  37. package/lib/client/admin/pages/SkillFiles.js +78 -0
  38. package/lib/client/admin/pages/SkillFiles.js.map +1 -0
  39. package/lib/client/admin/pages/Users.js +74 -3
  40. package/lib/client/admin/pages/Users.js.map +1 -1
  41. package/lib/client/admin/routes.js +8 -1
  42. package/lib/client/admin/routes.js.map +1 -1
  43. package/lib/client/admin/shared.js +5 -1
  44. package/lib/client/admin/shared.js.map +1 -1
  45. package/lib/client/admin/styles.js +2 -0
  46. package/lib/client/admin/styles.js.map +1 -1
  47. package/lib/client/attachments.js +41 -11
  48. package/lib/client/attachments.js.map +1 -1
  49. package/lib/client/base64.js +22 -1
  50. package/lib/client/base64.js.map +1 -1
  51. package/lib/client/components/QaAgentsDrawer.js +9 -6
  52. package/lib/client/components/QaAgentsDrawer.js.map +1 -1
  53. package/lib/client/components/QaApproval.js +1 -1
  54. package/lib/client/components/QaApproval.js.map +1 -1
  55. package/lib/client/components/QaAuthGate.js +19 -10
  56. package/lib/client/components/QaAuthGate.js.map +1 -1
  57. package/lib/client/components/QaChangelog.js +56 -0
  58. package/lib/client/components/QaChangelog.js.map +1 -1
  59. package/lib/client/components/QaFilesPanel.js +17 -11
  60. package/lib/client/components/QaFilesPanel.js.map +1 -1
  61. package/lib/client/components/QaHeader.js +3 -11
  62. package/lib/client/components/QaHeader.js.map +1 -1
  63. package/lib/client/components/QaModal.js.map +1 -1
  64. package/lib/client/components/QaQuestions.js +4 -4
  65. package/lib/client/components/QaQuestions.js.map +1 -1
  66. package/lib/client/components/QaSidebar.js +10 -2
  67. package/lib/client/components/QaSidebar.js.map +1 -1
  68. package/lib/client/components/QaWidthHandle.js +111 -5
  69. package/lib/client/components/QaWidthHandle.js.map +1 -1
  70. package/lib/client/components/QaWorkspaceBrowser.js +231 -0
  71. package/lib/client/components/QaWorkspaceBrowser.js.map +1 -0
  72. package/lib/client/index.js +122 -53
  73. package/lib/client/index.js.map +1 -1
  74. package/lib/client/kiosk.js +51 -0
  75. package/lib/client/kiosk.js.map +1 -0
  76. package/lib/client/lineage.js +64 -0
  77. package/lib/client/lineage.js.map +1 -1
  78. package/lib/client/markdown/blocks.js +122 -7
  79. package/lib/client/markdown/blocks.js.map +1 -1
  80. package/lib/client/markdown/inline.js +108 -12
  81. package/lib/client/markdown/inline.js.map +1 -1
  82. package/lib/client/markdown/katex-css.js +12 -0
  83. package/lib/client/markdown/katex-css.js.map +1 -0
  84. package/lib/client/markdown/math.js +84 -0
  85. package/lib/client/markdown/math.js.map +1 -0
  86. package/lib/client/markdown/render.js +74 -5
  87. package/lib/client/markdown/render.js.map +1 -1
  88. package/lib/client/settings/card.js +2 -2
  89. package/lib/client/settings/card.js.map +1 -1
  90. package/lib/client/settings/sections/attachments.js +6 -5
  91. package/lib/client/settings/sections/attachments.js.map +1 -1
  92. package/lib/client/settings/sections/notes.js +64 -0
  93. package/lib/client/settings/sections/notes.js.map +1 -0
  94. package/lib/client/settings/sections/sources.js +4 -1
  95. package/lib/client/settings/sections/sources.js.map +1 -1
  96. package/lib/client/settings/sections.js +1 -0
  97. package/lib/client/settings/sections.js.map +1 -1
  98. package/lib/client/settlement.js +1 -1
  99. package/lib/client/settlement.js.map +1 -1
  100. package/lib/client/source-preview.js +3 -0
  101. package/lib/client/source-preview.js.map +1 -1
  102. package/lib/client/styles.js +106 -18
  103. package/lib/client/styles.js.map +1 -1
  104. package/lib/client/types.js.map +1 -1
  105. package/lib/client/user-settings/IntegrationTokensPage.js +150 -0
  106. package/lib/client/user-settings/IntegrationTokensPage.js.map +1 -0
  107. package/lib/client/user-settings/PasswordSettingsPage.js +48 -0
  108. package/lib/client/user-settings/PasswordSettingsPage.js.map +1 -0
  109. package/lib/client/user-settings/SkillCatalog.js +2 -2
  110. package/lib/client/user-settings/SkillCatalog.js.map +1 -1
  111. package/lib/client/user-settings/UserSettingsDialog.js +17 -2
  112. package/lib/client/user-settings/UserSettingsDialog.js.map +1 -1
  113. package/lib/client/user-settings/copy.js +20 -0
  114. package/lib/client/user-settings/copy.js.map +1 -1
  115. package/lib/client.js +31007 -686
  116. package/lib/client.js.map +1 -1
  117. package/lib/config-resolvers/attachments.js +6 -5
  118. package/lib/config-resolvers/attachments.js.map +1 -1
  119. package/lib/config-resolvers/defaults.js +33 -2
  120. package/lib/config-resolvers/defaults.js.map +1 -1
  121. package/lib/config-resolvers/integration.js +94 -0
  122. package/lib/config-resolvers/integration.js.map +1 -0
  123. package/lib/config-resolvers/notes.js +26 -0
  124. package/lib/config-resolvers/notes.js.map +1 -0
  125. package/lib/config-resolvers/sources.js +4 -0
  126. package/lib/config-resolvers/sources.js.map +1 -1
  127. package/lib/config.js +107 -0
  128. package/lib/config.js.map +1 -1
  129. package/lib/index.js +348 -12
  130. package/lib/index.js.map +1 -1
  131. package/lib/integration/answer.js +100 -0
  132. package/lib/integration/answer.js.map +1 -0
  133. package/lib/integration/attachments.js +231 -0
  134. package/lib/integration/attachments.js.map +1 -0
  135. package/lib/integration/contract.js +53 -0
  136. package/lib/integration/contract.js.map +1 -0
  137. package/lib/integration/host-runner.js +243 -0
  138. package/lib/integration/host-runner.js.map +1 -0
  139. package/lib/integration/http.js +538 -0
  140. package/lib/integration/http.js.map +1 -0
  141. package/lib/integration/service.js +331 -0
  142. package/lib/integration/service.js.map +1 -0
  143. package/lib/integration/transcript-reader.js +202 -0
  144. package/lib/integration/transcript-reader.js.map +1 -0
  145. package/lib/integration/transcript.js +148 -0
  146. package/lib/integration/transcript.js.map +1 -0
  147. package/lib/personal-skills/index.js +2 -2
  148. package/lib/personal-skills/index.js.map +1 -1
  149. package/lib/personal-skills/paths.js +14 -8
  150. package/lib/personal-skills/paths.js.map +1 -1
  151. package/lib/personal-skills/provider.js +16 -4
  152. package/lib/personal-skills/provider.js.map +1 -1
  153. package/lib/personal-skills/service.js +240 -30
  154. package/lib/personal-skills/service.js.map +1 -1
  155. package/lib/prompt-notes.js +103 -6
  156. package/lib/prompt-notes.js.map +1 -1
  157. package/lib/provenance/document-preview.js +60 -0
  158. package/lib/provenance/document-preview.js.map +1 -0
  159. package/lib/provenance/file-preview.js +191 -19
  160. package/lib/provenance/file-preview.js.map +1 -1
  161. package/lib/qa-tools/catalog.js +18 -1
  162. package/lib/qa-tools/catalog.js.map +1 -1
  163. package/lib/qa-tools/docs-tools.js +563 -0
  164. package/lib/qa-tools/docs-tools.js.map +1 -0
  165. package/lib/qa-tools/file-delete-gate.js +60 -0
  166. package/lib/qa-tools/file-delete-gate.js.map +1 -0
  167. package/lib/qa-tools/file-delete.js +156 -0
  168. package/lib/qa-tools/file-delete.js.map +1 -0
  169. package/lib/resolve-config.js +6 -0
  170. package/lib/resolve-config.js.map +1 -1
  171. package/lib/secure-session.js +83 -3
  172. package/lib/secure-session.js.map +1 -1
  173. package/lib/shared/documents.js +22 -0
  174. package/lib/shared/documents.js.map +1 -0
  175. package/lib/shared/integration-tokens.js +23 -0
  176. package/lib/shared/integration-tokens.js.map +1 -0
  177. package/lib/typert.host.js +1320 -134
  178. package/lib/typert.remote-client.d.ts +33 -1
  179. package/lib/typert.remote-client.js +1102 -74
  180. package/lib/types/access/service.d.ts +33 -2
  181. package/lib/types/account-remotes.d.ts +30 -1
  182. package/lib/types/accounts/database.d.ts +53 -0
  183. package/lib/types/accounts/errors.d.ts +5 -1
  184. package/lib/types/accounts/service-token.d.ts +70 -0
  185. package/lib/types/accounts/store.d.ts +131 -1
  186. package/lib/types/admin/conversation-log.d.ts +12 -0
  187. package/lib/types/admin/service.d.ts +56 -1
  188. package/lib/types/admin/session-log.d.ts +21 -0
  189. package/lib/types/attachment-rules.d.ts +26 -3
  190. package/lib/types/client/QaAccountsController.d.ts +64 -5
  191. package/lib/types/client/QaSessionController.d.ts +24 -2
  192. package/lib/types/client/admin/pages/SkillFiles.d.ts +17 -0
  193. package/lib/types/client/admin/routes.d.ts +2 -0
  194. package/lib/types/client/admin/shared.d.ts +2 -0
  195. package/lib/types/client/attachments.d.ts +21 -4
  196. package/lib/types/client/base64.d.ts +13 -1
  197. package/lib/types/client/components/QaAgentsDrawer.d.ts +2 -1
  198. package/lib/types/client/components/QaFilesPanel.d.ts +16 -4
  199. package/lib/types/client/components/QaHeader.d.ts +9 -3
  200. package/lib/types/client/components/QaModal.d.ts +4 -3
  201. package/lib/types/client/components/QaWidthHandle.d.ts +48 -2
  202. package/lib/types/client/components/QaWorkspaceBrowser.d.ts +15 -0
  203. package/lib/types/client/index.d.ts +1 -1
  204. package/lib/types/client/kiosk.d.ts +34 -0
  205. package/lib/types/client/lineage.d.ts +42 -0
  206. package/lib/types/client/markdown/blocks.d.ts +14 -1
  207. package/lib/types/client/markdown/inline.d.ts +23 -7
  208. package/lib/types/client/markdown/katex-css.d.ts +11 -0
  209. package/lib/types/client/markdown/math.d.ts +23 -0
  210. package/lib/types/client/markdown/render.d.ts +2 -1
  211. package/lib/types/client/settings/sections/notes.d.ts +12 -0
  212. package/lib/types/client/settings/sections.d.ts +1 -0
  213. package/lib/types/client/settlement.d.ts +4 -1
  214. package/lib/types/client/styles.d.ts +15 -2
  215. package/lib/types/client/types.d.ts +120 -1
  216. package/lib/types/client/user-settings/IntegrationTokensPage.d.ts +21 -0
  217. package/lib/types/client/user-settings/PasswordSettingsPage.d.ts +19 -0
  218. package/lib/types/client/user-settings/UserSettingsDialog.d.ts +11 -2
  219. package/lib/types/client/user-settings/copy.d.ts +10 -1
  220. package/lib/types/config-resolvers/integration.d.ts +47 -0
  221. package/lib/types/config-resolvers/notes.d.ts +10 -0
  222. package/lib/types/config.d.ts +10 -0
  223. package/lib/types/index.d.ts +111 -1
  224. package/lib/types/integration/answer.d.ts +65 -0
  225. package/lib/types/integration/attachments.d.ts +85 -0
  226. package/lib/types/integration/contract.d.ts +196 -0
  227. package/lib/types/integration/host-runner.d.ts +44 -0
  228. package/lib/types/integration/http.d.ts +79 -0
  229. package/lib/types/integration/service.d.ts +120 -0
  230. package/lib/types/integration/transcript-reader.d.ts +100 -0
  231. package/lib/types/integration/transcript.d.ts +59 -0
  232. package/lib/types/personal-skills/index.d.ts +2 -2
  233. package/lib/types/personal-skills/paths.d.ts +15 -3
  234. package/lib/types/personal-skills/provider.d.ts +14 -2
  235. package/lib/types/personal-skills/service.d.ts +89 -14
  236. package/lib/types/prompt-notes.d.ts +37 -0
  237. package/lib/types/provenance/document-preview.d.ts +28 -0
  238. package/lib/types/provenance/file-preview.d.ts +69 -2
  239. package/lib/types/qa-tools/catalog.d.ts +1 -1
  240. package/lib/types/qa-tools/docs-tools.d.ts +160 -0
  241. package/lib/types/qa-tools/file-delete-gate.d.ts +42 -0
  242. package/lib/types/qa-tools/file-delete.d.ts +32 -0
  243. package/lib/types/secure-session.d.ts +52 -1
  244. package/lib/types/shared/documents.d.ts +20 -0
  245. package/lib/types/shared/integration-tokens.d.ts +24 -0
  246. package/lib/types/types.d.ts +263 -3
  247. package/lib/types/ui-mode.d.ts +18 -0
  248. package/lib/ui-mode.js +22 -0
  249. package/lib/ui-mode.js.map +1 -0
  250. package/package.json +12 -10
@@ -7,7 +7,8 @@ import { type MarkdownSourceContext } from "./source-chip.js";
7
7
  * instead of a plain link or code token.
8
8
  * @param text - Assistant-authored markdown.
9
9
  * @param context - Source resolution handed down by the owning message.
10
- * @returns The document's blocks.
10
+ * @returns The document's blocks, plus the footnote section when the document
11
+ * references a defined footnote.
11
12
  */
12
13
  export declare function renderMarkdown(text: string, context: MarkdownSourceContext): ReactNode[];
13
14
  //# sourceMappingURL=render.d.ts.map
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Model notes: the ambient plugin messages the injector writes into a QA chat
3
+ * (who the user is, the source-provenance rules, delegation naming, which
4
+ * reader an attached document belongs to, where an answer should come from).
5
+ * Each note has a switch and an optional wording override; an empty template
6
+ * keeps the built-in text, so the fields double as a wording editor and a mute
7
+ * switch.
8
+ */
9
+ import { type ConfigProps } from "./common.js";
10
+ /** The ambient notes the Host writes into QA chats as hidden user messages. */
11
+ export declare function NotesSection(props: ConfigProps): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=notes.d.ts.map
@@ -18,6 +18,7 @@ export { BrandingSection } from "./sections/branding.js";
18
18
  export { EmbeddingSection } from "./sections/embedding.js";
19
19
  export { InterfaceSection } from "./sections/interface.js";
20
20
  export { LockdownSection } from "./sections/lockdown.js";
21
+ export { NotesSection } from "./sections/notes.js";
21
22
  export { SessionSection } from "./sections/session.js";
22
23
  export { SlashSection } from "./sections/slash.js";
23
24
  export { SourcesSection } from "./sections/sources.js";
@@ -13,7 +13,10 @@ export declare function parseSettlement(text: string): SettledSubagent | undefin
13
13
  export interface SettlementView {
14
14
  readonly title: string;
15
15
  readonly body: string;
16
- /** Muted correlation line above the body; absent when the title says it all. */
16
+ /**
17
+ * Muted correlation lines above the body, one fact per line; absent when
18
+ * the title says it all.
19
+ */
17
20
  readonly meta?: string;
18
21
  }
19
22
  /**
@@ -2,12 +2,25 @@
2
2
  export declare const QA_BRAND_TOKEN_NAMES: readonly string[];
3
3
  export declare const QA_SURFACE_STYLES: string;
4
4
  /**
5
- * Everything the QA overlay paints, as one sheet for one `<style>` tag.
5
+ * Everything the QA surface paints, as one sheet for one `<style>` tag — the
6
+ * kiosk form, with no host-hiding rules: in the kiosk composition the native
7
+ * shell never mounts, so the sheet carries nothing aimed at it.
6
8
  *
7
9
  * The shared audit components keep their own stylesheet in
8
- * `@yadsh/dsh-audit-ui`; it is folded in here so the overlay is self-contained
10
+ * `@yadsh/dsh-audit-ui`; it is folded in here so the surface is self-contained
9
11
  * — the audit dialog must look right whether or not the audit plugin's own
10
12
  * client bundle happens to have injected the same rules into the document.
13
+ *
14
+ * The math styles and their fonts come from the bundled KaTeX copy the same
15
+ * way: the data-URI fonts resolve whatever the Host page loads, and identical
16
+ * rules from its own KaTeX stylesheet are harmless.
17
+ */
18
+ export declare const QA_ROOT_STYLES: string;
19
+ /**
20
+ * The overlay-composition sheet: the same rules as {@link QA_ROOT_STYLES}
21
+ * plus the host-column mask. Deployed into hosts without the kiosk patches,
22
+ * where the surface still covers a mounted native shell and the mask is what
23
+ * a deleted overlay element uncovers — a blank page instead of the shell.
11
24
  */
12
25
  export declare const QA_OVERLAY_STYLES: string;
13
26
  //# sourceMappingURL=styles.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import type { ClientRemote } from "@deepseek-ai/dsh-api-gateway/client";
2
2
  import type { ISessions, SessionFace } from "@deepseek-ai/dsh-api-session-controller/client";
3
3
  import type { UiConversation } from "@deepseek-ai/dsh-client-ui-conversation/client";
4
- import type { QaAccountProfileInput, QaAccountSession, QaAccountStartersInput, QaAccountStarter, QaAccountUserPublic, QaAccessAdminSnapshot, QaApprovalDecision, QaClaimResult, QaLockdownProof, QaOwnershipEntry, QaPendingApproval, QaPendingQuestion, QaQuestionAnswerItem, QaSessionState, QaSkillDocument, QaSkillDraftInput, QaSkillRemoval, QaSkillSummary, QaSkillToolDescriptor, QaSkillValidation, QaSourceFilePreview, QaTurnSources, QaWhoamiResult, QaCapabilitySelection, QaCurrentAccess, QaSessionAccess, QaSkillActivationRecord, QaSkillAssignmentOverride, QaSubrole, QaUserAccess, QaAdminAuditEvent, QaAdminOverview, QaAdminPage, QaAdminUserDetail, QaAdminUserRow, QaAdminUserUpdate, QaAuditQuery, QaConversationDetail, QaConversationDeletion, QaConversationQuery, QaConversationReview, QaConversationReviewInput, QaConversationSummary, QaFeedbackQuery, QaFeedbackRow, QaMessageFeedback, QaMessageFeedbackInput, QaQualityMetrics, QaReviewQueueItem, QaReviewQueueRow, QaSlashCatalog, QaSlashExecution, QaSlashSubmitAttachment, QaUserQuery } from "../types.js";
4
+ import type { QaAccountProfileInput, QaAccountSession, QaAccountStartersInput, QaAccountStarter, QaAccountUserPublic, QaAccessAdminSnapshot, QaApprovalDecision, QaClaimResult, QaLockdownProof, QaOwnershipEntry, QaPasswordResetRequest, QaPendingApproval, QaPendingQuestion, QaQuestionAnswerItem, QaIssuedServiceToken, QaServiceTokenCreateInput, QaServiceTokenSummary, QaSessionState, QaSkillDocument, QaSkillDraftInput, QaSkillRemoval, QaSkillSummary, QaSkillToolDescriptor, QaSkillValidation, QaSourceFilePreview, QaTurnSources, QaWhoamiResult, QaDocumentPreview, QaWorkspaceFile, QaWorkspaceListing, QaCapabilitySelection, QaCurrentAccess, QaSessionAccess, QaSkillActivationRecord, QaSkillAssignmentOverride, QaSubrole, QaUserAccess, QaAdminAuditEvent, QaAdminOverview, QaAdminPage, QaAdminSkillScope, QaAdminSkillsView, QaAdminUserDetail, QaAdminUserRow, QaAdminUserUpdate, QaAuditQuery, QaConversationDetail, QaConversationDeletion, QaConversationQuery, QaConversationReview, QaConversationReviewInput, QaConversationSummary, QaFeedbackQuery, QaFeedbackRow, QaMessageFeedback, QaMessageFeedbackInput, QaQualityMetrics, QaReviewQueueItem, QaReviewQueueRow, QaSlashCatalog, QaSlashExecution, QaSlashSubmitAttachment, QaUserQuery } from "../types.js";
5
5
  /** Wire content one prompt carries: text plus base64 image uploads. */
6
6
  export type QaPromptContent = Parameters<SessionFace["prompt"]>[0];
7
7
  /** DSH session runtime surface the QA controller is allowed to touch. */
@@ -56,6 +56,16 @@ export interface QaAdminApi {
56
56
  users(token: string, query: QaUserQuery, cursor: string | null, limit: number | null): Promise<RemoteResult<QaAdminPage<QaAdminUserRow>>>;
57
57
  user(token: string, userId: string): Promise<RemoteResult<QaAdminUserDetail>>;
58
58
  updateUser(token: string, userId: string, update: QaAdminUserUpdate): Promise<RemoteResult<QaAdminUserDetail>>;
59
+ /**
60
+ * Accounts that asked for a password reset from the sign-in screen, newest
61
+ * first. Reading takes `users.read`; answering one takes `users.manage`.
62
+ */
63
+ passwordResetRequests(token: string): Promise<RemoteResult<readonly QaPasswordResetRequest[]>>;
64
+ /**
65
+ * Answer one request: set that account's new password and drop its row. The
66
+ * account's live sessions end with the token-version bump.
67
+ */
68
+ resetPassword(token: string, userId: string, password: string): Promise<RemoteResult<QaAdminUserDetail>>;
59
69
  conversations(token: string, query: QaConversationQuery, cursor: string | null, limit: number | null): Promise<RemoteResult<QaAdminPage<QaConversationSummary>>>;
60
70
  conversation(token: string, conversationId: string): Promise<RemoteResult<QaConversationDetail>>;
61
71
  /**
@@ -71,6 +81,18 @@ export interface QaAdminApi {
71
81
  saveReview(token: string, input: QaConversationReviewInput): Promise<RemoteResult<QaConversationReview>>;
72
82
  metrics(token: string): Promise<RemoteResult<QaQualityMetrics>>;
73
83
  audit(token: string, query: QaAuditQuery, cursor: string | null, limit: number | null): Promise<RemoteResult<QaAdminPage<QaAdminAuditEvent>>>;
84
+ /**
85
+ * Skill files an administrator may edit: the deployment's shared store, or
86
+ * one named account's own. These are the same files the owner edits from
87
+ * their settings dialog, opened here with the authorization to leave a mark
88
+ * the owner sees.
89
+ */
90
+ skills(token: string, scope: QaAdminSkillScope): Promise<RemoteResult<QaAdminSkillsView>>;
91
+ skill(token: string, scope: QaAdminSkillScope, name: string): Promise<RemoteResult<QaSkillDocument>>;
92
+ saveSkill(token: string, scope: QaAdminSkillScope, name: string | null, input: QaSkillDraftInput): Promise<RemoteResult<QaSkillDocument>>;
93
+ deleteSkill(token: string, scope: QaAdminSkillScope, name: string, expectedRevision: string | null): Promise<RemoteResult<QaSkillRemoval>>;
94
+ validateSkill(token: string, scope: QaAdminSkillScope, name: string | null, input: QaSkillDraftInput): Promise<RemoteResult<QaSkillValidation>>;
95
+ skillTools(token: string, scope: QaAdminSkillScope): Promise<RemoteResult<readonly QaSkillToolDescriptor[]>>;
74
96
  }
75
97
  /**
76
98
  * Browser file-upload service (`ctx.fileUpload`), described structurally on
@@ -111,6 +133,34 @@ export interface QaSourceApi {
111
133
  readonly ok: false;
112
134
  readonly error: unknown;
113
135
  }>;
136
+ /** One directory of the chat's own workspace, for the files panel. */
137
+ listWorkspaceFiles(token: string, sessionId: string, path: string): Promise<{
138
+ readonly ok: true;
139
+ readonly value: QaWorkspaceListing;
140
+ } | {
141
+ readonly ok: false;
142
+ readonly error: unknown;
143
+ }>;
144
+ /** One file of that workspace: decoded text, or bytes when it is binary. */
145
+ readWorkspaceFile(token: string, sessionId: string, path: string): Promise<{
146
+ readonly ok: true;
147
+ readonly value: QaWorkspaceFile;
148
+ } | {
149
+ readonly ok: false;
150
+ readonly error: unknown;
151
+ }>;
152
+ /**
153
+ * A Word document of that workspace rendered as PDF by the deployment's
154
+ * document pipeline; the panel shows the PDF the browser already knows how
155
+ * to draw instead of uploading the bytes anywhere.
156
+ */
157
+ previewWorkspaceDocument(token: string, sessionId: string, path: string): Promise<{
158
+ readonly ok: true;
159
+ readonly value: QaDocumentPreview;
160
+ } | {
161
+ readonly ok: false;
162
+ readonly error: unknown;
163
+ }>;
114
164
  }
115
165
  /**
116
166
  * The slash half of the Host namespace. The catalog comes back already cut
@@ -138,6 +188,27 @@ export type QaBoundSourceApi = {
138
188
  readonly ok: false;
139
189
  readonly error: unknown;
140
190
  }>;
191
+ listWorkspaceFiles(sessionId: string, path: string): Promise<{
192
+ readonly ok: true;
193
+ readonly value: QaWorkspaceListing;
194
+ } | {
195
+ readonly ok: false;
196
+ readonly error: unknown;
197
+ }>;
198
+ readWorkspaceFile(sessionId: string, path: string): Promise<{
199
+ readonly ok: true;
200
+ readonly value: QaWorkspaceFile;
201
+ } | {
202
+ readonly ok: false;
203
+ readonly error: unknown;
204
+ }>;
205
+ previewWorkspaceDocument(sessionId: string, path: string): Promise<{
206
+ readonly ok: true;
207
+ readonly value: QaDocumentPreview;
208
+ } | {
209
+ readonly ok: false;
210
+ readonly error: unknown;
211
+ }>;
141
212
  };
142
213
  /**
143
214
  * Approval remotes of this plugin's namespace. Read-only listing plus the one
@@ -214,6 +285,31 @@ export interface QaBoundSkillApi {
214
285
  tools(): Promise<RemoteResult<readonly QaSkillToolDescriptor[]>>;
215
286
  validate(name: string | null, input: QaSkillDraftInput): Promise<RemoteResult<QaSkillValidation>>;
216
287
  }
288
+ /**
289
+ * Outcome of one integration-token operation as the settings page sees it:
290
+ * the value, or the audience-safe copy for the refusal. The page renders the
291
+ * copy and never has to know a reason code.
292
+ */
293
+ export type QaIntegrationTokenResult<Value> = {
294
+ readonly ok: true;
295
+ readonly value: Value;
296
+ } | {
297
+ readonly ok: false;
298
+ readonly error: string;
299
+ };
300
+ /** The integration-token section with the account token bound at the call site. */
301
+ export interface QaIntegrationTokenApi {
302
+ /**
303
+ * Whether this deployment can mint at all. A token is a credential for the
304
+ * HTTP API, so when that API is off the page explains the state instead of
305
+ * offering a button that only ever refuses — while listing and revoking stay
306
+ * available, because a credential has to remain revocable.
307
+ */
308
+ readonly canCreate: boolean;
309
+ list(): Promise<QaIntegrationTokenResult<readonly QaServiceTokenSummary[]>>;
310
+ create(input: QaServiceTokenCreateInput): Promise<QaIntegrationTokenResult<QaIssuedServiceToken>>;
311
+ revoke(tokenId: string): Promise<QaIntegrationTokenResult<null>>;
312
+ }
217
313
  /** Account remotes exposed by the plugin's own typert namespace. */
218
314
  export interface QaAccountsApi {
219
315
  accountsWhoami(token: string): Promise<RemoteResult<QaWhoamiResult>>;
@@ -230,6 +326,29 @@ export interface QaAccountsApi {
230
326
  accountsUpdateProfile(token: string, input: QaAccountProfileInput): Promise<RemoteResult<QaAccountUserPublic>>;
231
327
  /** Replace the caller's own starter buttons; the token is the identity. */
232
328
  accountsUpdateStarters(token: string, input: QaAccountStartersInput): Promise<RemoteResult<QaAccountUserPublic>>;
329
+ /**
330
+ * Replace the caller's own password. The answer carries a fresh token: the
331
+ * write bumps the account's token version, so without it the browser that
332
+ * made the change would sign itself out.
333
+ */
334
+ accountsChangePassword(token: string, currentPassword: string, nextPassword: string): Promise<RemoteResult<QaAccountSession>>;
335
+ /**
336
+ * File a forgotten-password request for the operator queue. The answer is
337
+ * the same for every address, so it reveals nothing about the account.
338
+ */
339
+ accountsRequestPasswordReset(email: string): Promise<RemoteResult<{
340
+ readonly accepted: true;
341
+ }>>;
342
+ /** The caller's own integration tokens; never a secret. */
343
+ accountsListServiceTokens(token: string): Promise<RemoteResult<{
344
+ readonly tokens: readonly QaServiceTokenSummary[];
345
+ }>>;
346
+ /** Mint one integration token for the caller; the plaintext comes back once. */
347
+ accountsCreateServiceToken(token: string, input: QaServiceTokenCreateInput): Promise<RemoteResult<QaIssuedServiceToken>>;
348
+ /** Revoke one of the caller's own integration tokens. */
349
+ accountsRevokeServiceToken(token: string, tokenId: string): Promise<RemoteResult<{
350
+ readonly revoked: boolean;
351
+ }>>;
233
352
  }
234
353
  /** One button above an empty composer: what it reads and what it sends. */
235
354
  export type QaQuickQuestion = QaAccountStarter;
@@ -0,0 +1,21 @@
1
+ import type { QaIntegrationTokenApi } from "../types.js";
2
+ /**
3
+ * The integration tokens of the signed-in account: mint, read the secret once,
4
+ * and revoke.
5
+ *
6
+ * An integration token is the credential a non-browser application presents to
7
+ * the QA HTTP API, and it is deliberately a second, separate credential from
8
+ * the browser session: it survives a password change, it carries its own
9
+ * scopes and expiry, and it is revoked here rather than by signing anybody out.
10
+ * The page therefore says what the token is *for* before it offers to mint one
11
+ * — handing a long-lived key to a service is not a preference toggle.
12
+ *
13
+ * The plaintext exists in exactly one place: the answer that minted it. It is
14
+ * shown once, with the warning that this is the only time, and the list that
15
+ * follows carries no secret in any state — a list that could repeat a
16
+ * credential would be a list that leaks it.
17
+ */
18
+ export declare function QaIntegrationTokensPage(props: {
19
+ readonly api: QaIntegrationTokenApi;
20
+ }): import("react/jsx-runtime").JSX.Element;
21
+ //# sourceMappingURL=IntegrationTokensPage.d.ts.map
@@ -0,0 +1,19 @@
1
+ export interface QaPasswordSettingsPageProps {
2
+ /**
3
+ * Replace the signed-in user's password; resolves to refusal copy, or to
4
+ * null once the Host accepted it. The controller keeps this browser signed
5
+ * in with the token that answer carries.
6
+ */
7
+ readonly onChange: (currentPassword: string, nextPassword: string) => Promise<string | null>;
8
+ }
9
+ /**
10
+ * The password section of the settings dialog: current, new, repeat. The
11
+ * repeat field is client-side only — it exists to catch a typo in the field
12
+ * that, unlike a name, cannot be read back later.
13
+ *
14
+ * The consequence is stated rather than discovered: changing a password ends
15
+ * every *other* session of this account, which is exactly the point after a
16
+ * leak and exactly what looks like a bug when nobody said so.
17
+ */
18
+ export declare function QaPasswordSettingsPage(props: QaPasswordSettingsPageProps): import("react/jsx-runtime").JSX.Element;
19
+ //# sourceMappingURL=PasswordSettingsPage.d.ts.map
@@ -1,8 +1,8 @@
1
1
  import type { QaAccountIdentityField, QaAccountProfile, QaAccountProfileInput, QaAccountStarters, QaAccountStartersInput } from "../../types.js";
2
- import type { QaBoundSkillApi } from "../types.js";
2
+ import type { QaBoundSkillApi, QaIntegrationTokenApi } from "../types.js";
3
3
  import type { QaUserSettingsSections } from "../settings-extensions/index.js";
4
4
  /** Sections of the user-facing settings dialog. */
5
- export type QaSettingsSectionId = "profile" | "starters" | "general" | "skills" | (string & {});
5
+ export type QaSettingsSectionId = "profile" | "password" | "starters" | "tokens" | "general" | "skills" | (string & {});
6
6
  export interface QaUserSettingsDialogProps {
7
7
  readonly open: boolean;
8
8
  /** Section to show when the dialog opens. */
@@ -18,11 +18,20 @@ export interface QaUserSettingsDialogProps {
18
18
  readonly instructionsMaxLength: number;
19
19
  readonly onSave: (input: QaAccountProfileInput) => Promise<string | null>;
20
20
  };
21
+ /**
22
+ * Self-service password change. Absent only where the surface runs without
23
+ * accounts at all, in which case this dialog is not shown either.
24
+ */
25
+ readonly password?: {
26
+ readonly onChange: (currentPassword: string, nextPassword: string) => Promise<string | null>;
27
+ };
21
28
  /** Self-service starter buttons; absent when the deployment turns them off. */
22
29
  readonly starters?: {
23
30
  readonly starters: QaAccountStarters;
24
31
  readonly onSave: (input: QaAccountStartersInput) => Promise<string | null>;
25
32
  };
33
+ /** Integration tokens; absent when accounts are off altogether. */
34
+ readonly integrationTokens?: QaIntegrationTokenApi;
26
35
  /** Personal skills; absent when the deployment cannot host them. */
27
36
  readonly skills?: QaBoundSkillApi;
28
37
  /** Additive pages contributed by separately shipped QA plugins. */
@@ -1,4 +1,4 @@
1
- import type { QaSkillDiagnostic } from "../../types.js";
1
+ import type { QaSkillAdminEdit, QaSkillDiagnostic } from "../../types.js";
2
2
  /**
3
3
  * Audience-facing copy for the settings dialog. The Host sends stable codes
4
4
  * and never Russian prose, so every message a user reads is written here.
@@ -11,6 +11,15 @@ export declare function diagnosticMessage(diagnostic: QaSkillDiagnostic): string
11
11
  * fault, an unknown code — reads as the generic failure.
12
12
  */
13
13
  export declare function skillFailureCopy(error: unknown): string;
14
+ /**
15
+ * The badge line for a skill an administrator last wrote.
16
+ *
17
+ * It names the role, not the person: the row already carries a date, and who
18
+ * administers a deployment is not a fact a personal settings page should
19
+ * depend on. The mark itself comes from the Host, which only reports one while
20
+ * the stored bytes are still the administrator's.
21
+ */
22
+ export declare function adminEditMessage(edit: QaSkillAdminEdit): string;
14
23
  /** Whether a failure is the optimistic-concurrency refusal. */
15
24
  export declare function isSkillConflict(error: unknown): boolean;
16
25
  export declare const SKILLS_EMPTY_COPY: {
@@ -0,0 +1,47 @@
1
+ import type { QaIntegrationConfig, ResolvedQaSurfaceConfig } from "../types.js";
2
+ type ResolvedIntegration = ResolvedQaSurfaceConfig["integration"];
3
+ /** Operator-tunable bounds; the values the settings card shows as hard limits. */
4
+ export declare const QA_INTEGRATION_TTL_DAYS_MIN = 1;
5
+ export declare const QA_INTEGRATION_TTL_DAYS_MAX = 3650;
6
+ export declare const QA_INTEGRATION_TIMEOUT_MS_MIN = 5000;
7
+ export declare const QA_INTEGRATION_TIMEOUT_MS_MAX = 600000;
8
+ export declare const QA_INTEGRATION_CONCURRENCY_MIN = 1;
9
+ export declare const QA_INTEGRATION_CONCURRENCY_MAX = 16;
10
+ export declare const QA_INTEGRATION_RATE_MIN = 1;
11
+ export declare const QA_INTEGRATION_RATE_MAX = 600;
12
+ export declare const QA_INTEGRATION_BODY_BYTES_MIN = 1048576;
13
+ export declare const QA_INTEGRATION_BODY_BYTES_MAX = 67108864;
14
+ export declare const QA_INTEGRATION_ATTACHMENT_BYTES_MIN = 1024;
15
+ export declare const QA_INTEGRATION_ANSWER_CHARS_MIN = 256;
16
+ export declare const QA_INTEGRATION_ANSWER_CHARS_MAX = 65536;
17
+ /**
18
+ * Normalize the integration API's base path.
19
+ *
20
+ * It is a route namespace rather than a page: it may live under `/qa` (the
21
+ * default does), because the web server tries its exact table before the QA
22
+ * navigation's prefix, so `/qa/api/ask` never falls into the page route. What
23
+ * it may not do is claim the operator root, the first-party `/api` namespace
24
+ * or the plugin asset namespace.
25
+ * @param value - the configured path.
26
+ * @returns the path without a trailing slash.
27
+ */
28
+ export declare function normalizeIntegrationBasePath(value: string): string;
29
+ /**
30
+ * The integration API's slice of the resolved configuration.
31
+ *
32
+ * The endpoint is off unless a deployment asks for it: it is a network
33
+ * surface reachable by anything that holds a token, and a QA stand that never
34
+ * integrates anything must not grow one by accident.
35
+ *
36
+ * It also needs accounts. Integration tokens are issued to an account and
37
+ * verified against it, so a deployment with `accounts.enabled: false` has
38
+ * nothing to authenticate a caller with; switching the API on there is a
39
+ * configuration mistake, and it is refused rather than served open.
40
+ *
41
+ * @param input - raw integration config.
42
+ * @param accounts - the resolved accounts domain, for the cross-check.
43
+ * @returns the frozen resolved slice.
44
+ */
45
+ export declare function resolveIntegration(input: QaIntegrationConfig | undefined, accounts: ResolvedQaSurfaceConfig["accounts"]): ResolvedIntegration;
46
+ export {};
47
+ //# sourceMappingURL=integration.d.ts.map
@@ -0,0 +1,10 @@
1
+ import type { QaNotesConfig, ResolvedQaSurfaceConfig } from "../types.js";
2
+ type ResolvedNotes = ResolvedQaSurfaceConfig["notes"];
3
+ /**
4
+ * The ambient model notes. Notes are advisory text, not capability: the
5
+ * default is the current behavior (every note on, built-in wording), and an
6
+ * empty template always resolves to the built-in text.
7
+ */
8
+ export declare function resolveNotes(input: QaNotesConfig | undefined): ResolvedNotes;
9
+ export {};
10
+ //# sourceMappingURL=notes.d.ts.map
@@ -1,5 +1,15 @@
1
1
  import z from "@deepseek-ai/schemastery";
2
2
  import type { QaSurfaceConfig } from "./types.js";
3
+ /**
4
+ * Version this build reports to the integration API's health endpoint.
5
+ *
6
+ * Read from the package manifest rather than written as a constant, so a
7
+ * release bump cannot drift away from it. Resolved on first use so importing
8
+ * the module never touches the filesystem, and this module is the right home
9
+ * for it: it is bundled one level under the package root, which is the depth
10
+ * `../package.json` resolves at.
11
+ */
12
+ export declare function qaSurfaceVersion(): string;
3
13
  export declare const ConfigSchema: z<QaSurfaceConfig>;
4
14
  export { DEFAULT_QA_SURFACE_CONFIG, normalizeRoutePath, resolveConfig, } from "./resolve-config.js";
5
15
  //# sourceMappingURL=config.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, QaAccountStartersInput, QaAccountUserPublic, QaApprovalDecision, QaClaimResult, QaLockdownProof, QaOwnershipEntry, QaPendingApproval, QaPendingQuestion, QaQuestionAnswerItem, QaSurfaceConfig, ResolvedQaSurfaceConfig, QaSkillDocument, QaSkillDraftInput, QaSkillRemoval, QaSkillSummary, QaSkillToolDescriptor, QaSkillValidation, QaSourceFilePreview, QaWhoamiResult, QaPrincipal, QaAccessAdminSnapshot, QaAdminAuditEvent, QaAdminOverview, QaAdminPage, QaAdminUserDetail, QaAdminUserRow, QaAdminUserUpdate, QaAuditQuery, QaCapabilitySelection, QaConversationDetail, QaConversationDeletion, QaConversationQuery, QaConversationReview, QaConversationReviewInput, QaConversationSummary, QaCurrentAccess, QaFeedbackQuery, QaFeedbackRow, QaMessageFeedback, QaMessageFeedbackInput, QaQualityMetrics, QaReviewQueueItem, QaReviewQueueRow, QaSessionAccess, QaSlashCatalog, QaSlashExecution, QaSlashSubmitAttachment, QaSkillActivationRecord, QaSkillAssignmentOverride, QaSubrole, QaUserAccess, QaUserQuery } from "./types.js";
4
+ import type { QaAccountProfileInput, QaAccountSession, QaAccountStartersInput, QaAccountUserPublic, QaApprovalDecision, QaClaimResult, QaDocumentPreview, QaIssuedServiceToken, QaLockdownProof, QaOwnershipEntry, QaPasswordResetRequest, QaPendingApproval, QaPendingQuestion, QaQuestionAnswerItem, QaServiceTokenCreateInput, QaServiceTokenSummary, QaSurfaceConfig, ResolvedQaSurfaceConfig, QaAdminSkillScope, QaAdminSkillsView, QaSkillDocument, QaSkillDraftInput, QaSkillRemoval, QaSkillSummary, QaSkillToolDescriptor, QaSkillValidation, QaSourceFilePreview, QaWhoamiResult, QaWorkspaceFile, QaWorkspaceListing, QaPrincipal, QaAccessAdminSnapshot, QaAdminAuditEvent, QaAdminOverview, QaAdminPage, QaAdminUserDetail, QaAdminUserRow, QaAdminUserUpdate, QaAuditQuery, QaCapabilitySelection, QaConversationDetail, QaConversationDeletion, QaConversationQuery, QaConversationReview, QaConversationReviewInput, QaConversationSummary, QaCurrentAccess, QaFeedbackQuery, QaFeedbackRow, QaMessageFeedback, QaMessageFeedbackInput, QaQualityMetrics, QaReviewQueueItem, QaReviewQueueRow, QaSessionAccess, QaSlashCatalog, QaSlashExecution, QaSlashSubmitAttachment, QaSkillActivationRecord, QaSkillAssignmentOverride, QaSubrole, QaUserAccess, QaUserQuery } 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";
@@ -20,6 +20,7 @@ export declare class QaSurface extends TypertRemoteService {
20
20
  private readonly logger;
21
21
  private readonly admission;
22
22
  private readonly approvals;
23
+ private readonly fileDeleteGate;
23
24
  private readonly userQuestions;
24
25
  private readonly provenance;
25
26
  private readonly notes;
@@ -50,6 +51,14 @@ export declare class QaSurface extends TypertRemoteService {
50
51
  private webServer;
51
52
  private disposeRoute;
52
53
  private routeKey;
54
+ /**
55
+ * The HTTP API an external application asks questions through. Constructed
56
+ * always — it is cheap and stateless until a request arrives — and exposed
57
+ * on the network only while the deployment turns it on.
58
+ */
59
+ private readonly integration;
60
+ private disposeIntegrationRoutes;
61
+ private integrationRouteKey;
53
62
  /**
54
63
  * The quality store opens its file on first use, so a deployment that never
55
64
  * opens the admin console never grows one.
@@ -107,6 +116,15 @@ export declare class QaSurface extends TypertRemoteService {
107
116
  accountsRegister(email: string, password: string): QaAccountSession;
108
117
  accountsLogin(email: string, password: string): QaAccountSession;
109
118
  /** Identity probe; safe to call with an empty or expired token. */
119
+ accountsChangePassword(token: string, currentPassword: string, nextPassword: string): QaAccountSession;
120
+ /**
121
+ * The sign-in screen's "забыли пароль?" path. It answers the same way for
122
+ * every address: whether an account exists is not something this endpoint
123
+ * tells a caller.
124
+ */
125
+ accountsRequestPasswordReset(email: string): {
126
+ readonly accepted: true;
127
+ };
110
128
  accountsWhoami(token: string): QaWhoamiResult;
111
129
  /**
112
130
  * Migrate a browser's local chat index into server-side ownership. The
@@ -139,6 +157,29 @@ export declare class QaSurface extends TypertRemoteService {
139
157
  * deployment's limits are enforced in the store before anything is written.
140
158
  */
141
159
  accountsUpdateStarters(token: string, input: QaAccountStartersInput): QaAccountUserPublic;
160
+ /**
161
+ * The caller's own integration tokens. The list is the account's own: the
162
+ * token names it, and a secret is never part of a summary, so reading this
163
+ * cannot repeat a credential that was already handed over.
164
+ */
165
+ accountsListServiceTokens(token: string): {
166
+ readonly tokens: readonly QaServiceTokenSummary[];
167
+ };
168
+ /**
169
+ * Mint one integration token for the caller. The answer carries the
170
+ * plaintext exactly once — nothing stores it, so nothing can repeat it — and
171
+ * the account is always the authenticated one: there is no owner field on
172
+ * the wire.
173
+ */
174
+ accountsCreateServiceToken(token: string, input: QaServiceTokenCreateInput): QaIssuedServiceToken;
175
+ /**
176
+ * Revoke one of the caller's own integration tokens. This is the immediate
177
+ * kill switch the profile page offers: the next request that presents the
178
+ * credential is refused, without waiting for its expiry.
179
+ */
180
+ accountsRevokeServiceToken(token: string, tokenId: string): {
181
+ readonly revoked: boolean;
182
+ };
142
183
  /**
143
184
  * Serve the effective QA configuration to the browser. The DSH gateway pins
144
185
  * settings RPCs to loopback, so a browser served over the LAN always sees
@@ -170,12 +211,35 @@ export declare class QaSurface extends TypertRemoteService {
170
211
  accessUpdateSkillOverride(token: string, input: QaSkillAssignmentOverride): readonly QaSkillAssignmentOverride[];
171
212
  /** What each skill activation actually granted in this session. */
172
213
  accessSkillActivations(token: string, sessionId: string): readonly QaSkillActivationRecord[];
214
+ /**
215
+ * The skill catalog of one scope: the deployment's shared skills, or the
216
+ * personal skills of the account the scope names. Reading another account's
217
+ * skills is an administrative act, so it needs `skills.manage`.
218
+ */
219
+ adminSkills(token: string, scope: QaAdminSkillScope): Promise<QaAdminSkillsView>;
220
+ /** One skill file with the body, revision and administrator mark. */
221
+ adminSkill(token: string, scope: QaAdminSkillScope, name: string): Promise<QaSkillDocument>;
222
+ /**
223
+ * Create (`name` null) or replace one skill in place. The write is recorded
224
+ * as this administrator's, and the owner sees that it was.
225
+ */
226
+ adminSkillSave(token: string, scope: QaAdminSkillScope, name: string | null, input: QaSkillDraftInput): Promise<QaSkillDocument>;
227
+ /** Remove one skill into the trash beside its own skills root. */
228
+ adminSkillDelete(token: string, scope: QaAdminSkillScope, name: string, expectedRevision: string | null): Promise<QaSkillRemoval>;
229
+ /** The file a save would write, plus every diagnostic for the draft. */
230
+ adminSkillValidate(token: string, scope: QaAdminSkillScope, name: string | null, input: QaSkillDraftInput): Promise<QaSkillValidation>;
231
+ /** The tool catalog the picker offers for one scope. */
232
+ adminSkillTools(token: string, scope: QaAdminSkillScope): Promise<{
233
+ readonly tools: readonly QaSkillToolDescriptor[];
234
+ }>;
173
235
  /** Counters, attention lines and the newest quality signals. */
174
236
  adminOverview(token: string): Promise<QaAdminOverview>;
175
237
  adminUsers(token: string, query: QaUserQuery, cursor: string | null, limit: number | null): Promise<QaAdminPage<QaAdminUserRow>>;
176
238
  adminUser(token: string, userId: string): Promise<QaAdminUserDetail>;
177
239
  /** Authorization role, status and subrole assignment of one account. */
178
240
  adminUpdateUser(token: string, userId: string, update: QaAdminUserUpdate): Promise<QaAdminUserDetail>;
241
+ adminPasswordResetRequests(token: string): Promise<readonly QaPasswordResetRequest[]>;
242
+ adminResetPassword(token: string, userId: string, password: string): Promise<QaAdminUserDetail>;
179
243
  adminConversations(token: string, query: QaConversationQuery, cursor: string | null, limit: number | null): Promise<QaAdminPage<QaConversationSummary>>;
180
244
  /** One conversation with its messages, tool calls and review state. */
181
245
  adminConversation(token: string, conversationId: string): Promise<QaConversationDetail>;
@@ -235,6 +299,43 @@ export declare class QaSurface extends TypertRemoteService {
235
299
  * the per-account scratch directory — could never be opened in the panel.
236
300
  */
237
301
  readSourceFile(token: string, sessionId: string, sourcePath: string): Promise<QaSourceFilePreview>;
302
+ /**
303
+ * List one directory of the chat's own workspace for the files panel.
304
+ *
305
+ * Browsing is deliberately narrower than the source preview: it stays inside
306
+ * the chat's own directory tree, so a visitor can look at what their
307
+ * conversation produced and at nothing else of the deployment.
308
+ * `readWorkspaceFile` opens one entry of such a listing.
309
+ */
310
+ listWorkspaceFiles(token: string, sessionId: string, path: string): Promise<QaWorkspaceListing>;
311
+ /**
312
+ * Read one file of the chat's workspace: text when it decodes as UTF-8, bytes
313
+ * when it does not, so a document the agent produced can be downloaded while
314
+ * a note previews inline. The readable roots are the ones the model itself
315
+ * may read; unlike the source preview this does not require the file to be
316
+ * recorded evidence, because the panel is browsing a tree rather than
317
+ * reopening a cited source.
318
+ */
319
+ readWorkspaceFile(token: string, sessionId: string, path: string): Promise<QaWorkspaceFile>;
320
+ /**
321
+ * Render one Word document of the chat's workspace as a PDF for the panel.
322
+ *
323
+ * The conversion is the document pipeline's own, reached through the service
324
+ * `@yadsh/dsh-documents` publishes for its Host siblings — the panel gets the
325
+ * same providers, limits and refusals the `document_*` tools see, and a
326
+ * deployment without that plugin refuses instead of showing a guess. The
327
+ * produced PDF is read back here and travels as base64, so the audience never
328
+ * reaches an unfenced byte route.
329
+ */
330
+ previewWorkspaceDocument(token: string, sessionId: string, path: string): Promise<QaDocumentPreview>;
331
+ /**
332
+ * Shared admission facts of both browse methods: the preview switch is what
333
+ * opens the panel's file reading at all, and the chat's cwd is the tree that
334
+ * browsing is confined to.
335
+ */
336
+ private browseContext;
337
+ /** One browse refusal, logged with its coarse reason and rethrown for the wire. */
338
+ private browseRefusal;
238
339
  /** Every personal skill of the token's account, sorted by name. */
239
340
  skillsList(token: string): {
240
341
  readonly skills: readonly QaSkillSummary[];
@@ -284,6 +385,15 @@ export declare class QaSurface extends TypertRemoteService {
284
385
  * the transcript row is read from.
285
386
  */
286
387
  slashExecute(token: string, sessionId: string, line: string, attachments: readonly QaSlashSubmitAttachment[]): Promise<QaSlashExecution>;
388
+ /**
389
+ * Register (or drop) the integration API's routes for the current config.
390
+ *
391
+ * The key is the whole registration decision — whether the API is on and
392
+ * where it lives — so a config change that does not move the endpoints
393
+ * leaves the live routes alone, and turning the API off disposes them
394
+ * immediately rather than at the next restart.
395
+ */
396
+ private refreshIntegrationRoutes;
287
397
  private refreshRoute;
288
398
  /**
289
399
  * A deployment that set `lockdown.allowSlashCommands: true` before this