@yadsh/dsh-qa-surface 0.15.6 → 0.16.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 (244) hide show
  1. package/README.md +8 -0
  2. package/lib/access/capability-catalog.js +11 -4
  3. package/lib/access/capability-catalog.js.map +1 -1
  4. package/lib/access/service.js +46 -5
  5. package/lib/access/service.js.map +1 -1
  6. package/lib/accounts/store.js +2 -2
  7. package/lib/accounts/store.js.map +1 -1
  8. package/lib/admin/service.js +4 -2
  9. package/lib/admin/service.js.map +1 -1
  10. package/lib/admin/session-log.js +3 -0
  11. package/lib/admin/session-log.js.map +1 -1
  12. package/lib/agent-scope.js +9 -0
  13. package/lib/agent-scope.js.map +1 -0
  14. package/lib/chat-sharing/native-fence.js +111 -0
  15. package/lib/chat-sharing/native-fence.js.map +1 -0
  16. package/lib/chat-sharing/resources.js +57 -0
  17. package/lib/chat-sharing/resources.js.map +1 -0
  18. package/lib/chat-sharing/store.js +193 -0
  19. package/lib/chat-sharing/store.js.map +1 -0
  20. package/lib/chat-sharing/transport.js +274 -0
  21. package/lib/chat-sharing/transport.js.map +1 -0
  22. package/lib/chat-sharing/turn-guard.js +154 -0
  23. package/lib/chat-sharing/turn-guard.js.map +1 -0
  24. package/lib/chat-sharing/types.js +2 -0
  25. package/lib/chat-sharing/types.js.map +1 -0
  26. package/lib/chat-sharing/uploads.js +55 -0
  27. package/lib/chat-sharing/uploads.js.map +1 -0
  28. package/lib/client/QaAccountsController.js +29 -2
  29. package/lib/client/QaAccountsController.js.map +1 -1
  30. package/lib/client/QaConfigController.js +7 -12
  31. package/lib/client/QaConfigController.js.map +1 -1
  32. package/lib/client/QaSessionController.js +186 -19
  33. package/lib/client/QaSessionController.js.map +1 -1
  34. package/lib/client/QaSurface.js +110 -9
  35. package/lib/client/QaSurface.js.map +1 -1
  36. package/lib/client/QaSurfaceGuard.js +6 -1
  37. package/lib/client/QaSurfaceGuard.js.map +1 -1
  38. package/lib/client/QaTranscriptAdapter.js +13 -3
  39. package/lib/client/QaTranscriptAdapter.js.map +1 -1
  40. package/lib/client/account-conversation.js +33 -0
  41. package/lib/client/account-conversation.js.map +1 -0
  42. package/lib/client/account-sessions.js +106 -0
  43. package/lib/client/account-sessions.js.map +1 -0
  44. package/lib/client/account-upload.js +30 -0
  45. package/lib/client/account-upload.js.map +1 -0
  46. package/lib/client/chat-artifacts.js +17 -3
  47. package/lib/client/chat-artifacts.js.map +1 -1
  48. package/lib/client/chat-sharing-api.js +2 -0
  49. package/lib/client/chat-sharing-api.js.map +1 -0
  50. package/lib/client/components/QaChangelog.js +70 -3
  51. package/lib/client/components/QaChangelog.js.map +1 -1
  52. package/lib/client/components/QaChatSharing.js +92 -0
  53. package/lib/client/components/QaChatSharing.js.map +1 -0
  54. package/lib/client/components/QaComposer.js +8 -4
  55. package/lib/client/components/QaComposer.js.map +1 -1
  56. package/lib/client/components/QaFileAttachment.js +12 -3
  57. package/lib/client/components/QaFileAttachment.js.map +1 -1
  58. package/lib/client/components/QaFilesPanel.js +11 -4
  59. package/lib/client/components/QaFilesPanel.js.map +1 -1
  60. package/lib/client/components/QaHeader.js +3 -3
  61. package/lib/client/components/QaHeader.js.map +1 -1
  62. package/lib/client/components/QaMessage.js +34 -9
  63. package/lib/client/components/QaMessage.js.map +1 -1
  64. package/lib/client/components/QaSidebar.js +1 -1
  65. package/lib/client/components/QaSidebar.js.map +1 -1
  66. package/lib/client/components/QaSourcesPanel.js +12 -4
  67. package/lib/client/components/QaSourcesPanel.js.map +1 -1
  68. package/lib/client/components/QaWorkspaceBrowser.js +28 -7
  69. package/lib/client/components/QaWorkspaceBrowser.js.map +1 -1
  70. package/lib/client/components/source-refs.js +42 -23
  71. package/lib/client/components/source-refs.js.map +1 -1
  72. package/lib/client/index.js +60 -6
  73. package/lib/client/index.js.map +1 -1
  74. package/lib/client/lineage.js +4 -3
  75. package/lib/client/lineage.js.map +1 -1
  76. package/lib/client/markdown/katex-css.js +1 -1
  77. package/lib/client/markdown/render.js +3 -4
  78. package/lib/client/markdown/render.js.map +1 -1
  79. package/lib/client/markdown/source-chip.js +4 -1
  80. package/lib/client/markdown/source-chip.js.map +1 -1
  81. package/lib/client/notifications/notification-dispatcher.js +50 -11
  82. package/lib/client/notifications/notification-dispatcher.js.map +1 -1
  83. package/lib/client/notifications/use-turn-notifications.js +107 -18
  84. package/lib/client/notifications/use-turn-notifications.js.map +1 -1
  85. package/lib/client/project-session-state.js +28 -13
  86. package/lib/client/project-session-state.js.map +1 -1
  87. package/lib/client/session-admission.js +9 -1
  88. package/lib/client/session-admission.js.map +1 -1
  89. package/lib/client/session-sources.js +44 -3
  90. package/lib/client/session-sources.js.map +1 -1
  91. package/lib/client/slash/useSlashNavigation.js +8 -5
  92. package/lib/client/slash/useSlashNavigation.js.map +1 -1
  93. package/lib/client/source-preview.js +1 -1
  94. package/lib/client/source-preview.js.map +1 -1
  95. package/lib/client/styles.js +9 -2
  96. package/lib/client/styles.js.map +1 -1
  97. package/lib/client/turn-sources.js +2 -1
  98. package/lib/client/turn-sources.js.map +1 -1
  99. package/lib/client/types.js.map +1 -1
  100. package/lib/client/workspace-download.js +42 -2
  101. package/lib/client/workspace-download.js.map +1 -1
  102. package/lib/client.js +3337 -947
  103. package/lib/client.js.map +1 -1
  104. package/lib/enforcement/skill-policy.js +29 -4
  105. package/lib/enforcement/skill-policy.js.map +1 -1
  106. package/lib/enforcement/skill-resource-paths.js +32 -0
  107. package/lib/enforcement/skill-resource-paths.js.map +1 -0
  108. package/lib/enforcement/structured-result.js +38 -0
  109. package/lib/enforcement/structured-result.js.map +1 -0
  110. package/lib/enforcement/tool-grants.js +3 -1
  111. package/lib/enforcement/tool-grants.js.map +1 -1
  112. package/lib/index.js +403 -15
  113. package/lib/index.js.map +1 -1
  114. package/lib/prompt-notes.js +18 -1
  115. package/lib/prompt-notes.js.map +1 -1
  116. package/lib/provenance/collector.js +13 -1
  117. package/lib/provenance/collector.js.map +1 -1
  118. package/lib/provenance/connectors.js +32 -8
  119. package/lib/provenance/connectors.js.map +1 -1
  120. package/lib/provenance/dedupe.js +8 -1
  121. package/lib/provenance/dedupe.js.map +1 -1
  122. package/lib/provenance/document-preview.js +19 -1
  123. package/lib/provenance/document-preview.js.map +1 -1
  124. package/lib/provenance/extractors.js +67 -1
  125. package/lib/provenance/extractors.js.map +1 -1
  126. package/lib/provenance/file-download.js +56 -0
  127. package/lib/provenance/file-download.js.map +1 -0
  128. package/lib/provenance/file-preview.js +12 -1
  129. package/lib/provenance/file-preview.js.map +1 -1
  130. package/lib/provenance/host-store.js +59 -10
  131. package/lib/provenance/host-store.js.map +1 -1
  132. package/lib/provenance/integration-extractor.js +63 -0
  133. package/lib/provenance/integration-extractor.js.map +1 -0
  134. package/lib/qa-tools/docs-tools.js +14 -0
  135. package/lib/qa-tools/docs-tools.js.map +1 -1
  136. package/lib/secure-session.js +37 -5
  137. package/lib/secure-session.js.map +1 -1
  138. package/lib/session-fork-host.js +157 -0
  139. package/lib/session-fork-host.js.map +1 -0
  140. package/lib/session-fork.js +34 -0
  141. package/lib/session-fork.js.map +1 -0
  142. package/lib/session-ownership.js +5 -1
  143. package/lib/session-ownership.js.map +1 -1
  144. package/lib/shared/session-lineage.js +6 -0
  145. package/lib/shared/session-lineage.js.map +1 -0
  146. package/lib/slash/draft-target.js +21 -0
  147. package/lib/slash/draft-target.js.map +1 -0
  148. package/lib/slash/remotes.js +39 -4
  149. package/lib/slash/remotes.js.map +1 -1
  150. package/lib/typert.host.js +1628 -231
  151. package/lib/typert.remote-client.d.ts +48 -1
  152. package/lib/typert.remote-client.js +1436 -193
  153. package/lib/types/access/capability-catalog.d.ts +1 -1
  154. package/lib/types/access/service.d.ts +7 -0
  155. package/lib/types/access.js +2 -0
  156. package/lib/types/access.js.map +1 -0
  157. package/lib/types/accounts/store.d.ts +1 -1
  158. package/lib/types/accounts.js +2 -0
  159. package/lib/types/accounts.js.map +1 -0
  160. package/lib/types/admin/session-log.d.ts +2 -0
  161. package/lib/types/admin.js +2 -0
  162. package/lib/types/admin.js.map +1 -0
  163. package/lib/types/agent-scope.d.ts +4 -0
  164. package/lib/types/capability.js +2 -0
  165. package/lib/types/capability.js.map +1 -0
  166. package/lib/types/chat-sharing/native-fence.d.ts +11 -0
  167. package/lib/types/chat-sharing/resources.d.ts +5 -0
  168. package/lib/types/chat-sharing/store.d.ts +28 -0
  169. package/lib/types/chat-sharing/transport.d.ts +31 -0
  170. package/lib/types/chat-sharing/turn-guard.d.ts +21 -0
  171. package/lib/types/chat-sharing/types.d.ts +25 -0
  172. package/lib/types/chat-sharing/uploads.d.ts +5 -0
  173. package/lib/types/client/QaAccountsController.d.ts +3 -0
  174. package/lib/types/client/QaConfigController.d.ts +3 -2
  175. package/lib/types/client/QaSessionController.d.ts +17 -3
  176. package/lib/types/client/QaSurface.d.ts +6 -1
  177. package/lib/types/client/account-conversation.d.ts +6 -0
  178. package/lib/types/client/account-sessions.d.ts +7 -0
  179. package/lib/types/client/account-upload.d.ts +15 -0
  180. package/lib/types/client/chat-sharing-api.d.ts +35 -0
  181. package/lib/types/client/components/QaChatSharing.d.ts +10 -0
  182. package/lib/types/client/components/QaComposer.d.ts +2 -0
  183. package/lib/types/client/components/QaFileAttachment.d.ts +3 -2
  184. package/lib/types/client/components/QaFilesPanel.d.ts +4 -1
  185. package/lib/types/client/components/QaMessage.d.ts +5 -2
  186. package/lib/types/client/components/QaWorkspaceBrowser.d.ts +8 -1
  187. package/lib/types/client/components/source-refs.d.ts +1 -0
  188. package/lib/types/client/lineage.d.ts +2 -2
  189. package/lib/types/client/notifications/notification-dispatcher.d.ts +10 -6
  190. package/lib/types/client/notifications/use-turn-notifications.d.ts +4 -0
  191. package/lib/types/client/project-session-state.d.ts +1 -0
  192. package/lib/types/client/session-admission.d.ts +2 -0
  193. package/lib/types/client/session-sources.d.ts +1 -0
  194. package/lib/types/client/turn-sources.d.ts +1 -1
  195. package/lib/types/client/types.d.ts +8 -1
  196. package/lib/types/client/workspace-download.d.ts +9 -1
  197. package/lib/types/config.js +2 -0
  198. package/lib/types/config.js.map +1 -0
  199. package/lib/types/documents.js +2 -0
  200. package/lib/types/documents.js.map +1 -0
  201. package/lib/types/enforcement/skill-resource-paths.d.ts +5 -0
  202. package/lib/types/enforcement/structured-result.d.ts +11 -0
  203. package/lib/types/expert-memory.js +2 -0
  204. package/lib/types/expert-memory.js.map +1 -0
  205. package/lib/types/index.d.ts +35 -1
  206. package/lib/types/policy.js +2 -0
  207. package/lib/types/policy.js.map +1 -0
  208. package/lib/types/prompt-notes.d.ts +2 -0
  209. package/lib/types/provenance/connectors.d.ts +4 -1
  210. package/lib/types/provenance/document-preview.d.ts +2 -0
  211. package/lib/types/provenance/extractors.d.ts +2 -0
  212. package/lib/types/provenance/file-download.d.ts +10 -0
  213. package/lib/types/provenance/host-store.d.ts +2 -0
  214. package/lib/types/provenance/integration-extractor.d.ts +5 -0
  215. package/lib/types/provenance/types.d.ts +2 -0
  216. package/lib/types/qa-tools/docs-tools.d.ts +2 -0
  217. package/lib/types/quality.js +7 -0
  218. package/lib/types/quality.js.map +1 -0
  219. package/lib/types/secure-session.d.ts +20 -1
  220. package/lib/types/session-fork-host.d.ts +27 -0
  221. package/lib/types/session-fork.d.ts +7 -0
  222. package/lib/types/session.js +2 -0
  223. package/lib/types/session.js.map +1 -0
  224. package/lib/types/shared/session-lineage.d.ts +7 -0
  225. package/lib/types/skills.js +2 -0
  226. package/lib/types/skills.js.map +1 -0
  227. package/lib/types/slash/draft-target.d.ts +7 -0
  228. package/lib/types/slash/remotes.d.ts +7 -0
  229. package/lib/types/slash.js +2 -0
  230. package/lib/types/slash.js.map +1 -0
  231. package/lib/types/types/access.d.ts +43 -0
  232. package/lib/types/types/accounts.d.ts +173 -0
  233. package/lib/types/types/admin.d.ts +286 -0
  234. package/lib/types/types/capability.d.ts +230 -0
  235. package/lib/types/types/config.d.ts +594 -0
  236. package/lib/types/types/documents.d.ts +34 -0
  237. package/lib/types/types/expert-memory.d.ts +35 -0
  238. package/lib/types/types/policy.d.ts +54 -0
  239. package/lib/types/types/quality.d.ts +100 -0
  240. package/lib/types/types/session.d.ts +382 -0
  241. package/lib/types/types/skills.d.ts +143 -0
  242. package/lib/types/types/slash.d.ts +159 -0
  243. package/lib/types/types.d.ts +13 -2180
  244. package/package.json +8 -7
@@ -0,0 +1,594 @@
1
+ import type { QaAccountIdentityField } from "./accounts.js";
2
+ import type { QaApprovalInteraction, QaApprovalPolicy, QaQuestionInteraction, QaQuestionInteractionInput, QaSandboxMode, QaSessionPolicy, QaToolActivationMode, QaToolPolicyMode } from "./policy.js";
3
+ import type { QaSlashCommandsConfig, ResolvedQaSlashCommands } from "./slash.js";
4
+ export interface QaSourcesConfig {
5
+ readonly enabled?: boolean;
6
+ /**
7
+ * How much durable provenance the deployment keeps. Every bound counts
8
+ * turns, shards or days, and zero keeps everything for that bound.
9
+ */
10
+ readonly retention?: {
11
+ readonly maxTurnsPerSession?: number;
12
+ readonly maxSessions?: number;
13
+ readonly maxAgeDays?: number;
14
+ readonly sweepIntervalMinutes?: number;
15
+ };
16
+ readonly collect?: {
17
+ readonly parentAgent?: boolean;
18
+ readonly subagents?: boolean;
19
+ readonly persistTurnEvent?: boolean;
20
+ };
21
+ readonly display?: {
22
+ readonly sidebar?: boolean;
23
+ readonly footer?: boolean;
24
+ readonly groupByKind?: boolean;
25
+ readonly showDiscovered?: boolean;
26
+ readonly showOriginBadges?: boolean;
27
+ readonly maxInitiallyVisiblePerGroup?: number;
28
+ };
29
+ readonly webSearch?: {
30
+ readonly promoteSearchResultsWithoutFetch?: boolean;
31
+ readonly maxPromotedPerSearch?: number;
32
+ };
33
+ readonly dedupe?: {
34
+ readonly normalizeUrls?: boolean;
35
+ readonly stripTrackingParams?: boolean;
36
+ readonly mergeFileRanges?: boolean;
37
+ };
38
+ readonly filePreview?: {
39
+ readonly enabled?: boolean;
40
+ readonly markdownRenderedByDefault?: boolean;
41
+ readonly allowRawToggle?: boolean;
42
+ readonly maxBytes?: number;
43
+ readonly maxMarkdownRenderBytes?: number;
44
+ readonly maxListingEntries?: number;
45
+ };
46
+ readonly subagents?: {
47
+ readonly inheritSources?: boolean;
48
+ readonly enableReportToolFallback?: boolean;
49
+ readonly markIncompleteOpaqueRuns?: boolean;
50
+ /**
51
+ * Whether a source the model writes into `qa_report_sources` must carry a
52
+ * usable path or URL. Off records the model's own type, title and snippet.
53
+ */
54
+ readonly validateReportedSources?: boolean;
55
+ };
56
+ readonly legacy?: {
57
+ readonly parseAssistantSourcesBlock?: boolean;
58
+ };
59
+ }
60
+ /**
61
+ * The ambient notes the injector writes into a QA chat as plugin-sourced user
62
+ * messages (`prompt-notes.ts`). Each note can be switched off and reworded;
63
+ * an empty template keeps the built-in wording.
64
+ */
65
+ export interface QaNotesConfig {
66
+ /** Who the assistant is talking to; `{identity}` + `{instructions}`. */
67
+ readonly identity?: {
68
+ readonly enabled?: boolean;
69
+ readonly template?: string;
70
+ };
71
+ /** Source-provenance rules; `{reportTool}` names the subagent report tool. */
72
+ readonly sources?: {
73
+ readonly enabled?: boolean;
74
+ readonly template?: string;
75
+ /** The sentence appended when the report-tool fallback is on. */
76
+ readonly fallbackTemplate?: string;
77
+ };
78
+ /** How to label background delegations; no placeholders. */
79
+ readonly delegation?: {
80
+ readonly enabled?: boolean;
81
+ readonly template?: string;
82
+ };
83
+ /** Which reader an attached office document belongs to; no placeholders. */
84
+ readonly documents?: {
85
+ readonly enabled?: boolean;
86
+ readonly template?: string;
87
+ };
88
+ /** Where an answer should come from; no placeholders. */
89
+ readonly sourcePriority?: {
90
+ readonly enabled?: boolean;
91
+ readonly template?: string;
92
+ };
93
+ }
94
+ export interface QaSurfaceConfig {
95
+ readonly enabled?: boolean;
96
+ readonly route?: {
97
+ readonly path?: string;
98
+ readonly matchChildren?: boolean;
99
+ };
100
+ readonly branding?: {
101
+ readonly title?: string;
102
+ readonly subtitle?: string;
103
+ readonly welcomeMessage?: string;
104
+ readonly placeholder?: string;
105
+ readonly logoUrl?: string | null;
106
+ /** Data-usage notice under the composer; empty string hides the plate. */
107
+ readonly disclaimer?: string | null;
108
+ };
109
+ readonly session?: {
110
+ readonly policy?: QaSessionPolicy;
111
+ readonly storageKey?: string;
112
+ /** Absolute directory pinned as the session cwd (alternative to workspaceId). */
113
+ readonly cwd?: string | null;
114
+ readonly workspaceId?: string | null;
115
+ readonly fixedSessionId?: string | null;
116
+ readonly agentPreset?: string | null;
117
+ readonly provider?: string | null;
118
+ readonly model?: string | null;
119
+ readonly reasoningEffort?: string | null;
120
+ /**
121
+ * How many chat turns the deployment answers at once. A ceiling is what a
122
+ * locally hosted model needs: the card runs out long before the queue does,
123
+ * and a third request makes every answer on the stand slower instead of
124
+ * adding capacity. 0 leaves the count unbounded, which is the default
125
+ * because a hosted model has no such ceiling.
126
+ */
127
+ readonly maxActiveRequests?: number;
128
+ };
129
+ readonly ui?: {
130
+ readonly showHeader?: boolean;
131
+ readonly showReset?: boolean;
132
+ readonly showStop?: boolean;
133
+ readonly showTimestamps?: boolean;
134
+ readonly showToolActivity?: boolean;
135
+ readonly showReasoning?: boolean;
136
+ readonly renderMarkdown?: boolean;
137
+ /** Floor for the visitor-resizable transcript/composer width; the page caps it. */
138
+ readonly minContentWidth?: number;
139
+ readonly showSessionList?: boolean;
140
+ /**
141
+ * Sign subagent completion notices with deterministic codenames
142
+ * («Дотошный Барсук») instead of the child's readable name or raw id.
143
+ */
144
+ readonly subagentCodenames?: boolean;
145
+ };
146
+ readonly suggestedQuestions?: readonly string[];
147
+ /**
148
+ * Phrases the running indicator cycles through. An empty list restores the
149
+ * built-in phrases: the indicator always carries a label.
150
+ */
151
+ readonly thinkingPhrases?: readonly string[];
152
+ readonly interaction?: {
153
+ readonly approvals?: QaApprovalInteraction;
154
+ readonly questions?: QaQuestionInteractionInput;
155
+ };
156
+ /**
157
+ * QA tool delivery. Dynamic activation keeps the QA tool schemas out of the
158
+ * model request until the activation skill has actually been loaded.
159
+ */
160
+ readonly tools?: {
161
+ /**
162
+ * `true` attaches the QA tools only after the activation skill loads;
163
+ * `false` attaches them to every managed agent at creation.
164
+ */
165
+ readonly dynamicActivation?: boolean;
166
+ /** The skill name whose successful load attaches the QA tools. */
167
+ readonly activationSkill?: string;
168
+ /** Accepted activation policy; only `all` is implemented. */
169
+ readonly activationMode?: QaToolActivationMode;
170
+ /**
171
+ * Agent presets whose sessions participate. An empty list leaves the gate
172
+ * open, which is only safe when this plugin serves one agent composition —
173
+ * name the QA preset in any deployment that composes more than one.
174
+ */
175
+ readonly activationPresets?: readonly string[];
176
+ /**
177
+ * Absolute path of the documentation tree `docs_search`/`docs_read` read.
178
+ * Leave it empty when the deployment publishes `docs/` inside each chat's
179
+ * own workspace; name it when the corpus is published once, outside every
180
+ * per-user directory, which is otherwise unreadable to those tools.
181
+ */
182
+ readonly docsRoot?: string;
183
+ /**
184
+ * Documentation version `docs_search` stays inside when the model named
185
+ * neither `version` nor `path`. A corpus carries several editions of the
186
+ * same module, and a chat asked about "the product" answers out of whichever
187
+ * edition it happened to read first; naming the stand's edition here lets a
188
+ * search default to it, and an explicit `version` or `path` still decides
189
+ * for itself.
190
+ */
191
+ readonly docsDefaultVersion?: string;
192
+ /**
193
+ * Whether `docsDefaultVersion` is applied. The value stays configured while
194
+ * the switch is off, so a stand can turn the default back on without
195
+ * retyping it.
196
+ */
197
+ readonly docsDefaultVersionEnabled?: boolean;
198
+ };
199
+ readonly lockdown?: {
200
+ readonly enabled?: boolean;
201
+ readonly enforceFixedAgentPreset?: boolean;
202
+ readonly enforceFixedWorkspace?: boolean;
203
+ readonly enforceFixedModel?: boolean;
204
+ readonly sandboxMode?: QaSandboxMode;
205
+ readonly approvalPolicy?: QaApprovalPolicy;
206
+ readonly permissionPreset?: string;
207
+ readonly allowPermissionChanges?: false;
208
+ /**
209
+ * Master switch for the slash interface, and the only capability flag the
210
+ * resolver lets a deployment turn on. It opens the palette, which then
211
+ * offers exactly what `slashCommands` admits — human commands stay denied
212
+ * until the deployment names them. Nothing here widens the tool allow-list,
213
+ * the sandbox or the approval policy.
214
+ */
215
+ readonly allowSlashCommands?: boolean;
216
+ readonly allowSettingsMutation?: false;
217
+ readonly allowSessionReset?: boolean;
218
+ readonly allowSessionRename?: false;
219
+ readonly allowSessionDelete?: false;
220
+ readonly allowArbitrarySessionOpen?: false;
221
+ readonly toolPolicy?: {
222
+ readonly mode?: QaToolPolicyMode;
223
+ readonly allow?: readonly string[];
224
+ };
225
+ /** Shared directories available to read-only filesystem tools. */
226
+ readonly sharedReadOnlyRoots?: readonly string[];
227
+ };
228
+ /**
229
+ * Slash interface policy. Admission only: the QA surface never implements a
230
+ * skill or command registry, it decides which native ones reach the palette.
231
+ * Inert while `lockdown.allowSlashCommands` is off.
232
+ */
233
+ readonly slashCommands?: QaSlashCommandsConfig;
234
+ readonly embedding?: {
235
+ readonly frameAncestors?: string | null;
236
+ };
237
+ readonly accounts?: {
238
+ /** Opt-in; the QA gate stays off until the deployment turns this on. */
239
+ readonly enabled?: boolean;
240
+ readonly allowRegistration?: boolean;
241
+ readonly sessionTtlDays?: number;
242
+ /**
243
+ * Login/registration attempts accepted per rolling minute, store-wide.
244
+ * The limit backs the password checks, so the default stays tight.
245
+ */
246
+ readonly maxAuthAttemptsPerMinute?: number;
247
+ /**
248
+ * What happens to ownership records of chats the Harness no longer knows.
249
+ * A record is a chat's auth boundary, so only vanished chats are ever
250
+ * swept, and only after `ownershipGraceHours`.
251
+ */
252
+ readonly retention?: {
253
+ readonly pruneVanishedSessions?: boolean;
254
+ readonly ownershipGraceHours?: number;
255
+ readonly sweepIntervalMinutes?: number;
256
+ };
257
+ /** Let admins see chats owned by other QA accounts. */
258
+ readonly showOtherUsersChats?: boolean;
259
+ /**
260
+ * Give every account a private cwd below the configured workspaceId.
261
+ * The child directory is not registered as a separate DSH workspace.
262
+ */
263
+ readonly perUserWorkspace?: boolean;
264
+ /**
265
+ * Personal Skills: the user's own `.dsh/skills` below their QA workspace,
266
+ * surfaced through a skill provider this plugin owns.
267
+ */
268
+ readonly skills?: {
269
+ readonly enabled?: boolean;
270
+ /** Directory below the personal root; relative, never escaping it. */
271
+ readonly relativeRoot?: string;
272
+ /** Follow manual file edits and refresh the DSH catalog. */
273
+ readonly watch?: boolean;
274
+ readonly maxSkillBytes?: number;
275
+ /** Reserved for the resource editor; v1 edits SKILL.md only. */
276
+ readonly allowResourceEditing?: boolean;
277
+ };
278
+ /** Self-declared profile: storage, the owner's form, and prompt injection. */
279
+ readonly profile?: {
280
+ readonly enabled?: boolean;
281
+ /** Render the profile into the QA agent's system prompt. */
282
+ readonly inject?: boolean;
283
+ /** External systems to collect a handle for; empty declares none. */
284
+ readonly identities?: readonly {
285
+ readonly key?: string;
286
+ readonly label?: string;
287
+ }[];
288
+ /** Character cap on the user's free-form agent guidance. */
289
+ readonly instructionsMaxLength?: number;
290
+ };
291
+ /** Per-account starter buttons above an empty composer. */
292
+ readonly starters?: {
293
+ readonly enabled?: boolean;
294
+ };
295
+ };
296
+ readonly entry?: {
297
+ /** Inject the root → /qa redirect for non-loopback hostnames. */
298
+ readonly redirectNonLoopback?: boolean;
299
+ /** Cookie-less /qa navigations go through the one-time ?token= exchange. */
300
+ readonly cookieBootstrap?: boolean;
301
+ };
302
+ /** Notices for a turn that ended in one of this browser's own chats. */
303
+ readonly notifications?: {
304
+ /** Master switch: with it off no channel raises anything. */
305
+ readonly enabled?: boolean;
306
+ /**
307
+ * Allow the desktop (operating-system) channel on this stand at all.
308
+ * A reader's own choice only applies while this is on: it is the answer
309
+ * for a shared laptop, where a personal notice is everybody's notice.
310
+ */
311
+ readonly allowOs?: boolean;
312
+ };
313
+ readonly sources?: QaSourcesConfig;
314
+ readonly attachments?: QaAttachmentsConfig;
315
+ readonly notes?: QaNotesConfig;
316
+ readonly integration?: QaIntegrationConfig;
317
+ }
318
+ /**
319
+ * The HTTP API an external application (the ticket bridge) uses to ask
320
+ * questions and read its own conversations back: `POST {basePath}/ask`,
321
+ * `GET {basePath}/session` and `GET {basePath}/health`, authenticated with an
322
+ * account's integration token. Off unless a deployment asks for it.
323
+ */
324
+ export interface QaIntegrationConfig {
325
+ /** Serve the API at all. Requires accounts; off by default. */
326
+ readonly enabled?: boolean;
327
+ /** Route namespace; the endpoints all hang off it. */
328
+ readonly basePath?: string;
329
+ /** Default lifetime of a minted integration token, in days. */
330
+ readonly tokenTtlDays?: number;
331
+ /**
332
+ * Wall-clock budget for one question. The endpoint answers within it — with
333
+ * an escalation when the turn is still running — because the caller's own
334
+ * timeout is a fixed part of the contract.
335
+ */
336
+ readonly requestTimeoutMs?: number;
337
+ /** Questions answered at the same time, deployment wide. */
338
+ readonly maxConcurrent?: number;
339
+ /** Requests one token may make per rolling minute. */
340
+ readonly requestsPerMinute?: number;
341
+ /** Ceiling on one request body, in bytes. */
342
+ readonly maxRequestBytes?: number;
343
+ /** Ceiling on one inline image attachment, in bytes. */
344
+ readonly maxAttachmentBytes?: number;
345
+ /**
346
+ * Ceiling on the published answer, in characters. The caller posts it into a
347
+ * ticket comment, whose own budget is smaller than a model's answer, and a
348
+ * cut made here at a paragraph boundary is readable where the caller's own
349
+ * silent truncation is not.
350
+ */
351
+ readonly maxAnswerCharacters?: number;
352
+ }
353
+ /** What a QA visitor may attach to one message. */
354
+ export interface QaAttachmentsConfig {
355
+ /** Offer text files (md, txt, log, …) next to images; off = images only. */
356
+ readonly textFiles?: boolean;
357
+ /**
358
+ * Line count above which pasted plain text becomes an attached file instead
359
+ * of landing in the input field. Zero never converts.
360
+ */
361
+ readonly pastedTextLines?: number;
362
+ /** Byte ceiling for one attached file; the composer refuses anything larger. */
363
+ readonly maxFileBytes?: number;
364
+ /**
365
+ * Pending attachments (images plus text files) allowed on one message. The
366
+ * Host keeps its own authority over assembled image batches.
367
+ */
368
+ readonly maxPending?: number;
369
+ /** Accepted text-file extensions, lowercase and without the dot. */
370
+ readonly extensions?: readonly string[];
371
+ }
372
+ export interface ResolvedQaSurfaceConfig {
373
+ readonly enabled: boolean;
374
+ readonly route: {
375
+ readonly path: string;
376
+ readonly matchChildren: boolean;
377
+ };
378
+ readonly branding: {
379
+ readonly title: string;
380
+ readonly subtitle: string;
381
+ readonly welcomeMessage: string;
382
+ readonly placeholder: string;
383
+ readonly logoUrl: string | null;
384
+ readonly disclaimer: string;
385
+ };
386
+ readonly session: {
387
+ readonly policy: QaSessionPolicy;
388
+ readonly storageKey: string;
389
+ readonly cwd: string | null;
390
+ readonly workspaceId: string | null;
391
+ readonly fixedSessionId: string | null;
392
+ readonly agentPreset: string | null;
393
+ readonly provider: string | null;
394
+ readonly model: string | null;
395
+ readonly reasoningEffort: string | null;
396
+ readonly maxActiveRequests: number;
397
+ };
398
+ readonly ui: {
399
+ readonly showHeader: boolean;
400
+ readonly showReset: boolean;
401
+ readonly showStop: boolean;
402
+ readonly showTimestamps: boolean;
403
+ readonly showToolActivity: boolean;
404
+ readonly showReasoning: boolean;
405
+ readonly renderMarkdown: boolean;
406
+ readonly minContentWidth: number;
407
+ readonly showSessionList: boolean;
408
+ readonly subagentCodenames: boolean;
409
+ };
410
+ readonly suggestedQuestions: readonly string[];
411
+ readonly thinkingPhrases: readonly string[];
412
+ readonly interaction: {
413
+ readonly approvals: QaApprovalInteraction;
414
+ readonly questions: QaQuestionInteraction;
415
+ };
416
+ readonly lockdown: {
417
+ readonly enabled: boolean;
418
+ readonly enforceFixedAgentPreset: boolean;
419
+ readonly enforceFixedWorkspace: boolean;
420
+ readonly enforceFixedModel: boolean;
421
+ readonly sandboxMode: QaSandboxMode;
422
+ readonly approvalPolicy: QaApprovalPolicy;
423
+ readonly permissionPreset: string;
424
+ readonly allowPermissionChanges: false;
425
+ readonly allowSlashCommands: boolean;
426
+ readonly allowSettingsMutation: false;
427
+ readonly allowSessionReset: boolean;
428
+ readonly allowSessionRename: false;
429
+ readonly allowSessionDelete: false;
430
+ readonly allowArbitrarySessionOpen: false;
431
+ readonly toolPolicy: {
432
+ readonly mode: QaToolPolicyMode;
433
+ readonly allow: readonly string[];
434
+ };
435
+ readonly sharedReadOnlyRoots: readonly string[];
436
+ };
437
+ readonly slashCommands: ResolvedQaSlashCommands;
438
+ readonly embedding: {
439
+ readonly frameAncestors: string | null;
440
+ };
441
+ readonly accounts: {
442
+ readonly enabled: boolean;
443
+ readonly allowRegistration: boolean;
444
+ readonly sessionTtlDays: number;
445
+ /** Login/registration attempts accepted per rolling minute, store-wide. */
446
+ readonly maxAuthAttemptsPerMinute: number;
447
+ readonly showOtherUsersChats: boolean;
448
+ readonly perUserWorkspace: boolean;
449
+ readonly retention: {
450
+ readonly pruneVanishedSessions: boolean;
451
+ readonly ownershipGraceHours: number;
452
+ readonly sweepIntervalMinutes: number;
453
+ };
454
+ readonly profile: {
455
+ readonly enabled: boolean;
456
+ readonly inject: boolean;
457
+ readonly identities: readonly QaAccountIdentityField[];
458
+ readonly instructionsMaxLength: number;
459
+ };
460
+ /** Per-account starter buttons above an empty composer. */
461
+ readonly starters: {
462
+ readonly enabled: boolean;
463
+ };
464
+ /**
465
+ * Personal Skills. Resolution turns the flag off on any deployment that
466
+ * cannot give every account its own directory: the storage root is the
467
+ * account's own workspace, so there is no safe shared fallback.
468
+ */
469
+ skills: {
470
+ readonly enabled: boolean;
471
+ readonly relativeRoot: string;
472
+ readonly watch: boolean;
473
+ readonly maxSkillBytes: number;
474
+ readonly allowResourceEditing: boolean;
475
+ };
476
+ };
477
+ readonly entry: {
478
+ readonly redirectNonLoopback: boolean;
479
+ readonly cookieBootstrap: boolean;
480
+ };
481
+ /** Channels a finished turn of this browser's own chats may use. */
482
+ readonly notifications: {
483
+ readonly enabled: boolean;
484
+ readonly allowOs: boolean;
485
+ };
486
+ readonly tools: {
487
+ readonly dynamicActivation: boolean;
488
+ readonly activationSkill: string;
489
+ readonly activationMode: QaToolActivationMode;
490
+ readonly activationPresets: readonly string[];
491
+ /**
492
+ * Absolute documentation root the QA catalogue reads, or `""` for the
493
+ * `docs/` directory inside each chat's own workspace.
494
+ */
495
+ readonly docsRoot: string;
496
+ /**
497
+ * Version a search without `version` and without `path` stays inside, or
498
+ * `""` for a search across every edition the corpus carries.
499
+ */
500
+ readonly docsDefaultVersion: string;
501
+ /** Whether the deployment's default version is in force. */
502
+ readonly docsDefaultVersionEnabled: boolean;
503
+ };
504
+ readonly sources: {
505
+ readonly enabled: boolean;
506
+ readonly retention: {
507
+ readonly maxTurnsPerSession: number;
508
+ readonly maxSessions: number;
509
+ readonly maxAgeDays: number;
510
+ readonly sweepIntervalMinutes: number;
511
+ };
512
+ readonly collect: {
513
+ readonly parentAgent: boolean;
514
+ readonly subagents: boolean;
515
+ readonly persistTurnEvent: boolean;
516
+ };
517
+ readonly display: {
518
+ readonly sidebar: boolean;
519
+ readonly footer: boolean;
520
+ readonly groupByKind: boolean;
521
+ readonly showDiscovered: boolean;
522
+ readonly showOriginBadges: boolean;
523
+ readonly maxInitiallyVisiblePerGroup: number;
524
+ };
525
+ readonly webSearch: {
526
+ readonly promoteSearchResultsWithoutFetch: boolean;
527
+ readonly maxPromotedPerSearch: number;
528
+ };
529
+ readonly dedupe: {
530
+ readonly normalizeUrls: boolean;
531
+ readonly stripTrackingParams: boolean;
532
+ readonly mergeFileRanges: boolean;
533
+ };
534
+ readonly filePreview: {
535
+ readonly enabled: boolean;
536
+ readonly markdownRenderedByDefault: boolean;
537
+ readonly allowRawToggle: boolean;
538
+ readonly maxBytes: number;
539
+ readonly maxMarkdownRenderBytes: number;
540
+ readonly maxListingEntries: number;
541
+ };
542
+ readonly subagents: {
543
+ readonly inheritSources: boolean;
544
+ readonly enableReportToolFallback: boolean;
545
+ readonly markIncompleteOpaqueRuns: boolean;
546
+ readonly validateReportedSources: boolean;
547
+ };
548
+ readonly legacy: {
549
+ readonly parseAssistantSourcesBlock: boolean;
550
+ };
551
+ };
552
+ readonly attachments: {
553
+ readonly textFiles: boolean;
554
+ readonly pastedTextLines: number;
555
+ readonly maxFileBytes: number;
556
+ readonly maxPending: number;
557
+ readonly extensions: readonly string[];
558
+ };
559
+ readonly notes: {
560
+ readonly identity: {
561
+ readonly enabled: boolean;
562
+ readonly template: string;
563
+ };
564
+ readonly sources: {
565
+ readonly enabled: boolean;
566
+ readonly template: string;
567
+ readonly fallbackTemplate: string;
568
+ };
569
+ readonly delegation: {
570
+ readonly enabled: boolean;
571
+ readonly template: string;
572
+ };
573
+ readonly documents: {
574
+ readonly enabled: boolean;
575
+ readonly template: string;
576
+ };
577
+ readonly sourcePriority: {
578
+ readonly enabled: boolean;
579
+ readonly template: string;
580
+ };
581
+ };
582
+ readonly integration: {
583
+ readonly enabled: boolean;
584
+ readonly basePath: string;
585
+ readonly tokenTtlDays: number;
586
+ readonly requestTimeoutMs: number;
587
+ readonly maxConcurrent: number;
588
+ readonly requestsPerMinute: number;
589
+ readonly maxRequestBytes: number;
590
+ readonly maxAttachmentBytes: number;
591
+ readonly maxAnswerCharacters: number;
592
+ };
593
+ }
594
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1,34 @@
1
+ /**
2
+ * A file the agent produced during the turn an answer belongs to.
3
+ *
4
+ * An artifact has no attachment-store handle: it lives in the chat's own
5
+ * workspace, so the card addresses it by the workspace-relative name the
6
+ * producing tool reported — the spelling the Host's workspace reads take, and
7
+ * the only spelling that cannot publish the directory the deployment keeps
8
+ * this account's workspace in.
9
+ */
10
+ export interface QaArtifactView {
11
+ readonly workflow?: {
12
+ readonly id: string;
13
+ readonly revision: number;
14
+ readonly sha256: string;
15
+ readonly status: string;
16
+ };
17
+ /** Workspace-relative path; the identifier every workspace read takes. */
18
+ readonly path: string;
19
+ /** Last path segment, which is what the card is signed with. */
20
+ readonly name: string;
21
+ /** Format the producing tool reported: `docx`, `pdf` or `md`. */
22
+ readonly format: string;
23
+ /** Bytes as the tool reported them; null when it reported no size. */
24
+ readonly bytes: number | null;
25
+ }
26
+ /** Compact, authenticated state used by the approval action beside a draft. */
27
+ export interface QaDocumentWorkflowStatus {
28
+ readonly id: string;
29
+ readonly revision: number;
30
+ readonly status: string;
31
+ readonly sha256: string | null;
32
+ readonly blockers: readonly string[];
33
+ }
34
+ //# sourceMappingURL=documents.d.ts.map
@@ -0,0 +1,35 @@
1
+ /**
2
+ * One memory namespace as the console lists it: which expert it belongs to and
3
+ * whether it takes writes. `access` comes from the expert's own definition, so
4
+ * a shared carrier shows up as what its owner declared rather than as whatever
5
+ * the browser guessed.
6
+ */
7
+ export interface QaExpertMemoryScope {
8
+ readonly domainId: string;
9
+ readonly domainName: string;
10
+ readonly namespace: string;
11
+ readonly access: "read-write" | "read-only";
12
+ readonly records: number;
13
+ }
14
+ /** One line an expert recorded. */
15
+ export interface QaExpertMemoryRecord {
16
+ readonly namespace: string;
17
+ readonly key: string;
18
+ readonly text: string;
19
+ readonly tags: readonly string[];
20
+ readonly createdAt: number;
21
+ readonly updatedAt: number;
22
+ }
23
+ /** One page of a namespace, with the count the filter matched. */
24
+ export interface QaExpertMemoryPage {
25
+ readonly records: readonly QaExpertMemoryRecord[];
26
+ readonly total: number;
27
+ readonly offset: number;
28
+ readonly limit: number;
29
+ }
30
+ /** What an operator says a record should hold. The key never moves. */
31
+ export interface QaExpertMemoryDraft {
32
+ readonly text: string;
33
+ readonly tags: readonly string[];
34
+ }
35
+ //# sourceMappingURL=expert-memory.d.ts.map