@progress/kendo-react-mcp 1.1.0 → 1.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.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- var D=Object.defineProperty;var _=(e,r,o)=>r in e?D(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o;var u=(e,r,o)=>_(e,typeof r!="symbol"?r+"":r,o);import{McpServer as M}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as O}from"@modelcontextprotocol/sdk/server/stdio.js";import{z as C}from"zod";var h="Kendo UI for React",g="react",S=["ActionSheet","AIPrompt","Animation","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","Breadcrumb","Button","ButtonGroup","Calendar","Card","Chart","Checkbox","Chip","ChipList","ChunkProgressBar","CircularGauge","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataGrid","Grid","DataQuery","DateMath","DateInput","DatePicker","DateRangePicker","DateTimePicker","Dialog","Drag&Drop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","Error","ExcelExport","ExpansionPanel","ExternalDropZone","FileSaver","FileManager","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","FontIcon","Form","Gantt","Gauge","General","GridLayout","Hint","InlineAIPrompt","Input","Label","LinearGauge","ListBox","ListView","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OrgChart","PageTemplates/BuildingBlocks","Pager","PanelBar","PDFProcessing","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","QRCode","RadialGauge","RadioButton","RadioGroup","RangeSlider","Rating","Ripple","Sankey","Scheduler","ScrollView","Signature","Skeleton","Slider","Sortable","Sparkline","SpeechToTextButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","StockChart","SVGIcon","Switch","TabStrip","TaskBoard","TextArea","TextBox","TileLayout","Timeline","TimePicker","Toolbar","Tooltip","TreeList","TreeView","Typography","Upload","VSCodeExtension","Window"];import{dirname as N,join as B}from"path";import{fileURLToPath as G}from"url";import{readFileSync as L}from"node:fs";import a from"node:fs";import p from"node:path";import U from"@grpc/proto-loader";import l from"@grpc/grpc-js";var E=["TELERIK_LICENSE","KENDO_UI_LICENSE"],y="TELERIK_LICENSE_PATH",c=(e=>(e[e.UNAUTHENTICATED=16]="UNAUTHENTICATED",e[e.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e))(c||{}),v=!1,i=process.env.DEBUG_LOG_FILE,x=!!(i&&typeof i=="string");if(x){let e=p.resolve(i),r=p.dirname(e);if(r!=="."&&r!==process.cwd()&&!a.existsSync(r))try{a.mkdirSync(r,{recursive:!0})}catch(o){console.error("Error creating log directory:",o)}if(!a.existsSync(e))try{a.writeFileSync(e,"")}catch(o){console.error("Error creating log file:",o)}}v=x&&!!i&&a.existsSync(p.resolve(i));function n(...e){if(v&&i){let r=`${new Date().toISOString()}: ${e.join(" ")}
3
- `,o=p.resolve(i);a.appendFile(o,r,t=>{t&&console.error("Error writing to log file:",t)})}}var s=process.env[y],m=process.env[E[0]]||process.env[E[1]],d=class extends Error{constructor(e){super(e),this.name="LicenseError"}};function R(){if(!s&&!m)throw new d(`No license found. Please set one of the following environment variables: ${E.join(", ")} or ${y}`);let e;if(s)try{e=L(s,"utf8"),n("License key read from file: ",s)}catch{throw new d(`Error reading license file: ${s}. Please verify the file exists and is readable.`)}return m&&(e=m,n("License key read from environment variable.")),e}var T=class{constructor(e,r){u(this,"client");u(this,"isDev");this.contextApiUrl=e,this.protoPath=r;let o=U.loadSync(this.protoPath,{keepCase:!0,longs:String,enums:String,defaults:!0,oneofs:!0});this.isDev=this.contextApiUrl?.includes("localhost")||this.contextApiUrl?.includes("127.0.0.1"),n("Using ContextApi URl:",this.contextApiUrl);let t=l.loadPackageDefinition(o);this.client=new t.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?l.credentials.createInsecure():l.credentials.createSsl())}async query(e){let r=this.isDev?"fake_license":R(),o=new l.Metadata;if(r&&typeof r=="string"){r=r.replace(/^\uFEFF/,"");try{o.add("x-license-key",r)}catch(t){return n("Error adding license key to metadata:",t),Promise.reject(new Error(`Failed to use license key: ${t.message}`))}}return r&&typeof r=="string"&&o.add("x-license-key",r),new Promise((t,I)=>{this.client.query(e,o,(f,A)=>{f?I(f):t(A)})})}};var b=B(N(G(import.meta.url)),"../proto/service.proto"),F=new T("contextapi.telerik.com:443",b);async function k(e){return F.query(e)}import q from"fs";import w from"path";import{fileURLToPath as V}from"url";var H=V(import.meta.url),$=w.dirname(H),K=w.resolve($,"../package.json"),J=JSON.parse(q.readFileSync(K,"utf-8")),P=new M({name:"kendo-and-kendo-resources",version:J.version});P.tool("kendo_react_assistant",`Answers questions and retrieves documentation about Kendo UI for React.
2
+ var D=Object.defineProperty;var _=(e,r,o)=>r in e?D(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o;var u=(e,r,o)=>_(e,typeof r!="symbol"?r+"":r,o);import{McpServer as M}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as O}from"@modelcontextprotocol/sdk/server/stdio.js";import{z as k}from"zod";var h="Kendo UI for React",g="react",S=["ActionSheet","AIPrompt","Animation","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","Breadcrumb","Button","ButtonGroup","Calendar","Card","Chart","ChartWizard","Chat","Checkbox","Chip","ChipList","ChunkProgressBar","CircularGauge","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataGrid","Grid","DataQuery","DateMath","DateInput","DatePicker","DateRangePicker","DateTimePicker","Dialog","Drag&Drop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","Error","ExcelExport","ExpansionPanel","ExternalDropZone","FileSaver","FileManager","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","FontIcon","Form","Gantt","Gauge","General","GridLayout","Hint","InlineAIPrompt","Input","Label","LinearGauge","ListBox","ListView","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OrgChart","PageTemplates/BuildingBlocks","Pager","PanelBar","PDFProcessing","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","QRCode","RadialGauge","RadioButton","RadioGroup","RangeSlider","Rating","Ripple","Sankey","Scheduler","ScrollView","Signature","Skeleton","Slider","Sortable","Sparkline","SpeechToTextButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","StockChart","SVGIcon","Switch","TabStrip","TaskBoard","TextArea","TextBox","TileLayout","Timeline","TimePicker","Toolbar","Tooltip","TreeList","TreeView","Typography","Upload","VSCodeExtension","Window"];import{dirname as N,join as B}from"path";import{fileURLToPath as G}from"url";import{readFileSync as L}from"node:fs";import a from"node:fs";import p from"node:path";import U from"@grpc/proto-loader";import l from"@grpc/grpc-js";var E=["TELERIK_LICENSE","KENDO_UI_LICENSE"],y="TELERIK_LICENSE_PATH",c=(e=>(e[e.UNAUTHENTICATED=16]="UNAUTHENTICATED",e[e.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e))(c||{}),v=!1,i=process.env.DEBUG_LOG_FILE,x=!!(i&&typeof i=="string");if(x){let e=p.resolve(i),r=p.dirname(e);if(r!=="."&&r!==process.cwd()&&!a.existsSync(r))try{a.mkdirSync(r,{recursive:!0})}catch(o){console.error("Error creating log directory:",o)}if(!a.existsSync(e))try{a.writeFileSync(e,"")}catch(o){console.error("Error creating log file:",o)}}v=x&&!!i&&a.existsSync(p.resolve(i));function n(...e){if(v&&i){let r=`${new Date().toISOString()}: ${e.join(" ")}
3
+ `,o=p.resolve(i);a.appendFile(o,r,t=>{t&&console.error("Error writing to log file:",t)})}}var s=process.env[y],m=process.env[E[0]]||process.env[E[1]],d=class extends Error{constructor(e){super(e),this.name="LicenseError"}};function R(){if(!s&&!m)throw new d(`No license found. Please set one of the following environment variables: ${E.join(", ")} or ${y}`);let e;if(s)try{e=L(s,"utf8"),n("License key read from file: ",s)}catch{throw new d(`Error reading license file: ${s}. Please verify the file exists and is readable.`)}return m&&(e=m,n("License key read from environment variable.")),e}var C=class{constructor(e,r){u(this,"client");u(this,"isDev");this.contextApiUrl=e,this.protoPath=r;let o=U.loadSync(this.protoPath,{keepCase:!0,longs:String,enums:String,defaults:!0,oneofs:!0});this.isDev=this.contextApiUrl?.includes("localhost")||this.contextApiUrl?.includes("127.0.0.1"),n("Using ContextApi URl:",this.contextApiUrl);let t=l.loadPackageDefinition(o);this.client=new t.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?l.credentials.createInsecure():l.credentials.createSsl())}async query(e){let r=this.isDev?"fake_license":R(),o=new l.Metadata;if(r&&typeof r=="string"){r=r.replace(/^\uFEFF/,"");try{o.add("x-license-key",r)}catch(t){return n("Error adding license key to metadata:",t),Promise.reject(new Error(`Failed to use license key: ${t.message}`))}}return r&&typeof r=="string"&&o.add("x-license-key",r),new Promise((t,I)=>{this.client.query(e,o,(f,A)=>{f?I(f):t(A)})})}};var b=B(N(G(import.meta.url)),"../proto/service.proto"),F=new C("contextapi.telerik.com:443",b);async function T(e){return F.query(e)}import q from"fs";import w from"path";import{fileURLToPath as V}from"url";var H=V(import.meta.url),$=w.dirname(H),K=w.resolve($,"../package.json"),J=JSON.parse(q.readFileSync(K,"utf-8")),P=new M({name:"kendo-and-kendo-resources",version:J.version});P.tool("kendo_react_assistant",`Answers questions and retrieves documentation about Kendo UI for React.
4
4
  Use this tool when the user asks about Kendo UI for React features, specific components (e.g., Grid, Chart, Editor), implementation details, or general usage.
5
5
  Provide the user's detailed question as the 'query'. If the question pertains to a specific Kendo UI for React component,
6
6
  specify its name in the 'component' parameter. This tool can be automatically triggered when the following phrases are detected in the user's input/prompt:
@@ -12,7 +12,7 @@ specify its name in the 'component' parameter. This tool can be automatically tr
12
12
  - '@kendo';
13
13
  - '@kendoreact';
14
14
  - '@ask_kendo';
15
- - '@help_kendo'.`,{query:C.string().describe("The query to search for."),component:C.enum(S).describe("The component to search for. If not specified, you can use General.")},async({query:e,component:r})=>{n("Calling tool: ",JSON.stringify({query:e,component:r})),r==="Grid"&&(r="DataGrid");try{let o=await k({query:e,component:r.toLocaleLowerCase(),lib_name:g,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]});n("Response from context API: ",JSON.stringify(o));let t=[{type:"text",text:o.values.join(`
15
+ - '@help_kendo'.`,{query:k.string().describe("The query to search for."),component:k.enum(S).describe("The component to search for. If not specified, you can use General.")},async({query:e,component:r})=>{n("Calling tool: ",JSON.stringify({query:e,component:r})),r==="Grid"&&(r="DataGrid");try{let o=await T({query:e,component:r.toLocaleLowerCase(),lib_name:g,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]});n("Response from context API: ",JSON.stringify(o));let t=[{type:"text",text:o.values.join(`
16
16
 
17
17
  `)}];return n("Response from tool: ",JSON.stringify(t)),{content:t}}catch(o){throw n("Error calling context API: ",JSON.stringify(o)),o?.code===c.UNAUTHENTICATED?new Error("Error: You are not authenticated. Please verify the Telerik License Key provided is valid."):o?.code===c.RESOURCE_EXHAUSTED?new Error(`Error: You have exceeded the extension quota. Upgrade to subscription licensing in order to unlock full access. Message: ${o.message}.`):o?.code===c.PERMISSION_DENIED?new Error(`Error: You do not have permission to access this resource. Please verify that you have a valid ${h} license key.`):o instanceof d?(n("License error: ",o.message),o):new Error(`Error: An error occurred while calling the service. Please try again later.
18
18
 
@@ -1,3 +1,3 @@
1
1
  export declare const REACT_SUITE_NAME = "Kendo UI for React";
2
2
  export declare const Suite = "react";
3
- export declare const ReactComponents: readonly ["ActionSheet", "AIPrompt", "Animation", "AppBar", "ArcGauge", "AutoComplete", "Avatar", "Badge", "Barcode", "BottomNavigation", "Breadcrumb", "Button", "ButtonGroup", "Calendar", "Card", "Chart", "Checkbox", "Chip", "ChipList", "ChunkProgressBar", "CircularGauge", "ColorGradient", "ColorPalette", "ColorPicker", "ComboBox", "ContextMenu", "ConversationalUI", "DataGrid", "Grid", "DataQuery", "DateMath", "DateInput", "DatePicker", "DateRangePicker", "DateTimePicker", "Dialog", "Drag&Drop", "Drawer", "Drawing", "DropDownButton", "DropDownList", "DropDownTree", "Editor", "Error", "ExcelExport", "ExpansionPanel", "ExternalDropZone", "FileSaver", "FileManager", "Filter", "FlatColorPicker", "FloatingActionButton", "FloatingLabel", "FontIcon", "Form", "Gantt", "Gauge", "General", "GridLayout", "Hint", "InlineAIPrompt", "Input", "Label", "LinearGauge", "ListBox", "ListView", "Loader", "Map", "MaskedTextBox", "Menu", "MultiColumnComboBox", "MultiSelect", "MultiSelectTree", "MultiViewCalendar", "Notification", "NumericTextBox", "OrgChart", "PageTemplates/BuildingBlocks", "Pager", "PanelBar", "PDFProcessing", "PDFViewer", "PivotGrid", "Popover", "Popup", "ProgressBar", "QRCode", "RadialGauge", "RadioButton", "RadioGroup", "RangeSlider", "Rating", "Ripple", "Sankey", "Scheduler", "ScrollView", "Signature", "Skeleton", "Slider", "Sortable", "Sparkline", "SpeechToTextButton", "SplitButton", "Splitter", "Spreadsheet", "StackLayout", "Stepper", "StockChart", "SVGIcon", "Switch", "TabStrip", "TaskBoard", "TextArea", "TextBox", "TileLayout", "Timeline", "TimePicker", "Toolbar", "Tooltip", "TreeList", "TreeView", "Typography", "Upload", "VSCodeExtension", "Window"];
3
+ export declare const ReactComponents: readonly ["ActionSheet", "AIPrompt", "Animation", "AppBar", "ArcGauge", "AutoComplete", "Avatar", "Badge", "Barcode", "BottomNavigation", "Breadcrumb", "Button", "ButtonGroup", "Calendar", "Card", "Chart", "ChartWizard", "Chat", "Checkbox", "Chip", "ChipList", "ChunkProgressBar", "CircularGauge", "ColorGradient", "ColorPalette", "ColorPicker", "ComboBox", "ContextMenu", "ConversationalUI", "DataGrid", "Grid", "DataQuery", "DateMath", "DateInput", "DatePicker", "DateRangePicker", "DateTimePicker", "Dialog", "Drag&Drop", "Drawer", "Drawing", "DropDownButton", "DropDownList", "DropDownTree", "Editor", "Error", "ExcelExport", "ExpansionPanel", "ExternalDropZone", "FileSaver", "FileManager", "Filter", "FlatColorPicker", "FloatingActionButton", "FloatingLabel", "FontIcon", "Form", "Gantt", "Gauge", "General", "GridLayout", "Hint", "InlineAIPrompt", "Input", "Label", "LinearGauge", "ListBox", "ListView", "Loader", "Map", "MaskedTextBox", "Menu", "MultiColumnComboBox", "MultiSelect", "MultiSelectTree", "MultiViewCalendar", "Notification", "NumericTextBox", "OrgChart", "PageTemplates/BuildingBlocks", "Pager", "PanelBar", "PDFProcessing", "PDFViewer", "PivotGrid", "Popover", "Popup", "ProgressBar", "QRCode", "RadialGauge", "RadioButton", "RadioGroup", "RangeSlider", "Rating", "Ripple", "Sankey", "Scheduler", "ScrollView", "Signature", "Skeleton", "Slider", "Sortable", "Sparkline", "SpeechToTextButton", "SplitButton", "Splitter", "Spreadsheet", "StackLayout", "Stepper", "StockChart", "SVGIcon", "Switch", "TabStrip", "TaskBoard", "TextArea", "TextBox", "TileLayout", "Timeline", "TimePicker", "Toolbar", "Tooltip", "TreeList", "TreeView", "Typography", "Upload", "VSCodeExtension", "Window"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-mcp",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "bin": "./dist/index.js",
6
6
  "license": "See LICENSE.md",