@yadsh/dsh-qa-surface 0.15.7 → 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 (243) 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 +57 -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 +3329 -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 +397 -14
  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 +9 -3
  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 +1633 -236
  151. package/lib/typert.remote-client.d.ts +48 -1
  152. package/lib/typert.remote-client.js +1477 -234
  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/session-fork-host.d.ts +27 -0
  220. package/lib/types/session-fork.d.ts +7 -0
  221. package/lib/types/session.js +2 -0
  222. package/lib/types/session.js.map +1 -0
  223. package/lib/types/shared/session-lineage.d.ts +7 -0
  224. package/lib/types/skills.js +2 -0
  225. package/lib/types/skills.js.map +1 -0
  226. package/lib/types/slash/draft-target.d.ts +7 -0
  227. package/lib/types/slash/remotes.d.ts +7 -0
  228. package/lib/types/slash.js +2 -0
  229. package/lib/types/slash.js.map +1 -0
  230. package/lib/types/types/access.d.ts +43 -0
  231. package/lib/types/types/accounts.d.ts +173 -0
  232. package/lib/types/types/admin.d.ts +286 -0
  233. package/lib/types/types/capability.d.ts +230 -0
  234. package/lib/types/types/config.d.ts +594 -0
  235. package/lib/types/types/documents.d.ts +34 -0
  236. package/lib/types/types/expert-memory.d.ts +35 -0
  237. package/lib/types/types/policy.d.ts +54 -0
  238. package/lib/types/types/quality.d.ts +100 -0
  239. package/lib/types/types/session.d.ts +382 -0
  240. package/lib/types/types/skills.d.ts +143 -0
  241. package/lib/types/types/slash.d.ts +159 -0
  242. package/lib/types/types.d.ts +13 -2180
  243. package/package.json +8 -7
@@ -0,0 +1,159 @@
1
+ import type { QaImageMediaType } from "./session.js";
2
+ /** Which native registry one unified entry came from. */
3
+ export type QaSlashEntryKind = "skill" | "command";
4
+ /** How one half of the catalog admits native entries. */
5
+ export type QaSlashPolicyMode = "deny-all" | "allow-list" | "all";
6
+ export interface QaSlashPolicyConfig {
7
+ readonly mode?: QaSlashPolicyMode;
8
+ readonly allow?: readonly string[];
9
+ }
10
+ export interface QaSlashPaletteConfig {
11
+ readonly enabled?: boolean;
12
+ /** Run the two weakest matcher rungs (substring, subsequence). */
13
+ readonly fuzzySearch?: boolean;
14
+ readonly maxVisible?: number;
15
+ readonly showDescriptions?: boolean;
16
+ readonly showKindBadge?: boolean;
17
+ }
18
+ export interface QaSlashCommandsConfig {
19
+ readonly skills?: QaSlashPolicyConfig;
20
+ readonly commands?: QaSlashPolicyConfig;
21
+ readonly palette?: QaSlashPaletteConfig;
22
+ }
23
+ export interface ResolvedQaSlashCommands {
24
+ /** Mirror of `lockdown.allowSlashCommands`; the one master switch. */
25
+ readonly enabled: boolean;
26
+ readonly skills: {
27
+ readonly mode: QaSlashPolicyMode;
28
+ readonly allow: readonly string[];
29
+ };
30
+ readonly commands: {
31
+ readonly mode: QaSlashPolicyMode;
32
+ readonly allow: readonly string[];
33
+ };
34
+ readonly palette: {
35
+ readonly enabled: boolean;
36
+ readonly fuzzySearch: boolean;
37
+ readonly maxVisible: number;
38
+ readonly showDescriptions: boolean;
39
+ readonly showKindBadge: boolean;
40
+ };
41
+ /**
42
+ * True when the deployment turned the master switch on without declaring a
43
+ * `slashCommands` section: skills then admit every user-invocable skill the
44
+ * session already exposes, commands stay denied. The Host logs it once, so
45
+ * an upgrade cannot silently widen anything.
46
+ */
47
+ readonly legacyDefaults: boolean;
48
+ }
49
+ /**
50
+ * One palette row. `id` is the routing identity: skill and command may share a
51
+ * name, so identity is `skill:<name>` or `command:<name>` and never the bare
52
+ * name the two halves would collide on.
53
+ */
54
+ export interface QaSlashCatalogEntry {
55
+ readonly id: string;
56
+ readonly kind: QaSlashEntryKind;
57
+ readonly name: string;
58
+ readonly description: string;
59
+ /** Skill-only: the native `whenToUse`, rendered as secondary copy. */
60
+ readonly whenToUse?: string;
61
+ /** Skill-only: whether the model is also offered this skill. */
62
+ readonly modelInvocable?: boolean;
63
+ /** Command-only: the advertised argument shape. */
64
+ readonly inputHint?: string;
65
+ /** Command-only: whether the executor admits composer attachments. */
66
+ readonly acceptsAttachments?: boolean;
67
+ }
68
+ /**
69
+ * Whether the command half of the catalog could be read. `inactive` is the
70
+ * ordinary state of a cold chat: the native command registry resolves through
71
+ * a live Agent, and a chat with none answers with no commands rather than an
72
+ * error — the palette then offers skills alone.
73
+ */
74
+ export type QaSlashCommandSurface = "ready" | "unavailable" | "inactive";
75
+ export interface QaSlashCatalog {
76
+ /** False while `lockdown.allowSlashCommands` is off. */
77
+ readonly enabled: boolean;
78
+ readonly entries: readonly QaSlashCatalogEntry[];
79
+ readonly commandSurface: QaSlashCommandSurface;
80
+ /**
81
+ * User-invocable skills of this chat that the deployment or the chat's role
82
+ * withheld from the palette. Naming them is what lets the browser warn about
83
+ * a `/name` typed inside an ordinary prompt — the native gesture path never
84
+ * consults this list, so it is a courtesy, not an authorization.
85
+ */
86
+ readonly deniedSkills: readonly string[];
87
+ }
88
+ /**
89
+ * One composer attachment offered to a human command. The same two shapes the
90
+ * prompt path uses — an image rides inline, a file rides its staged receipt —
91
+ * because the native executor admits both through one attachment store.
92
+ */
93
+ export type QaSlashSubmitAttachment = {
94
+ readonly type: "image";
95
+ readonly mediaType: QaImageMediaType;
96
+ readonly data: string;
97
+ readonly name?: string;
98
+ } | {
99
+ readonly type: "file";
100
+ readonly receiptId: string;
101
+ };
102
+ /** Why a command line was refused before, or instead of, running. */
103
+ export type QaSlashRefusal = "slash-disabled" | "unknown-command" | "not-allowed" | "attachments-unsupported" | "inactive-session";
104
+ export type QaSlashCommandOutcome = {
105
+ readonly kind: "success";
106
+ readonly text?: string;
107
+ /** Earlier authoritative event this result is presented from. */
108
+ readonly sourceEventSeq?: number;
109
+ } | {
110
+ readonly kind: "error";
111
+ readonly text: string;
112
+ };
113
+ /**
114
+ * The result of one admitted command. `refused` is an admission decision and
115
+ * costs nothing; `executed` means the native runtime ran the handler and the
116
+ * lifecycle is already in the session log, which is what the transcript row
117
+ * projects.
118
+ */
119
+ export type QaSlashExecution = {
120
+ readonly kind: "executed";
121
+ readonly commandId: string;
122
+ readonly outcome: QaSlashCommandOutcome;
123
+ } | {
124
+ readonly kind: "refused";
125
+ readonly reason: QaSlashRefusal;
126
+ /** Host-authored detail; the browser renders its own copy for `reason`. */
127
+ readonly message: string;
128
+ };
129
+ /** One entry of the palette the browser is filtering. */
130
+ export interface QaSlashView {
131
+ readonly enabled: boolean;
132
+ readonly state: "idle" | "loading" | "ready" | "error";
133
+ readonly entries: readonly QaSlashCatalogEntry[];
134
+ readonly commandSurface: QaSlashCommandSurface;
135
+ readonly deniedSkills: readonly string[];
136
+ /** Set when the catalog could not be read; ordinary prompts keep working. */
137
+ readonly error: string | null;
138
+ /**
139
+ * Bumped when the surface must re-open a palette the user had dismissed —
140
+ * an ambiguous `/name` is the case that needs it. The composer watches the
141
+ * counter rather than the message, so a refusal can be re-stated.
142
+ */
143
+ readonly reopen: number;
144
+ }
145
+ /**
146
+ * One human command line projected into the transcript. Commands never enter
147
+ * the model conversation, so this row is their only visible trace; it is a
148
+ * control row, not an assistant bubble.
149
+ */
150
+ export interface QaCommandActivity {
151
+ readonly commandId: string;
152
+ readonly name: string;
153
+ /** Verbatim text after the name, with its separator whitespace removed. */
154
+ readonly args?: string;
155
+ readonly state: "running" | "success" | "error";
156
+ readonly resultText?: string;
157
+ readonly sourceEventSeq?: number;
158
+ }
159
+ //# sourceMappingURL=slash.d.ts.map