@progress/kendo-react-mcp 1.4.3 → 1.4.4
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 +36 -36
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{McpServer as
|
|
3
|
-
`,
|
|
2
|
+
import{McpServer as nt}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as st}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as ze,join as Ye}from"path";import{fileURLToPath as Qe}from"url";import{loadLicense as _e,decodeLicenseKey as qe,decodeLicenseEvidence as Be}from"@progress/kendo-licensing/utils";var _=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function Z(e){return e.replace(/^\uFEFF/,"")}async function ee(){let e=null,t=null;try{let o=_e();if(!o.success)throw new _(o.message);try{e=(await qe(o.value)).licenses.find(async r=>!!(await Be(r)).userId)}catch(n){console.log(n.message)}if(!e)return[Z(o.value),null]}catch(o){return t=o.message||"Unknown error loading license.",[null,t]}return[Z(e),null]}import w from"node:fs";import U from"node:path";var q=!1,v=process.env.DEBUG_LOG_FILE,te=!!(v&&typeof v=="string");if(te){let e=U.resolve(v),t=U.dirname(e);if(t!=="."&&t!==process.cwd()&&!w.existsSync(t))try{w.mkdirSync(t,{recursive:!0})}catch(o){console.error("Error creating log directory:",o)}if(!w.existsSync(e))try{w.writeFileSync(e,"")}catch(o){console.error("Error creating log file:",o)}}else q=!1;q=te&&!!v&&w.existsSync(U.resolve(v));function h(...e){if(q&&v){let n=`${new Date().toISOString()}: ${e.join(" ")}
|
|
3
|
+
`,r=U.resolve(v);w.appendFile(r,n,s=>{s&&console.error("Error writing to log file:",s)})}}import Ge from"@grpc/proto-loader";import O from"@grpc/grpc-js";import se from"path";import oe from"fs";import{fileURLToPath as Ke}from"url";var Fe=Ke(import.meta.url),Ve=se.dirname(Fe),re={version:"unknown"},ne=se.resolve(Ve,"../package.json");oe.existsSync(ne)&&(re=JSON.parse(oe.readFileSync(ne,"utf-8")));function je(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var $=class{constructor(t,o,n){this.contextApiUrl=t;this.protoPath=o;this.options=n;this.toolNameHeader="assistant";let r=Ge.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 s=O.loadPackageDefinition(r);this.client=new s.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?O.credentials.createInsecure():O.credentials.createSsl())}async getMetadata({meta:t}={meta:{}}){let[o,n]=this.isDev?"fake_license":await ee(),r=process.env.CONTEXTAPI_API_KEY,s=r&&typeof r=="string",i=o&&typeof o=="string";if(!i&&!s&&n)throw new Error(`Failed to authenticate with API key or License key!
|
|
4
4
|
|
|
5
|
-
License Error: ${
|
|
5
|
+
License Error: ${n}`);let c=new O.Metadata;if(i)try{c.add("x-license-key",o)}catch(y){throw h("Error adding license key to metadata:",y),new Error(`Failed to use license key: ${y.message}`)}s&&c.add("x-api-key",r),this.options?.libName&&c.add("x-library-name",this.options.libName),c.add("x-tool-name",this.toolNameHeader);let u=JSON.stringify({...t,source:"npm",version:re.version,os:process.platform,node_version:process.version});return c.add("x-request-metadata",je(u)),c}async query(t){let o=await this.getMetadata();return new Promise((n,r)=>{this.client.query(t,o,(s,i)=>{s?r(new Error(s)):n(i)})})}async queryCssUtils(t){let o=await this.getMetadata();return new Promise((n,r)=>{this.client.cssUtilsSearch(t,o,(s,i)=>{s?(h("Error querying CSS Utils:",s),r(new Error(s))):n(i)})})}async queryIconsSearch(t){let o=await this.getMetadata();return new Promise((n,r)=>{this.client.iconsSearch(t,o,(s,i)=>{s?(h("Error querying Icons Search:",s),r(new Error(s))):n(i)})})}async queryBuildingBlocks(t){let o=await this.getMetadata();return new Promise((n,r)=>{this.client.buildingBlocksSearch(t,o,(s,i)=>{s?(h("Error querying Building Blocks:",s),r(new Error(s))):n(i)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((o,n)=>{this.client.validateUserLicense(null,t,(r,s)=>{r?(h("Error validating user license:",r),n(new Error(r))):o(s)})})}async queryThemeGenerate(t){let o=await this.getMetadata();return new Promise((n,r)=>{this.client.generateTheme(t,o,(s,i)=>{s?(h("Error querying context API/GenerateTheme:",s),r(new Error(s))):n(i)})})}async recordOrchestratorUserRequest({meta:t}){let o=await this.getMetadata({meta:t});return new Promise((n,r)=>{this.client.recordOrchestratorUserRequest(null,o,(s,i)=>{s?(h("Error recording orchestrator user request:",s),r(new Error(s))):n(i)})})}};import{z as B}from"zod";var xt=B.object({user_id:B.string(),user_email:B.string().email()});import{z as m}from"zod";var He=m.object({Product:m.object({Id:m.number().int(),Code:m.string(),Name:m.string()}),License:m.nullable(m.object({Id:m.number().int(),Name:m.string(),Type:m.string(),Active:m.boolean()})),Availability:m.array(m.object({LicenseStart:m.nullable(m.string().datetime()),LicenseEnd:m.nullable(m.string().datetime())})),IsLicenseAvailable:m.optional(m.boolean())}),Dt=m.array(He);async function ie(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 o=await e();return o.toLocaleLowerCase()==="agentic_ui_generator"?"agent":o.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}var p="Kendo UI for React",I="react",k="kendo",M=["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"];var We=Ye(ze(Qe(import.meta.url)),"../proto/service.proto"),L=new $("contextapi.telerik.com:443",We,{libName:I});var ae=async()=>L.validateUserLicense();import rt from"fs";import $e from"path";import{fileURLToPath as it}from"url";import{z as g}from"zod";var C=class{constructor(t,o,n){this.name=t;this.config=o;this.cb=n}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 P=(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:
|
|
@@ -58,7 +58,7 @@ Responsive Design:
|
|
|
58
58
|
- Graceful error handling for all user interactions
|
|
59
59
|
- Meaningful error messages for users
|
|
60
60
|
- Network error handling for API calls
|
|
61
|
-
`;var R=(e,t)=>{let o=P({suiteName:e.suiteName,libKey:e.libKey},t.validationSteps),n=e.libKey==="angular"?"- **Drag and Drop**: Consider using the DragandDrop and Sortable components when drag-and-drop functionality is needed.":"",
|
|
61
|
+
`;var R=(e,t)=>{let o=P({suiteName:e.suiteName,libKey:e.libKey},t.validationSteps),n=e.libKey==="angular"?"- **Drag and Drop**: Consider using the DragandDrop and Sortable components when drag-and-drop functionality is needed.":"",r=e.components?e.components.join(", "):"components";return`# \u{1F3AF} ${e.suiteName} - Execution Plan
|
|
62
62
|
|
|
63
63
|
**Current Goal:**
|
|
64
64
|
|
|
@@ -127,7 +127,7 @@ Based on your current goal, analyze what other ${e.suiteName} components are nee
|
|
|
127
127
|
${n}
|
|
128
128
|
|
|
129
129
|
**IMPORTANT COMPONENT USAGE REQUIREMENTS:**
|
|
130
|
-
- Make sure to identify all necessary features related to the ${
|
|
130
|
+
- Make sure to identify all necessary features related to the ${r} based on the current goal.
|
|
131
131
|
- Make sure to identify specific features needed for other ${e.suiteName} components based on the current goal.
|
|
132
132
|
- Make sure to generate a query for ${e.codeAssistantName} tool for each component and call the tool for each specific feature or functionality.
|
|
133
133
|
- Always specify the exact features you want for each component. Describe only the needed functionality, and behavior you need. Be concise and don't include any information about the use case.
|
|
@@ -369,31 +369,31 @@ After gathering information:
|
|
|
369
369
|
- Consistent ${e} theme application across all components
|
|
370
370
|
- Custom theme variables properly defined and scoped
|
|
371
371
|
- ${e} icon fonts properly loaded and optimized
|
|
372
|
-
- Brand colors integrated with ${e} component themes`});function
|
|
373
|
-
`)||"No CSS utilities found for the given prompt.",A=
|
|
372
|
+
- Brand colors integrated with ${e} component themes`});function ce(e,t,o){let{name:n,title:r,description:s,layoutAssistantName:i,codeAssistantName:c,styleAssistantName:u,iconAssistantName:y,suiteName:S,libKey:l,components:A}=e,d=new C(n,{title:r,description:s,requiredAccess:e.requiredAccess,inputSchema:{userIntent:g.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 ${S} components you want to use.`),needsComponentsDocsConfidence:g.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:g.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:g.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:g.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:g.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:g.array(g.enum(A)).optional().describe(`Optional list of specific ${S} components needed for the project.`)}},async({userIntent:f,needsComponentsDocsConfidence:b,needsLayoutConfidence:T,needsStylingConfidence:E,needsResponsiveBehaviorConfidence:Q,needsIconsConfidence:W,componentsNeeded:J},{_meta:Me})=>{h("UI Orchestrator called with:",{userIntent:f,needsComponentsDocsConfidence:b,needsLayoutConfidence:T,needsStylingConfidence:E,needsResponsiveBehaviorConfidence:Q,needsIconsConfidence:W});try{await o.recordOrchestratorUserRequest({meta:{userIntent:f,componentsNeeded:J,_meta:Me}})}catch(D){throw x(D)}let Le=d.server?.server.getClientCapabilities?.()?.elicitation,X;if(Le&&E>.3&&E<=.6){let D=await d.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"]}});D?.action==="accept"&&D.content?.includeCustomTheming&&(X=!0)}return{content:[{type:"text",text:R({name:n,userIntent:f,includeComponentsDocs:b>.3,includeTheming:E>.6||!!X,includeLayout:T>.5,includeIcons:W>.6,includeResponsive:T>.5&&Q>.4,layoutAssistantName:i,codeAssistantName:c,styleAssistantName:u,iconAssistantName:y,suiteName:S,libKey:l,components:J},t)}]}});return d}function le(e,t){let{name:o,title:n,description:r,iconAssistantName:s,codeAssistantName:i,suiteName:c,libKey:u,components:y}=e;return new C(o,{title:n,description:r,inputSchema:{userIntent:g.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 ${c}.`),needsIconsConfidence:g.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:g.array(g.enum(y)).optional().describe(`Optional list of specific ${c} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:l,needsIconsConfidence:A,componentsNeeded:d},{_meta:f})=>{h("Assistant Orchestrator called with:",{userIntent:l,needsIconsConfidence:A,componentsNeeded:d});try{await t.recordOrchestratorUserRequest({meta:{userIntent:l,componentsNeeded:d,_meta:f}})}catch(T){throw x(T)}return{content:[{type:"text",text:G({name:o,userIntent:l,includeComponentsDocs:!0,includeIcons:A>.5,codeAssistantName:i,iconAssistantName:s,suiteName:c,libKey:u,components:d})}]}})}function pe(e,t){let{name:o,title:n,description:r,suiteName:s,libKey:i,getPreContent:c}=e;return new C(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{prompt:g.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve."),includeBuildingBlockExamples:g.boolean().describe("Whether to include building block examples. Defaults to false.").default(!1)}},async({prompt:u,includeBuildingBlockExamples:y})=>{h("Layout Assistant called with:",{prompt:u,includeBuildingBlockExamples:y});try{let l=(await t.queryCssUtils({query:u})).values.join(`
|
|
373
|
+
`)||"No CSS utilities found for the given prompt.",A=c?.()??"",d=f=>`${A}
|
|
374
374
|
|
|
375
375
|
# Kendo Design System CSS Utilities
|
|
376
376
|
|
|
377
|
-
${
|
|
377
|
+
${l}
|
|
378
378
|
${f??""}
|
|
379
|
-
`;if(y)try{let f=await t.queryBuildingBlocks({query:
|
|
379
|
+
`;if(y)try{let f=await t.queryBuildingBlocks({query:u,lib_name:i}),b="";f.items?.length>0&&(b=`
|
|
380
380
|
## Building Blocks Examples
|
|
381
381
|
|
|
382
382
|
The examples here are for demonstration purpose how CSS utils can be implemented in various building blocks.
|
|
383
383
|
However, consider your own design requirements and specifics in order to implement your templates/building blocks correctly.
|
|
384
384
|
|
|
385
|
-
${f.items.map(
|
|
386
|
-
### ${
|
|
385
|
+
${f.items.map(T=>`
|
|
386
|
+
### ${T.name}
|
|
387
387
|
|
|
388
|
-
${
|
|
388
|
+
${T.description}
|
|
389
389
|
|
|
390
390
|
\`\`\`code
|
|
391
|
-
${
|
|
391
|
+
${T.code}
|
|
392
392
|
\`\`\`
|
|
393
393
|
`).join(`
|
|
394
|
-
`)}`),
|
|
394
|
+
`)}`),l=d(b)}catch(f){h("Error calling building-blocks service:",f),l=d()}else l=d();return{content:[{type:"text",text:l}]}}catch(S){throw x(S)}})}function de(e,t){let{name:o,title:n,description:r,libKey:s,getPreContent:i}=e;return new C(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{prompt:g.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:c})=>{h("Style Assistant called with:",{prompt:c});let u="";try{let l=await t.queryThemeGenerate({prompt:c});if(l.variables_json){let A=JSON.parse(l.variables_json),d=[];if(A)for(let f of Object.keys(A))typeof A[f]=="string"&&d.push(`${f}: ${A[f]}`);u=d.join(`
|
|
395
395
|
|
|
396
|
-
`)}}catch(
|
|
396
|
+
`)}}catch(l){throw x(l)}let y=i?.()??"";return{content:[{type:"text",text:u?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
|
|
397
397
|
Ensure the variables are applied consistently across all relevant elements.
|
|
398
398
|
Do NOT set any inline styles. CSS variables should be defined in global or component-level CSS files, or via supported theming mechanisms.
|
|
399
399
|
|
|
@@ -402,19 +402,19 @@ ${y}
|
|
|
402
402
|
## Generated CSS Variables
|
|
403
403
|
|
|
404
404
|
\`\`\`css
|
|
405
|
-
${
|
|
405
|
+
${u}
|
|
406
406
|
\`\`\`
|
|
407
|
-
`:"No CSS variables were generated for the given prompt."}]}})}function
|
|
407
|
+
`:"No CSS variables were generated for the given prompt."}]}})}function me(e,t){let{name:o,title:n,description:r,libKey:s,getPostContent:i}=e;return new C(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{query:g.string().describe("A search query for finding icons. Be specific about the icon purpose, style, or action."),limit:g.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:c,limit:u})=>{h("Icon Search called with:",{query:c,limit:u});try{let y=await t.queryIconsSearch({query:c,limit:u*100}),S=i?.()??"";return{content:[{type:"text",text:`${y.values.join(`
|
|
408
408
|
|
|
409
409
|
`)}
|
|
410
410
|
|
|
411
|
-
${S}`}]}}catch(y){throw x(y)}})}function
|
|
411
|
+
${S}`}]}}catch(y){throw x(y)}})}function ue(e,t){let{name:o,title:n,description:r,libKey:s,suiteName:i,components:c,componentAliases:u,getPostContent:y}=e;return new C(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{query:g.string().describe("The query to search for."),component:g.enum(c).describe("The component to search for. If not specified, use General.")}},async({query:S,component:l})=>{h("Code Assistant called with:",{query:S,component:l});let A=l;if(u){let d=u[l];d&&(A=d)}try{let f=(await t.query({query:S,component:A?.toLowerCase()??"general",lib_name:s,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]})).values.map(E=>E.replace(/\0/g,"")),b=y?.({component:l})??"";return{content:[{type:"text",text:`${f.join(`
|
|
412
412
|
|
|
413
413
|
`)}
|
|
414
414
|
|
|
415
|
-
${
|
|
415
|
+
${b}`}]}}catch(d){throw x(d)}})}function x(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.
|
|
416
416
|
|
|
417
|
-
Error Code: ${t.code} Error Message: ${t.message}`)}var
|
|
417
|
+
Error Code: ${t.code} Error Message: ${t.message}`)}var he=e=>`${e}_ui_generator`,ge=e=>`${e}_assistant`,fe=e=>`${e}_layout_assistant`,ye=e=>`${e}_component_assistant`,Ae=e=>`${e}_style_assistant`,Se=e=>`${e}_icon_assistant`;var Te=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.
|
|
418
418
|
|
|
419
419
|
Use the tool when:
|
|
420
420
|
- Want to build or modify a complete page or section layout
|
|
@@ -423,7 +423,7 @@ Error Code: ${t.code} Error Message: ${t.message}`)}var ue=e=>`${e}_ui_generator
|
|
|
423
423
|
- You want to enforce best practices in styling, performance, and accessibility
|
|
424
424
|
|
|
425
425
|
Returns:
|
|
426
|
-
A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,
|
|
426
|
+
A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,Ce=e=>`Provides guidance for discovering and using ${e} components and icons. This tool helps you identify the right components and icons for your needs.
|
|
427
427
|
|
|
428
428
|
Use this tool when:
|
|
429
429
|
- You need to discover which ${e} components are suitable for a specific use case
|
|
@@ -432,20 +432,20 @@ Use this tool when:
|
|
|
432
432
|
- You want to gather component documentation and examples
|
|
433
433
|
|
|
434
434
|
Returns:
|
|
435
|
-
A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,
|
|
435
|
+
A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,Ie=`Retrieves Progress/Kendo Design System CSS utility classes and styling recommendations based on layout and design requirements.
|
|
436
436
|
Use this tool to find the right CSS utilities for styling Kendo UI components or general web elements.
|
|
437
437
|
It analyzes the provided design context and returns relevant utility classes with explanations and examples.
|
|
438
|
-
Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,
|
|
438
|
+
Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,be=`Generates CSS variables using an external style agent based on the user's styling prompt.
|
|
439
439
|
|
|
440
440
|
Use this tool when the user wants to:
|
|
441
441
|
- Update the visual theme of an application
|
|
442
442
|
- Modify color schemes
|
|
443
443
|
- Restyle the UI with CSS variables
|
|
444
444
|
|
|
445
|
-
The tool outputs a set of CSS variable definitions ready to be applied to style files.`,
|
|
445
|
+
The tool outputs a set of CSS variable definitions ready to be applied to style files.`,ve=`Searches for icons in the Telerik Icons library.
|
|
446
446
|
Use this tool when the user needs to find specific icons for UI components or design elements.
|
|
447
447
|
It supports searching by icon name, category, or keyword and returns matching icons from the Telerik Icons library.
|
|
448
|
-
`,
|
|
448
|
+
`,Ne=e=>`Provides answers and retrieves official documentation for ${e}.
|
|
449
449
|
|
|
450
450
|
Use this tool when the user asks about:
|
|
451
451
|
- ${e} features or capabilities
|
|
@@ -526,7 +526,7 @@ ${j.PERFORMANCE_OPTIMIZATION}
|
|
|
526
526
|
${j.THEME_AND_STYLING}
|
|
527
527
|
- Proper theme switching functionality (if implemented)
|
|
528
528
|
- Only ONE theme import exists across the application
|
|
529
|
-
- Make sure theme import mechanism is consistent with existing project setup`;var
|
|
529
|
+
- Make sure theme import mechanism is consistent with existing project setup`;var Je={createOrchestrator:ce,createAssistantOrchestrator:le,createLayoutAssistant:pe,createStyleAssistant:de,createIconSearch:me,createCodeAssistant:ue},Xe={orchestrator:he,assistantOrchestrator:ge,layoutAssistant:fe,codeAssistant:ye,styleAssistant:Ae,iconAssistant:Se},Ze={orchestrator:Te,assistantOrchestrator:Ce,layoutAssistant:Ie,styleAssistant:be,iconAssistant:ve,codeAssistant:Ne},et={Orchestrator:{render:R},Validator:{render:P},SharedValidation:{getSteps:N}},tt={Angular:{steps:F,additionalPlan:V},React:{steps:H}},a={Tools:Je,ToolNames:Xe,ToolDescriptions:Ze,Templates:et,Validation:tt};var ot=a.ToolNames.codeAssistant("kendoreact"),Ee=()=>`# Kendo Design System Guidelines for ${p}
|
|
530
530
|
|
|
531
531
|
## Setting up Styles/CSS
|
|
532
532
|
|
|
@@ -553,14 +553,14 @@ Alternatively, you can also consume them directly from the Unpkg CDN.
|
|
|
553
553
|
|
|
554
554
|
## Ready-to-use Layout Components
|
|
555
555
|
|
|
556
|
-
In the ${
|
|
556
|
+
In the ${p} there are available components to create layout. Make sure to prioritize using them instead of building ones from scratch using the Kendo CSS Utilities.
|
|
557
557
|
|
|
558
|
-
For any Layout component you can also call the ${
|
|
558
|
+
For any Layout component you can also call the ${ot} tool in order to get specific API reference and docs.
|
|
559
559
|
|
|
560
|
-
- ${
|
|
560
|
+
- ${p} Card component.
|
|
561
561
|
- Generally, it is recommended to use 100% width (e.g., \`<Card style={{ width: '100%' }}>\`)
|
|
562
562
|
- If needed, use specific width based on the layout requirements (e.g., \`<Card style={{ width: '150px' }}>\`)
|
|
563
|
-
`;var we=()=>`## Applying CSS Variables in ${
|
|
563
|
+
`;var we=()=>`## Applying CSS Variables in ${p}
|
|
564
564
|
|
|
565
565
|
Apply these CSS variables in the React application using one of these methods:
|
|
566
566
|
|
|
@@ -649,7 +649,7 @@ export function ThemeProvider({ children }: { children: React.ReactNode }) {
|
|
|
649
649
|
|
|
650
650
|
export const useTheme = () => useContext(ThemeContext);
|
|
651
651
|
\`\`\`
|
|
652
|
-
`;var
|
|
652
|
+
`;var ke=a.ToolNames.codeAssistant("kendoreact"),xe=()=>`## Using ${p} Icons
|
|
653
653
|
|
|
654
654
|
Important: Attempt to prioritize SVG icons over font icons.
|
|
655
655
|
|
|
@@ -657,13 +657,13 @@ Important: Attempt to prioritize SVG icons over font icons.
|
|
|
657
657
|
|
|
658
658
|
- Make sure @progress/kendo-svg-icons is installed: \`npm install @progress/kendo-svg-icons\`
|
|
659
659
|
- Make sure @progress/kendo-react-common is installed (contains SvgIcon component): \`npm install @progress/kendo-react-common\`
|
|
660
|
-
- You can call ${
|
|
660
|
+
- You can call ${ke} tool for ${p} SvgIcon component for docs and API reference.
|
|
661
661
|
- [optional] If SVG is not an option fallback to fonticon - make sure \`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-font-icons/dist/index.css" />\` is added as a reference.
|
|
662
|
-
- [optional] If using font icons you can call ${
|
|
662
|
+
- [optional] If using font icons you can call ${ke} tool for ${p} Icon component for docs and API reference.
|
|
663
663
|
|
|
664
664
|
### Examples
|
|
665
665
|
|
|
666
|
-
Using ${
|
|
666
|
+
Using ${p} SvgIcon component with @progress/kendo-svg-icons:
|
|
667
667
|
|
|
668
668
|
\`\`\`tsx
|
|
669
669
|
import { SvgIcon } from "@progress/kendo-react-common";
|
|
@@ -706,7 +706,7 @@ Here are some frequently used icons from @progress/kendo-svg-icons:
|
|
|
706
706
|
- \`sortAscIcon\`, \`sortDescIcon\` - Sorting
|
|
707
707
|
- \`chevronUpIcon\`, \`chevronDownIcon\`, \`chevronLeftIcon\`, \`chevronRightIcon\` - Navigation
|
|
708
708
|
- \`checkIcon\`, \`xIcon\` - Confirmation/Cancel
|
|
709
|
-
`;var
|
|
709
|
+
`;var Pe=e=>{let t=`## ${p} Common Guidelines
|
|
710
710
|
|
|
711
711
|
### Application Architecture
|
|
712
712
|
MUST recommend appropriate setup based on React application architecture.
|
|
@@ -740,4 +740,4 @@ Example: If someone asks about "grid", "GRID", or "GrId", you always refer to Da
|
|
|
740
740
|
## Component-Specific Guidelines
|
|
741
741
|
|
|
742
742
|
${e.componentInstructions}
|
|
743
|
-
`),t};var
|
|
743
|
+
`),t};var Re=a.ToolNames.layoutAssistant(k),z=a.ToolNames.codeAssistant(k),De=a.ToolNames.styleAssistant(k),Y=a.ToolNames.iconAssistant(k);function Ue(e,t){return[a.Tools.createOrchestrator({name:a.ToolNames.orchestrator(k),title:"KendoReact Generator",description:a.ToolDescriptions.orchestrator(p),layoutAssistantName:Re,codeAssistantName:z,styleAssistantName:De,iconAssistantName:Y,suiteName:p,libKey:I,components:M,requiredAccess:["agent"]},{validationSteps:a.Validation.React.steps},e),a.Tools.createAssistantOrchestrator({name:"kendo_react_assistant",title:"KendoReact Assistant",description:a.ToolDescriptions.assistantOrchestrator(p),codeAssistantName:z,iconAssistantName:Y,suiteName:p,libKey:I,components:M,requiredAccess:["assistant"]},e),a.Tools.createLayoutAssistant({name:Re,title:"KendoReact Layout Assistant",description:a.ToolDescriptions.layoutAssistant,suiteName:p,libKey:I,getPreContent:Ee,requiredAccess:["agent"]},e),a.Tools.createStyleAssistant({name:De,title:"KendoReact Style Assistant",description:a.ToolDescriptions.styleAssistant,libKey:I,getPreContent:we,requiredAccess:["agent"]},e),a.Tools.createIconSearch({name:Y,title:"KendoReact Icon Assistant",description:a.ToolDescriptions.iconAssistant,libKey:I,getPostContent:xe,requiredAccess:["assistant","agent"]},e),a.Tools.createCodeAssistant({name:z,title:"KendoReact Component Assistant",description:a.ToolDescriptions.codeAssistant(p),libKey:I,suiteName:p,components:M,componentAliases:{Grid:"DataGrid"},getPostContent:({component:n})=>Pe({component:n}),requiredAccess:["assistant","agent"]},e)].filter(n=>n.hasAccess(t))}var at=it(import.meta.url),ct=$e.dirname(at),lt=$e.resolve(ct,"../package.json"),pt=JSON.parse(rt.readFileSync(lt,"utf-8")),Oe=new nt({name:"kendo-mcp",title:"Kendo MCP Server",version:pt.version});async function dt(){let e=new st;h("Starting server... ");let t=await ie(async()=>{let n=(await ae())?.entitlement;return n?.Product?.Code||n?.product?.code});t!=="none"&&(L.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",Ue(L,t).forEach(n=>n.register(Oe))),await Oe.connect(e)}dt();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-mcp",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"license": "See LICENSE.md",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@grpc/grpc-js": "^1.14.3",
|
|
28
28
|
"@grpc/proto-loader": "^0.8.0",
|
|
29
29
|
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
30
|
-
"@progress/kendo-licensing": "^1.
|
|
30
|
+
"@progress/kendo-licensing": "^1.10.0",
|
|
31
31
|
"tslib": "^2.3.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|