@aleph-alpha/lib-mcp 2.1.0 → 2.2.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.
@@ -103,6 +103,142 @@
103
103
  ],
104
104
  "_autoGenerated": true
105
105
  },
106
+ "CkFeedbackButton": {
107
+ "description": "Binary thumbs up / thumbs down feedback control for assistant messages. Fully prop-driven: the host application owns the selection and lock state and decides when (or if) to persist it to a backend. Labels default to those provided by `useChatKitLabels` (which can be translated via `provideChatKitLabels`). The `ariaLabel*` props override the injected labels on a per-instance basis when set.",
108
+ "category": "Feedback",
109
+ "useCases": [
110
+ "like or dislike an assistant reply",
111
+ "collect binary message rating",
112
+ "lock feedback after submission",
113
+ "rate AI response"
114
+ ],
115
+ "keywords": [
116
+ "feedback",
117
+ "thumbs up",
118
+ "thumbs down",
119
+ "like",
120
+ "dislike",
121
+ "rating",
122
+ "vote",
123
+ "action",
124
+ "message",
125
+ "button"
126
+ ],
127
+ "related": [
128
+ "CkMessageActionButton",
129
+ "CkCopyMessageActionButton",
130
+ "CkAgentMessage",
131
+ "CkConversation"
132
+ ],
133
+ "props": [
134
+ "value",
135
+ "locked",
136
+ "disabled",
137
+ "ariaLabelThumbsUp",
138
+ "ariaLabelThumbsDown",
139
+ "ariaLabelGroup"
140
+ ],
141
+ "examples": [
142
+ "Default",
143
+ "SelectedUp",
144
+ "SelectedDown",
145
+ "Locked",
146
+ "Disabled",
147
+ "SubmitOnSelect"
148
+ ],
149
+ "_autoGenerated": true
150
+ },
151
+ "CkFeedbackDialog": {
152
+ "description": "Modal dialog for collecting qualitative feedback on an assistant response. Opened after a binary thumbs-up / thumbs-down click (see `CkFeedbackButton`), it lets the user pick a single reason code and add an optional free-text comment, then submit both alongside the original sentiment. One reason per submission: the backend (feedback-kit) stores a single `reason` enum per response, so the dialog is single-select by design. Fully prop-driven: the host application owns `open`, the list of reasons to show (fetched from `GET /feedback/config`), the response text to display, and the submission handler. The component only manages transient form state (the selected reason and free-text value) until the user submits or cancels. capture a free-text comment, drive a two-step rating flow rating, comment CkConversation, UiDialog, UiToggleGroup",
153
+ "category": "Feedback",
154
+ "useCases": [
155
+ "collect qualitative feedback",
156
+ "gather a reason code for a response"
157
+ ],
158
+ "keywords": [
159
+ "feedback",
160
+ "dialog",
161
+ "modal",
162
+ "reason codes",
163
+ "free text",
164
+ "qualitative"
165
+ ],
166
+ "related": [
167
+ "CkFeedbackButton",
168
+ "CkMessageActionButton",
169
+ "CkAgentMessage"
170
+ ],
171
+ "props": [
172
+ "open",
173
+ "sentiment",
174
+ "responseText",
175
+ "reasons",
176
+ "maxFreeTextLength",
177
+ "submitting",
178
+ "disabled",
179
+ "titlePositive",
180
+ "titleNegative",
181
+ "responseHeading",
182
+ "description",
183
+ "otherLabel",
184
+ "otherTooltip",
185
+ "freeTextPlaceholder",
186
+ "cancelLabel",
187
+ "submitLabel"
188
+ ],
189
+ "examples": [
190
+ "Positive",
191
+ "Negative",
192
+ "NoResponseColumn",
193
+ "Submitting",
194
+ "WithFeedbackButton"
195
+ ],
196
+ "_autoGenerated": true
197
+ },
198
+ "CkFileItemsList": {
199
+ "description": "Horizontal list of file attachments; collapses to a popover once the count exceeds `maxInline`.",
200
+ "category": "Form Inputs",
201
+ "useCases": [
202
+ "user message attachments",
203
+ "prompt input previews",
204
+ "chat file row"
205
+ ],
206
+ "keywords": [
207
+ "files",
208
+ "attachments",
209
+ "file list",
210
+ "popover",
211
+ "chat",
212
+ "file",
213
+ "items",
214
+ "list"
215
+ ],
216
+ "related": [
217
+ "UiFileItem",
218
+ "UiPopover"
219
+ ],
220
+ "props": [
221
+ "files",
222
+ "maxInline",
223
+ "size",
224
+ "isRemovable",
225
+ "removeLabel",
226
+ "disabled",
227
+ "triggerLabel",
228
+ "triggerAriaLabel",
229
+ "listLabel",
230
+ "popoverClass"
231
+ ],
232
+ "examples": [
233
+ "Inline",
234
+ "Collapsed",
235
+ "Removable",
236
+ "CustomItem",
237
+ "Clickable",
238
+ "Disabled"
239
+ ],
240
+ "_autoGenerated": true
241
+ },
106
242
  "CkHistoryItem": {
107
243
  "description": "A single chat history entry with title, optional meta line, active indicator, and a trailing action control (plain button or popover). Sidebar-agnostic: can be used anywhere, not only inside a sidebar.",
108
244
  "category": "Actions",
@@ -443,6 +579,7 @@
443
579
  ],
444
580
  "examples": [
445
581
  "Default",
582
+ "ChainOfThought",
446
583
  "WithIcon",
447
584
  "WithCustomAvatarFallback",
448
585
  "NoIcon",
@@ -62,14 +62,26 @@
62
62
  "_autoGenerated": true
63
63
  },
64
64
  "UiAlertDialog": {
65
- "description": "Root alert dialog. Uses core **`Dialog`** (`components/core/dialog/Dialog.vue` → **`DialogRoot`**) with **`modal: true`** Root uses core **`Dialog`** with modal enabled. Subcomponents use **`UiAlertDialog*`** / alert **`DialogContent`** for **`alertdialog`** semantics. Use **`v-model:model`** for controlled mode (unlike **`UiDialog`**, which uses **`v-model:open`**).",
66
- "category": "Uncategorized",
67
- "useCases": [],
65
+ "description": "A modal dialog for confirmations that interrupt the user. Use for destructive actions, important decisions, or critical confirmations.",
66
+ "category": "Overlays",
67
+ "useCases": [
68
+ "confirm delete",
69
+ "destructive action",
70
+ "important confirmation",
71
+ "warning"
72
+ ],
68
73
  "keywords": [
69
74
  "alert",
70
- "dialog"
75
+ "dialog",
76
+ "modal",
77
+ "confirm",
78
+ "warning",
79
+ "destructive",
80
+ "popup"
81
+ ],
82
+ "related": [
83
+ "UiPopover"
71
84
  ],
72
- "related": [],
73
85
  "props": [],
74
86
  "examples": [
75
87
  "Default",
@@ -78,6 +90,40 @@
78
90
  ],
79
91
  "_autoGenerated": true
80
92
  },
93
+ "UiAutocomplete": {
94
+ "description": "Beta: Filterable select input for choosing one or many options. This component is currently beta. Its API and behavior may still change before it is considered stable.",
95
+ "category": "Form Inputs",
96
+ "useCases": [
97
+ "autocomplete",
98
+ "searchable select",
99
+ "multi select",
100
+ "command picker"
101
+ ],
102
+ "keywords": [
103
+ "autocomplete",
104
+ "combobox",
105
+ "select",
106
+ "search",
107
+ "filter",
108
+ "multi-select",
109
+ "beta"
110
+ ],
111
+ "related": [
112
+ "UiSelect",
113
+ "UiTagsInput",
114
+ "UiListbox"
115
+ ],
116
+ "props": [],
117
+ "examples": [
118
+ "Default",
119
+ "Multiple",
120
+ "WithSlots",
121
+ "WithBadges",
122
+ "WithCheckboxes",
123
+ "WithExternalItems"
124
+ ],
125
+ "_autoGenerated": true
126
+ },
81
127
  "UiAvatar": {
82
128
  "description": "A circular image for representing users or entities. Use for profile pictures, user lists, or any person/entity representation.",
83
129
  "category": "Data Display",
@@ -102,9 +148,10 @@
102
148
  "props": [],
103
149
  "examples": [
104
150
  "Default",
151
+ "Sizes",
105
152
  "Fallback",
106
153
  "Multiple",
107
- "Stacked"
154
+ "AvatarGroup"
108
155
  ],
109
156
  "_autoGenerated": true
110
157
  },
@@ -205,6 +252,7 @@
205
252
  "WithIconSlot",
206
253
  "AsChild",
207
254
  "AllVariants",
255
+ "DisabledHoverBleed",
208
256
  "IconSizes",
209
257
  "AllVariantsAndSizes"
210
258
  ],
@@ -633,12 +681,15 @@
633
681
  "upload",
634
682
  "attachment",
635
683
  "progress",
684
+ "success",
685
+ "error",
636
686
  "item"
637
687
  ],
638
688
  "related": [
639
689
  "UiFileUploadBox",
640
690
  "UiItem",
641
- "UiButton"
691
+ "UiButton",
692
+ "UiProgress"
642
693
  ],
643
694
  "props": [
644
695
  "filename",
@@ -647,24 +698,64 @@
647
698
  "progress",
648
699
  "error",
649
700
  "removeLabel",
650
- "disabled"
701
+ "progressLabel",
702
+ "removable",
703
+ "disabled",
704
+ "size",
705
+ "mediaTone",
706
+ "mediaIcon"
651
707
  ],
652
708
  "examples": [
653
709
  "Default",
654
- "WithProgress",
655
- "Complete",
656
- "WithError",
710
+ "DefaultWithProgress",
711
+ "DefaultSuccess",
712
+ "DefaultError",
713
+ "SmallWithProgress",
714
+ "SmallSuccess",
715
+ "SmallError",
716
+ "NonRemovable",
657
717
  "Disabled",
658
- "DisabledWithError",
659
- "ProgressAndError",
660
- "FilenameOnly",
661
- "AllStates"
718
+ "AllVariants"
719
+ ],
720
+ "_autoGenerated": true
721
+ },
722
+ "UiFileType": {
723
+ "description": "Round 32×32 badge that visualises a file type with a tone + icon. Mirrors the Figma `Filetype` component (`AA26 / File Upload / Filetype`, node id `26438:42144`): - `Type=Text` (`pdf` / `doc` / `docx` / `txt` / `rtf`) → `accent-pink` + `file` - `Type=Markdown` (`html` / `htm` / `md` / `mdx`) → `accent-soft` + `code-xml` - `Type=Tabular` (`csv` / `tsv` / `xls` / `xlsx`) → `accent-yellow` + `table-2` - everything else → `default` + `file`",
724
+ "category": "Data Display",
725
+ "useCases": [
726
+ "file-type indicator",
727
+ "attachment badge"
728
+ ],
729
+ "keywords": [
730
+ "file",
731
+ "badge",
732
+ "attachment",
733
+ "filetype",
734
+ "icon",
735
+ "type"
736
+ ],
737
+ "related": [
738
+ "UiFileItem",
739
+ "UiFileUploadBox"
740
+ ],
741
+ "props": [
742
+ "filename",
743
+ "tone",
744
+ "icon",
745
+ "error",
746
+ "loading"
747
+ ],
748
+ "examples": [
749
+ "Default",
750
+ "ErrorState",
751
+ "AllTypes",
752
+ "ToneOverrides"
662
753
  ],
663
754
  "_autoGenerated": true
664
755
  },
665
756
  "UiFileUploadBox": {
666
757
  "description": "Drop zone + file picker for selecting files with optional type/size validation. **Emits:** see {@link UiFileUploadBoxEmits}.",
667
- "category": "Components",
758
+ "category": "Form Inputs",
668
759
  "useCases": [
669
760
  "file upload area",
670
761
  "drag and drop attachments"
@@ -698,13 +789,24 @@
698
789
  "_autoGenerated": true
699
790
  },
700
791
  "UiIcon": {
701
- "description": "UiIcon component",
702
- "category": "Uncategorized",
703
- "useCases": [],
792
+ "description": "An icon component using Lucide icons. Use for visual indicators, button decorations, or standalone meaningful graphics.",
793
+ "category": "Data Display",
794
+ "useCases": [
795
+ "visual indicator",
796
+ "button icon",
797
+ "status icon",
798
+ "decorative graphic"
799
+ ],
704
800
  "keywords": [
705
- "icon"
801
+ "icon",
802
+ "symbol",
803
+ "graphic",
804
+ "lucide",
805
+ "svg"
806
+ ],
807
+ "related": [
808
+ "UiButton"
706
809
  ],
707
- "related": [],
708
810
  "props": [
709
811
  "name",
710
812
  "size",
@@ -785,7 +887,6 @@
785
887
  "menu",
786
888
  "settings",
787
889
  "navigation",
788
- "selectable",
789
890
  "card"
790
891
  ],
791
892
  "related": [
@@ -796,6 +897,9 @@
796
897
  "props": [
797
898
  "variant",
798
899
  "size",
900
+ "title",
901
+ "description",
902
+ "desc",
799
903
  "asChild",
800
904
  "withListSemantics"
801
905
  ],
@@ -803,16 +907,14 @@
803
907
  "Basic",
804
908
  "Variants",
805
909
  "Sizes",
910
+ "CustomSlots",
806
911
  "WithIcon",
807
- "WithAvatar",
808
- "WithImage",
912
+ "Actions",
913
+ "ActionTooltip",
914
+ "Media",
809
915
  "Group",
810
- "WithHeaderAndFooter",
811
916
  "AsLink",
812
- "TeamMembersList",
813
- "NotificationList",
814
- "EmptyStateWithInvite",
815
- "AllStates"
917
+ "AllVariants"
816
918
  ],
817
919
  "_autoGenerated": true
818
920
  },
@@ -1120,6 +1222,36 @@
1120
1222
  ],
1121
1223
  "_autoGenerated": true
1122
1224
  },
1225
+ "UiResizable": {
1226
+ "description": "A resizable panel layout for splitting available space into user-adjustable regions. Use for sidebars, inspectors, editors, and other dense layouts where users need control over panel sizes.",
1227
+ "category": "Layout",
1228
+ "useCases": [
1229
+ "split pane",
1230
+ "resizable sidebar",
1231
+ "editor layout",
1232
+ "inspector panel"
1233
+ ],
1234
+ "keywords": [
1235
+ "resizable",
1236
+ "splitter",
1237
+ "panel",
1238
+ "pane",
1239
+ "layout",
1240
+ "sidebar"
1241
+ ],
1242
+ "related": [
1243
+ "UiSheet",
1244
+ "UiSeparator"
1245
+ ],
1246
+ "props": [],
1247
+ "examples": [
1248
+ "Default",
1249
+ "Vertical",
1250
+ "Collapsible",
1251
+ "PixelSizing"
1252
+ ],
1253
+ "_autoGenerated": true
1254
+ },
1123
1255
  "UiSelect": {
1124
1256
  "description": "A dropdown select for choosing from a list of options. Use for form fields where users must pick one value from many.",
1125
1257
  "category": "Form Inputs",
@@ -1147,6 +1279,7 @@
1147
1279
  "Default",
1148
1280
  "WithGroups",
1149
1281
  "WithDisabledItems",
1282
+ "WithIcons",
1150
1283
  "Disabled",
1151
1284
  "Sizes",
1152
1285
  "Multiple",
@@ -1589,9 +1722,12 @@
1589
1722
  "props": [
1590
1723
  "modelValue",
1591
1724
  "defaultValue",
1725
+ "active",
1592
1726
  "disabled",
1593
1727
  "variant",
1594
- "size"
1728
+ "size",
1729
+ "leftIcon",
1730
+ "rightIcon"
1595
1731
  ],
1596
1732
  "examples": [
1597
1733
  "Default",
@@ -1718,8 +1854,11 @@
1718
1854
  "WithSorting",
1719
1855
  "WithPagination",
1720
1856
  "WithToolbar",
1857
+ "WithColumnsFilter",
1721
1858
  "WithGlobalFilter",
1722
1859
  "WithRowSelection",
1860
+ "WithDraggableColumns",
1861
+ "WithExpandableRows",
1723
1862
  "FullExample",
1724
1863
  "WithCustomEmptyText",
1725
1864
  "WithCustomEmptySlot",
@@ -1871,6 +2010,7 @@
1871
2010
  "props": [],
1872
2011
  "examples": [
1873
2012
  "Default",
2013
+ "Resizable",
1874
2014
  "Inset",
1875
2015
  "RightSide"
1876
2016
  ],
@@ -185,28 +185,7 @@ var CHAT_KIT_OUTPUT_PATH = path3.join(
185
185
  PACKAGE_ROOT,
186
186
  "chat-kit-components-meta.json"
187
187
  );
188
- function extractJSDocTags(content, interfaceName) {
189
- const declarationRegex = new RegExp(
190
- `export\\s+(?:interface|type)\\s+${escapeRegex(interfaceName)}\\b`
191
- );
192
- const declarationMatch = content.match(declarationRegex);
193
- if (!declarationMatch || declarationMatch.index === void 0) {
194
- return { description: "", useCases: [], keywords: [], related: [] };
195
- }
196
- const contentBefore = content.substring(0, declarationMatch.index);
197
- const jsdocEndIndex = contentBefore.lastIndexOf("*/");
198
- if (jsdocEndIndex === -1) {
199
- return { description: "", useCases: [], keywords: [], related: [] };
200
- }
201
- const betweenJsdocAndDeclaration = contentBefore.substring(jsdocEndIndex + 2);
202
- if (betweenJsdocAndDeclaration.trim() !== "") {
203
- return { description: "", useCases: [], keywords: [], related: [] };
204
- }
205
- const jsdocStartIndex = contentBefore.lastIndexOf("/**");
206
- if (jsdocStartIndex === -1 || jsdocStartIndex > jsdocEndIndex) {
207
- return { description: "", useCases: [], keywords: [], related: [] };
208
- }
209
- const jsdoc = contentBefore.substring(jsdocStartIndex + 3, jsdocEndIndex);
188
+ function parseJSDocBlock(jsdoc) {
210
189
  const lines = jsdoc.split("\n").map((l) => l.replace(/^\s*\*\s?/, "").trim());
211
190
  let description = "";
212
191
  const useCases = [];
@@ -231,6 +210,51 @@ function extractJSDocTags(content, interfaceName) {
231
210
  }
232
211
  return { description, useCases, keywords, related, category };
233
212
  }
213
+ function extractJSDocTags(content, interfaceName) {
214
+ const declarationRegex = new RegExp(
215
+ `export\\s+(?:interface|type)\\s+${escapeRegex(interfaceName)}\\b`
216
+ );
217
+ const declarationMatch = content.match(declarationRegex);
218
+ if (!declarationMatch || declarationMatch.index === void 0) {
219
+ return { description: "", useCases: [], keywords: [], related: [] };
220
+ }
221
+ const contentBefore = content.substring(0, declarationMatch.index);
222
+ const jsdocEndIndex = contentBefore.lastIndexOf("*/");
223
+ if (jsdocEndIndex === -1) {
224
+ return { description: "", useCases: [], keywords: [], related: [] };
225
+ }
226
+ const betweenJsdocAndDeclaration = contentBefore.substring(jsdocEndIndex + 2);
227
+ if (betweenJsdocAndDeclaration.trim() !== "") {
228
+ return { description: "", useCases: [], keywords: [], related: [] };
229
+ }
230
+ const jsdocStartIndex = contentBefore.lastIndexOf("/**");
231
+ if (jsdocStartIndex === -1 || jsdocStartIndex > jsdocEndIndex) {
232
+ return { description: "", useCases: [], keywords: [], related: [] };
233
+ }
234
+ const jsdoc = contentBefore.substring(jsdocStartIndex + 3, jsdocEndIndex);
235
+ return parseJSDocBlock(jsdoc);
236
+ }
237
+ function findBestJSDocSource(content, componentName, primaryInterfaceName) {
238
+ const primary = extractJSDocTags(content, primaryInterfaceName);
239
+ if (primary.category) return primary;
240
+ const propsRegex = new RegExp(
241
+ `export\\s+(?:interface|type)\\s+(${escapeRegex(componentName)}\\w*Props)\\b`,
242
+ "g"
243
+ );
244
+ let propsMatch;
245
+ while ((propsMatch = propsRegex.exec(content)) !== null) {
246
+ if (propsMatch[1] === primaryInterfaceName) continue;
247
+ const tags = extractJSDocTags(content, propsMatch[1]);
248
+ if (tags.category) return tags;
249
+ }
250
+ const blockRegex = /\/\*\*([\s\S]*?)\*\//g;
251
+ let blockMatch;
252
+ while ((blockMatch = blockRegex.exec(content)) !== null) {
253
+ const tags = parseJSDocBlock(blockMatch[1]);
254
+ if (tags.category) return tags;
255
+ }
256
+ return primary;
257
+ }
234
258
  function extractKeywordsFromName(componentName) {
235
259
  const name = componentName.replace(/^(?:Ui|Ck)/, "");
236
260
  return name.replace(/([a-z])([A-Z])/g, "$1 $2").toLowerCase().split(/\s+/).filter((word) => word.length > 2);
@@ -284,7 +308,11 @@ function processComponent(componentDir, componentName) {
284
308
  /export\s+(?:interface|type)\s+((?:Ui|Ck)\w+Props)/
285
309
  );
286
310
  const interfaceName = exactMatch?.[1] || subComponentMatch?.[1] || anyPropsMatch?.[1] || `${componentName}Props`;
287
- const jsdocData = extractJSDocTags(typesContent, interfaceName);
311
+ const jsdocData = findBestJSDocSource(
312
+ typesContent,
313
+ componentName,
314
+ interfaceName
315
+ );
288
316
  const nameKeywords = extractKeywordsFromName(componentName);
289
317
  const keywords = jsdocData.keywords.length > 0 ? jsdocData.keywords : nameKeywords;
290
318
  const category = jsdocData.category || "Uncategorized";
@@ -386,5 +414,7 @@ if (isMain) {
386
414
  export {
387
415
  extractJSDocTags,
388
416
  extractKeywordsFromName,
389
- extractProps
417
+ extractProps,
418
+ findBestJSDocSource,
419
+ parseJSDocBlock
390
420
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aleph-alpha/lib-mcp",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/server.js",
@@ -36,8 +36,8 @@
36
36
  "@aleph-alpha/tsconfig-frontend": "0.6.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "@aleph-alpha/ui-library": "2.2.0",
40
- "@aleph-alpha/chat-kit": "1.1.0"
39
+ "@aleph-alpha/ui-library": "2.8.0",
40
+ "@aleph-alpha/chat-kit": "1.13.0"
41
41
  },
42
42
  "homepage": "https://docs.aleph-alpha.com",
43
43
  "scripts": {