@progress/kendo-react-webmcp 15.0.0-develop.2

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 (340) hide show
  1. package/LICENSE.md +11 -0
  2. package/NOTICE.txt +383 -0
  3. package/README.md +72 -0
  4. package/WebMcpProvider.d.ts +49 -0
  5. package/WebMcpProvider.js +8 -0
  6. package/WebMcpProvider.mjs +138 -0
  7. package/adapters/aiprompt.d.ts +15 -0
  8. package/adapters/aiprompt.js +8 -0
  9. package/adapters/aiprompt.mjs +63 -0
  10. package/adapters/autocomplete.d.ts +18 -0
  11. package/adapters/autocomplete.js +8 -0
  12. package/adapters/autocomplete.mjs +69 -0
  13. package/adapters/button.d.ts +18 -0
  14. package/adapters/button.js +8 -0
  15. package/adapters/button.mjs +46 -0
  16. package/adapters/calendar.d.ts +16 -0
  17. package/adapters/calendar.js +8 -0
  18. package/adapters/calendar.mjs +61 -0
  19. package/adapters/chart.d.ts +29 -0
  20. package/adapters/chart.js +8 -0
  21. package/adapters/chart.mjs +95 -0
  22. package/adapters/chat.d.ts +16 -0
  23. package/adapters/chat.js +8 -0
  24. package/adapters/chat.mjs +66 -0
  25. package/adapters/colorpicker.d.ts +16 -0
  26. package/adapters/colorpicker.js +8 -0
  27. package/adapters/colorpicker.mjs +60 -0
  28. package/adapters/combobox.d.ts +20 -0
  29. package/adapters/combobox.js +8 -0
  30. package/adapters/combobox.mjs +87 -0
  31. package/adapters/dashboard.d.ts +18 -0
  32. package/adapters/dashboard.js +8 -0
  33. package/adapters/dashboard.mjs +41 -0
  34. package/adapters/datepicker.d.ts +17 -0
  35. package/adapters/datepicker.js +8 -0
  36. package/adapters/datepicker.mjs +59 -0
  37. package/adapters/daterangepicker.d.ts +19 -0
  38. package/adapters/daterangepicker.js +8 -0
  39. package/adapters/daterangepicker.mjs +70 -0
  40. package/adapters/datetimepicker.d.ts +16 -0
  41. package/adapters/datetimepicker.js +8 -0
  42. package/adapters/datetimepicker.mjs +59 -0
  43. package/adapters/dialog.d.ts +15 -0
  44. package/adapters/dialog.js +8 -0
  45. package/adapters/dialog.mjs +58 -0
  46. package/adapters/drawer.d.ts +33 -0
  47. package/adapters/drawer.js +8 -0
  48. package/adapters/drawer.mjs +86 -0
  49. package/adapters/dropdownlist.d.ts +19 -0
  50. package/adapters/dropdownlist.js +8 -0
  51. package/adapters/dropdownlist.mjs +74 -0
  52. package/adapters/dropdowntree.d.ts +22 -0
  53. package/adapters/dropdowntree.js +8 -0
  54. package/adapters/dropdowntree.mjs +108 -0
  55. package/adapters/editor.d.ts +30 -0
  56. package/adapters/editor.js +8 -0
  57. package/adapters/editor.mjs +109 -0
  58. package/adapters/form.d.ts +20 -0
  59. package/adapters/form.js +10 -0
  60. package/adapters/form.mjs +115 -0
  61. package/adapters/gantt.d.ts +65 -0
  62. package/adapters/gantt.js +8 -0
  63. package/adapters/gantt.mjs +370 -0
  64. package/adapters/grid.d.ts +102 -0
  65. package/adapters/grid.js +8 -0
  66. package/adapters/grid.mjs +692 -0
  67. package/adapters/listbox.d.ts +18 -0
  68. package/adapters/listbox.js +8 -0
  69. package/adapters/listbox.mjs +87 -0
  70. package/adapters/listview.d.ts +22 -0
  71. package/adapters/listview.js +8 -0
  72. package/adapters/listview.mjs +80 -0
  73. package/adapters/map.d.ts +32 -0
  74. package/adapters/map.js +8 -0
  75. package/adapters/map.mjs +88 -0
  76. package/adapters/maskedtextbox.d.ts +17 -0
  77. package/adapters/maskedtextbox.js +8 -0
  78. package/adapters/maskedtextbox.mjs +57 -0
  79. package/adapters/menu.d.ts +16 -0
  80. package/adapters/menu.js +8 -0
  81. package/adapters/menu.mjs +50 -0
  82. package/adapters/multiselect.d.ts +19 -0
  83. package/adapters/multiselect.js +8 -0
  84. package/adapters/multiselect.mjs +75 -0
  85. package/adapters/notification.d.ts +17 -0
  86. package/adapters/notification.js +8 -0
  87. package/adapters/notification.mjs +57 -0
  88. package/adapters/numerictextbox.d.ts +19 -0
  89. package/adapters/numerictextbox.js +8 -0
  90. package/adapters/numerictextbox.mjs +78 -0
  91. package/adapters/panelbar.d.ts +17 -0
  92. package/adapters/panelbar.js +8 -0
  93. package/adapters/panelbar.mjs +66 -0
  94. package/adapters/pivotgrid.d.ts +16 -0
  95. package/adapters/pivotgrid.js +8 -0
  96. package/adapters/pivotgrid.mjs +126 -0
  97. package/adapters/rangeslider.d.ts +21 -0
  98. package/adapters/rangeslider.js +8 -0
  99. package/adapters/rangeslider.mjs +55 -0
  100. package/adapters/rating.d.ts +16 -0
  101. package/adapters/rating.js +8 -0
  102. package/adapters/rating.mjs +60 -0
  103. package/adapters/scheduler.d.ts +45 -0
  104. package/adapters/scheduler.js +8 -0
  105. package/adapters/scheduler.mjs +165 -0
  106. package/adapters/scrollview.d.ts +21 -0
  107. package/adapters/scrollview.js +8 -0
  108. package/adapters/scrollview.mjs +74 -0
  109. package/adapters/signature.d.ts +16 -0
  110. package/adapters/signature.js +8 -0
  111. package/adapters/signature.mjs +47 -0
  112. package/adapters/slider.d.ts +19 -0
  113. package/adapters/slider.js +8 -0
  114. package/adapters/slider.mjs +47 -0
  115. package/adapters/sortable.d.ts +17 -0
  116. package/adapters/sortable.js +8 -0
  117. package/adapters/sortable.mjs +67 -0
  118. package/adapters/spreadsheet.d.ts +32 -0
  119. package/adapters/spreadsheet.js +8 -0
  120. package/adapters/spreadsheet.mjs +256 -0
  121. package/adapters/stepper.d.ts +23 -0
  122. package/adapters/stepper.js +8 -0
  123. package/adapters/stepper.mjs +47 -0
  124. package/adapters/switch.d.ts +17 -0
  125. package/adapters/switch.js +8 -0
  126. package/adapters/switch.mjs +48 -0
  127. package/adapters/tabstrip.d.ts +19 -0
  128. package/adapters/tabstrip.js +8 -0
  129. package/adapters/tabstrip.mjs +47 -0
  130. package/adapters/taskboard.d.ts +20 -0
  131. package/adapters/taskboard.js +8 -0
  132. package/adapters/taskboard.mjs +104 -0
  133. package/adapters/textarea.d.ts +16 -0
  134. package/adapters/textarea.js +8 -0
  135. package/adapters/textarea.mjs +57 -0
  136. package/adapters/textbox.d.ts +19 -0
  137. package/adapters/textbox.js +8 -0
  138. package/adapters/textbox.mjs +61 -0
  139. package/adapters/timepicker.d.ts +16 -0
  140. package/adapters/timepicker.js +8 -0
  141. package/adapters/timepicker.mjs +59 -0
  142. package/adapters/treelist.d.ts +81 -0
  143. package/adapters/treelist.js +8 -0
  144. package/adapters/treelist.mjs +403 -0
  145. package/adapters/treeview.d.ts +25 -0
  146. package/adapters/treeview.js +9 -0
  147. package/adapters/treeview.mjs +212 -0
  148. package/adapters/upload.d.ts +15 -0
  149. package/adapters/upload.js +8 -0
  150. package/adapters/upload.mjs +52 -0
  151. package/adapters/utils.d.ts +16 -0
  152. package/adapters/utils.js +8 -0
  153. package/adapters/utils.mjs +25 -0
  154. package/adapters/window.d.ts +17 -0
  155. package/adapters/window.js +8 -0
  156. package/adapters/window.mjs +99 -0
  157. package/commands/aiprompt.d.ts +30 -0
  158. package/commands/aiprompt.js +8 -0
  159. package/commands/aiprompt.mjs +54 -0
  160. package/commands/autocomplete.d.ts +26 -0
  161. package/commands/autocomplete.js +8 -0
  162. package/commands/autocomplete.mjs +36 -0
  163. package/commands/button.d.ts +19 -0
  164. package/commands/button.js +8 -0
  165. package/commands/button.mjs +21 -0
  166. package/commands/calendar.d.ts +29 -0
  167. package/commands/calendar.js +8 -0
  168. package/commands/calendar.mjs +52 -0
  169. package/commands/chart.d.ts +27 -0
  170. package/commands/chart.js +8 -0
  171. package/commands/chart.mjs +43 -0
  172. package/commands/chat.d.ts +22 -0
  173. package/commands/chat.js +8 -0
  174. package/commands/chat.mjs +30 -0
  175. package/commands/checkbox.d.ts +26 -0
  176. package/commands/checkbox.js +8 -0
  177. package/commands/checkbox.mjs +36 -0
  178. package/commands/colorpicker.d.ts +26 -0
  179. package/commands/colorpicker.js +8 -0
  180. package/commands/colorpicker.mjs +36 -0
  181. package/commands/combobox.d.ts +34 -0
  182. package/commands/combobox.js +8 -0
  183. package/commands/combobox.mjs +48 -0
  184. package/commands/dashboard.d.ts +19 -0
  185. package/commands/dashboard.js +8 -0
  186. package/commands/dashboard.mjs +21 -0
  187. package/commands/datepicker.d.ts +26 -0
  188. package/commands/datepicker.js +8 -0
  189. package/commands/datepicker.mjs +36 -0
  190. package/commands/daterangepicker.d.ts +27 -0
  191. package/commands/daterangepicker.js +8 -0
  192. package/commands/daterangepicker.mjs +37 -0
  193. package/commands/datetimepicker.d.ts +26 -0
  194. package/commands/datetimepicker.js +8 -0
  195. package/commands/datetimepicker.mjs +36 -0
  196. package/commands/dialog.d.ts +23 -0
  197. package/commands/dialog.js +8 -0
  198. package/commands/dialog.mjs +25 -0
  199. package/commands/drawer.d.ts +30 -0
  200. package/commands/drawer.js +8 -0
  201. package/commands/drawer.mjs +38 -0
  202. package/commands/dropdownlist.d.ts +30 -0
  203. package/commands/dropdownlist.js +8 -0
  204. package/commands/dropdownlist.mjs +42 -0
  205. package/commands/dropdowntree.d.ts +34 -0
  206. package/commands/dropdowntree.js +8 -0
  207. package/commands/dropdowntree.mjs +48 -0
  208. package/commands/editor.d.ts +26 -0
  209. package/commands/editor.js +8 -0
  210. package/commands/editor.mjs +36 -0
  211. package/commands/form.d.ts +34 -0
  212. package/commands/form.js +8 -0
  213. package/commands/form.mjs +54 -0
  214. package/commands/gantt.d.ts +119 -0
  215. package/commands/gantt.js +8 -0
  216. package/commands/gantt.mjs +156 -0
  217. package/commands/grid.d.ts +209 -0
  218. package/commands/grid.js +8 -0
  219. package/commands/grid.mjs +280 -0
  220. package/commands/index.d.ts +58 -0
  221. package/commands/listbox.d.ts +31 -0
  222. package/commands/listbox.js +8 -0
  223. package/commands/listbox.mjs +69 -0
  224. package/commands/listview.d.ts +22 -0
  225. package/commands/listview.js +8 -0
  226. package/commands/listview.mjs +29 -0
  227. package/commands/map.d.ts +43 -0
  228. package/commands/map.js +8 -0
  229. package/commands/map.mjs +77 -0
  230. package/commands/maskedtextbox.d.ts +26 -0
  231. package/commands/maskedtextbox.js +8 -0
  232. package/commands/maskedtextbox.mjs +36 -0
  233. package/commands/menu.d.ts +22 -0
  234. package/commands/menu.js +8 -0
  235. package/commands/menu.mjs +30 -0
  236. package/commands/multicolumncombobox.d.ts +34 -0
  237. package/commands/multicolumncombobox.js +8 -0
  238. package/commands/multicolumncombobox.mjs +48 -0
  239. package/commands/multiselect.d.ts +41 -0
  240. package/commands/multiselect.js +8 -0
  241. package/commands/multiselect.mjs +57 -0
  242. package/commands/notification.d.ts +27 -0
  243. package/commands/notification.js +8 -0
  244. package/commands/notification.mjs +46 -0
  245. package/commands/numerictextbox.d.ts +34 -0
  246. package/commands/numerictextbox.js +8 -0
  247. package/commands/numerictextbox.mjs +48 -0
  248. package/commands/panelbar.d.ts +29 -0
  249. package/commands/panelbar.js +8 -0
  250. package/commands/panelbar.mjs +43 -0
  251. package/commands/pivotgrid.d.ts +56 -0
  252. package/commands/pivotgrid.js +8 -0
  253. package/commands/pivotgrid.mjs +87 -0
  254. package/commands/rangeslider.d.ts +23 -0
  255. package/commands/rangeslider.js +8 -0
  256. package/commands/rangeslider.mjs +25 -0
  257. package/commands/rating.d.ts +26 -0
  258. package/commands/rating.js +8 -0
  259. package/commands/rating.mjs +36 -0
  260. package/commands/scheduler.d.ts +45 -0
  261. package/commands/scheduler.js +8 -0
  262. package/commands/scheduler.mjs +59 -0
  263. package/commands/scrollview.d.ts +30 -0
  264. package/commands/scrollview.js +8 -0
  265. package/commands/scrollview.mjs +46 -0
  266. package/commands/signature.d.ts +19 -0
  267. package/commands/signature.js +8 -0
  268. package/commands/signature.mjs +21 -0
  269. package/commands/slider.d.ts +22 -0
  270. package/commands/slider.js +8 -0
  271. package/commands/slider.mjs +24 -0
  272. package/commands/sortable.d.ts +23 -0
  273. package/commands/sortable.js +8 -0
  274. package/commands/sortable.mjs +32 -0
  275. package/commands/spreadsheet.d.ts +92 -0
  276. package/commands/spreadsheet.js +8 -0
  277. package/commands/spreadsheet.mjs +181 -0
  278. package/commands/stepper.d.ts +22 -0
  279. package/commands/stepper.js +8 -0
  280. package/commands/stepper.mjs +35 -0
  281. package/commands/switch.d.ts +26 -0
  282. package/commands/switch.js +8 -0
  283. package/commands/switch.mjs +36 -0
  284. package/commands/tabstrip.d.ts +23 -0
  285. package/commands/tabstrip.js +8 -0
  286. package/commands/tabstrip.mjs +30 -0
  287. package/commands/taskboard.d.ts +48 -0
  288. package/commands/taskboard.js +8 -0
  289. package/commands/taskboard.mjs +90 -0
  290. package/commands/textarea.d.ts +26 -0
  291. package/commands/textarea.js +8 -0
  292. package/commands/textarea.mjs +36 -0
  293. package/commands/textbox.d.ts +26 -0
  294. package/commands/textbox.js +8 -0
  295. package/commands/textbox.mjs +36 -0
  296. package/commands/timepicker.d.ts +26 -0
  297. package/commands/timepicker.js +8 -0
  298. package/commands/timepicker.mjs +36 -0
  299. package/commands/treelist.d.ts +135 -0
  300. package/commands/treelist.js +8 -0
  301. package/commands/treelist.mjs +177 -0
  302. package/commands/treeview.d.ts +44 -0
  303. package/commands/treeview.js +8 -0
  304. package/commands/treeview.mjs +84 -0
  305. package/commands/upload.d.ts +19 -0
  306. package/commands/upload.js +8 -0
  307. package/commands/upload.mjs +21 -0
  308. package/commands/window.d.ts +35 -0
  309. package/commands/window.js +8 -0
  310. package/commands/window.mjs +45 -0
  311. package/dist/cdn/js/kendo-react-webmcp.js +15 -0
  312. package/grid-mcp-tools.d.ts +26 -0
  313. package/grid-mcp-tools.js +8 -0
  314. package/grid-mcp-tools.mjs +75 -0
  315. package/index.d.mts +68 -0
  316. package/index.d.ts +68 -0
  317. package/index.js +8 -0
  318. package/index.mjs +308 -0
  319. package/mcp-types.d.ts +12 -0
  320. package/package.json +64 -0
  321. package/schemas/common.d.ts +27 -0
  322. package/schemas/common.js +8 -0
  323. package/schemas/common.mjs +113 -0
  324. package/schemas/gantt.d.ts +10 -0
  325. package/schemas/gantt.js +8 -0
  326. package/schemas/gantt.mjs +51 -0
  327. package/schemas/grid.d.ts +10 -0
  328. package/schemas/grid.js +8 -0
  329. package/schemas/grid.mjs +46 -0
  330. package/schemas/index.d.ts +13 -0
  331. package/schemas/input.d.ts +19 -0
  332. package/schemas/input.js +8 -0
  333. package/schemas/input.mjs +137 -0
  334. package/schemas/scheduler.d.ts +11 -0
  335. package/schemas/scheduler.js +8 -0
  336. package/schemas/scheduler.mjs +58 -0
  337. package/schemas/table.d.ts +12 -0
  338. package/schemas/table.js +8 -0
  339. package/schemas/table.mjs +87 -0
  340. package/types.d.ts +39 -0
@@ -0,0 +1,45 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { ToolAdapter } from '../types';
9
+ /**
10
+ * Scheduler tool adapter for the Web MCP Provider.
11
+ *
12
+ * Reads Scheduler props (data, modelFields, onDateChange, onViewChange, onDataChange, children)
13
+ * to register navigate, view-switch, and CRUD event tools.
14
+ *
15
+ * Imports the shared schema generators from `@progress/kendo-react-common` for rich
16
+ * input schemas for better AI agent guidance.
17
+ *
18
+ * Delegates all mutations to public Scheduler callbacks (onDateChange, onViewChange, onDataChange)
19
+ * following the React controlled-component pattern.
20
+ */
21
+ import * as React from 'react';
22
+ interface SchedulerAdapterHandle {
23
+ element?: HTMLDivElement | null;
24
+ props?: Record<string, unknown>;
25
+ }
26
+ interface SchedulerModelFields {
27
+ id?: string;
28
+ title?: string;
29
+ start?: string;
30
+ end?: string;
31
+ isAllDay?: string;
32
+ description?: string;
33
+ }
34
+ interface SchedulerAdapterProps {
35
+ data?: Array<Record<string, unknown>>;
36
+ children?: React.ReactNode;
37
+ modelFields?: SchedulerModelFields;
38
+ onDateChange?: (event: Record<string, unknown>) => void;
39
+ onViewChange?: (event: Record<string, unknown>) => void;
40
+ onDataChange?: (event: Record<string, unknown>) => void;
41
+ webMcp?: unknown;
42
+ }
43
+ /** @hidden */
44
+ export declare const schedulerAdapter: ToolAdapter<SchedulerAdapterHandle, SchedulerAdapterProps>;
45
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),s=require("../commands/scheduler.js"),h=require("./utils.js");function D(n){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return e.default=n,Object.freeze(e)}const x=D(w);function g(n){const e=n.modelFields;return{id:(e==null?void 0:e.id)||"id",title:(e==null?void 0:e.title)||"title",start:(e==null?void 0:e.start)||"start",end:(e==null?void 0:e.end)||"end",isAllDay:(e==null?void 0:e.isAllDay)||"isAllDay",description:(e==null?void 0:e.description)||"description"}}function N(n){const e=[];return x.Children.forEach(n,t=>{if(x.isValidElement(t)){const r=t.props.name;r&&e.push(r)}}),e}function b(n,e){const t=n.date;if(!t)return{content:[{type:"text",text:"Missing required argument: date"}],isError:!0};const r=new Date(t);if(Number.isNaN(r.getTime()))return{content:[{type:"text",text:`Invalid date: ${t}`}],isError:!0};const o=e.current;return o.onDateChange&&o.onDateChange({value:r}),{content:[{type:"text",text:`Navigated to ${r.toISOString().split("T")[0]}.`}]}}function T(n,e){const t=n.view;if(!t)return{content:[{type:"text",text:"Missing required argument: view"}],isError:!0};const r=e.current;return r.onViewChange&&r.onViewChange({value:t}),{content:[{type:"text",text:`Switched to ${t} view.`}]}}function $(n,e){const t=e.current;if(!t.onDataChange)return{content:[{type:"text",text:"Scheduler is not editable (no onDataChange handler)."}],isError:!0};const r=g(t),o=n.title||"New Event",d=n.start,a=n.end;if(!d||!a)return{content:[{type:"text",text:"Missing required arguments: start and end (ISO strings)"}],isError:!0};const i=new Date(d),u=new Date(a);if(Number.isNaN(i.getTime())||Number.isNaN(u.getTime()))return{content:[{type:"text",text:"Invalid start or end date."}],isError:!0};const c={[r.id]:Date.now(),[r.title]:o,[r.start]:i,[r.end]:u,[r.isAllDay]:n.isAllDay===!0};return n.description&&(c[r.description]=n.description),t.onDataChange({created:[c],updated:[],deleted:[]}),{content:[{type:"text",text:`Created event "${o}" from ${d} to ${a}.`}]}}function E(n,e){const t=e.current;if(!t.onDataChange)return{content:[{type:"text",text:"Scheduler is not editable (no onDataChange handler)."}],isError:!0};const r=g(t),o=n.title;if(!o)return{content:[{type:"text",text:"Missing required argument: title"}],isError:!0};const d=t.data||[],a=n.start,i=d.find(u=>{if(h.toText(u[r.title])!==o)return!1;if(a){const c=u[r.start];return(c instanceof Date?c.toISOString():h.toText(c)).startsWith(a)}return!0});return i?(t.onDataChange({created:[],updated:[],deleted:[i]}),{content:[{type:"text",text:`Deleted event "${h.toText(i[r.title])}".`}]}):{content:[{type:"text",text:`Event "${o}" not found.`}],isError:!0}}function O(n,e,t){switch(n){case s.SchedulerCommands.Navigate:return b(e,t);case s.SchedulerCommands.View:return T(e,t);case s.SchedulerCommands.Create:return $(e,t);case s.SchedulerCommands.Delete:return E(e,t);default:return{content:[{type:"text",text:`Unknown command: ${n}`}],isError:!0}}}const M={componentSuffix:"scheduler",createTools(n,e,t,r){const o=[],d=l=>`${t.groupName}_${l}`,a=e.current,i=N(a.children),u=i.length>0?` Available views: ${i.join(", ")}.`:"",c=[{name:"navigate",description:`Navigate the ${t.dataName} scheduler to a specific date.`,commandType:s.SchedulerCommands.Navigate,enabled:!!a.onDateChange},{name:"set_view",description:`Switch the ${t.dataName} scheduler view.${u}`,commandType:s.SchedulerCommands.View,enabled:!!a.onViewChange},{name:"create_event",description:`Create a new event in the ${t.dataName} scheduler.`,commandType:s.SchedulerCommands.Create,enabled:!!a.onDataChange},{name:"delete_event",description:`Delete an event from the ${t.dataName} scheduler.`,commandType:s.SchedulerCommands.Delete,enabled:!!a.onDataChange}],m=e.current.webMcp,p=typeof m=="object"&&m!==null&&typeof m.tools=="function"?m.tools:void 0,C={tname:d,data:a.data},S=p?p(c,C):c;for(const l of S){if(!l.enabled)continue;const f=s.getSchedulerToolSchema(l.commandType),y=l.commandType;try{o.push(r.registerTool({name:d(l.name),description:l.description,inputSchema:f,execute:async v=>O(y,v||{},e)}))}catch{}}return o}};exports.schedulerAdapter=M;
@@ -0,0 +1,165 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import * as x from "react";
9
+ import { SchedulerCommands as d, getSchedulerToolSchema as f } from "../commands/scheduler.mjs";
10
+ import { toText as p } from "./utils.mjs";
11
+ function w(r) {
12
+ const e = r.modelFields;
13
+ return {
14
+ id: (e == null ? void 0 : e.id) || "id",
15
+ title: (e == null ? void 0 : e.title) || "title",
16
+ start: (e == null ? void 0 : e.start) || "start",
17
+ end: (e == null ? void 0 : e.end) || "end",
18
+ isAllDay: (e == null ? void 0 : e.isAllDay) || "isAllDay",
19
+ description: (e == null ? void 0 : e.description) || "description"
20
+ };
21
+ }
22
+ function S(r) {
23
+ const e = [];
24
+ return x.Children.forEach(r, (t) => {
25
+ if (x.isValidElement(t)) {
26
+ const n = t.props.name;
27
+ n && e.push(n);
28
+ }
29
+ }), e;
30
+ }
31
+ function N(r, e) {
32
+ const t = r.date;
33
+ if (!t)
34
+ return { content: [{ type: "text", text: "Missing required argument: date" }], isError: !0 };
35
+ const n = new Date(t);
36
+ if (Number.isNaN(n.getTime()))
37
+ return { content: [{ type: "text", text: `Invalid date: ${t}` }], isError: !0 };
38
+ const o = e.current;
39
+ return o.onDateChange && o.onDateChange({ value: n }), { content: [{ type: "text", text: `Navigated to ${n.toISOString().split("T")[0]}.` }] };
40
+ }
41
+ function $(r, e) {
42
+ const t = r.view;
43
+ if (!t)
44
+ return { content: [{ type: "text", text: "Missing required argument: view" }], isError: !0 };
45
+ const n = e.current;
46
+ return n.onViewChange && n.onViewChange({ value: t }), { content: [{ type: "text", text: `Switched to ${t} view.` }] };
47
+ }
48
+ function b(r, e) {
49
+ const t = e.current;
50
+ if (!t.onDataChange)
51
+ return {
52
+ content: [{ type: "text", text: "Scheduler is not editable (no onDataChange handler)." }],
53
+ isError: !0
54
+ };
55
+ const n = w(t), o = r.title || "New Event", s = r.start, a = r.end;
56
+ if (!s || !a)
57
+ return {
58
+ content: [{ type: "text", text: "Missing required arguments: start and end (ISO strings)" }],
59
+ isError: !0
60
+ };
61
+ const i = new Date(s), u = new Date(a);
62
+ if (Number.isNaN(i.getTime()) || Number.isNaN(u.getTime()))
63
+ return { content: [{ type: "text", text: "Invalid start or end date." }], isError: !0 };
64
+ const c = {
65
+ [n.id]: Date.now(),
66
+ [n.title]: o,
67
+ [n.start]: i,
68
+ [n.end]: u,
69
+ [n.isAllDay]: r.isAllDay === !0
70
+ };
71
+ return r.description && (c[n.description] = r.description), t.onDataChange({ created: [c], updated: [], deleted: [] }), {
72
+ content: [{ type: "text", text: `Created event "${o}" from ${s} to ${a}.` }]
73
+ };
74
+ }
75
+ function T(r, e) {
76
+ const t = e.current;
77
+ if (!t.onDataChange)
78
+ return {
79
+ content: [{ type: "text", text: "Scheduler is not editable (no onDataChange handler)." }],
80
+ isError: !0
81
+ };
82
+ const n = w(t), o = r.title;
83
+ if (!o)
84
+ return { content: [{ type: "text", text: "Missing required argument: title" }], isError: !0 };
85
+ const s = t.data || [], a = r.start, i = s.find((u) => {
86
+ if (p(u[n.title]) !== o)
87
+ return !1;
88
+ if (a) {
89
+ const c = u[n.start];
90
+ return (c instanceof Date ? c.toISOString() : p(c)).startsWith(a);
91
+ }
92
+ return !0;
93
+ });
94
+ return i ? (t.onDataChange({ created: [], updated: [], deleted: [i] }), {
95
+ content: [{ type: "text", text: `Deleted event "${p(i[n.title])}".` }]
96
+ }) : {
97
+ content: [{ type: "text", text: `Event "${o}" not found.` }],
98
+ isError: !0
99
+ };
100
+ }
101
+ function E(r, e, t) {
102
+ switch (r) {
103
+ case d.Navigate:
104
+ return N(e, t);
105
+ case d.View:
106
+ return $(e, t);
107
+ case d.Create:
108
+ return b(e, t);
109
+ case d.Delete:
110
+ return T(e, t);
111
+ default:
112
+ return { content: [{ type: "text", text: `Unknown command: ${r}` }], isError: !0 };
113
+ }
114
+ }
115
+ const M = {
116
+ componentSuffix: "scheduler",
117
+ createTools(r, e, t, n) {
118
+ const o = [], s = (l) => `${t.groupName}_${l}`, a = e.current, i = S(a.children), u = i.length > 0 ? ` Available views: ${i.join(", ")}.` : "", c = [
119
+ {
120
+ name: "navigate",
121
+ description: `Navigate the ${t.dataName} scheduler to a specific date.`,
122
+ commandType: d.Navigate,
123
+ enabled: !!a.onDateChange
124
+ },
125
+ {
126
+ name: "set_view",
127
+ description: `Switch the ${t.dataName} scheduler view.${u}`,
128
+ commandType: d.View,
129
+ enabled: !!a.onViewChange
130
+ },
131
+ {
132
+ name: "create_event",
133
+ description: `Create a new event in the ${t.dataName} scheduler.`,
134
+ commandType: d.Create,
135
+ enabled: !!a.onDataChange
136
+ },
137
+ {
138
+ name: "delete_event",
139
+ description: `Delete an event from the ${t.dataName} scheduler.`,
140
+ commandType: d.Delete,
141
+ enabled: !!a.onDataChange
142
+ }
143
+ ], m = e.current.webMcp, h = typeof m == "object" && m !== null && typeof m.tools == "function" ? m.tools : void 0, v = { tname: s, data: a.data }, y = h ? h(c, v) : c;
144
+ for (const l of y) {
145
+ if (!l.enabled)
146
+ continue;
147
+ const g = f(l.commandType), C = l.commandType;
148
+ try {
149
+ o.push(
150
+ n.registerTool({
151
+ name: s(l.name),
152
+ description: l.description,
153
+ inputSchema: g,
154
+ execute: async (D) => E(C, D || {}, e)
155
+ })
156
+ );
157
+ } catch {
158
+ }
159
+ }
160
+ return o;
161
+ }
162
+ };
163
+ export {
164
+ M as schedulerAdapter
165
+ };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { ToolAdapter } from '../types';
9
+ interface ScrollViewAdapterHandle {
10
+ element: HTMLElement | null;
11
+ focus: () => void;
12
+ }
13
+ interface ScrollViewAdapterProps {
14
+ activeView?: number;
15
+ data?: unknown[];
16
+ children?: unknown;
17
+ webMcp?: unknown;
18
+ }
19
+ /** @hidden */
20
+ export declare const scrollViewAdapter: ToolAdapter<ScrollViewAdapterHandle, ScrollViewAdapterProps>;
21
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../commands/scrollview.js"),T=".k-scrollview-next",f=".k-scrollview-prev",E=".k-scrollview-nav .k-link";function y(r,a){var s;const t=(s=r==null?void 0:r.element)==null?void 0:s.querySelector(a);return t?(t.click(),!0):!1}const N={componentSuffix:"scrollview",createTools(r,a,t,s){const m=[],v=e=>`${t.groupName}_${e}`,p=[{name:"next",description:`Go to the next slide in the ${t.dataName} carousel.`,commandType:n.ScrollViewCommands.Next,enabled:!0},{name:"previous",description:`Go to the previous slide in the ${t.dataName} carousel.`,commandType:n.ScrollViewCommands.Previous,enabled:!0},{name:"navigate",description:`Jump to a specific slide in the ${t.dataName} carousel.`,commandType:n.ScrollViewCommands.Navigate,enabled:!0}],i=a.current.webMcp,x=typeof i=="object"&&i!==null&&typeof i.tools=="function"?i.tools:void 0,w=x?x(p):p,S=async(e,u)=>{var l;const o=r;switch(e){case n.ScrollViewCommands.Next:return y(o,T)?{content:[{type:"text",text:"Moved to next slide."}]}:{content:[{type:"text",text:"Already on the last slide."}],isError:!0};case n.ScrollViewCommands.Previous:return y(o,f)?{content:[{type:"text",text:"Moved to previous slide."}]}:{content:[{type:"text",text:"Already on the first slide."}],isError:!0};case n.ScrollViewCommands.Navigate:{const c=Number(u.index),d=(l=o==null?void 0:o.element)==null?void 0:l.querySelectorAll(E);return d&&c>=0&&c<d.length?(d[c].click(),{content:[{type:"text",text:`Jumped to slide ${c+1}.`}]}):{content:[{type:"text",text:`Invalid slide index: ${c}`}],isError:!0}}default:return{content:[{type:"text",text:`Unknown command: ${e}`}],isError:!0}}};for(const e of w){if(!e.enabled)continue;const u=n.getScrollViewToolSchema(e.commandType),o=e.commandType;try{m.push(s.registerTool({name:v(e.name),description:e.description,inputSchema:u,execute:async l=>S(o,l||{})}))}catch{}}return m}};exports.scrollViewAdapter=N;
@@ -0,0 +1,74 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { ScrollViewCommands as n, getScrollViewToolSchema as E } from "../commands/scrollview.mjs";
9
+ const N = ".k-scrollview-next", w = ".k-scrollview-prev", S = ".k-scrollview-nav .k-link";
10
+ function y(r, a) {
11
+ var s;
12
+ const t = (s = r == null ? void 0 : r.element) == null ? void 0 : s.querySelector(a);
13
+ return t ? (t.click(), !0) : !1;
14
+ }
15
+ const k = {
16
+ componentSuffix: "scrollview",
17
+ createTools(r, a, t, s) {
18
+ const p = [], v = (e) => `${t.groupName}_${e}`, m = [
19
+ {
20
+ name: "next",
21
+ description: `Go to the next slide in the ${t.dataName} carousel.`,
22
+ commandType: n.Next,
23
+ enabled: !0
24
+ },
25
+ {
26
+ name: "previous",
27
+ description: `Go to the previous slide in the ${t.dataName} carousel.`,
28
+ commandType: n.Previous,
29
+ enabled: !0
30
+ },
31
+ {
32
+ name: "navigate",
33
+ description: `Jump to a specific slide in the ${t.dataName} carousel.`,
34
+ commandType: n.Navigate,
35
+ enabled: !0
36
+ }
37
+ ], i = a.current.webMcp, x = typeof i == "object" && i !== null && typeof i.tools == "function" ? i.tools : void 0, f = x ? x(m) : m, T = async (e, u) => {
38
+ var l;
39
+ const o = r;
40
+ switch (e) {
41
+ case n.Next:
42
+ return y(o, N) ? { content: [{ type: "text", text: "Moved to next slide." }] } : { content: [{ type: "text", text: "Already on the last slide." }], isError: !0 };
43
+ case n.Previous:
44
+ return y(o, w) ? { content: [{ type: "text", text: "Moved to previous slide." }] } : { content: [{ type: "text", text: "Already on the first slide." }], isError: !0 };
45
+ case n.Navigate: {
46
+ const c = Number(u.index), d = (l = o == null ? void 0 : o.element) == null ? void 0 : l.querySelectorAll(S);
47
+ return d && c >= 0 && c < d.length ? (d[c].click(), { content: [{ type: "text", text: `Jumped to slide ${c + 1}.` }] }) : { content: [{ type: "text", text: `Invalid slide index: ${c}` }], isError: !0 };
48
+ }
49
+ default:
50
+ return { content: [{ type: "text", text: `Unknown command: ${e}` }], isError: !0 };
51
+ }
52
+ };
53
+ for (const e of f) {
54
+ if (!e.enabled)
55
+ continue;
56
+ const u = E(e.commandType), o = e.commandType;
57
+ try {
58
+ p.push(
59
+ s.registerTool({
60
+ name: v(e.name),
61
+ description: e.description,
62
+ inputSchema: u,
63
+ execute: async (l) => T(o, l || {})
64
+ })
65
+ );
66
+ } catch {
67
+ }
68
+ }
69
+ return p;
70
+ }
71
+ };
72
+ export {
73
+ k as scrollViewAdapter
74
+ };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { ToolAdapter } from '../types';
9
+ interface SignatureAdapterProps {
10
+ value?: string;
11
+ onChange?: (event: Record<string, unknown>) => void;
12
+ webMcp?: unknown;
13
+ }
14
+ /** @hidden */
15
+ export declare const signatureAdapter: ToolAdapter<unknown, SignatureAdapterProps>;
16
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../commands/signature.js"),C={componentSuffix:"signature",createTools(l,o,r,m){const c=[],d=e=>`${r.groupName}_${e}`,s=[{name:"clear",description:`Clear the ${r.dataName} signature pad`,commandType:a.SignatureCommands.Clear,enabled:!!o.current.onChange}],t=o.current.webMcp,i=typeof t=="object"&&t!==null&&typeof t.tools=="function"?t.tools:void 0,g=i?i(s):s,p=async(e,u)=>{if(e===a.SignatureCommands.Clear){const n=o.current;return n.onChange&&n.onChange({value:"",syntheticEvent:null,target:l}),{content:[{type:"text",text:"Signature cleared."}]}}return{content:[{type:"text",text:`Unknown command: ${e}`}],isError:!0}};for(const e of g){if(!e.enabled)continue;const u=a.getSignatureToolSchema(e.commandType),n=e.commandType;try{c.push(m.registerTool({name:d(e.name),description:e.description,inputSchema:u,execute:async y=>p(n,y||{})}))}catch{}}return c}};exports.signatureAdapter=C;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { SignatureCommands as l, getSignatureToolSchema as f } from "../commands/signature.mjs";
9
+ const h = {
10
+ componentSuffix: "signature",
11
+ createTools(u, o, a, m) {
12
+ const c = [], p = (t) => `${a.groupName}_${t}`, r = [
13
+ {
14
+ name: "clear",
15
+ description: `Clear the ${a.dataName} signature pad`,
16
+ commandType: l.Clear,
17
+ enabled: !!o.current.onChange
18
+ }
19
+ ], e = o.current.webMcp, s = typeof e == "object" && e !== null && typeof e.tools == "function" ? e.tools : void 0, d = s ? s(r) : r, g = async (t, i) => {
20
+ if (t === l.Clear) {
21
+ const n = o.current;
22
+ return n.onChange && n.onChange({ value: "", syntheticEvent: null, target: u }), { content: [{ type: "text", text: "Signature cleared." }] };
23
+ }
24
+ return { content: [{ type: "text", text: `Unknown command: ${t}` }], isError: !0 };
25
+ };
26
+ for (const t of d) {
27
+ if (!t.enabled)
28
+ continue;
29
+ const i = f(t.commandType), n = t.commandType;
30
+ try {
31
+ c.push(
32
+ m.registerTool({
33
+ name: p(t.name),
34
+ description: t.description,
35
+ inputSchema: i,
36
+ execute: async (y) => g(n, y || {})
37
+ })
38
+ );
39
+ } catch {
40
+ }
41
+ }
42
+ return c;
43
+ }
44
+ };
45
+ export {
46
+ h as signatureAdapter
47
+ };
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { ToolAdapter } from '../types';
9
+ interface SliderAdapterProps {
10
+ value?: number;
11
+ min?: number;
12
+ max?: number;
13
+ step?: number;
14
+ onChange?: (event: Record<string, unknown>) => void;
15
+ webMcp?: unknown;
16
+ }
17
+ /** @hidden */
18
+ export declare const sliderAdapter: ToolAdapter<unknown, SliderAdapterProps>;
19
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../commands/slider.js"),y={componentSuffix:"slider",createTools(u,r,s,m){const i=[],p=e=>`${s.groupName}_${e}`,t=r.current,S=t.min!==void 0&&t.max!==void 0?` Range: ${t.min}-${t.max}.`:"",l=[{name:"set_value",description:`Set the ${s.dataName} slider to a specific value.${S}`,commandType:a.SliderCommands.SetValue,enabled:!!t.onChange}],o=t.webMcp,d=typeof o=="object"&&o!==null&&typeof o.tools=="function"?o.tools:void 0,f=d?d(l):l,g=async(e,n)=>{if(e===a.SliderCommands.SetValue){const c=r.current;return c.onChange&&c.onChange({value:n.value,syntheticEvent:null,target:u}),{content:[{type:"text",text:`Slider set to ${String(n.value)}.`}]}}return{content:[{type:"text",text:`Unknown command: ${e}`}],isError:!0}};for(const e of f){if(!e.enabled)continue;const n=e.commandType;try{i.push(m.registerTool({name:p(e.name),description:e.description,inputSchema:a.getSliderToolSchema(n),execute:async c=>g(n,c||{})}))}catch{}}return i}};exports.sliderAdapter=y;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { SliderCommands as m, getSliderToolSchema as y } from "../commands/slider.mjs";
9
+ const h = {
10
+ componentSuffix: "slider",
11
+ createTools(u, a, r, d) {
12
+ const s = [], p = (e) => `${r.groupName}_${e}`, t = a.current, f = t.min !== void 0 && t.max !== void 0 ? ` Range: ${t.min}-${t.max}.` : "", i = [
13
+ {
14
+ name: "set_value",
15
+ description: `Set the ${r.dataName} slider to a specific value.${f}`,
16
+ commandType: m.SetValue,
17
+ enabled: !!t.onChange
18
+ }
19
+ ], o = t.webMcp, l = typeof o == "object" && o !== null && typeof o.tools == "function" ? o.tools : void 0, g = l ? l(i) : i, x = async (e, n) => {
20
+ if (e === m.SetValue) {
21
+ const c = a.current;
22
+ return c.onChange && c.onChange({ value: n.value, syntheticEvent: null, target: u }), { content: [{ type: "text", text: `Slider set to ${String(n.value)}.` }] };
23
+ }
24
+ return { content: [{ type: "text", text: `Unknown command: ${e}` }], isError: !0 };
25
+ };
26
+ for (const e of g) {
27
+ if (!e.enabled)
28
+ continue;
29
+ const n = e.commandType;
30
+ try {
31
+ s.push(
32
+ d.registerTool({
33
+ name: p(e.name),
34
+ description: e.description,
35
+ inputSchema: y(n),
36
+ execute: async (c) => x(n, c || {})
37
+ })
38
+ );
39
+ } catch {
40
+ }
41
+ }
42
+ return s;
43
+ }
44
+ };
45
+ export {
46
+ h as sliderAdapter
47
+ };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { ToolAdapter } from '../types';
9
+ interface SortableAdapterProps {
10
+ data?: unknown[];
11
+ onDragOver?: (event: Record<string, unknown>) => void;
12
+ onNavigate?: (event: Record<string, unknown>) => void;
13
+ webMcp?: unknown;
14
+ }
15
+ /** @hidden */
16
+ export declare const sortableAdapter: ToolAdapter<unknown, SortableAdapterProps>;
17
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../commands/sortable.js"),w={componentSuffix:"sortable",createTools(l,c,d,f){const m=[],g=e=>`${d.groupName}_${e}`,u=c.current,v=!!u.onDragOver||!!u.onNavigate,p=[{name:"reorder",description:`Move an item to a new position in the ${d.dataName} sortable list`,commandType:i.SortableCommands.Reorder,enabled:v}],r=c.current.webMcp,b=typeof r=="object"&&r!==null&&typeof r.tools=="function"?r.tools:void 0,x=b?b(p):p,S=async(e,o)=>{const t=c.current;if(e===i.SortableCommands.Reorder){const n=Number(o.oldIndex),s=Number(o.newIndex),a=t.data?[...t.data]:[],[y]=a.splice(n,1);return y!==void 0&&a.splice(s,0,y),t.onNavigate?t.onNavigate({oldIndex:n,newIndex:s,newState:a,syntheticEvent:null,target:l}):t.onDragOver&&t.onDragOver({oldIndex:n,newIndex:s,newState:a,syntheticEvent:null,target:l}),{content:[{type:"text",text:`Moved item from position ${String(o.oldIndex)} to ${String(o.newIndex)}.`}]}}return{content:[{type:"text",text:`Unknown command: ${e}`}],isError:!0}};for(const e of x){if(!e.enabled)continue;const o=i.getSortableToolSchema(e.commandType),t=e.commandType;try{m.push(f.registerTool({name:g(e.name),description:e.description,inputSchema:o,execute:async n=>S(t,n||{})}))}catch{}}return m}};exports.sortableAdapter=w;
@@ -0,0 +1,67 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { SortableCommands as b, getSortableToolSchema as S } from "../commands/sortable.mjs";
9
+ const N = {
10
+ componentSuffix: "sortable",
11
+ createTools(i, c, d, f) {
12
+ const l = [], v = (t) => `${d.groupName}_${t}`, m = c.current, y = !!m.onDragOver || !!m.onNavigate, p = [
13
+ {
14
+ name: "reorder",
15
+ description: `Move an item to a new position in the ${d.dataName} sortable list`,
16
+ commandType: b.Reorder,
17
+ enabled: y
18
+ }
19
+ ], r = c.current.webMcp, u = typeof r == "object" && r !== null && typeof r.tools == "function" ? r.tools : void 0, g = u ? u(p) : p, w = async (t, o) => {
20
+ const e = c.current;
21
+ if (t === b.Reorder) {
22
+ const n = Number(o.oldIndex), s = Number(o.newIndex), a = e.data ? [...e.data] : [], [x] = a.splice(n, 1);
23
+ return x !== void 0 && a.splice(s, 0, x), e.onNavigate ? e.onNavigate({
24
+ oldIndex: n,
25
+ newIndex: s,
26
+ newState: a,
27
+ syntheticEvent: null,
28
+ target: i
29
+ }) : e.onDragOver && e.onDragOver({
30
+ oldIndex: n,
31
+ newIndex: s,
32
+ newState: a,
33
+ syntheticEvent: null,
34
+ target: i
35
+ }), {
36
+ content: [
37
+ {
38
+ type: "text",
39
+ text: `Moved item from position ${String(o.oldIndex)} to ${String(o.newIndex)}.`
40
+ }
41
+ ]
42
+ };
43
+ }
44
+ return { content: [{ type: "text", text: `Unknown command: ${t}` }], isError: !0 };
45
+ };
46
+ for (const t of g) {
47
+ if (!t.enabled)
48
+ continue;
49
+ const o = S(t.commandType), e = t.commandType;
50
+ try {
51
+ l.push(
52
+ f.registerTool({
53
+ name: v(t.name),
54
+ description: t.description,
55
+ inputSchema: o,
56
+ execute: async (n) => w(e, n || {})
57
+ })
58
+ );
59
+ } catch {
60
+ }
61
+ }
62
+ return l;
63
+ }
64
+ };
65
+ export {
66
+ N as sortableAdapter
67
+ };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ import { ToolAdapter } from '../types';
9
+ interface SpreadsheetHandle {
10
+ instance?: unknown;
11
+ toJSON(): unknown;
12
+ fromJSON(data: unknown): void;
13
+ sheets(): SpreadsheetSheet[];
14
+ activeSheet(sheet?: SpreadsheetSheet): SpreadsheetSheet;
15
+ executeCommand(args: Record<string, unknown>): void;
16
+ saveAsExcel(options?: Record<string, unknown>): void;
17
+ }
18
+ interface SpreadsheetProps {
19
+ webMcp?: unknown;
20
+ }
21
+ /** Minimal shape for the Kendo Spreadsheet sheet widget. */
22
+ interface SpreadsheetSheet {
23
+ range(ref: string): {
24
+ value(v?: unknown): unknown;
25
+ [key: string]: any;
26
+ };
27
+ name(): string;
28
+ activeCell(): string;
29
+ }
30
+ /** @hidden */
31
+ export declare const spreadsheetAdapter: ToolAdapter<SpreadsheetHandle, SpreadsheetProps>;
32
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @license
3
+ *-------------------------------------------------------------------------------------------
4
+ * Copyright © 2026 Progress Software Corporation. All rights reserved.
5
+ * Licensed under commercial license. See LICENSE.md in the package root for more information
6
+ *-------------------------------------------------------------------------------------------
7
+ */
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../commands/spreadsheet.js");function l(t,r){if(!(r!=null&&r.instance))return{content:[{type:"text",text:"Spreadsheet ref not available."}],isError:!0};const e=t.ref;if(!e)return{content:[{type:"text",text:'Missing required argument: ref (e.g. "A1")'}],isError:!0};const a=r.activeSheet();return a?(a.range(e).value(t.value),{content:[{type:"text",text:`Set ${e} = ${JSON.stringify(t.value)}.`}]}):{content:[{type:"text",text:"No active sheet."}],isError:!0}}function f(t,r){if(!(r!=null&&r.instance))return{content:[{type:"text",text:"Spreadsheet ref not available."}],isError:!0};const e=t.cells;if(!Array.isArray(e)||e.length===0)return{content:[{type:"text",text:"Missing required argument: cells (array of {ref, value})"}],isError:!0};const a=r.activeSheet();if(!a)return{content:[{type:"text",text:"No active sheet."}],isError:!0};for(const s of e)s.ref&&a.range(s.ref).value(s.value);return{content:[{type:"text",text:`Set ${e.length} cell(s).`}]}}function y(t,r){if(!r)return{content:[{type:"text",text:"Spreadsheet ref not available."}],isError:!0};const e=t.name;if(!e)return{content:[{type:"text",text:"Missing required argument: name"}],isError:!0};const s=r.sheets().find(o=>o.name()===e);return s?(r.activeSheet(s),{content:[{type:"text",text:`Switched to sheet "${e}".`}]}):{content:[{type:"text",text:`Sheet "${e}" not found.`}],isError:!0}}function v(t,r){if(!(r!=null&&r.instance))return{content:[{type:"text",text:"Spreadsheet ref not available."}],isError:!0};const e=r.instance;if(e.insertSheet){const o=t.name;e.insertSheet(o?{name:o}:void 0)}const a=t.name;return{content:[{type:"text",text:a?'Sheet "'+a+'" added.':"Sheet added."}]}}function C(t,r){if(!(r!=null&&r.instance))return{content:[{type:"text",text:"Spreadsheet ref not available."}],isError:!0};const e=t.name;if(!e)return{content:[{type:"text",text:"Missing required argument: name"}],isError:!0};const a=r.activeSheet();if(!a)return{content:[{type:"text",text:"No active sheet."}],isError:!0};const s=r.instance;if(s.renameSheet)s.renameSheet(a,e);else return{content:[{type:"text",text:"Rename sheet is not supported by this instance."}],isError:!0};return{content:[{type:"text",text:`Sheet renamed to "${e}".`}]}}function b(t){return t!=null&&t.instance?(t.saveAsExcel({}),{content:[{type:"text",text:"Export triggered."}]}):{content:[{type:"text",text:"Spreadsheet ref not available."}],isError:!0}}function E(t,r){if(!(r!=null&&r.instance))return{content:[{type:"text",text:"Spreadsheet ref not available."}],isError:!0};const e=t.ref;if(!e)return{content:[{type:"text",text:'Missing required argument: ref (e.g. "A1")'}],isError:!0};const a=r.activeSheet();if(!a)return{content:[{type:"text",text:"No active sheet."}],isError:!0};const s=a.range(e).value();return{content:[{type:"text",text:JSON.stringify(s)}]}}function N(t){if(!t)return{content:[{type:"text",text:"Spreadsheet ref not available."}],isError:!0};const r=t.toJSON();return{content:[{type:"text",text:JSON.stringify(r)}]}}function g(t,r){if(!r)return{content:[{type:"text",text:"Spreadsheet ref not available."}],isError:!0};const e=t.data;return!e||typeof e!="object"?{content:[{type:"text",text:"Missing required argument: data (object)"}],isError:!0}:(r.fromJSON(e),{content:[{type:"text",text:"Workbook data loaded."}]})}function T(t){if(!t)return{content:[{type:"text",text:"Spreadsheet ref not available."}],isError:!0};const e=t.sheets().map(a=>a.name());return{content:[{type:"text",text:JSON.stringify(e)}]}}const $={bold:!0,italic:!0,underline:!0};function w(t,r){var a,s;if(!r)return{content:[{type:"text",text:"Spreadsheet ref not available."}],isError:!0};const e=t.command;if(!e)return{content:[{type:"text",text:"Missing required argument: command"}],isError:!0};if($[e]){const o=r.activeSheet();if(!o)return{content:[{type:"text",text:"No active sheet."}],isError:!0};const u=o.activeCell(),m=u?(s=(a=o.range(u))[e])==null?void 0:s.call(a):!1;r.executeCommand({command:"PropertyChangeCommand",options:{property:e,value:!m}})}else{const o=t.options||void 0;r.executeCommand(o?{command:e,...o}:{command:e})}return{content:[{type:"text",text:`Command "${e}" executed.`}]}}const _={componentSuffix:"spreadsheet",createTools(t,r,e,a){const s=[],o=c=>`${e.groupName}_${c}`,u=[{name:"set_cell",description:`Set a cell value in the ${e.dataName} spreadsheet.`,commandType:n.SpreadsheetCommands.SetCell,enabled:!0},{name:"set_cells",description:`Set multiple cell values at once in the ${e.dataName} spreadsheet. Preferred over multiple set_cell calls.`,commandType:n.SpreadsheetCommands.SetCells,enabled:!0},{name:"get_cell",description:`Get the value of a cell in the ${e.dataName} spreadsheet.`,commandType:n.SpreadsheetCommands.GetCell,enabled:!0},{name:"get_data",description:`Get the full workbook data from the ${e.dataName} spreadsheet as JSON.`,commandType:n.SpreadsheetCommands.GetData,enabled:!0},{name:"set_data",description:`Load workbook data into the ${e.dataName} spreadsheet from a JSON object.`,commandType:n.SpreadsheetCommands.SetData,enabled:!0},{name:"get_sheets",description:`Get the names of all sheets in the ${e.dataName} spreadsheet.`,commandType:n.SpreadsheetCommands.GetSheets,enabled:!0},{name:"switch_sheet",description:`Switch the active sheet in the ${e.dataName} spreadsheet by name.`,commandType:n.SpreadsheetCommands.SwitchSheet,enabled:!0},{name:"navigate_sheet",description:`Switch the active sheet in the ${e.dataName} spreadsheet.`,commandType:n.SpreadsheetCommands.NavigateSheet,enabled:!0},{name:"add_sheet",description:`Add a new sheet to the ${e.dataName} spreadsheet.`,commandType:n.SpreadsheetCommands.AddSheet,enabled:!0},{name:"rename_sheet",description:`Rename the active sheet in the ${e.dataName} spreadsheet.`,commandType:n.SpreadsheetCommands.RenameSheet,enabled:!0},{name:"export",description:`Export the ${e.dataName} spreadsheet (triggers Excel download).`,commandType:n.SpreadsheetCommands.Export,enabled:!0},{name:"execute_command",description:`Execute a command (e.g. bold, italic, underline, undo, redo) on the selected cells in the ${e.dataName} spreadsheet.`,commandType:n.SpreadsheetCommands.ExecuteCommand,enabled:!0}],m=r.current.webMcp,d=typeof m=="object"&&m!==null&&typeof m.tools=="function"?m.tools:void 0,p=d?d(u):u,x=async(c,i)=>{switch(c){case n.SpreadsheetCommands.SetCell:return l(i,t);case n.SpreadsheetCommands.SetCells:return f(i,t);case n.SpreadsheetCommands.GetCell:return E(i,t);case n.SpreadsheetCommands.GetData:return N(t);case n.SpreadsheetCommands.SetData:return g(i,t);case n.SpreadsheetCommands.GetSheets:return T(t);case n.SpreadsheetCommands.SwitchSheet:case n.SpreadsheetCommands.NavigateSheet:return y(i,t);case n.SpreadsheetCommands.AddSheet:return v(i,t);case n.SpreadsheetCommands.RenameSheet:return C(i,t);case n.SpreadsheetCommands.ExecuteCommand:return w(i,t);case n.SpreadsheetCommands.Export:return b(t);default:return{content:[{type:"text",text:`Unknown command: ${c}`}],isError:!0}}};for(const c of p){if(!c.enabled)continue;const i=n.getSpreadsheetToolSchema(c.commandType),S=c.commandType;try{s.push(a.registerTool({name:o(c.name),description:c.description,inputSchema:i,execute:async h=>x(S,h||{})}))}catch{}}return s}};exports.spreadsheetAdapter=_;