@adyen/bento-mcp 0.1.0 → 0.1.1

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 (38) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +11 -66
  3. package/dist/assets/components/action-bar/action-bar.stories.ts +1 -1
  4. package/dist/assets/components/action-bar/action-bar.vue +1 -1
  5. package/dist/assets/components/ai-tag/ai-tag.docs.mdx +75 -0
  6. package/dist/assets/components/ai-tag/ai-tag.stories.ts +1 -0
  7. package/dist/assets/components/ai-tag/ai-tag.vue +1 -0
  8. package/dist/assets/components/card/card.docs.mdx +3 -3
  9. package/dist/assets/components/data-grid/components/data-grid-tag-with-text-cell/data-grid-tag-with-text-cell.docs.mdx +35 -0
  10. package/dist/assets/components/data-grid/components/data-grid-tag-with-text-cell/data-grid-tag-with-text-cell.stories.ts +1 -0
  11. package/dist/assets/components/data-grid/components/data-grid-tag-with-text-cell/data-grid-tag-with-text-cell.vue +1 -0
  12. package/dist/assets/components/data-grid/data-grid.docs.mdx +16 -4
  13. package/dist/assets/components/data-grid/data-grid.stories.ts +1 -1
  14. package/dist/assets/components/data-grid/data-grid.vue +1 -1
  15. package/dist/assets/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue +1 -1
  16. package/dist/assets/components/date-range-picker/date-range-picker.vue +1 -1
  17. package/dist/assets/components/draggable-handle/draggable-handle.docs.mdx +61 -0
  18. package/dist/assets/components/draggable-handle/draggable-handle.stories.ts +1 -0
  19. package/dist/assets/components/draggable-handle/draggable-handle.vue +1 -0
  20. package/dist/assets/components/dropdown/dropdown.docs.mdx +3 -3
  21. package/dist/assets/components/file-uploader/components/file-uploader-file-card/file-uploader-file-card.vue +1 -1
  22. package/dist/assets/components/filter-bar/components/date-range-filter/date-range-filter.vue +1 -1
  23. package/dist/assets/components/filter-bar/filter-bar.docs.mdx +1 -1
  24. package/dist/assets/components/form-layout/components/form-layout-title/form-layout-title.vue +1 -1
  25. package/dist/assets/components/form-layout/form-layout.docs.mdx +2 -2
  26. package/dist/assets/components/inspector/inspector.docs.mdx +2 -2
  27. package/dist/assets/components/internal/copy/copy.docs.mdx +2 -2
  28. package/dist/assets/components/layout/layout.docs.mdx +8 -8
  29. package/dist/assets/components/layout/layout.vue +1 -1
  30. package/dist/assets/components/modal/modal.docs.mdx +4 -4
  31. package/dist/assets/components/modal-fullscreen/modal-fullscreen.docs.mdx +5 -5
  32. package/dist/assets/components/sidepanel/sidepanel.docs.mdx +27 -27
  33. package/dist/assets/components/summary-grid/summary-grid.docs.mdx +1 -1
  34. package/dist/assets/components/tabs/tabs.docs.mdx +1 -1
  35. package/dist/assets/components/toast/toast.docs.mdx +10 -10
  36. package/dist/assets/index.ts +1 -1
  37. package/dist/main.js +121 -101
  38. package/package.json +5 -4
@@ -84,10 +84,10 @@ Some properties can only be applied to `bento-modal`:
84
84
 
85
85
  Additionally, there are also properties applied only to `bento-modal-page`:
86
86
 
87
- | Property Name | Description |
88
- | -------------- | --------------------------------------------------------------------------------------------- |
89
- | `pageId` | The id of the page, used with `bento-modal` activePage prop to control navigation |
90
- | `previousPage` | Can be set to null to hide the back button, or to a `pageId` to override the normal behaviour |
87
+ | Property Name | Description |
88
+ | -------------- | -------------------------------------------------------------------------------------------- |
89
+ | `pageId` | The id of the page, used with `bento-modal` activePage prop to control navigation |
90
+ | `previousPage` | Can be set to null to hide the back button, or to a `pageId` to override the normal behavior |
91
91
 
92
92
  #### Dismissible
93
93
 
@@ -83,10 +83,10 @@ Some properties can only be applied to `bento-modal-fullscreen`:
83
83
 
84
84
  Additionally, there are also properties applied only to `bento-modal-fullscreen-page`:
85
85
 
86
- | Property Name | Description |
87
- | -------------- | --------------------------------------------------------------------------------------------- |
88
- | `pageId` | The id of the page, used with `bento-modal-fullscreen` activePage prop to control navigation |
89
- | `previousPage` | Can be set to null to hide the back button, or to a `pageId` to override the normal behaviour |
86
+ | Property Name | Description |
87
+ | -------------- | -------------------------------------------------------------------------------------------- |
88
+ | `pageId` | The id of the page, used with `bento-modal-fullscreen` activePage prop to control navigation |
89
+ | `previousPage` | Can be set to null to hide the back button, or to a `pageId` to override the normal behavior |
90
90
 
91
91
  ### Title
92
92
 
@@ -206,7 +206,7 @@ It indicates the browser to ignore all the elements with `inert` attribute appli
206
206
  ### Keyboard interaction
207
207
 
208
208
  - User can use `Tab` key to move focus to the trigger and use `Spacebar`/`Enter` to activate the sidepanel.
209
- - The `Tab` should change focus between interactive elements in Fullscreen Modal (if there are few). This behaviour
209
+ - The `Tab` should change focus between interactive elements in Fullscreen Modal (if there are few). This behavior
210
210
  should only exist when Fullscreen Modal is open and should not extend outside of the dialog (focus trap).
211
211
  - When user uses `Esc` button, Fullscreen Modal should close and return focus to the trigger.
212
212
  - _OR_ when user use tab key to move focus to the dismiss/close button and then use Spacebar/Enter key -> we close
@@ -19,18 +19,18 @@ with the main screen.
19
19
 
20
20
  Examples:
21
21
 
22
- - Create new object
23
- - Edit existing object
24
- - Settings/Configuration
25
- - Context related learning article
26
- - Other similar use cases
22
+ - Create new object
23
+ - Edit existing object
24
+ - Settings/Configuration
25
+ - Context related learning article
26
+ - Other similar use cases
27
27
 
28
28
  ### Do not use
29
29
 
30
30
  For a small complexity tasks
31
31
 
32
- - Rename
33
- - Changing of only one setting
32
+ - Rename
33
+ - Changing of only one setting
34
34
 
35
35
  In those cases, use Modal component instead.
36
36
 
@@ -55,9 +55,9 @@ Each `sidepanel-page` component has three different sections:
55
55
 
56
56
  The header sections can contain three different elements:
57
57
 
58
- - Title (optional), this can be passed with the `title` prop.
59
- - Back button (optional), if the user has navigated deeper in the hierarchy and `previousPage` is not set to null.
60
- - Close button (optional), shows on the right top corner of the page if `isDismissible` is set to `true`.
58
+ - Title (optional), this can be passed with the `title` prop.
59
+ - Back button (optional), if the user has navigated deeper in the hierarchy and `previousPage` is not set to null.
60
+ - Close button (optional), shows on the right top corner of the page if `isDismissible` is set to `true`.
61
61
 
62
62
  ### Content area
63
63
 
@@ -82,21 +82,21 @@ This is the list of properties, applicable to `bento-sidepanel`
82
82
 
83
83
  This is the list of properties, applicable to `bento-sidepanel-page`
84
84
 
85
- | Property Name | Description |
86
- | -------------------- | --------------------------------------------------------------------------------------------- |
87
- | `pageId` | The id of the page, used to control navigation |
88
- | `previousPage` | Can be set to null to hide the back button, or to a `pageId` to override the normal behaviour |
89
- | `title` | Title of the page |
90
- | `actions` | List of actions that will be used to render the buttons |
91
- | `actionsLabel` | Text label that is displayed left to the action buttons |
92
- | `destructiveActions` | If passed - sets first button color to red |
85
+ | Property Name | Description |
86
+ | -------------------- | -------------------------------------------------------------------------------------------- |
87
+ | `pageId` | The id of the page, used to control navigation |
88
+ | `previousPage` | Can be set to null to hide the back button, or to a `pageId` to override the normal behavior |
89
+ | `title` | Title of the page |
90
+ | `actions` | List of actions that will be used to render the buttons |
91
+ | `actionsLabel` | Text label that is displayed left to the action buttons |
92
+ | `destructiveActions` | If passed - sets first button color to red |
93
93
 
94
94
  ### isDismissible vs hideCloseButton
95
95
 
96
96
  The `isDismissible` property determines whether the sidepanel can be closed by clicking outside of the panel.
97
97
 
98
- - When `isDismissible=true`, a close button is displayed by default.
99
- - When `isDismissible=false`, a close button is hidden by default.
98
+ - When `isDismissible=true`, a close button is displayed by default.
99
+ - When `isDismissible=false`, a close button is hidden by default.
100
100
 
101
101
  To independently control the visibility of the close button while `isDismissible` is set, use the `hideCloseButton`
102
102
  property.
@@ -117,13 +117,13 @@ It indicates the browser to ignore all the elements with `inert` attribute appli
117
117
 
118
118
  ### Keyboard interaction
119
119
 
120
- - User can use `Tab` key to move focus to the trigger and use `Spacebar`/`Enter` to activate the sidepanel.
121
- - The `Tab` should change focus between interactive elements in Sidepanel (if there are few). This behaviour should
122
- only exist when Sidepanel is open and should not extend outside of the Sidepanel window (focus trap).
123
- - When user uses `Esc` button, Sidepanel should close and return focus to the trigger.
124
- - _OR_ when user use tab key to move focus to the dismiss/close button and then use Spacebar/Enter key -> we close
125
- the sidepanel and return focus to the trigger
120
+ - User can use `Tab` key to move focus to the trigger and use `Spacebar`/`Enter` to activate the sidepanel.
121
+ - The `Tab` should change focus between interactive elements in Sidepanel (if there are few). This behavior should only
122
+ exist when Sidepanel is open and should not extend outside of the Sidepanel window (focus trap).
123
+ - When user uses `Esc` button, Sidepanel should close and return focus to the trigger.
124
+ - _OR_ when user use tab key to move focus to the dismiss/close button and then use Spacebar/Enter key -> we close
125
+ the sidepanel and return focus to the trigger
126
126
 
127
127
  ## Resources
128
128
 
129
- - [Figma link](https://www.figma.com/file/uLabwF3243jdMDsNSP7U9I/Bento---Components?type=design&node-id=16389-6643&mode=design&t=2CFK9xp3h3zaSfYF-0)
129
+ - [Figma link](https://www.figma.com/file/uLabwF3243jdMDsNSP7U9I/Bento---Components?type=design&node-id=16389-6643&mode=design&t=2CFK9xp3h3zaSfYF-0)
@@ -13,7 +13,7 @@ import * as SummaryGridItemCustomStories from './components/summary-grid-item-cu
13
13
  Summary grid is a set of summary card items that are placed on a 12 column grid and can be used to highlight key
14
14
  information on your page.
15
15
 
16
- You can choose to use summary grid (based on 12 columns) or summary cards individually (hug content behaviour, no grid).
16
+ You can choose to use summary grid (based on 12 columns) or summary cards individually (hug content behavior, no grid).
17
17
 
18
18
  <Canvas sourceState="closed">
19
19
  <Story of={SummaryGridStories.Default} />
@@ -13,7 +13,7 @@ page. Selecting another tab replaces content with the new tab’s content.
13
13
 
14
14
  ## Do's
15
15
 
16
- - Use tabs on content-heavy pages to organise related content into different views. This can help reduce cognitive load.
16
+ - Use tabs on content-heavy pages to organize related content into different views. This can help reduce cognitive load.
17
17
  - Use concise tab headers that are easily understandable, ideally one or two words.
18
18
 
19
19
  ### Do not's
@@ -3,7 +3,7 @@
3
3
  Toast is a concise and temporary message that provides feedback on app’s processes after user takes an action, without
4
4
  disrupting their flow or requiring them to act on it.
5
5
 
6
- ### Behaviour
6
+ ### Behavior
7
7
 
8
8
  When a user performs an action that triggers a toast message, it appears on the bottom right corner of the screen (or in
9
9
  the middle on smaller screens).
@@ -41,7 +41,7 @@ obscure the toast. When you need to provide feedback on actions taken within a m
41
41
  The `bento-toast` component doesn't accept any props, however its state is managed by a global reactive state. To be
42
42
  able to add and display toast messages, you should:
43
43
 
44
- - Initialize the **Bento plugin** with the toasts enabled by setting the `withToast` property to `true`
44
+ - Initialize the **Bento plugin** with the toasts enabled by setting the `withToast` property to `true`
45
45
 
46
46
  ```typescript
47
47
  // index.ts
@@ -51,9 +51,9 @@ import BentoVue from '@adyen/bento-vue2';
51
51
  Vue.use(BentoVue, { withToast: true });
52
52
  ```
53
53
 
54
- - Import and instantiate the `bento-toast` component in the root of your application. The Toast component can be
55
- anywhere on the app but it should only be included once, therefore it is recommended to have it on the root of your
56
- app, namely in the `App.vue` file.
54
+ - Import and instantiate the `bento-toast` component in the root of your application. The Toast component can be
55
+ anywhere on the app but it should only be included once, therefore it is recommended to have it on the root of your
56
+ app, namely in the `App.vue` file.
57
57
 
58
58
  ```html
59
59
  // App.vue
@@ -75,9 +75,9 @@ Vue.use(BentoVue, { withToast: true });
75
75
  </script>
76
76
  ```
77
77
 
78
- - Import the `useBentoToastController` composable in whatever component you might need to trigger a toast message.
79
- Upon executing, `useBentoToastController()` composable will retrun `addToast()` method which would allow to register
80
- new toasts messages.
78
+ - Import the `useBentoToastController` composable in whatever component you might need to trigger a toast message. Upon
79
+ executing, `useBentoToastController()` composable will return `addToast()` method which would allow to register new
80
+ toasts messages.
81
81
 
82
82
  ```typescript
83
83
  <script lang="ts">
@@ -147,5 +147,5 @@ navigation and will be announced as non-interactive by assistive technology.
147
147
 
148
148
  ## Resources
149
149
 
150
- - [Figma link](https://www.figma.com/design/uLabwF3243jdMDsNSP7U9I/Bento---Components?node-id=2342-42474)
151
- - [WAI-ARIA guidelines](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA22)
150
+ - [Figma link](https://www.figma.com/design/uLabwF3243jdMDsNSP7U9I/Bento---Components?node-id=2342-42474)
151
+ - [WAI-ARIA guidelines](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA22)
@@ -1 +1 @@
1
- import BentoVue from './install'; export * from './components/accordion'; export * from './components/action-bar'; export * from './components/alert'; export * from './components/avatar'; export * from './components/button'; export * from './components/dashed-underline'; export * from './components/data-grid'; export * from './components/card'; export * from './components/date-picker'; export * from './components/date-range-picker'; export * from './components/dropdown'; export * from './components/checkbox'; export * from './components/chip'; export * from './components/click-outside'; export * from './components/code-snippet'; export * from './components/country'; export * from './components/currency'; export * from './components/date'; export * from './components/divider'; export * from './components/empty-state'; export * from './components/file-uploader'; export * from './components/filter-bar'; export * from './components/form-layout'; export * from './components/header-with-views'; export * from './components/image'; export * from './components/info-icon'; export * from './components/input-field'; export * from './components/input-field-password'; export * from './components/input-field-phone-number'; export * from './components/inspector'; export * from './components/layout'; export * from './components/loading-indicator'; export * from './components/link'; export * from './components/menu'; export * from './components/modal'; export * from './components/modal-fullscreen'; export * from './components/header'; export * from './components/pagination'; export * from './components/payment-method'; export * from './components/popover'; export * from './components/promo-banner'; export * from './components/radio-group'; export * from './components/rich-text-editor'; export * from './components/search-bar'; export * from './components/secondary-nav'; export * from './components/selection-card'; export * from './components/segmented-control'; export * from './components/sidepanel'; export * from './components/status'; export * from './components/stepper'; export * from './components/structured-list'; export * from './components/summary-grid'; export * from './components/tabs'; export * from './components/tag'; export * from './components/textarea'; export * from './components/timeline'; export * from './components/toast'; export * from './components/toggle'; export * from './components/tutorial'; export * from './components/typography'; // Export Composables export * from './composables/use-bento-base-filter'; export * from './composables/use-bento-currency'; export * from './composables/use-bento-theme'; export * from './composables/use-bento-toast-controller'; export * from './composables/use-click-outside'; export * from './composables/use-form-validate'; // Export Templates export * from './templates/dashboard-template'; export * from './templates/data-grid-template'; // Export Types export * from './types'; // Export Directives export * from './directives'; // AdlVue Plugin export default BentoVue; export { BentoTheme } from './install';
1
+ import BentoVue from './install'; export * from './components/accordion'; export * from './components/action-bar'; export * from './components/ai-tag'; export * from './components/alert'; export * from './components/avatar'; export * from './components/button'; export * from './components/dashed-underline'; export * from './components/data-grid'; export * from './components/card'; export * from './components/date-picker'; export * from './components/date-range-picker'; export * from './components/dropdown'; export * from './components/checkbox'; export * from './components/chip'; export * from './components/click-outside'; export * from './components/code-snippet'; export * from './components/country'; export * from './components/currency'; export * from './components/date'; export * from './components/divider'; export * from './components/empty-state'; export * from './components/file-uploader'; export * from './components/filter-bar'; export * from './components/form-layout'; export * from './components/header-with-views'; export * from './components/image'; export * from './components/info-icon'; export * from './components/input-field'; export * from './components/input-field-password'; export * from './components/input-field-phone-number'; export * from './components/inspector'; export * from './components/layout'; export * from './components/loading-indicator'; export * from './components/link'; export * from './components/menu'; export * from './components/modal'; export * from './components/modal-fullscreen'; export * from './components/header'; export * from './components/pagination'; export * from './components/payment-method'; export * from './components/popover'; export * from './components/promo-banner'; export * from './components/radio-group'; export * from './components/rich-text-editor'; export * from './components/search-bar'; export * from './components/secondary-nav'; export * from './components/selection-card'; export * from './components/segmented-control'; export * from './components/sidepanel'; export * from './components/status'; export * from './components/stepper'; export * from './components/structured-list'; export * from './components/summary-grid'; export * from './components/tabs'; export * from './components/tag'; export * from './components/textarea'; export * from './components/timeline'; export * from './components/toast'; export * from './components/toggle'; export * from './components/tutorial'; export * from './components/typography'; // Export Composables export * from './composables/use-bento-base-filter'; export * from './composables/use-bento-currency'; export * from './composables/use-bento-theme'; export * from './composables/use-bento-toast-controller'; export * from './composables/use-click-outside'; export * from './composables/use-form-validate'; // Export Templates export * from './templates/dashboard-template'; export * from './templates/data-grid-template'; // Export Types export * from './types'; // Export Directives export * from './directives'; // AdlVue Plugin export default BentoVue; export { BentoTheme } from './install';
package/dist/main.js CHANGED
@@ -22277,7 +22277,7 @@ function object(shape, params) {
22277
22277
  return new ZodMiniObject(def);
22278
22278
  }
22279
22279
 
22280
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
22280
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.26.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
22281
22281
  function isZ4Schema(s) {
22282
22282
  const schema = s;
22283
22283
  return !!schema._zod;
@@ -24567,7 +24567,7 @@ function date4(params) {
24567
24567
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/external.js
24568
24568
  config(en_default2());
24569
24569
 
24570
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
24570
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.26.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
24571
24571
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
24572
24572
  var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
24573
24573
  var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
@@ -26085,7 +26085,7 @@ var UrlElicitationRequiredError = class extends McpError {
26085
26085
  }
26086
26086
  };
26087
26087
 
26088
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
26088
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.26.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
26089
26089
  function isTerminal(status) {
26090
26090
  return status === "completed" || status === "failed" || status === "cancelled";
26091
26091
  }
@@ -27374,7 +27374,7 @@ var zodToJsonSchema = (schema, options) => {
27374
27374
  return combined;
27375
27375
  };
27376
27376
 
27377
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
27377
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.26.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
27378
27378
  function mapMiniTarget(t) {
27379
27379
  if (!t)
27380
27380
  return "draft-7";
@@ -27416,7 +27416,7 @@ function parseWithCompat(schema, data) {
27416
27416
  return result.data;
27417
27417
  }
27418
27418
 
27419
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
27419
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.26.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
27420
27420
  var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
27421
27421
  var Protocol = class {
27422
27422
  constructor(_options) {
@@ -27593,6 +27593,9 @@ var Protocol = class {
27593
27593
  * The Protocol object assumes ownership of the Transport, replacing any callbacks that have already been set, and expects that it is the only user of the Transport instance going forward.
27594
27594
  */
27595
27595
  async connect(transport) {
27596
+ if (this._transport) {
27597
+ throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");
27598
+ }
27596
27599
  this._transport = transport;
27597
27600
  const _onclose = this.transport?.onclose;
27598
27601
  this._transport.onclose = () => {
@@ -27625,6 +27628,10 @@ var Protocol = class {
27625
27628
  this._progressHandlers.clear();
27626
27629
  this._taskProgressTokens.clear();
27627
27630
  this._pendingDebouncedNotifications.clear();
27631
+ for (const controller of this._requestHandlerAbortControllers.values()) {
27632
+ controller.abort();
27633
+ }
27634
+ this._requestHandlerAbortControllers.clear();
27628
27635
  const error48 = McpError.fromError(ErrorCode.ConnectionClosed, "Connection closed");
27629
27636
  this._transport = void 0;
27630
27637
  this.onclose?.();
@@ -27675,6 +27682,8 @@ var Protocol = class {
27675
27682
  sessionId: capturedTransport?.sessionId,
27676
27683
  _meta: request.params?._meta,
27677
27684
  sendNotification: async (notification) => {
27685
+ if (abortController.signal.aborted)
27686
+ return;
27678
27687
  const notificationOptions = { relatedRequestId: request.id };
27679
27688
  if (relatedTaskId) {
27680
27689
  notificationOptions.relatedTask = { taskId: relatedTaskId };
@@ -27682,6 +27691,9 @@ var Protocol = class {
27682
27691
  await this.notification(notification, notificationOptions);
27683
27692
  },
27684
27693
  sendRequest: async (r, resultSchema, options) => {
27694
+ if (abortController.signal.aborted) {
27695
+ throw new McpError(ErrorCode.ConnectionClosed, "Request was cancelled");
27696
+ }
27685
27697
  const requestOptions = { ...options, relatedRequestId: request.id };
27686
27698
  if (relatedTaskId && !requestOptions.relatedTask) {
27687
27699
  requestOptions.relatedTask = { taskId: relatedTaskId };
@@ -28352,7 +28364,7 @@ function mergeCapabilities(base, additional) {
28352
28364
  return result;
28353
28365
  }
28354
28366
 
28355
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
28367
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.26.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
28356
28368
  var import_ajv = __toESM(require_ajv(), 1);
28357
28369
  var import_ajv_formats = __toESM(require_dist(), 1);
28358
28370
  function createDefaultAjvInstance() {
@@ -28420,7 +28432,7 @@ var AjvJsonSchemaValidator = class {
28420
28432
  }
28421
28433
  };
28422
28434
 
28423
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
28435
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.26.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
28424
28436
  var ExperimentalServerTasks = class {
28425
28437
  constructor(_server) {
28426
28438
  this._server = _server;
@@ -28492,7 +28504,7 @@ var ExperimentalServerTasks = class {
28492
28504
  }
28493
28505
  };
28494
28506
 
28495
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
28507
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.26.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
28496
28508
  function assertToolsCallTaskCapability(requests, method, entityName) {
28497
28509
  if (!requests) {
28498
28510
  throw new Error(`${entityName} does not support task creation (required for ${method})`);
@@ -28527,7 +28539,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
28527
28539
  }
28528
28540
  }
28529
28541
 
28530
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
28542
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.26.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
28531
28543
  var Server = class extends Protocol {
28532
28544
  /**
28533
28545
  * Initializes this server with the given name and version information.
@@ -28907,7 +28919,7 @@ var Server = class extends Protocol {
28907
28919
  }
28908
28920
  };
28909
28921
 
28910
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
28922
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.26.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js
28911
28923
  var COMPLETABLE_SYMBOL = /* @__PURE__ */ Symbol.for("mcp.completable");
28912
28924
  function isCompletable(schema) {
28913
28925
  return !!schema && typeof schema === "object" && COMPLETABLE_SYMBOL in schema;
@@ -28921,7 +28933,7 @@ var McpZodTypeKind;
28921
28933
  McpZodTypeKind2["Completable"] = "McpCompletable";
28922
28934
  })(McpZodTypeKind || (McpZodTypeKind = {}));
28923
28935
 
28924
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
28936
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.26.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js
28925
28937
  var TOOL_NAME_REGEX = /^[A-Za-z0-9._-]{1,128}$/;
28926
28938
  function validateToolName(name) {
28927
28939
  const warnings = [];
@@ -28979,7 +28991,7 @@ function validateAndWarnToolName(name) {
28979
28991
  return result.isValid;
28980
28992
  }
28981
28993
 
28982
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
28994
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.26.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js
28983
28995
  var ExperimentalMcpServerTasks = class {
28984
28996
  constructor(_mcpServer) {
28985
28997
  this._mcpServer = _mcpServer;
@@ -28997,7 +29009,7 @@ var ExperimentalMcpServerTasks = class {
28997
29009
  // node_modules/.pnpm/zod@4.3.6/node_modules/zod/index.js
28998
29010
  var zod_default = external_exports3;
28999
29011
 
29000
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
29012
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.26.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
29001
29013
  var McpServer = class {
29002
29014
  constructor(serverInfo, options) {
29003
29015
  this._registeredResources = {};
@@ -29783,10 +29795,10 @@ var EMPTY_COMPLETION_RESULT = {
29783
29795
  }
29784
29796
  };
29785
29797
 
29786
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
29798
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.26.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
29787
29799
  import process3 from "node:process";
29788
29800
 
29789
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
29801
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.26.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
29790
29802
  var ReadBuffer = class {
29791
29803
  append(chunk) {
29792
29804
  this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
@@ -29814,7 +29826,7 @@ function serializeMessage(message) {
29814
29826
  return JSON.stringify(message) + "\n";
29815
29827
  }
29816
29828
 
29817
- // node_modules/.pnpm/@modelcontextprotocol+sdk@1.25.3_hono@4.11.7_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
29829
+ // node_modules/.pnpm/@modelcontextprotocol+sdk@1.26.0_zod@4.3.6/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
29818
29830
  var StdioServerTransport = class {
29819
29831
  constructor(_stdin = process3.stdin, _stdout = process3.stdout) {
29820
29832
  this._stdin = _stdin;
@@ -29888,11 +29900,92 @@ function getFile(filePath) {
29888
29900
  }
29889
29901
  }
29890
29902
 
29903
+ // packages/mcp/src/tools/get-all-components.ts
29904
+ function addGetAllComponents(server) {
29905
+ server.registerTool(
29906
+ "get_all_components",
29907
+ {
29908
+ description: `
29909
+ Retrieves the main index file that exports all available Bento components.
29910
+ Use this to understand which components are available in the library.
29911
+ Returns:
29912
+ str: The raw content of the packages/vue2/src/index.ts file.
29913
+ `
29914
+ },
29915
+ () => {
29916
+ const filePath = "index.ts";
29917
+ return {
29918
+ content: [{ type: "text", text: getFile(filePath) }]
29919
+ };
29920
+ }
29921
+ );
29922
+ }
29923
+
29924
+ // packages/mcp/src/tools/get-component.ts
29925
+ function addGetComponent(server) {
29926
+ server.registerTool(
29927
+ "get_component",
29928
+ {
29929
+ description: `
29930
+ Retrieves the documentation, stories, and Vue implementation for a list of components from the private repo.
29931
+
29932
+ Args:
29933
+ componentNames (Array<string>): A list of component names (e.g., ["button", "modal"]).
29934
+
29935
+ Returns:
29936
+ str: A Markdown formatted string containing the contents of the .docs.mdx, .stories.ts, and .vue files.
29937
+ `,
29938
+ inputSchema: {
29939
+ componentNames: zod_default.array(zod_default.string()).describe("A list of component names")
29940
+ }
29941
+ },
29942
+ async ({ componentNames }) => {
29943
+ const output = [
29944
+ "I have retrieved the requested component context. For each component, I have provided three sections:",
29945
+ "1. **Documentation (.docs.mdx)**: Explains how to use the component, props, and design guidelines.",
29946
+ "2. **Stories (.stories.ts)**: Shows code examples of how to implement the component (emits, props usage).",
29947
+ "3. **Implementation (.vue)**: The internal logic, properties, emits, and slots of the component.",
29948
+ "---"
29949
+ ];
29950
+ const basePath = "components";
29951
+ for (const component of componentNames) {
29952
+ const docsContent = getFile(`${basePath}/${component}/${component}.docs.mdx`);
29953
+ const storiesContent = getFile(`${basePath}/${component}/${component}.stories.ts`);
29954
+ const vueContent = getFile(`${basePath}/${component}/${component}.vue`);
29955
+ const componentSection = [
29956
+ `# Component: ${component}`,
29957
+ `## 1. Documentation (${component}.docs.mdx)`,
29958
+ "```markdown",
29959
+ docsContent,
29960
+ "```",
29961
+ `## 2. Stories (${component}.stories.ts)`,
29962
+ "```typescript",
29963
+ storiesContent,
29964
+ "```",
29965
+ `## 3. Implementation (${component}.vue)`,
29966
+ "```vue",
29967
+ vueContent,
29968
+ "```"
29969
+ ].join("\n\n");
29970
+ output.push(componentSection);
29971
+ }
29972
+ return {
29973
+ content: [
29974
+ {
29975
+ type: "text",
29976
+ text: output.join("\n")
29977
+ }
29978
+ ]
29979
+ };
29980
+ }
29981
+ );
29982
+ }
29983
+
29891
29984
  // packages/mcp/package.json
29892
29985
  var package_default = {
29893
29986
  name: "@adyen/bento-mcp",
29894
29987
  mcpName: "io.github.adyen/bento-mcp",
29895
- version: "0.1.0",
29988
+ version: "0.1.1",
29896
29989
  type: "module",
29897
29990
  description: "A Model Context Protocol server implementation for Bento",
29898
29991
  license: "MIT",
@@ -29927,100 +30020,27 @@ var package_default = {
29927
30020
  "bento"
29928
30021
  ],
29929
30022
  dependencies: {
29930
- "@modelcontextprotocol/sdk": "1.25.3",
30023
+ "@modelcontextprotocol/sdk": "1.26.0",
29931
30024
  zod: "4.3.6"
29932
30025
  },
29933
30026
  devDependencies: {
29934
30027
  "@modelcontextprotocol/inspector": "0.19.0",
30028
+ "@playwright/test": "catalog:",
30029
+ "@nx/playwright": "catalog:nx",
29935
30030
  "@swc/cli": "0.7.10",
29936
- "@swc/core": "1.15.10",
29937
- "tailwind-merge": "2.6.0"
30031
+ "@swc/core": "1.15.10"
29938
30032
  }
29939
30033
  };
29940
30034
 
29941
30035
  // packages/mcp/src/main.ts
29942
- var server = new McpServer({
29943
- name: "bento-mcp",
29944
- version: package_default.version
29945
- });
29946
- server.registerTool(
29947
- "get_component",
29948
- {
29949
- description: `
29950
- Retrieves the documentation, stories, and Vue implementation for a list of components from the private repo.
29951
-
29952
- Args:
29953
- componentNames (Array<string>): A list of component names (e.g., ["button", "modal"]).
29954
-
29955
- Returns:
29956
- str: A Markdown formatted string containing the contents of the .docs.mdx, .stories.ts, and .vue files.
29957
- `,
29958
- inputSchema: {
29959
- componentNames: zod_default.array(zod_default.string()).describe("A list of component names")
29960
- }
29961
- },
29962
- async ({ componentNames }) => {
29963
- const output = [
29964
- "I have retrieved the requested component context. For each component, I have provided three sections:",
29965
- "1. **Documentation (.docs.mdx)**: Explains how to use the component, props, and design guidelines.",
29966
- "2. **Stories (.stories.ts)**: Shows code examples of how to implement the component (emits, props usage).",
29967
- "3. **Implementation (.vue)**: The internal logic, properties, emits, and slots of the component.",
29968
- "---"
29969
- ];
29970
- const basePath = "components";
29971
- for (const component of componentNames) {
29972
- const docsPath = `${basePath}/${component}/${component}.docs.mdx`;
29973
- const docsContent = getFile(docsPath);
29974
- const storiesPath = `${basePath}/${component}/${component}.stories.ts`;
29975
- const storiesContent = getFile(storiesPath);
29976
- const vuePath = `${basePath}/${component}/${component}.vue`;
29977
- const vueContent = getFile(vuePath);
29978
- const componentSection = `
29979
- # Component: ${component}
29980
-
29981
- ## 1. Documentation (${component}.docs.mdx)
29982
- \`\`\`markdown
29983
- ${docsContent}
29984
- \`\`\`
29985
-
29986
- ## 2. Stories (${component}.stories.ts)
29987
- TypeScript
29988
- ${storiesContent}
29989
-
29990
- ## 3. Implementation (${component}.vue)
29991
- Code snippet
29992
- ${vueContent}
29993
- `;
29994
- output.push(componentSection);
29995
- }
29996
- return {
29997
- content: [
29998
- {
29999
- type: "text",
30000
- text: output.join("\n")
30001
- }
30002
- ]
30003
- };
30004
- }
30005
- );
30006
- server.registerTool(
30007
- "get_all_components",
30008
- {
30009
- description: `
30010
- Retrieves the main index file that exports all available Bento components.
30011
- Use this to understand which components are available in the library.
30012
- Returns:
30013
- str: The raw content of the packages/vue2/src/index.ts file.
30014
- `
30015
- },
30016
- () => {
30017
- const filePath = "index.ts";
30018
- return {
30019
- content: [{ type: "text", text: getFile(filePath) }]
30020
- };
30021
- }
30022
- );
30023
30036
  async function main() {
30037
+ const server = new McpServer({
30038
+ name: "bento-mcp",
30039
+ version: package_default.version,
30040
+ description: package_default.description
30041
+ });
30042
+ addGetAllComponents(server);
30043
+ addGetComponent(server);
30024
30044
  const transport = new StdioServerTransport();
30025
30045
  await server.connect(transport);
30026
30046
  console.error("Bento MCP Server running on stdio");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adyen/bento-mcp",
3
3
  "mcpName": "io.github.adyen/bento-mcp",
4
- "version": "0.1.0",
4
+ "version": "0.1.1",
5
5
  "type": "module",
6
6
  "description": "A Model Context Protocol server implementation for Bento",
7
7
  "license": "MIT",
@@ -31,14 +31,15 @@
31
31
  "bento"
32
32
  ],
33
33
  "dependencies": {
34
- "@modelcontextprotocol/sdk": "1.25.3",
34
+ "@modelcontextprotocol/sdk": "1.26.0",
35
35
  "zod": "4.3.6"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@modelcontextprotocol/inspector": "0.19.0",
39
+ "@playwright/test": "1.42.1",
40
+ "@nx/playwright": "22.4.0",
39
41
  "@swc/cli": "0.7.10",
40
- "@swc/core": "1.15.10",
41
- "tailwind-merge": "2.6.0"
42
+ "@swc/core": "1.15.10"
42
43
  },
43
44
  "scripts": {
44
45
  "server": "node dist/main.js",