@progress/kendo-react-mcp 1.6.0-dev.fb926bc2.0 → 1.6.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/README.md CHANGED
@@ -26,87 +26,30 @@ To use the KendoReact MCP Server, you need:
26
26
 
27
27
  ## Installation
28
28
 
29
- Use the documentation of your AI-powered MCP client to add the KendoReact MCP server to a specific workspace or globally. You can see installation tips and examples for some popular MCP clients below.
29
+ Use the [Kendo CLI](https://www.npmjs.com/package/@progress/kendo-cli) and the built-in **Getting Started Assistant** to handle the entire setup automatically - whether you are starting a new project or adding KendoReact to an existing one.
30
30
 
31
- The generic settings of the KendoReact MCP Server are:
31
+ Follow these steps to set up the Agentic UI Generator and use it in your IDE (VS Code or another supported AI-enabled IDE):
32
32
 
33
- * Server name: `kendo-mcp`
34
- * Type: `stdio` (standard input/output transport)
35
- * Command: `npx` (the MCP server works through an npm package)
36
- * Supported arguments: `-y`
37
- * npm package name: `@progress/kendo-react-mcp`
38
- * You also need to add your [Telerik licence key](https://www.telerik.com/kendo-react-ui/components/my-license) as an `env` parameter in the `mcp.json` file. There are two options:
39
- * (recommended) Use a `TELERIK_LICENSE_PATH` argument and point to your Telerik license file location.
40
- * Use a `TELERIK_LICENSE` argument and paste your Telerik license key. Make sure to [update the license key](https://www.telerik.com/kendo-react-ui/components/my-license) when necessary.
33
+ 1. Open your terminal and install the Kendo CLI globally:
41
34
 
42
- > You can ignore the `env` parameter if you have the Telerik license key set up as a global environment variable on your machine. And if the MCP client supports passing global environment variables to MCP servers.
35
+ ```sh
36
+ npm i -g @progress/kendo-cli
37
+ ```
43
38
 
44
- ## Authentication
39
+ 1. Configure the KendoReact MCP server for your IDE and set up your Telerik license in a single step with the Kendo CLI:
45
40
 
46
- The KendoReact MCP server [requires an active Subscription or trial license](https://www.telerik.com/kendo-react-ui/components/ai-tools#license-requirements) and a valid key for authentication. You can configure your license key either globally on your machine or locally in the `mcp.json` configuration file.
41
+ ```sh
42
+ npx kendo react setup
43
+ ```
47
44
 
48
- - *(Recommended)* When set globally, the MCP server automatically recognizes the license and you can ignore the `env` parameter in the `mcp.json` setup.
49
- - When configured locally, you have to define either one of the following variables inside the `mcp.json` file:
50
- * `TELERIK_LICENSE_PATH`—to point to your license file location.
51
- * `TELERIK_LICENSE`—to paste your license key directly.
45
+ You are now ready to generate components and pages using the Agentic UI Generator in your IDE.
52
46
 
53
- For detailed instructions on obtaining and managing your license key, see [KendoReact Licensing](https://www.telerik.com/kendo-react-ui/components/my-license).
47
+ 1. Create a new empty folder for your project and open it in your IDE. Then, in the AI chat interface, invoke the **Getting Started Assistant**:
54
48
 
55
- ## Configuration Examples
49
+ ```prompt
50
+ #kendo_getting_started_assistant create a new React project
51
+ ```
56
52
 
57
- ### VSCode - Copilot
58
-
59
- Refer to [Use MCP servers in VS Code](https://code.visualstudio.com/docs/copilot/chat/mcp-servers).
60
-
61
- To enable the Kendo React MCP server in a specific workspace or React app, add a `.vscode` folder with an `mcp.json` file at the root of the workspace:
62
-
63
- > .vscode/mcp.json at the workspace root
64
-
65
- ```json
66
- {
67
- "servers": {
68
- "kendo-mcp": {
69
- "type": "stdio",
70
- "command": "npx",
71
- "args": ["-y", "@progress/kendo-react-mcp@latest"],
72
- "env": {
73
- "TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FILE",
74
- // or
75
- "TELERIK_LICENSE": "YOUR_LICENSE_KEY"
76
- }
77
- }
78
- }
79
- }
80
- ```
81
-
82
- > You can ignore the `env` parameter if you have the Telerik license key set up as a global environment variable on your machine. And if the MCP client supports passing global environment variables to MCP servers.
83
-
84
- ### Cursor
85
-
86
- Refer to [Model Context Protocol](https://docs.cursor.com/context/model-context-protocol).
87
-
88
- To [enable the KendoReact MCP server in a specific workspace](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server-to-your-workspace) or React app, add a `.cursor` folder with an `mcp.json` file at the root of the workspace.
89
-
90
- > .cursor/mcp.json at the workspace root
91
-
92
- ```json
93
- {
94
- "mcpServers": {
95
- "kendo-mcp": {
96
- "type": "stdio",
97
- "command": "npx",
98
- "args": ["-y", "@progress/kendo-react-mcp@latest"],
99
- "env": {
100
- "TELERIK_LICENSE_PATH": "THE_PATH_TO_YOUR_LICENSE_FILE",
101
- // or
102
- "TELERIK_LICENSE": "YOUR_LICENSE_KEY"
103
- },
104
- }
105
- }
106
- }
107
- ```
108
-
109
- > You can ignore the `env` parameter if you have the Telerik license key set up as a global environment variable on your machine. And if the MCP client supports passing global environment variables to MCP servers.
110
53
 
111
54
  ## Usage
112
55
 
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import{McpServer as St}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as Tt}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as ct,join as lt}from"path";import{fileURLToPath as dt}from"url";import{loadLicense as Je,decodeLicenseKey as Xe,decodeLicenseEvidence as Ze}from"@progress/kendo-licensing/utils";var B=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function te(e){return e.replace(/^\uFEFF/,"")}async function oe(e){let t=null,n=null;try{let o=Je();if(!o.success){let s=new B(o.message);throw e&&await e("license_load_failed",{error:o.message}).catch(()=>{}),s}try{t=(await Xe(o.value)).licenses.find(async r=>!!(await Ze(r)).userId)}catch(s){console.log(s.message),e&&await e("license_load_failed",{error:s.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[te(o.value),null]}catch(o){return n=o.message||"Unknown error loading license.",e&&await e("license_load_failed",{error:n}).catch(()=>{}),[null,n]}return[te(t),null]}import P from"node:fs";import U from"node:path";var q=!1,E=process.env.DEBUG_LOG_FILE,ne=!!(E&&typeof E=="string");if(ne){let e=U.resolve(E),t=U.dirname(e);if(t!=="."&&t!==process.cwd()&&!P.existsSync(t))try{P.mkdirSync(t,{recursive:!0})}catch(n){console.error("Error creating log directory:",n)}if(!P.existsSync(e))try{P.writeFileSync(e,"")}catch(n){console.error("Error creating log file:",n)}}else q=!1;q=ne&&!!E&&P.existsSync(U.resolve(E));function h(...e){if(q&&E){let o=`${new Date().toISOString()}: ${e.join(" ")}
3
- `,s=U.resolve(E);P.appendFile(s,o,r=>{r&&console.error("Error writing to log file:",r)})}}import et from"@grpc/proto-loader";import $ from"@grpc/grpc-js";import re from"path";import se from"fs";import{fileURLToPath as tt}from"url";var ot=tt(import.meta.url),nt=re.dirname(ot),ie={version:"unknown"},ae=re.resolve(nt,"../package.json");se.existsSync(ae)&&(ie=JSON.parse(se.readFileSync(ae,"utf-8")));function st(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var M=class{constructor(t,n,o){this.contextApiUrl=t;this.protoPath=n;this.options=o;this.toolNameHeader="assistant";let s=et.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"),h("Using ContextApi URl:",this.contextApiUrl);let r=$.loadPackageDefinition(s);this.client=new r.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?$.credentials.createInsecure():$.credentials.createSsl())}async getMetadata({meta:t}={meta:{}}){let[n,o]=this.isDev?["fake_license",null]:await oe((m,A)=>this.logEvent(m,A)),s=process.env.CONTEXTAPI_API_KEY,r=s&&typeof s=="string",a=n&&typeof n=="string";if(!a&&!r&&o)throw new Error(`Failed to authenticate with API key or License key!
2
+ import{McpServer as St}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as Tt}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as ct,join as lt}from"path";import{fileURLToPath as dt}from"url";import{loadLicense as Je,decodeLicenseKey as Xe,decodeLicenseEvidence as Ze}from"@progress/kendo-licensing/utils";var B=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function te(e){return e.replace(/^\uFEFF/,"")}async function oe(e){let t=null,n=null;try{let o=Je();if(!o.success){let s=new B(o.message);throw e&&await e("license_load_failed",{error:o.message}).catch(()=>{}),s}try{t=(await Xe(o.value)).licenses.find(async r=>!!(await Ze(r)).userId)}catch(s){console.log(s.message),e&&await e("license_load_failed",{error:s.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[te(o.value),null]}catch(o){return n=o.message||"Unknown error loading license.",e&&await e("license_load_failed",{error:n}).catch(()=>{}),[null,n]}return[te(t),null]}import P from"node:fs";import U from"node:path";var q=!1,E=process.env.DEBUG_LOG_FILE,ne=!!(E&&typeof E=="string");if(ne){let e=U.resolve(E),t=U.dirname(e);if(t!=="."&&t!==process.cwd()&&!P.existsSync(t))try{P.mkdirSync(t,{recursive:!0})}catch(n){console.error("Error creating log directory:",n)}if(!P.existsSync(e))try{P.writeFileSync(e,"")}catch(n){console.error("Error creating log file:",n)}}else q=!1;q=ne&&!!E&&P.existsSync(U.resolve(E));function g(...e){if(q&&E){let o=`${new Date().toISOString()}: ${e.join(" ")}
3
+ `,s=U.resolve(E);P.appendFile(s,o,r=>{r&&console.error("Error writing to log file:",r)})}}import et from"@grpc/proto-loader";import $ from"@grpc/grpc-js";import re from"path";import se from"fs";import{fileURLToPath as tt}from"url";var ot=tt(import.meta.url),nt=re.dirname(ot),ie={version:"unknown"},ae=re.resolve(nt,"../package.json");se.existsSync(ae)&&(ie=JSON.parse(se.readFileSync(ae,"utf-8")));function st(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var M=class{constructor(t,n,o){this.contextApiUrl=t;this.protoPath=n;this.options=o;this.toolNameHeader="assistant";let s=et.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"),g("Using ContextApi URl:",this.contextApiUrl);let r=$.loadPackageDefinition(s);this.client=new r.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?$.credentials.createInsecure():$.credentials.createSsl())}async getMetadata({meta:t}={meta:{}}){let[n,o]=this.isDev?["fake_license",null]:await oe((m,A)=>this.logEvent(m,A)),s=process.env.CONTEXTAPI_API_KEY,r=s&&typeof s=="string",a=n&&typeof n=="string";if(!a&&!r&&o)throw new Error(`Failed to authenticate with API key or License key!
4
4
 
5
- License Error: ${o}`);let i=new $.Metadata;if(a)try{i.add("x-license-key",n)}catch(m){throw h("Error adding license key to metadata:",m),new Error(`Failed to use license key: ${m.message}`)}r&&i.add("x-api-key",s),this.options?.libName&&i.add("x-library-name",this.options.libName),i.add("x-tool-name",this.toolNameHeader);let d=JSON.stringify({...t,source:"npm",version:ie.version,os:process.platform,node_version:process.version});return i.add("x-request-metadata",st(d)),i}async query(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.query(t,o,(a,i)=>{a?r(new Error(a)):s(i)})})}async getApiRefMatches(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.getApiRefMatches(t,o,(a,i)=>{a?r(new Error(a)):s(i)})})}async queryCssUtils(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.cssUtilsSearch(t,o,(a,i)=>{a?(h("Error querying CSS Utils:",a),r(new Error(a))):s(i)})})}async queryIconsSearch(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.iconsSearch(t,o,(a,i)=>{a?(h("Error querying Icons Search:",a),r(new Error(a))):s(i)})})}async queryBuildingBlocks(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.buildingBlocksSearch(t,o,(a,i)=>{a?(h("Error querying Building Blocks:",a),r(new Error(a))):s(i)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((n,o)=>{this.client.validateUserLicense(null,t,(s,r)=>{s?(h("Error validating user license:",s),o(new Error(s))):n(r)})})}async queryThemeGenerate(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.generateTheme(t,o,(a,i)=>{a?(h("Error querying context API/GenerateTheme:",a),r(new Error(a))):s(i)})})}async recordOrchestratorUserRequest({meta:t}){let n=await this.getMetadata({meta:t});return new Promise((o,s)=>{this.client.recordOrchestratorUserRequest(null,n,(r,a)=>{r?(h("Error recording orchestrator user request:",r),s(new Error(r))):o(a)})})}async logEvent(t,n){let o="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq";if(!o||typeof o!="string"){h("LOGGING_API_KEY not configured, skipping log event");return}let s=new $.Metadata;return s.add("x-api-key",o),new Promise((r,a)=>{this.client.logEvent({event_name:t,fields:n||{}},s,(i,d)=>{i?(h("Error logging event:",i),a(new Error(i))):r()})})}};import{z as K}from"zod";var Ht=K.object({user_id:K.string(),user_email:K.string().email()});import{z as b}from"zod";var at=b.object({Product:b.object({Id:b.number().int(),Code:b.string(),Name:b.string()}),License:b.nullable(b.object({Id:b.number().int(),Name:b.string(),Type:b.string(),Active:b.boolean()})),Availability:b.array(b.object({LicenseStart:b.nullable(b.string().datetime()),LicenseEnd:b.nullable(b.string().datetime())})),IsLicenseAvailable:b.optional(b.boolean())}),Yt=b.array(at);async function ce(e){let t=process.env.KENDO_MCP_ACCESS;if(t==="true"||t==="1"||t==="full")return"full";if(typeof t=="string"&&(t.toLowerCase()==="agent"||t.toLowerCase()==="assistant"))return t.toLowerCase();let n=await e();return n.toLocaleLowerCase()==="agentic_ui_generator"?"agent":n.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function le(){return'**Accessibility Guidelines: WCAG 2.2 Level AA Compliance**\n\n**Core Principles:**\n1. Use semantic HTML and ARIA correctly\n2. Ensure WCAG 2.2 AA compliance\n3. Follow W3C ARIA Authoring Practices\n4. Provide standards-based accessibility fixes\n\n**1. Form Control Labels** (WCAG 1.3.1, 3.3.2, 4.1.2)\nEvery input must have an associated label.\nCORRECT: `<input type="search" aria-label="Search products" placeholder="Search...">`\nWRONG: `<span>Email</span><input type="email">` (no association)\nWRONG: `<input type="email" placeholder="Email">` (placeholder as label)\n\n**2. Button Accessibility** (WCAG 4.1.2, 2.4.6, 2.5.3)\nAll buttons need accessible names describing their purpose.\nCORRECT: `<button type="button">Save Changes</button>`\nCORRECT: `<button aria-label="Close dialog"><svg aria-hidden="true" focusable="false">...</svg></button>`\nWRONG: `<button><svg>...</svg></button>` (no accessible name)\nWRONG: `<button>Click here</button>` (generic text)\n\n**3. Popup/Menu Triggers** (WCAG 4.1.2, 1.3.1)\nIndicate popup purpose and state using aria-haspopup, aria-expanded, aria-controls.\nCORRECT: `<button aria-expanded="false" aria-haspopup="menu" aria-controls="menu-id">Settings</button>`\n\n**4. Image Accessibility** (WCAG 1.1.1)\nInformative: `<img src="chart.png" alt="Sales increased 25% in Q4 2024">`\nFunctional: `<a href="/home"><img src="logo.png" alt="Company Name Home"></a>`\nDecorative: `<img src="border.png" alt="" role="presentation">`\nComplex: `<img src="chart.png" alt="Sales data" aria-describedby="desc-id">`\nWRONG: Missing alt, filename as alt, generic alt for decorative images\n\n**5. Link Accessibility** (WCAG 2.4.4, 2.4.6)\nLinks must be descriptive and understandable out of context.\nCORRECT: `<a href="/products">View All Products</a>`\nCORRECT: `<a href="/article" aria-label="Read more about New Product Launch">Read more</a>`\nWRONG: "Click here", "Read more", "Learn more" without context\n\n**6. Form Validation** (WCAG 3.3.1, 3.3.2, 3.3.3)\nErrors must be identified, associated with inputs, and provide suggestions. Use aria-describedby, aria-invalid="true", and role="alert".\n\n**7. Heading Structure** (WCAG 1.3.1, 2.4.6)\nEach page should have an `<h1>` that describes its content. Use hierarchical, descriptive headings with no skipped levels (h1\u2192h2\u2192h3).\nCORRECT: `<h1>Dashboard</h1> <h2>Sales</h2> <h3>By Region</h3>`\nWRONG: No `<h1>` on the page, or skipping levels (h1\u2192h3)\nIf a heading should look smaller than its semantic level, use CSS: `<h2 class="text-sm">Subtitle</h2>`\n\n**8. Page Component Landmark Rules** (WCAG 1.3.1, 4.1.2)\nPage components (route components) may be rendered inside a layout that already provides `<main>`, `<header>`, or `<footer>`. Since the layout configuration is unknown, avoid using these landmarks in page components to prevent potential duplication and nesting violations. Use `<div>`, `<section>`, or `<article>` as the top-level wrapper instead.\n\n**Quick Checklist:**\n- **Forms:** Associated labels, aria-required on required fields, autocomplete attributes, aria-describedby for errors, aria-invalid for invalid fields, fieldsets with legends\n- **Buttons/Links:** Accessible names, aria-label for icon buttons, aria-hidden on decorative icons, descriptive link text\n- **Popups/Dialogs:** aria-haspopup, aria-expanded, aria-controls, role="dialog", aria-modal="true", aria-labelledby, focus trap, Escape to close\n- **Images:** alt on all images, descriptive alt for informative, empty alt for decorative, aria-describedby for complex\n- **Structure:** One h1, logical heading hierarchy, avoid `<main>`, `<header>`, or `<footer>` in page/route components (the layout may already provide them), use `<section>` or `<div>` as page-level wrappers, semantic HTML\n- **Dynamic Content:** role="status"/aria-live="polite" for updates, role="alert"/aria-live="assertive" for critical alerts\n- **Keyboard/Focus:** All interactive elements keyboard accessible, logical focus order, visible focus indicators, no keyboard traps (except modals)\n- **Color/Contrast:** 4.5:1 text contrast (3:1 large text), 3:1 UI component contrast, no color-only information, 3:1 focus indicator contrast'}var rt=1440*60*1e3;function de(e){let{serverName:t,contextApi:n,additionalFields:o={},intervalMs:s=rt}=e,r="mcp_server_heartbeat",a=async()=>{try{let d={server_name:t,timestamp:new Date().toISOString(),...o};await n.logEvent(r,d)}catch(d){h(`Failed to send heartbeat for ${t}:`,d)}};a();let i=setInterval(a,s);return()=>{clearInterval(i),h(`Heartbeat stopped for ${t}`)}}import{z as F}from"zod";var it=["default","bootstrap","material","fluent"];function pe(e,t){return{projectName:F.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:F.boolean().default(!0).describe(`Whether to create a new project before configuring ${e}. Set to true to scaffold a brand-new project, or false if the project already exists and you only want to add ${e} to it.`),theme:F.enum(it).default("default").describe("The Kendo UI theme to use. Determines which theme package is installed and imported.")}}var l="Kendo UI for React",I="react",w="kendo";var O=["ActionSheet","AIPrompt","Animation","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","Breadcrumb","Button","ButtonGroup","BreadCrumb","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","Form","Gantt","Gauge","General","GridLayout","Hint","Icon","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","PromptBox","QRCode","RadialGauge","RadioButton","RadioGroup","RangeSlider","Rating","Ripple","Sankey","Scheduler","ScrollView","Signature","Skeleton","Slider","Sortable","Sparkline","SpeechToTextButton","SmartPasteButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","StockChart","SVGIcon","Switch","TabStrip","TaskBoard","TextArea","TextBox","TileLayout","Timeline","TimePicker","Toolbar","Tooltip","TreeList","TreeView","Typography","Upload","VSCodeExtension","Window"];var pt=lt(ct(dt(import.meta.url)),"../proto/service.proto"),_=new M("contextapi.telerik.com:443",pt,{libName:I});var me=async()=>_.validateUserLicense();import vt from"fs";import ze from"path";import{fileURLToPath as kt}from"url";import{z as C}from"zod";var v=class{constructor(t,n,o){this.name=t;this.config=n;this.cb=o}register(t){this.server=t,this.server.registerTool(this.name,this.config,this.cb)}hasAccess(t){return!this.config.requiredAccess||this.config.requiredAccess.length===0?!0:t==="full"||this.config.requiredAccess.includes(t)}};var D=(e,t)=>`# ${e.suiteName} - Code Validation & Quality Assurance
5
+ License Error: ${o}`);let i=new $.Metadata;if(a)try{i.add("x-license-key",n)}catch(m){throw g("Error adding license key to metadata:",m),new Error(`Failed to use license key: ${m.message}`)}r&&i.add("x-api-key",s),this.options?.libName&&i.add("x-library-name",this.options.libName),i.add("x-tool-name",this.toolNameHeader);let d=JSON.stringify({...t,source:"npm",version:ie.version,os:process.platform,node_version:process.version});return i.add("x-request-metadata",st(d)),i}async query(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.query(t,o,(a,i)=>{a?r(new Error(a)):s(i)})})}async getApiRefMatches(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.getApiRefMatches(t,o,(a,i)=>{a?r(new Error(a)):s(i)})})}async queryCssUtils(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.cssUtilsSearch(t,o,(a,i)=>{a?(g("Error querying CSS Utils:",a),r(new Error(a))):s(i)})})}async queryIconsSearch(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.iconsSearch(t,o,(a,i)=>{a?(g("Error querying Icons Search:",a),r(new Error(a))):s(i)})})}async queryBuildingBlocks(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.buildingBlocksSearch(t,o,(a,i)=>{a?(g("Error querying Building Blocks:",a),r(new Error(a))):s(i)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((n,o)=>{this.client.validateUserLicense(null,t,(s,r)=>{s?(g("Error validating user license:",s),o(new Error(s))):n(r)})})}async queryThemeGenerate(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.generateTheme(t,o,(a,i)=>{a?(g("Error querying context API/GenerateTheme:",a),r(new Error(a))):s(i)})})}async recordOrchestratorUserRequest({meta:t}){let n=await this.getMetadata({meta:t});return new Promise((o,s)=>{this.client.recordOrchestratorUserRequest(null,n,(r,a)=>{r?(g("Error recording orchestrator user request:",r),s(new Error(r))):o(a)})})}async recordToolUserRequest({toolName:t,meta:n}){let o=await this.getMetadata({meta:n});return new Promise((s,r)=>{this.client.recordToolUserRequest({tool_name:t},o,(a,i)=>{a?(g("Error recording tool user request:",a),r(new Error(a))):s(i)})})}async logEvent(t,n){let o="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq";if(!o||typeof o!="string"){g("LOGGING_API_KEY not configured, skipping log event");return}let s=new $.Metadata;return s.add("x-api-key",o),new Promise((r,a)=>{this.client.logEvent({event_name:t,fields:n||{}},s,(i,d)=>{i?(g("Error logging event:",i),a(new Error(i))):r()})})}};import{z as K}from"zod";var Ht=K.object({user_id:K.string(),user_email:K.string().email()});import{z as b}from"zod";var at=b.object({Product:b.object({Id:b.number().int(),Code:b.string(),Name:b.string()}),License:b.nullable(b.object({Id:b.number().int(),Name:b.string(),Type:b.string(),Active:b.boolean()})),Availability:b.array(b.object({LicenseStart:b.nullable(b.string().datetime()),LicenseEnd:b.nullable(b.string().datetime())})),IsLicenseAvailable:b.optional(b.boolean())}),Yt=b.array(at);async function ce(e){let t=process.env.KENDO_MCP_ACCESS;if(t==="true"||t==="1"||t==="full")return"full";if(typeof t=="string"&&(t.toLowerCase()==="agent"||t.toLowerCase()==="assistant"))return t.toLowerCase();let n=await e();return n.toLocaleLowerCase()==="agentic_ui_generator"?"agent":n.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function le(){return'**Accessibility Guidelines: WCAG 2.2 Level AA Compliance**\n\n**Core Principles:**\n1. Use semantic HTML and ARIA correctly\n2. Ensure WCAG 2.2 AA compliance\n3. Follow W3C ARIA Authoring Practices\n4. Provide standards-based accessibility fixes\n\n**1. Form Control Labels** (WCAG 1.3.1, 3.3.2, 4.1.2)\nEvery input must have an associated label.\nCORRECT: `<input type="search" aria-label="Search products" placeholder="Search...">`\nWRONG: `<span>Email</span><input type="email">` (no association)\nWRONG: `<input type="email" placeholder="Email">` (placeholder as label)\n\n**2. Button Accessibility** (WCAG 4.1.2, 2.4.6, 2.5.3)\nAll buttons need accessible names describing their purpose.\nCORRECT: `<button type="button">Save Changes</button>`\nCORRECT: `<button aria-label="Close dialog"><svg aria-hidden="true" focusable="false">...</svg></button>`\nWRONG: `<button><svg>...</svg></button>` (no accessible name)\nWRONG: `<button>Click here</button>` (generic text)\n\n**3. Popup/Menu Triggers** (WCAG 4.1.2, 1.3.1)\nIndicate popup purpose and state using aria-haspopup, aria-expanded, aria-controls.\nCORRECT: `<button aria-expanded="false" aria-haspopup="menu" aria-controls="menu-id">Settings</button>`\n\n**4. Image Accessibility** (WCAG 1.1.1)\nInformative: `<img src="chart.png" alt="Sales increased 25% in Q4 2024">`\nFunctional: `<a href="/home"><img src="logo.png" alt="Company Name Home"></a>`\nDecorative: `<img src="border.png" alt="" role="presentation">`\nComplex: `<img src="chart.png" alt="Sales data" aria-describedby="desc-id">`\nWRONG: Missing alt, filename as alt, generic alt for decorative images\n\n**5. Link Accessibility** (WCAG 2.4.4, 2.4.6)\nLinks must be descriptive and understandable out of context.\nCORRECT: `<a href="/products">View All Products</a>`\nCORRECT: `<a href="/article" aria-label="Read more about New Product Launch">Read more</a>`\nWRONG: "Click here", "Read more", "Learn more" without context\n\n**6. Form Validation** (WCAG 3.3.1, 3.3.2, 3.3.3)\nErrors must be identified, associated with inputs, and provide suggestions. Use aria-describedby, aria-invalid="true", and role="alert".\n\n**7. Heading Structure** (WCAG 1.3.1, 2.4.6)\nEach page should have an `<h1>` that describes its content. Use hierarchical, descriptive headings with no skipped levels (h1\u2192h2\u2192h3).\nCORRECT: `<h1>Dashboard</h1> <h2>Sales</h2> <h3>By Region</h3>`\nWRONG: No `<h1>` on the page, or skipping levels (h1\u2192h3)\nIf a heading should look smaller than its semantic level, use CSS: `<h2 class="text-sm">Subtitle</h2>`\n\n**8. Page Component Landmark Rules** (WCAG 1.3.1, 4.1.2)\nPage components (route components) may be rendered inside a layout that already provides `<main>`, `<header>`, or `<footer>`. Since the layout configuration is unknown, avoid using these landmarks in page components to prevent potential duplication and nesting violations. Use `<div>`, `<section>`, or `<article>` as the top-level wrapper instead.\n\n**Quick Checklist:**\n- **Forms:** Associated labels, aria-required on required fields, autocomplete attributes, aria-describedby for errors, aria-invalid for invalid fields, fieldsets with legends\n- **Buttons/Links:** Accessible names, aria-label for icon buttons, aria-hidden on decorative icons, descriptive link text\n- **Popups/Dialogs:** aria-haspopup, aria-expanded, aria-controls, role="dialog", aria-modal="true", aria-labelledby, focus trap, Escape to close\n- **Images:** alt on all images, descriptive alt for informative, empty alt for decorative, aria-describedby for complex\n- **Structure:** One h1, logical heading hierarchy, avoid `<main>`, `<header>`, or `<footer>` in page/route components (the layout may already provide them), use `<section>` or `<div>` as page-level wrappers, semantic HTML\n- **Dynamic Content:** role="status"/aria-live="polite" for updates, role="alert"/aria-live="assertive" for critical alerts\n- **Keyboard/Focus:** All interactive elements keyboard accessible, logical focus order, visible focus indicators, no keyboard traps (except modals)\n- **Color/Contrast:** 4.5:1 text contrast (3:1 large text), 3:1 UI component contrast, no color-only information, 3:1 focus indicator contrast'}var rt=1440*60*1e3;function de(e){let{serverName:t,contextApi:n,additionalFields:o={},intervalMs:s=rt}=e,r="mcp_server_heartbeat",a=async()=>{try{let d={server_name:t,timestamp:new Date().toISOString(),...o};await n.logEvent(r,d)}catch(d){g(`Failed to send heartbeat for ${t}:`,d)}};a();let i=setInterval(a,s);return()=>{clearInterval(i),g(`Heartbeat stopped for ${t}`)}}import{z as F}from"zod";var it=["default","bootstrap","material","fluent"];function pe(e,t){return{projectName:F.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:F.boolean().default(!0).describe(`Whether to create a new project before configuring ${e}. Set to true to scaffold a brand-new project, or false if the project already exists and you only want to add ${e} to it.`),theme:F.enum(it).default("default").describe("The Kendo UI theme to use. Determines which theme package is installed and imported.")}}var l="Kendo UI for React",I="react",w="kendo";var O=["ActionSheet","AIPrompt","Animation","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","Breadcrumb","Button","ButtonGroup","BreadCrumb","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","Form","Gantt","Gauge","General","GridLayout","Hint","Icon","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","PromptBox","QRCode","RadialGauge","RadioButton","RadioGroup","RangeSlider","Rating","Ripple","Sankey","Scheduler","ScrollView","Signature","Skeleton","Slider","Sortable","Sparkline","SpeechToTextButton","SmartPasteButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","StockChart","SVGIcon","Switch","TabStrip","TaskBoard","TextArea","TextBox","TileLayout","Timeline","TimePicker","Toolbar","Tooltip","TreeList","TreeView","Typography","Upload","VSCodeExtension","Window"];var pt=lt(ct(dt(import.meta.url)),"../proto/service.proto"),_=new M("contextapi.telerik.com:443",pt,{libName:I});var me=async()=>_.validateUserLicense();import vt from"fs";import ze from"path";import{fileURLToPath as kt}from"url";import{z as C}from"zod";var v=class{constructor(t,n,o){this.name=t;this.config=n;this.cb=o}register(t){this.server=t,this.server.registerTool(this.name,this.config,this.cb)}hasAccess(t){return!this.config.requiredAccess||this.config.requiredAccess.length===0?!0:t==="full"||this.config.requiredAccess.includes(t)}};var D=(e,t)=>`# ${e.suiteName} - Code Validation & Quality Assurance
6
6
 
7
7
  ## Comprehensive Code Validation Checklist
8
8
  Execute these validation steps systematically to ensure high-quality, maintainable code:
@@ -412,13 +412,13 @@ After gathering information:
412
412
  \`\`\`
413
413
  ${k}
414
414
  \`\`\`
415
- `}c>0&&s.push(p)}let g=n.RelatedItemsByType??{},f=[];for(let[p,c]of Object.entries(g))if(!(p==="return_type"||p==="render_fragment"))for(let y of c??[]){let S=y.FullName??"",T=y.ShortText??"";f.push(`### ${S} (${p})
415
+ `}c>0&&s.push(p)}let h=n.RelatedItemsByType??{},f=[];for(let[p,c]of Object.entries(h))if(!(p==="return_type"||p==="render_fragment"))for(let y of c??[]){let S=y.FullName??"",T=y.ShortText??"";f.push(`### ${S} (${p})
416
416
  ${T}`)}return f.length>0&&s.push(`## Additional Context
417
417
  `+f.join(`
418
418
  ---
419
419
  `)),s.join(`
420
420
 
421
- `)}function ue(e,t,n){let{name:o,title:s,description:r,layoutAssistantName:a,codeAssistantName:i,styleAssistantName:d,iconAssistantName:m,accessibilityAssistantName:A,suiteName:g,libKey:f,components:p}=e,c=new v(o,{title:s,description:r,requiredAccess:e.requiredAccess,inputSchema:{userIntent:C.string().describe(`Detailed description and intent of what the user wants to build. Include the type of page/component, main functionality, visual requirements, and any specific ${g} components you want to use.`),needsComponentsDocsConfidence:C.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:C.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:C.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:C.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:C.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:C.array(C.enum(p)).optional().describe(`Optional list of specific ${g} components needed for the project.`)}},async({userIntent:y,needsComponentsDocsConfidence:S,needsLayoutConfidence:T,needsStylingConfidence:k,needsResponsiveBehaviorConfidence:N,needsIconsConfidence:X,componentsNeeded:Z},{_meta:Ye})=>{h("UI Orchestrator called with:",{userIntent:y,needsComponentsDocsConfidence:S,needsLayoutConfidence:T,needsStylingConfidence:k,needsResponsiveBehaviorConfidence:N,needsIconsConfidence:X});try{await n.recordOrchestratorUserRequest({meta:{userIntent:y,componentsNeeded:Z,_meta:Ye}})}catch(G){throw R(G)}let Qe=c.server?.server.getClientCapabilities?.()?.elicitation,ee;if(Qe&&k>.3&&k<=.6){let G=await c.server?.server.elicitInput({message:"I was unable to determine if you need custom Kendo Theme assistant. Can you please confirm?",requestedSchema:{type:"object",properties:{includeCustomTheming:{type:"boolean",description:"Whether to include Custom Theming assistance in the workflow."}},required:["includeCustomTheming"]}});G?.action==="accept"&&G.content?.includeCustomTheming&&(ee=!0)}return{content:[{type:"text",text:L({name:o,userIntent:y,includeComponentsDocs:S>.3,includeTheming:k>.6||!!ee,includeLayout:T>.5,includeIcons:X>.6,includeResponsive:T>.5&&N>.4,layoutAssistantName:a,codeAssistantName:i,styleAssistantName:d,iconAssistantName:m,accessibilityAssistantName:A,suiteName:g,libKey:f,components:Z},t)}]}});return c}function ge(e,t){let{name:n,title:o,description:s,iconAssistantName:r,codeAssistantName:a,suiteName:i,libKey:d,components:m}=e;return new v(n,{title:o,description:s,inputSchema:{userIntent:C.string().describe(`Describe what you want to build or what components you're looking for. Include the type of functionality, features, or UI elements you need from ${i}.`),needsIconsConfidence:C.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:C.array(C.enum(m)).optional().describe(`Optional list of specific ${i} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:g,needsIconsConfidence:f,componentsNeeded:p},{_meta:c})=>{h("Assistant Orchestrator called with:",{userIntent:g,needsIconsConfidence:f,componentsNeeded:p});try{await t.recordOrchestratorUserRequest({meta:{userIntent:g,componentsNeeded:p,_meta:c}})}catch(S){throw R(S)}return{content:[{type:"text",text:V({name:n,userIntent:g,includeComponentsDocs:!0,includeIcons:f>.5,codeAssistantName:a,iconAssistantName:r,suiteName:i,libKey:d,components:p})}]}})}function he(e,t){let{name:n,title:o,description:s,suiteName:r,libKey:a,getPreContent:i}=e;return new v(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{prompt:C.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve."),includeBuildingBlockExamples:C.boolean().describe("Whether to include building block examples. Defaults to false.").default(!1)}},async({prompt:d,includeBuildingBlockExamples:m},{_meta:A})=>{h("Layout Assistant called with:",{prompt:d,includeBuildingBlockExamples:m});try{let f=(await t.queryCssUtils({query:d},{_meta:A})).values.join(`
421
+ `)}function ue(e,t,n){let{name:o,title:s,description:r,layoutAssistantName:a,codeAssistantName:i,styleAssistantName:d,iconAssistantName:m,accessibilityAssistantName:A,suiteName:h,libKey:f,components:p}=e,c=new v(o,{title:s,description:r,requiredAccess:e.requiredAccess,inputSchema:{userIntent:C.string().describe(`Detailed description and intent of what the user wants to build. Include the type of page/component, main functionality, visual requirements, and any specific ${h} components you want to use.`),needsComponentsDocsConfidence:C.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:C.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:C.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:C.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:C.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:C.array(C.enum(p)).optional().describe(`Optional list of specific ${h} components needed for the project.`)}},async({userIntent:y,needsComponentsDocsConfidence:S,needsLayoutConfidence:T,needsStylingConfidence:k,needsResponsiveBehaviorConfidence:N,needsIconsConfidence:X,componentsNeeded:Z},{_meta:Ye})=>{g("UI Orchestrator called with:",{userIntent:y,needsComponentsDocsConfidence:S,needsLayoutConfidence:T,needsStylingConfidence:k,needsResponsiveBehaviorConfidence:N,needsIconsConfidence:X});try{await n.recordOrchestratorUserRequest({meta:{userIntent:y,componentsNeeded:Z,_meta:Ye}})}catch(G){throw R(G)}let Qe=c.server?.server.getClientCapabilities?.()?.elicitation,ee;if(Qe&&k>.3&&k<=.6){let G=await c.server?.server.elicitInput({message:"I was unable to determine if you need custom Kendo Theme assistant. Can you please confirm?",requestedSchema:{type:"object",properties:{includeCustomTheming:{type:"boolean",description:"Whether to include Custom Theming assistance in the workflow."}},required:["includeCustomTheming"]}});G?.action==="accept"&&G.content?.includeCustomTheming&&(ee=!0)}return{content:[{type:"text",text:L({name:o,userIntent:y,includeComponentsDocs:S>.3,includeTheming:k>.6||!!ee,includeLayout:T>.5,includeIcons:X>.6,includeResponsive:T>.5&&N>.4,layoutAssistantName:a,codeAssistantName:i,styleAssistantName:d,iconAssistantName:m,accessibilityAssistantName:A,suiteName:h,libKey:f,components:Z},t)}]}});return c}function ge(e,t){let{name:n,title:o,description:s,iconAssistantName:r,codeAssistantName:a,suiteName:i,libKey:d,components:m}=e;return new v(n,{title:o,description:s,inputSchema:{userIntent:C.string().describe(`Describe what you want to build or what components you're looking for. Include the type of functionality, features, or UI elements you need from ${i}.`),needsIconsConfidence:C.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:C.array(C.enum(m)).optional().describe(`Optional list of specific ${i} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:h,needsIconsConfidence:f,componentsNeeded:p},{_meta:c})=>{g("Assistant Orchestrator called with:",{userIntent:h,needsIconsConfidence:f,componentsNeeded:p});try{await t.recordOrchestratorUserRequest({meta:{userIntent:h,componentsNeeded:p,_meta:c}})}catch(S){throw R(S)}return{content:[{type:"text",text:V({name:n,userIntent:h,includeComponentsDocs:!0,includeIcons:f>.5,codeAssistantName:a,iconAssistantName:r,suiteName:i,libKey:d,components:p})}]}})}function he(e,t){let{name:n,title:o,description:s,suiteName:r,libKey:a,getPreContent:i}=e;return new v(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{prompt:C.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve."),includeBuildingBlockExamples:C.boolean().describe("Whether to include building block examples. Defaults to false.").default(!1)}},async({prompt:d,includeBuildingBlockExamples:m},{_meta:A})=>{g("Layout Assistant called with:",{prompt:d,includeBuildingBlockExamples:m});try{let f=(await t.queryCssUtils({query:d},{_meta:A})).values.join(`
422
422
  `)||"No CSS utilities found for the given prompt.",p=i?.()??"",c=y=>`${p}
423
423
 
424
424
  # Kendo Design System CSS Utilities
@@ -440,7 +440,7 @@ ${T.description}
440
440
  ${T.code}
441
441
  \`\`\`
442
442
  `).join(`
443
- `)}`),f=c(S)}catch(y){h("Error calling building-blocks service:",y),f=c()}else f=c();return{content:[{type:"text",text:f}]}}catch(g){throw R(g)}})}function fe(e,t){let{name:n,title:o,description:s,libKey:r,getPreContent:a}=e;return new v(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{prompt:C.string().describe("A natural language description of the desired visual style or theme. For example: 'Create a modern dark theme with high contrast'.")}},async({prompt:i},{_meta:d})=>{h("Style Assistant called with:",{prompt:i});let m="";try{let f=await t.queryThemeGenerate({prompt:i},{_meta:d});if(f.variables_json){let p=JSON.parse(f.variables_json),c=[];if(p)for(let y of Object.keys(p))typeof p[y]=="string"&&c.push(`${y}: ${p[y]}`);m=c.join(`
443
+ `)}`),f=c(S)}catch(y){g("Error calling building-blocks service:",y),f=c()}else f=c();return{content:[{type:"text",text:f}]}}catch(h){throw R(h)}})}function fe(e,t){let{name:n,title:o,description:s,libKey:r,getPreContent:a}=e;return new v(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{prompt:C.string().describe("A natural language description of the desired visual style or theme. For example: 'Create a modern dark theme with high contrast'.")}},async({prompt:i},{_meta:d})=>{g("Style Assistant called with:",{prompt:i});let m="";try{let f=await t.queryThemeGenerate({prompt:i},{_meta:d});if(f.variables_json){let p=JSON.parse(f.variables_json),c=[];if(p)for(let y of Object.keys(p))typeof p[y]=="string"&&c.push(`${y}: ${p[y]}`);m=c.join(`
444
444
 
445
445
  `)}}catch(f){throw R(f)}let A=a?.()??"";return{content:[{type:"text",text:m?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
446
446
  Ensure the variables are applied consistently across all relevant elements.
@@ -453,15 +453,15 @@ ${A}
453
453
  \`\`\`css
454
454
  ${m}
455
455
  \`\`\`
456
- `:"No CSS variables were generated for the given prompt."}]}})}function ye(e,t){let{name:n,title:o,description:s,libKey:r,getPostContent:a}=e;return new v(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:C.string().describe("A search query for finding icons. Be specific about the icon purpose, style, or action."),limit:C.number().min(.1).max(1).default(.1).describe("The proportion of matching icons to return (0.1 = 1 icon, 0.5 = 5 icons, 1.0 = many icons). Default is 0.1.")}},async({query:i,limit:d},{_meta:m})=>{h("Icon Search called with:",{query:i,limit:d});try{let A=await t.queryIconsSearch({query:i,limit:d*100},{_meta:m}),g=a?.()??"";return{content:[{type:"text",text:`${A.values.join(`
456
+ `:"No CSS variables were generated for the given prompt."}]}})}function ye(e,t){let{name:n,title:o,description:s,libKey:r,getPostContent:a}=e;return new v(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:C.string().describe("A search query for finding icons. Be specific about the icon purpose, style, or action."),limit:C.number().min(.1).max(1).default(.1).describe("The proportion of matching icons to return (0.1 = 1 icon, 0.5 = 5 icons, 1.0 = many icons). Default is 0.1.")}},async({query:i,limit:d},{_meta:m})=>{g("Icon Search called with:",{query:i,limit:d});try{let A=await t.queryIconsSearch({query:i,limit:d*100},{_meta:m}),h=a?.()??"";return{content:[{type:"text",text:`${A.values.join(`
457
457
 
458
458
  `)}
459
459
 
460
- ${g}`}]}}catch(A){throw R(A)}})}function Ae(e,t){let{name:n,title:o,description:s,libKey:r,suiteName:a,components:i,componentAliases:d,getPostContent:m}=e;return new v(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:C.string().describe("The query to search for."),component:C.enum(i).describe("The component to search for. If not specified, use General.")}},async({query:A,component:g},{_meta:f})=>{h("Code Assistant called with:",{query:A,component:g});let p=g;if(d){let c=d[g];c&&(p=c)}try{let y=(await t.query({query:A,component:p?.toLowerCase()??"general",lib_name:r,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]},{_meta:f})).values.map(k=>k.replace(/\0/g,"")),S=m?.({component:g})??"";return{content:[{type:"text",text:`${y.join(`
460
+ ${h}`}]}}catch(A){throw R(A)}})}function Ae(e,t){let{name:n,title:o,description:s,libKey:r,suiteName:a,components:i,componentAliases:d,getPostContent:m}=e;return new v(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:C.string().describe("The query to search for."),component:C.enum(i).describe("The component to search for. If not specified, use General.")}},async({query:A,component:h},{_meta:f})=>{g("Code Assistant called with:",{query:A,component:h});let p=h;if(d){let c=d[h];c&&(p=c)}try{let y=(await t.query({query:A,component:p?.toLowerCase()??"general",lib_name:r,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]},{_meta:f})).values.map(k=>k.replace(/\0/g,"")),S=m?.({component:h})??"";return{content:[{type:"text",text:`${y.join(`
461
461
 
462
462
  `)}
463
463
 
464
- ${S}`}]}}catch(c){throw R(c)}})}function Ce(e,t){let{name:n,title:o,description:s,libKey:r,suiteName:a,components:i,componentAliases:d}=e;return new v(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:C.string().describe("The query to search for."),component:C.enum(i).describe("The component to search for. If not specified, use General."),includeGeneralGuidelines:C.boolean().default(!1).describe("Set to true only on the first call to include comprehensive WCAG 2.2 Level AA general guidelines. After the first call, set to false to get only component-specific accessibility information. Default is false.")}},async({query:m,component:A,includeGeneralGuidelines:g},{_meta:f})=>{h("Accessibility Assistant called with:",{query:m,component:A,includeGeneralGuidelines:g});let p=A;if(d){let c=d[A];c&&(p=c)}try{let c="";if(g){let N=le();c+=`# WCAG 2.2 Level AA General Accessibility Guidelines
464
+ ${S}`}]}}catch(c){throw R(c)}})}function Ce(e,t){let{name:n,title:o,description:s,libKey:r,suiteName:a,components:i,componentAliases:d}=e;return new v(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:C.string().describe("The query to search for."),component:C.enum(i).describe("The component to search for. If not specified, use General."),includeGeneralGuidelines:C.boolean().default(!1).describe("Set to true only on the first call to include comprehensive WCAG 2.2 Level AA general guidelines. After the first call, set to false to get only component-specific accessibility information. Default is false.")}},async({query:m,component:A,includeGeneralGuidelines:h},{_meta:f})=>{g("Accessibility Assistant called with:",{query:m,component:A,includeGeneralGuidelines:h});let p=A;if(d){let c=d[A];c&&(p=c)}try{let c="";if(h){let N=le();c+=`# WCAG 2.2 Level AA General Accessibility Guidelines
465
465
 
466
466
  `,c+=N,c+=`
467
467
 
@@ -469,9 +469,9 @@ ${S}`}]}}catch(c){throw R(c)}})}function Ce(e,t){let{name:n,title:o,description:
469
469
 
470
470
  `}let k=(await t.getApiRefMatches({query:m,component:p?.toLowerCase()??"general",lib_name:r,filters_json:'{"type":{"$in":["accessibility"]}}'},{_meta:f})).values.map(N=>N.replace(/\0/g,"")).map(N=>mt(N,p?.toLowerCase()??"general")).join(`
471
471
 
472
- `);return k?(g&&(c+=`# Component-Specific Accessibility Information
472
+ `);return k?(h&&(c+=`# Component-Specific Accessibility Information
473
473
 
474
- `),c+=k):g||(c="No component-specific accessibility guidelines found."),{content:[{type:"text",text:c}]}}catch(c){throw R(c)}})}function R(e){let t=e;return t.code===16?new Error("Error: You are not authenticated. Please verify the Telerik License Key provided is valid."):t.code===8?new Error(`Error: You have exceeded the extension quota. Upgrade to subscription licensing to unlock full access. Message: ${t.message}.`):t.code===7?new Error("Error: You do not have permission to access this resource. Please verify that you have a valid license."):new Error(`Error: An error occurred while calling the service. Please try again later.
474
+ `),c+=k):h||(c="No component-specific accessibility guidelines found."),{content:[{type:"text",text:c}]}}catch(c){throw R(c)}})}function R(e){let t=e;return t.code===16?new Error("Error: You are not authenticated. Please verify the Telerik License Key provided is valid."):t.code===8?new Error(`Error: You have exceeded the extension quota. Upgrade to subscription licensing to unlock full access. Message: ${t.message}.`):t.code===7?new Error("Error: You do not have permission to access this resource. Please verify that you have a valid license."):new Error(`Error: An error occurred while calling the service. Please try again later.
475
475
 
476
476
  Error Code: ${t.code} Error Message: ${t.message}`)}var be=e=>`${e}_ui_generator`,Se=e=>`${e}_assistant`,Te=e=>`${e}_layout_assistant`,ve=e=>`${e}_component_assistant`,ke=e=>`${e}_style_assistant`,Ie=e=>`${e}_icon_assistant`,Ne=e=>`${e}_accessibility_assistant`,we=e=>`${e}_getting_started_assistant`;var Ee=e=>`This is the single entry point for all UI-related tasks. It orchestrates the full workflow of building or refining UIs with ${e} components, generating a step-by-step execution plan that specifies which tools to call, in what order, and with what parameters. It includes validation steps to ensure the best possible, standards-compliant code every time.
477
477
 
@@ -829,7 +829,7 @@ ${e.componentInstructions}
829
829
  First, ensure the Kendo CLI tool is installed globally:
830
830
 
831
831
  \`\`\`bash
832
- npm i -g @progress/kendo-cli
832
+ npm i -g @progress/kendo-cli@latest
833
833
  \`\`\`
834
834
 
835
835
  This CLI tool will handle the entire project setup including all necessary dependencies and configurations.
@@ -888,7 +888,7 @@ Also add the Kendo CSS utilities CDN link in your \`index.html\` \`<head>\`:
888
888
 
889
889
  `,m=`## Step ${a++}: Activate Kendo License
890
890
 
891
- This step is required to use Kendo UI for Angular components without watermarks and with access to all features. Run the following command to activate your license:
891
+ This step is required to use Kendo React components without watermarks and with access to all features. Run the following command to activate your license:
892
892
 
893
893
  \`\`\`bash
894
894
  npx kendo license activate
@@ -944,13 +944,13 @@ function Home() {
944
944
  <p className="k-font-size-lg k-font-weight-bold k-mb-4">\u{1F60A} Ready to build? Copy any prompt below directly into your coding agent to get started</p>
945
945
  <div className="k-d-grid k-grid-cols-3 k-gap-4 k-max-w-screen-xl k-mx-auto">
946
946
  <div className="prompt-box k-p-4 k-rounded-md">
947
- <p className="k-font-family-monospace k-text-base k-m-0">'#kendoreact_ui_generator Create a dashboard with sales charts, revenue KPIs, and a recent orders grid'</p>
947
+ <p className="k-font-family-monospace k-text-base k-m-0">'#kendo_ui_generator Create a dashboard with sales charts, revenue KPIs, and a recent orders grid'</p>
948
948
  </div>
949
949
  <div className="prompt-box k-p-4 k-rounded-md">
950
- <p className="k-font-family-monospace k-text-base k-m-0">'#kendoreact_ui_generator Create an ecommerce product details page with product images, specifications, reviews, and an add to cart button'</p>
950
+ <p className="k-font-family-monospace k-text-base k-m-0">'#kendo_ui_generator Create an ecommerce product details page with product images, specifications, reviews, and an add to cart button'</p>
951
951
  </div>
952
952
  <div className="prompt-box k-p-4 k-rounded-md">
953
- <p className="k-font-family-monospace k-text-base k-m-0">'#kendoreact_ui_generator Build a registration form with email and password inputs, where did you learn about us text area, and agreement checkbox'</p>
953
+ <p className="k-font-family-monospace k-text-base k-m-0">'#kendo_ui_generator Build a registration form with email and password inputs, where did you learn about us text area, and agreement checkbox'</p>
954
954
  </div>
955
955
  </div>
956
956
  </div>
@@ -1045,4 +1045,4 @@ Add the following styles to \`src/Home.css\`:
1045
1045
  }
1046
1046
  \`\`\`
1047
1047
 
1048
- `}var qe=u.ToolNames.layoutAssistant(w),Q=u.ToolNames.codeAssistant(w),Ke=u.ToolNames.styleAssistant(w),J=u.ToolNames.iconAssistant(w),Fe=u.ToolNames.gettingStartedAssistant(w),Ve=u.ToolNames.accessibilityAssistant(w);function je(e,t){return[u.Tools.createOrchestrator({name:u.ToolNames.orchestrator(w),title:"KendoReact Generator",description:u.ToolDescriptions.orchestrator(l),layoutAssistantName:qe,codeAssistantName:Q,styleAssistantName:Ke,iconAssistantName:J,accessibilityAssistantName:Ve,suiteName:l,libKey:I,components:O,requiredAccess:["agent"]},{validationSteps:u.Validation.React.steps},e),u.Tools.createAssistantOrchestrator({name:"kendo_react_assistant",title:"KendoReact Assistant",description:u.ToolDescriptions.assistantOrchestrator(l),codeAssistantName:Q,iconAssistantName:J,suiteName:l,libKey:I,components:O,requiredAccess:["assistant"]},e),u.Tools.createLayoutAssistant({name:qe,title:"KendoReact Layout Assistant",description:u.ToolDescriptions.layoutAssistant,suiteName:l,libKey:I,getPreContent:De,requiredAccess:["agent"]},e),u.Tools.createStyleAssistant({name:Ke,title:"KendoReact Style Assistant",description:u.ToolDescriptions.styleAssistant,libKey:I,getPreContent:Le,requiredAccess:["agent"]},e),u.Tools.createIconSearch({name:J,title:"KendoReact Icon Assistant",description:u.ToolDescriptions.iconAssistant,libKey:I,getPostContent:Ue,requiredAccess:["assistant","agent"]},e),u.Tools.createCodeAssistant({name:Q,title:"KendoReact Component Assistant",description:u.ToolDescriptions.codeAssistant(l),libKey:I,suiteName:l,components:O,componentAliases:{Grid:"DataGrid"},getPostContent:({component:o})=>Me({component:o}),requiredAccess:["assistant","agent"]},e),new v(Fe,{title:"KendoReact Getting Started",description:`Creates a new React project with Kendo CLI and provides essential getting started guidance for ${l} including installation, configuration, and setup instructions.`,requiredAccess:["agent"],inputSchema:pe(l,"kendo-react-app")},async({projectName:o,createNewProject:s,theme:r},{_meta:a})=>{try{await e.recordOrchestratorUserRequest({meta:{tool:Fe,projectName:o,createNewProject:s,theme:r,_meta:a}})}catch(d){console.error("Error recording orchestrator request:",d)}return{content:[{type:"text",text:Be(o,s,r)}]}}),u.Tools.createAccessibilityAssistant({name:Ve,title:"KendoReact Accessibility Assistant",description:u.ToolDescriptions.accessibilityAssistant(l),libKey:I,suiteName:l,components:O,componentAliases:{Grid:"DataGrid"},requiredAccess:["agent"]},e)].filter(o=>o.hasAccess(t))}var It=kt(import.meta.url),Nt=ze.dirname(It),wt=ze.resolve(Nt,"../package.json"),We=JSON.parse(vt.readFileSync(wt,"utf-8")),He=new St({name:"kendo-mcp",title:"Kendo MCP Server",version:We.version});async function Et(){let e=new Tt;h("Starting server... ");let t=await ce(async()=>{let o=(await me())?.entitlement;return o?.Product?.Code||o?.product?.code});t!=="none"&&(_.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",je(_,t).forEach(o=>o.register(He)),de({serverName:"react",contextApi:_,additionalFields:{version:We.version,access_type:t}})),await He.connect(e)}Et();
1048
+ `}var qe=u.ToolNames.layoutAssistant(w),Q=u.ToolNames.codeAssistant(w),Ke=u.ToolNames.styleAssistant(w),J=u.ToolNames.iconAssistant(w),Fe=u.ToolNames.gettingStartedAssistant(w),Ve=u.ToolNames.accessibilityAssistant(w);function je(e,t){return[u.Tools.createOrchestrator({name:u.ToolNames.orchestrator(w),title:"KendoReact Generator",description:u.ToolDescriptions.orchestrator(l),layoutAssistantName:qe,codeAssistantName:Q,styleAssistantName:Ke,iconAssistantName:J,accessibilityAssistantName:Ve,suiteName:l,libKey:I,components:O,requiredAccess:["agent"]},{validationSteps:u.Validation.React.steps},e),u.Tools.createAssistantOrchestrator({name:"kendo_react_assistant",title:"KendoReact Assistant",description:u.ToolDescriptions.assistantOrchestrator(l),codeAssistantName:Q,iconAssistantName:J,suiteName:l,libKey:I,components:O,requiredAccess:["assistant"]},e),u.Tools.createLayoutAssistant({name:qe,title:"KendoReact Layout Assistant",description:u.ToolDescriptions.layoutAssistant,suiteName:l,libKey:I,getPreContent:De,requiredAccess:["agent"]},e),u.Tools.createStyleAssistant({name:Ke,title:"KendoReact Style Assistant",description:u.ToolDescriptions.styleAssistant,libKey:I,getPreContent:Le,requiredAccess:["agent"]},e),u.Tools.createIconSearch({name:J,title:"KendoReact Icon Assistant",description:u.ToolDescriptions.iconAssistant,libKey:I,getPostContent:Ue,requiredAccess:["assistant","agent"]},e),u.Tools.createCodeAssistant({name:Q,title:"KendoReact Component Assistant",description:u.ToolDescriptions.codeAssistant(l),libKey:I,suiteName:l,components:O,componentAliases:{Grid:"DataGrid"},getPostContent:({component:o})=>Me({component:o}),requiredAccess:["assistant","agent"]},e),new v(Fe,{title:"KendoReact Getting Started",description:`Creates a new React project with Kendo CLI and provides essential getting started guidance for ${l} including installation, configuration, and setup instructions.`,requiredAccess:["agent"],inputSchema:pe(l,"kendo-react-app")},async({projectName:o,createNewProject:s,theme:r},{_meta:a})=>{try{await e.recordToolUserRequest({toolName:Fe,meta:{projectName:o,createNewProject:s,theme:r,_meta:a}})}catch(d){console.error("Error recording tool request:",d)}return{content:[{type:"text",text:Be(o,s,r)}]}}),u.Tools.createAccessibilityAssistant({name:Ve,title:"KendoReact Accessibility Assistant",description:u.ToolDescriptions.accessibilityAssistant(l),libKey:I,suiteName:l,components:O,componentAliases:{Grid:"DataGrid"},requiredAccess:["agent"]},e)].filter(o=>o.hasAccess(t))}var It=kt(import.meta.url),Nt=ze.dirname(It),wt=ze.resolve(Nt,"../package.json"),We=JSON.parse(vt.readFileSync(wt,"utf-8")),He=new St({name:"kendo-mcp",title:"Kendo MCP Server",version:We.version});async function Et(){let e=new Tt;g("Starting server... ");let t=await ce(async()=>{let o=(await me())?.entitlement;return o?.Product?.Code||o?.product?.code});t!=="none"&&(_.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",je(_,t).forEach(o=>o.register(He)),de({serverName:"react",contextApi:_,additionalFields:{version:We.version,access_type:t}})),await He.connect(e)}Et();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-mcp",
3
- "version": "1.6.0-dev.fb926bc2.0",
3
+ "version": "1.6.1",
4
4
  "type": "module",
5
5
  "bin": "./dist/index.js",
6
6
  "license": "See LICENSE.md",
@@ -62,6 +62,10 @@ message LogEventRequest {
62
62
  map<string, string> fields = 2;
63
63
  }
64
64
 
65
+ message RecordToolUserRequestMessage {
66
+ string tool_name = 1;
67
+ }
68
+
65
69
  message ProductInfo {
66
70
  int32 id = 1;
67
71
  string code = 2;
@@ -122,5 +126,6 @@ service ContextQueryService {
122
126
  rpc GenerateTheme(ThemeGenerateRequest) returns (ThemeGenerateResponse);
123
127
  rpc ValidateUserLicense(google.protobuf.Empty) returns (ValidateUserLicenseResponse);
124
128
  rpc RecordOrchestratorUserRequest(google.protobuf.Empty) returns (google.protobuf.Empty);
129
+ rpc RecordToolUserRequest(RecordToolUserRequestMessage) returns (google.protobuf.Empty);
125
130
  rpc LogEvent(LogEventRequest) returns (google.protobuf.Empty);
126
131
  }