@progress/kendo-react-mcp 1.10.2 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +80 -92
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,17 +1,19 @@
1
1
  #!/usr/bin/env node
2
- import{McpServer as Gt}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as $t}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as Ct,join as vt}from"path";import{fileURLToPath as At}from"url";import{loadLicense as it,decodeLicenseKey as lt,decodeLicenseEvidence as ct}from"@progress/kendo-licensing/utils";var Y=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function oe(e){return e.replace(/^\uFEFF/,"")}async function z(e){let t=null,o=null;try{let s=it();if(!s.success){let n=new Y(s.message);throw e&&await e("license_load_failed",{error:s.message}).catch(()=>{}),n}try{t=(await lt(s.value)).licenses.find(async a=>!!(await ct(a)).userId)}catch(n){console.log(n.message),e&&await e("license_load_failed",{error:n.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[oe(s.value),null]}catch(s){return o=s.message||"Unknown error loading license.",e&&await e("license_load_failed",{error:o}).catch(()=>{}),[null,o]}return[oe(t),null]}import G from"node:fs";import j from"node:path";var V=!1,D=process.env.DEBUG_LOG_FILE,se=!!(D&&typeof D=="string");if(se){let e=j.resolve(D),t=j.dirname(e);if(t!=="."&&t!==process.cwd()&&!G.existsSync(t))try{G.mkdirSync(t,{recursive:!0})}catch(o){console.error("Error creating log directory:",o)}if(!G.existsSync(e))try{G.writeFileSync(e,"")}catch(o){console.error("Error creating log file:",o)}}else V=!1;V=se&&!!D&&G.existsSync(j.resolve(D));function b(...e){if(V&&D){let s=`${new Date().toISOString()}: ${e.join(" ")}
3
- `,n=j.resolve(D);G.appendFile(n,s,a=>{a&&console.error("Error writing to log file:",a)})}}import pt from"@grpc/proto-loader";import q from"@grpc/grpc-js";import ae from"path";import ne from"fs";import{fileURLToPath as ut}from"url";var mt=ut(import.meta.url),gt=ae.dirname(mt),ie={version:"unknown"},re=ae.resolve(gt,"../package.json");ne.existsSync(re)&&(ie=JSON.parse(ne.readFileSync(re,"utf-8")));function ht(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var W=class{constructor(t,o,s){this.contextApiUrl=t;this.protoPath=o;this.options=s;this.toolNameHeader="assistant";let n=pt.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"),b("Using ContextApi URl:",this.contextApiUrl);let a=q.loadPackageDefinition(n);this.client=new a.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?q.credentials.createInsecure():q.credentials.createSsl())}buildRequestMetadata(t={}){return ht(JSON.stringify({...t,source:"npm",version:ie.version,os:process.platform,node_version:process.version,plugin_mode:!!process.env.PLUGIN_MODE,install_source:process.env.INSTALL_SOURCE?.toLowerCase()}))}async getMetadata({meta:t}={meta:{}}){let[o,s]=this.isDev?["fake_license",null]:await z((l,p)=>this.logEvent(l,p)),n=process.env.CONTEXTAPI_API_KEY,a=n&&typeof n=="string",r=o&&typeof o=="string";if(!r&&!a&&s)throw new Error(`Failed to authenticate with API key or License key!
2
+ import{McpServer as Qt}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as Jt}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as Dt,join as _t}from"path";import{fileURLToPath as Gt}from"url";import{loadLicense as Ct,decodeLicenseKey as At,decodeLicenseEvidence as kt}from"@progress/kendo-licensing/utils";var z=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function de(e){return e.replace(/^\uFEFF/,"")}async function X(e){let t=null,o=null;try{let s=Ct();if(!s.success){let r=new z(s.message);throw e&&await e("license_load_failed",{error:s.message}).catch(()=>{}),r}try{t=(await At(s.value)).licenses.find(async a=>!!(await kt(a)).userId)}catch(r){console.log(r.message),e&&await e("license_load_failed",{error:r.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[de(s.value),null]}catch(s){return o=s.message||"Unknown error loading license.",e&&await e("license_load_failed",{error:o}).catch(()=>{}),[null,o]}return[de(t),null]}import $ from"node:fs";import H from"node:path";var Q=!1,D=process.env.DEBUG_LOG_FILE,pe=!!(D&&typeof D=="string");if(pe){let e=H.resolve(D),t=H.dirname(e);if(t!=="."&&t!==process.cwd()&&!$.existsSync(t))try{$.mkdirSync(t,{recursive:!0})}catch(o){console.error("Error creating log directory:",o)}if(!$.existsSync(e))try{$.writeFileSync(e,"")}catch(o){console.error("Error creating log file:",o)}}else Q=!1;Q=pe&&!!D&&$.existsSync(H.resolve(D));function C(...e){if(Q&&D){let s=`${new Date().toISOString()}: ${e.join(" ")}
3
+ `,r=H.resolve(D);$.appendFile(r,s,a=>{a&&console.error("Error writing to log file:",a)})}}import xt from"@grpc/proto-loader";import F from"@grpc/grpc-js";import ge from"path";import ue from"fs";import{fileURLToPath as St}from"url";var It=St(import.meta.url),Tt=ge.dirname(It),he={version:"unknown"},me=ge.resolve(Tt,"../package.json");ue.existsSync(me)&&(he=JSON.parse(ue.readFileSync(me,"utf-8")));function J(e){return typeof e=="string"&&e.length>0&&e.length<200&&/^[\x20-\x7e]+$/.test(e)}function Rt(e){return e==="semantic"||e==="fallback"}function Nt(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var Y=class{constructor(t,o,s){this.contextApiUrl=t;this.protoPath=o;this.options=s;this.toolNameHeader="assistant";let r=xt.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"),C("Using ContextApi URl:",this.contextApiUrl);let a=F.loadPackageDefinition(r);this.client=new a.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?F.credentials.createInsecure():F.credentials.createSsl())}buildRequestMetadata(t={}){return Nt(JSON.stringify({...t,source:"npm",version:he.version,os:process.platform,node_version:process.version,plugin_mode:!!process.env.PLUGIN_MODE,install_source:process.env.INSTALL_SOURCE?.toLowerCase()}))}async getMetadata({meta:t}={meta:{}}){let o=t??{},{langfuseSessionId:s,toolInvocationId:r,mcpToolName:a,workflowSessionSource:n,workflowSessionExplicitIdRejected:l,...m}=o;delete m["progress.com/kendo-ui-workflow-session-id"];let[d,h]=this.isDev?["fake_license",null]:await X((y,f)=>this.logEvent(y,f)),v=process.env.CONTEXTAPI_API_KEY,g=v&&typeof v=="string",i=d&&typeof d=="string";if(!i&&!g&&h)throw new Error(`Failed to authenticate with API key or License key!
4
4
 
5
- License Error: ${s}`);let i=new q.Metadata;if(r)try{i.add("x-license-key",o)}catch(l){throw b("Error adding license key to metadata:",l),new Error(`Failed to use license key: ${l.message}`)}return a&&i.add("x-api-key",n),this.options?.libName&&i.add("x-library-name",this.options.libName),i.add("x-tool-name",this.toolNameHeader),i.add("x-request-metadata",this.buildRequestMetadata(t)),i}async query(t,o){let s=await this.getMetadata({meta:o});return new Promise((n,a)=>{this.client.query(t,s,(r,i)=>{r?a(r):n(i)})})}async getApiRefMatches(t,o){let s=await this.getMetadata({meta:o});return new Promise((n,a)=>{this.client.getApiRefMatches(t,s,(r,i)=>{r?a(r):n(i)})})}async queryCssUtils(t,o){let s=await this.getMetadata({meta:o});return new Promise((n,a)=>{this.client.cssUtilsSearch(t,s,(r,i)=>{r?(b("Error querying CSS Utils:",r),a(r)):n(i)})})}async queryIconsSearch(t,o){let s=await this.getMetadata({meta:o});return new Promise((n,a)=>{this.client.iconsSearch(t,s,(r,i)=>{r?(b("Error querying Icons Search:",r),a(r)):n(i)})})}async queryBuildingBlocks(t,o){let s=await this.getMetadata({meta:o});return new Promise((n,a)=>{this.client.buildingBlocksSearch(t,s,(r,i)=>{r?(b("Error querying Building Blocks:",r),a(r)):n(i)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((o,s)=>{this.client.validateUserLicense({},t,(n,a)=>{n?(b("Error validating user license:",n),s(n)):o(a)})})}async queryThemeGenerate(t,o){let s=await this.getMetadata({meta:o});return new Promise((n,a)=>{this.client.generateTheme(t,s,(r,i)=>{r?(b("Error querying context API/GenerateTheme:",r),a(r)):n(i)})})}async recordOrchestratorUserRequest({meta:t}){let o=await this.getMetadata({meta:t});return new Promise((s,n)=>{this.client.recordOrchestratorUserRequest({},o,(a,r)=>{a?(b("Error recording orchestrator user request:",a),n(a)):s(r)})})}async recordToolUserRequest({toolName:t,meta:o}){let s=await this.getMetadata({meta:o});return new Promise(n=>{this.client.recordToolUserRequest({tool_name:t},s,(a,r)=>{a?(a.code===7?b("recordToolUserRequest: license does not cover Kendo AI Tools, skipping telemetry."):b("Error recording tool user request:",a),n(null)):n(r)})})}async logEvent(t,o,s={}){let n="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq",{enrichWithUserData:a=!1,meta:r={}}=s,i=n&&typeof n=="string",l=null;if(a)try{let[h]=this.isDev?["fake_license",null]:await z();h&&typeof h=="string"&&(l=h)}catch{}if(!i&&!l){b("Neither LOGGING_API_KEY nor license key available, skipping log event");return}let p=new q.Metadata;return i&&p.add("x-api-key",n),l&&(p.add("x-license-key",l),p.add("x-request-metadata",this.buildRequestMetadata(r)),this.options?.libName&&p.add("x-library-name",this.options.libName)),new Promise((h,v)=>{this.client.logEvent({event_name:t,fields:o||{}},p,(g,u)=>{g?(b("Error logging event:",g),v(g)):h()})})}};import{z as X}from"zod";var ao=X.object({user_id:X.string(),user_email:X.string().email()});import{z as x}from"zod";var ft=x.object({Product:x.object({Id:x.number().int(),Code:x.string(),Name:x.string()}),License:x.nullable(x.object({Id:x.number().int(),Name:x.string(),Type:x.string(),Active:x.boolean()})),Availability:x.array(x.object({LicenseStart:x.nullable(x.string().datetime()),LicenseEnd:x.nullable(x.string().datetime())})),IsLicenseAvailable:x.optional(x.boolean())}),co=x.array(ft);function T(e,t){let o=e.server?.server.getClientVersion?.(),s=t||{};return o&&(s.clientInfo={name:o.name,version:o.version}),s}async function le(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"}function ce(){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...">`\nCORRECT: `<label for="qty">Quantity</label><input type="number" id="qty">`\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 must 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- Avoid adding `<main>`, `role="main"`, `<header>`, or `<footer>` in page components \u2014 the layout typically provides them. Duplicating them can cause `landmark-no-duplicate-main` and `landmark-main-is-top-level` violations.\n- Avoid adding `role="banner"` or using a semantic `<header>` element in page components \u2014 the layout\'s `<header>` already claims the banner landmark. Adding another causes `landmark-banner-is-top-level` violations.\n- Avoid adding `role="contentinfo"` to elements inside page components \u2014 the contentinfo landmark should be a top-level landmark, not nested inside `<main>` or other landmarks. Nesting it can cause `landmark-contentinfo-is-top-level` violations.\n- When multiple `<section>` or `<nav>` elements exist on a page, give each a unique `aria-label` to avoid `landmark-unique` violations.\n\n**9. ARIA Role and Attribute Restrictions** (WCAG 4.1.2)\nOnly use ARIA roles that are valid for the given HTML element. Avoid adding `aria-label` or `aria-labelledby` to elements that do not permit naming.\n- `<article>` has an implicit `article` role. Do NOT override it with `role="listitem"`, `role="button"`, `role="link"`, or any other role \u2014 none are allowed on `<article>`. Use `<li>` for list items, `<button>` for interactive cards, or `<a>` for clickable cards instead.\n- `<button>` already has an implicit `button` role. Do NOT add `role="listitem"` or other incompatible roles.\n- `<span>` and `<div>` without roles are generic elements. Do NOT add `aria-label` to them \u2014 it is a prohibited attribute on elements with no accessible role and can cause `aria-prohibited-attr` violations. Instead, use `role="img"` + `aria-label` for visual indicators, or use visually hidden text.\n- Do NOT add `aria-label` to non-interactive `<div>` wrappers \u2014 it has no effect and triggers violations.\n- `aria-pressed` is only valid on elements with `role="button"`, `role="checkbox"`, `role="menuitemcheckbox"`, `role="option"`, `role="radio"`, or `role="switch"`. Do NOT use `aria-pressed` on elements with `role="listitem"` or other roles.\nCORRECT: `<ul role="list"><li class="product-card">...</li></ul>` (listitem inside list)\nCORRECT: `<span role="img" aria-label="Status: pending" class="status-dot"></span>` (role added before aria-label)\nCORRECT: `<span class="status-dot" aria-hidden="true"></span><span class="visually-hidden">Pending</span>` (hidden text alternative)\nWRONG: `<article role="listitem">` (listitem not allowed on article)\nWRONG: `<article role="button">` (button not allowed on article \u2014 use `<button>` or `<div role="button">`)\nWRONG: `<span aria-label="pending" class="status-dot"></span>` (aria-label prohibited on generic span)\nWRONG: `<div aria-label="Product badges" class="badges"></div>` (aria-label prohibited on generic div)\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>`, `<footer>`, `role="main"`, `role="contentinfo"`, `role="banner"` in page/route components (the layout may already provide them), use `<section>` or `<div>` as page-level wrappers, unique aria-labels on duplicate landmark types\n- **ARIA Rules:** Avoid adding `aria-label` to generic `<span>`/`<div>` without a role, avoid using `role="listitem"` or `role="button"` on `<article>` \u2014 use `<li>` for list items, add `role="img"` before `aria-label` on visual indicators, `aria-pressed` only on button-like roles\n- **Scrollable Regions:** Any scrollable container must have `tabindex="0"` or contain keyboard-interactive children\n- **Nested Interactive:** Do not add interactive role/tabindex to a container that already has focusable children\n- **List Roles:** `role="list"` containers must have `role="listitem"` children \u2014 prefer `<ul>/<li>` natively\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 yt=1440*60*1e3;function de(e){let{serverName:t,contextApi:o,additionalFields:s={},intervalMs:n=yt,enrichWithUserData:a=!1}=e,r="mcp_server_heartbeat",i=async()=>{try{let p={server_name:t,timestamp:new Date().toISOString(),...s};await o.logEvent(r,p,{enrichWithUserData:a})}catch(p){b(`Failed to send heartbeat for ${t}:`,p)}};i();let l=setInterval(i,n);return()=>{clearInterval(l),b(`Heartbeat stopped for ${t}`)}}import{z as Q}from"zod";var bt=["meridian","default","bootstrap","material","fluent"];function pe(e,t){return{projectName:Q.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:Q.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:Q.enum(bt).default("meridian").describe("The Kendo UI theme to use. Determines which theme package is installed and imported. Available themes: meridian (default), default, bootstrap, material, fluent.")}}var d="Kendo UI for React",I="react",U="kendo";var M=["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","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","LLMKit","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OrgChart","OTPInput","PageTemplates/BuildingBlocks","Pager","PanelBar","PDFProcessing","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RadioGroup","RangeSlider","Rating","Ripple","Sankey","SegmentedControl","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 xt=vt(Ct(At(import.meta.url)),"../proto/service.proto"),F=new W("contextapi.telerik.com:443",xt,{libName:I});var ue=async()=>F.validateUserLicense();import Ot from"fs";import st from"path";import{fileURLToPath as qt}from"url";import{z as A}from"zod";var w=class{constructor(t,o,s){this.name=t;this.config=o;this.cb=s}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 B=e=>{let t=[`1. \`${e.accessibilityAssistantName}\`: Call first with \`includeGeneralGuidelines=true\`; use \`false\` for component-specific follow-ups.`];if(e.includeLayout){let n=e.includeResponsive?"structure, responsive behavior, and UX policy":"structure and UX policy";t.push(`${t.length+1}. \`${e.layoutAssistantName}\`: Get Kendo Design System utilities for the requested ${n}. Use only those utilities for styling and layout.`)}if(e.includeTheming&&t.push(`${t.length+1}. \`${e.styleAssistantName}\`: Generate the requested Kendo theme variables.`),e.includeIcons&&t.push(`${t.length+1}. \`${e.iconAssistantName}\`: Find icons only for the required actions and states.`),e.includeComponentsDocs){let n=e.components?.length?e.components.join(", "):"each Kendo component selected for the implementation";t.push(`${t.length+1}. \`${e.codeAssistantName}\`: Call once per component (${n}) with a concise, feature-specific query before writing Kendo markup.`)}t.push(`${t.length+1}. After each assistant call, use the output to decide how to incorporate the guidance into the feature where applicable.`),t.push(`${t.length+1}. Implement the requested UI using ${e.suiteName} components and the gathered guidance.`),t.push(`${t.length+1}. Run \`npm run build\`, resolve failures, and repeat until it succeeds.`);let o=e.libKey==="angular"?"- Before editing, inspect the project for Standalone or NgModule setup, built-in or structural template syntax, and the existing Kendo theme import mechanism. Match those conventions; default to Standalone and built-in control flow for Angular 17+ only when no existing pattern is found.":"- Use React function components, Hooks, typed props where needed, stable list keys, and the project's existing KendoReact theme and package setup.",s=e.libKey==="angular"?`
5
+ License Error: ${h}`);let c=new F.Metadata;if(i)try{c.add("x-license-key",d)}catch(y){throw C("Error adding license key to metadata:",y),new Error(`Failed to use license key: ${y.message}`)}return g&&c.add("x-api-key",v),this.options?.libName&&c.add("x-library-name",this.options.libName),c.add("x-tool-name",this.toolNameHeader),J(s)&&c.add("x-langfuse-session-id",s),J(r)&&c.add("x-tool-invocation-id",r),J(a)&&c.add("x-mcp-tool-name",a),Rt(n)&&c.add("x-workflow-session-source",n),typeof l=="boolean"&&c.add("x-workflow-session-explicit-id-rejected",String(l)),c.add("x-request-metadata",this.buildRequestMetadata(m)),c}async query(t,o){let s=await this.getMetadata({meta:o});return new Promise((r,a)=>{this.client.query(t,s,(n,l)=>{n?a(n):r(l)})})}async getApiRefMatches(t,o){let s=await this.getMetadata({meta:o});return new Promise((r,a)=>{this.client.getApiRefMatches(t,s,(n,l)=>{n?a(n):r(l)})})}async queryCssUtils(t,o){let s=await this.getMetadata({meta:o});return new Promise((r,a)=>{this.client.cssUtilsSearch(t,s,(n,l)=>{n?(C("Error querying CSS Utils:",n),a(n)):r(l)})})}async queryIconsSearch(t,o){let s=await this.getMetadata({meta:o});return new Promise((r,a)=>{this.client.iconsSearch(t,s,(n,l)=>{n?(C("Error querying Icons Search:",n),a(n)):r(l)})})}async queryBuildingBlocks(t,o){let s=await this.getMetadata({meta:o});return new Promise((r,a)=>{this.client.buildingBlocksSearch(t,s,(n,l)=>{n?(C("Error querying Building Blocks:",n),a(n)):r(l)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((o,s)=>{this.client.validateUserLicense({},t,(r,a)=>{r?(C("Error validating user license:",r),s(r)):o(a)})})}async queryThemeGenerate(t,o){let s=await this.getMetadata({meta:o});return new Promise((r,a)=>{this.client.generateTheme(t,s,(n,l)=>{n?(C("Error querying context API/GenerateTheme:",n),a(n)):r(l)})})}async recordOrchestratorUserRequest({meta:t}){let o=await this.getMetadata({meta:t});return new Promise((s,r)=>{this.client.recordOrchestratorUserRequest({},o,(a,n)=>{a?(C("Error recording orchestrator user request:",a),r(a)):s(n)})})}async recordToolUserRequest({toolName:t,meta:o}){let s=await this.getMetadata({meta:o});return new Promise(r=>{this.client.recordToolUserRequest({tool_name:t},s,(a,n)=>{a?(a.code===7?C("recordToolUserRequest: license does not cover Kendo AI Tools, skipping telemetry."):C("Error recording tool user request:",a),r(null)):r(n)})})}async logEvent(t,o,s={}){let r="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq",{enrichWithUserData:a=!1,meta:n={}}=s,l=r&&typeof r=="string",m=null;if(a)try{let[h]=this.isDev?["fake_license",null]:await X();h&&typeof h=="string"&&(m=h)}catch{}if(!l&&!m){C("Neither LOGGING_API_KEY nor license key available, skipping log event");return}let d=new F.Metadata;return l&&d.add("x-api-key",r),m&&(d.add("x-license-key",m),d.add("x-request-metadata",this.buildRequestMetadata(n)),this.options?.libName&&d.add("x-library-name",this.options.libName)),new Promise((h,v)=>{this.client.logEvent({event_name:t,fields:o||{}},d,(g,i)=>{g?(C("Error logging event:",g),v(g)):h()})})}};import{z as Z}from"zod";var ko=Z.object({user_id:Z.string(),user_email:Z.string().email()});import{z as w}from"zod";var Et=w.object({Product:w.object({Id:w.number().int(),Code:w.string(),Name:w.string()}),License:w.nullable(w.object({Id:w.number().int(),Name:w.string(),Type:w.string(),Active:w.boolean()})),Availability:w.array(w.object({LicenseStart:w.nullable(w.string().datetime()),LicenseEnd:w.nullable(w.string().datetime())})),IsLicenseAvailable:w.optional(w.boolean())}),So=w.array(Et);function I(e,t){let o=e.server?.server.getClientVersion?.(),s=t||{};return o&&(s.clientInfo={name:o.name,version:o.version}),s}async function fe(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"}function ye(){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...">`\nCORRECT: `<label for="qty">Quantity</label><input type="number" id="qty">`\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 must 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- Avoid adding `<main>`, `role="main"`, `<header>`, or `<footer>` in page components \u2014 the layout typically provides them. Duplicating them can cause `landmark-no-duplicate-main` and `landmark-main-is-top-level` violations.\n- Avoid adding `role="banner"` or using a semantic `<header>` element in page components \u2014 the layout\'s `<header>` already claims the banner landmark. Adding another causes `landmark-banner-is-top-level` violations.\n- Avoid adding `role="contentinfo"` to elements inside page components \u2014 the contentinfo landmark should be a top-level landmark, not nested inside `<main>` or other landmarks. Nesting it can cause `landmark-contentinfo-is-top-level` violations.\n- When multiple `<section>` or `<nav>` elements exist on a page, give each a unique `aria-label` to avoid `landmark-unique` violations.\n\n**9. ARIA Role and Attribute Restrictions** (WCAG 4.1.2)\nOnly use ARIA roles that are valid for the given HTML element. Avoid adding `aria-label` or `aria-labelledby` to elements that do not permit naming.\n- `<article>` has an implicit `article` role. Do NOT override it with `role="listitem"`, `role="button"`, `role="link"`, or any other role \u2014 none are allowed on `<article>`. Use `<li>` for list items, `<button>` for interactive cards, or `<a>` for clickable cards instead.\n- `<button>` already has an implicit `button` role. Do NOT add `role="listitem"` or other incompatible roles.\n- `<span>` and `<div>` without roles are generic elements. Do NOT add `aria-label` to them \u2014 it is a prohibited attribute on elements with no accessible role and can cause `aria-prohibited-attr` violations. Instead, use `role="img"` + `aria-label` for visual indicators, or use visually hidden text.\n- Do NOT add `aria-label` to non-interactive `<div>` wrappers \u2014 it has no effect and triggers violations.\n- `aria-pressed` is only valid on elements with `role="button"`, `role="checkbox"`, `role="menuitemcheckbox"`, `role="option"`, `role="radio"`, or `role="switch"`. Do NOT use `aria-pressed` on elements with `role="listitem"` or other roles.\nCORRECT: `<ul role="list"><li class="product-card">...</li></ul>` (listitem inside list)\nCORRECT: `<span role="img" aria-label="Status: pending" class="status-dot"></span>` (role added before aria-label)\nCORRECT: `<span class="status-dot" aria-hidden="true"></span><span class="visually-hidden">Pending</span>` (hidden text alternative)\nWRONG: `<article role="listitem">` (listitem not allowed on article)\nWRONG: `<article role="button">` (button not allowed on article \u2014 use `<button>` or `<div role="button">`)\nWRONG: `<span aria-label="pending" class="status-dot"></span>` (aria-label prohibited on generic span)\nWRONG: `<div aria-label="Product badges" class="badges"></div>` (aria-label prohibited on generic div)\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>`, `<footer>`, `role="main"`, `role="contentinfo"`, `role="banner"` in page/route components (the layout may already provide them), use `<section>` or `<div>` as page-level wrappers, unique aria-labels on duplicate landmark types\n- **ARIA Rules:** Avoid adding `aria-label` to generic `<span>`/`<div>` without a role, avoid using `role="listitem"` or `role="button"` on `<article>` \u2014 use `<li>` for list items, add `role="img"` before `aria-label` on visual indicators, `aria-pressed` only on button-like roles\n- **Scrollable Regions:** Any scrollable container must have `tabindex="0"` or contain keyboard-interactive children\n- **Nested Interactive:** Do not add interactive role/tabindex to a container that already has focusable children\n- **List Roles:** `role="list"` containers must have `role="listitem"` children \u2014 prefer `<ul>/<li>` natively\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 Ut=1440*60*1e3;function be(e){let{serverName:t,contextApi:o,additionalFields:s={},intervalMs:r=Ut,enrichWithUserData:a=!1}=e,n="mcp_server_heartbeat",l=async()=>{try{let d={server_name:t,timestamp:new Date().toISOString(),...s};await o.logEvent(n,d,{enrichWithUserData:a})}catch(d){C(`Failed to send heartbeat for ${t}:`,d)}};l();let m=setInterval(l,r);return()=>{clearInterval(m),C(`Heartbeat stopped for ${t}`)}}import{z as ee}from"zod";var Pt=["meridian","default","bootstrap","material","fluent"];function ve(e,t){return{projectName:ee.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:ee.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:ee.enum(Pt).default("meridian").describe("The Kendo UI theme to use. Determines which theme package is installed and imported. Available themes: meridian (default), default, bootstrap, material, fluent.")}}var u="Kendo UI for React",U="react",P="kendo";var B=["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","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","LLMKit","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OrgChart","OTPInput","PageTemplates/BuildingBlocks","Pager","PanelBar","PDFProcessing","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RadioGroup","RangeSlider","Rating","Ripple","Sankey","SegmentedControl","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 Lt=_t(Dt(Gt(import.meta.url)),"../proto/service.proto"),K=new Y(process.env.CONTEXTAPI_URL,Lt,{libName:U});var Ce=async()=>K.validateUserLicense();import Zt from"fs";import bt from"path";import{fileURLToPath as eo}from"url";import{z as b}from"zod";var S=class{constructor(t,o,s){this.name=t;this.config=o;this.cb=s}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 W=e=>{let t=[`1. \`${e.accessibilityAssistantName}\`: Call first with \`includeGeneralGuidelines=true\`; use \`false\` for component-specific follow-ups.`];if(e.includeLayout){let r=e.includeResponsive?"structure, responsive behavior, and UX policy":"structure and UX policy";t.push(`${t.length+1}. \`${e.layoutAssistantName}\`: Get Kendo Design System utilities for the requested ${r}. Use only those utilities for styling and layout.`)}if(e.includeTheming&&t.push(`${t.length+1}. \`${e.styleAssistantName}\`: Generate the requested Kendo theme variables.`),e.includeIcons&&t.push(`${t.length+1}. \`${e.iconAssistantName}\`: Find icons only for the required actions and states.`),e.includeComponentsDocs){let r=e.components?.length?e.components.join(", "):"each Kendo component selected for the implementation";t.push(`${t.length+1}. \`${e.codeAssistantName}\`: Call once per component (${r}) with a concise, feature-specific query before writing Kendo markup.`)}t.push(`${t.length+1}. After each assistant call, use the output to decide how to incorporate the guidance into the feature where applicable.`),t.push(`${t.length+1}. Implement the requested UI using ${e.suiteName} components and the gathered guidance.`),t.push(`${t.length+1}. Run \`npm run build\`, resolve failures, and repeat until it succeeds.`);let o=e.libKey==="angular"?"- Before editing, inspect the project for Standalone or NgModule setup, built-in or structural template syntax, and the existing Kendo theme import mechanism. Match those conventions; default to Standalone and built-in control flow for Angular 17+ only when no existing pattern is found.":"- Use React function components, Hooks, typed props where needed, stable list keys, and the project's existing KendoReact theme and package setup.",s=e.libKey==="angular"?`
6
6
  - When drag-and-drop is required, consider the DragAndDrop and Sortable components.`:"";return`# ${e.suiteName} Execution Plan
7
7
 
8
8
  <orchestrator-plan>
9
+ <workflow-id>${e.workflowId}</workflow-id>
9
10
  <goal>${e.userIntent}</goal>
10
11
  <execution-order>
11
- ${t.map(n=>` ${n}`).join(`
12
+ ${t.map(r=>` ${r}`).join(`
12
13
  `)}
13
14
  </execution-order>
14
15
  <required-invariants>
16
+ - Pass \`workflowId="${e.workflowId}"\` unchanged to every assistant tool call in this plan.
15
17
  - Accessibility guidance is retrieved before implementation; meet WCAG 2.2 Level AA.
16
18
  - Do not generate code until the required tool calls above are complete and their guidance is incorporated.
17
19
  - Generate code using tool guidance. Do not inspect \`node_modules\` unless the tools are insufficient and there is conflicting information or runtime errors.
@@ -25,15 +27,17 @@ ${t.map(n=>` ${n}`).join(`
25
27
  - Required Kendo component, accessibility, layout, and framework-specific requirements are implemented.
26
28
  - Do not report completion while either condition is unresolved.
27
29
  </completion>
28
- </orchestrator-plan>`};var J=e=>{let t=e.components?.length?e.components.join(", "):"each Kendo component selected for the implementation",o=[`1. \`${e.codeAssistantName}\`: Call once per component (${t}) with a concise, feature-specific query before writing Kendo markup.`];return e.includeIcons&&o.push(`${o.length+1}. \`${e.iconAssistantName}\`: Find icons only for the required actions and states.`),o.push(`${o.length+1}. Implement using the gathered ${e.suiteName} documentation.`),o.push(`${o.length+1}. Run \`npm run build\`, resolve failures, and repeat until it succeeds.`),`# ${e.suiteName} Execution Plan
30
+ </orchestrator-plan>`};var te=e=>{let t=e.components?.length?e.components.join(", "):"each Kendo component selected for the implementation",o=[`1. \`${e.codeAssistantName}\`: Call once per component (${t}) with a concise, feature-specific query before writing Kendo markup.`];return e.includeIcons&&o.push(`${o.length+1}. \`${e.iconAssistantName}\`: Find icons only for the required actions and states.`),o.push(`${o.length+1}. Implement using the gathered ${e.suiteName} documentation.`),o.push(`${o.length+1}. Run \`npm run build\`, resolve failures, and repeat until it succeeds.`),`# ${e.suiteName} Execution Plan
29
31
 
30
32
  <assistant-plan>
33
+ <workflow-id>${e.workflowId}</workflow-id>
31
34
  <goal>${e.userIntent}</goal>
32
35
  <execution-order>
33
36
  ${o.map(s=>` ${s}`).join(`
34
37
  `)}
35
38
  </execution-order>
36
39
  <required-invariants>
40
+ - Pass \`workflowId="${e.workflowId}"\` unchanged to every assistant tool call in this plan.
37
41
  - Build failures block completion and must be fixed before reporting success.
38
42
  - Use the selected components and gathered guidance rather than generic substitutions.
39
43
  </required-invariants>
@@ -41,7 +45,7 @@ ${o.map(s=>` ${s}`).join(`
41
45
  - \`npm run build\` succeeds without errors.
42
46
  - Do not report completion while the build is failing.
43
47
  </completion>
44
- </assistant-plan>`};var $=()=>`## UX/UI Design Best Practices
48
+ </assistant-plan>`};var O=()=>`## UX/UI Design Best Practices
45
49
 
46
50
  Follow the constraints and conventions unless the prompt or project defines a stronger convention. Accessibility and WCAG rules always override other guidance.
47
51
 
@@ -99,7 +103,7 @@ Follow the constraints and conventions unless the prompt or project defines a st
99
103
 
100
104
  ### Dialog vs Window
101
105
  - Dialog: blocking choice or confirmation; title should be action-oriented
102
- - Window: non-modal content that can stay alongside the background(resizable/draggable panels, editors)`;var Z=()=>`
106
+ - Window: non-modal content that can stay alongside the background(resizable/draggable panels, editors)`;var oe=()=>`
103
107
  **REQUIRED ACTIONS \u2014 apply all fixes directly to the source files:**
104
108
  - Search all .ts files for every outdated API mentioned in the codemod output \u2014 this includes renamed or removed properties, method names, and enum values.
105
109
  - Search all .ts, .css, and .scss files for every outdated CSS class mentioned in the codemod output and update it with an appropriate replacement.
@@ -112,91 +116,75 @@ Follow the constraints and conventions unless the prompt or project defines a st
112
116
  **OUTPUT REQUIREMENTS:**
113
117
  - For each file you change, briefly describe what was wrong and what fix you applied
114
118
  - If a problem requires a decision from the developer that you cannot make automatically, call it out explicitly with the file path
115
- - If all automated changes look correct and no further fixes are needed, explicitly confirm this`;import{execFile as kt}from"child_process";import{access as wt}from"fs/promises";import{promisify as St}from"util";var me=St(kt);function Tt(e,t){let o;try{o=JSON.parse(e)}catch{return e}let s=o?.Item;if(!s)return e;let n=[],a=s.FullName??s.Name??"",r=s.Type??"",i=s.Summary??"",l=s.SyntaxContent??"";n.push(`## API Reference Item
119
+ - If all automated changes look correct and no further fixes are needed, explicitly confirm this`;import{execFile as Ot}from"child_process";import{access as Mt}from"fs/promises";import{promisify as qt}from"util";import{randomUUID as se}from"node:crypto";var ke="progress.com/kendo-ui-workflow-session-id";function Ae(e){return typeof e=="string"&&e.length>0&&e.length<200&&/^[\x20-\x7e]+$/.test(e)}var we=900*1e3;function xe(){return{sessionId:se(),expiresAt:Date.now()+we}}var V=xe();function $t(){return Date.now()>=V.expiresAt&&(V=xe()),V}function Se(e){let t=e._meta?.[ke],s=t!==void 0&&!Ae(t);return Ae(t)?{sessionId:t,sessionSource:"semantic",explicitSessionIdRejected:!1}:{sessionId:$t().sessionId,sessionSource:"fallback",explicitSessionIdRejected:s}}function Ie(e,t){return{langfuseSessionId:e.sessionId,toolInvocationId:se(),mcpToolName:t,workflowSessionSource:e.sessionSource,workflowSessionExplicitIdRejected:e.explicitSessionIdRejected}}function M(e,t,o){let s=o?{...e,_meta:{...e._meta,[ke]:o}}:e;return Ie(Se(s),t)}function re(e,t){let o=Se(e),s=o.sessionSource==="semantic"?o:{sessionId:se(),sessionSource:"fallback",explicitSessionIdRejected:o.explicitSessionIdRejected};return s.sessionSource==="fallback"&&(V={sessionId:s.sessionId,expiresAt:Date.now()+we}),{metadata:Ie(s,t)}}var Te=qt(Ot);function Ft(e,t){let o;try{o=JSON.parse(e)}catch{return e}let s=o?.Item;if(!s)return e;let r=[],a=s.FullName??s.Name??"",n=s.Type??"",l=s.Summary??"",m=s.SyntaxContent??"";r.push(`## API Reference Item
116
120
  - Name: ${a}
117
- - Type: ${r}
118
- - Summary: ${i}
119
- - Syntax: ${l}`);let p=o.RelatedItemsByType?.return_type;if(p?.length){let u=p[0].Text;u&&n.push(`- Return Type: ${u}`)}let h=s.Examples??[];if(h.length>0){let u=`## Examples
120
- `,m=0;for(let y of h){let c=(y.Component??"").toLowerCase(),f=t.toLowerCase();if(c&&c!==f&&c!=="general")continue;m+=1;let k=y.Code??"";u+=`### Example ${m}
121
+ - Type: ${n}
122
+ - Summary: ${l}
123
+ - Syntax: ${m}`);let d=o.RelatedItemsByType?.return_type;if(d?.length){let i=d[0].Text;i&&r.push(`- Return Type: ${i}`)}let h=s.Examples??[];if(h.length>0){let i=`## Examples
124
+ `,c=0;for(let y of h){let f=(y.Component??"").toLowerCase(),p=t.toLowerCase();if(f&&f!==p&&f!=="general")continue;c+=1;let k=y.Code??"";i+=`### Example ${c}
121
125
  \`\`\`
122
126
  ${k}
123
127
  \`\`\`
124
- `}m>0&&n.push(u)}let v=o.RelatedItemsByType??{},g=[];for(let[u,m]of Object.entries(v))if(!(u==="return_type"||u==="render_fragment"))for(let y of m??[]){let c=y.FullName??"",f=y.ShortText??"";g.push(`### ${c} (${u})
125
- ${f}`)}return g.length>0&&n.push(`## Additional Context
128
+ `}c>0&&r.push(i)}let v=o.RelatedItemsByType??{},g=[];for(let[i,c]of Object.entries(v))if(!(i==="return_type"||i==="render_fragment"))for(let y of c??[]){let f=y.FullName??"",p=y.ShortText??"";g.push(`### ${f} (${i})
129
+ ${p}`)}return g.length>0&&r.push(`## Additional Context
126
130
  `+g.join(`
127
131
  ---
128
- `)),n.join(`
132
+ `)),r.join(`
129
133
 
130
- `)}function he(e,t){let{name:o,title:s,description:n,layoutAssistantName:a,codeAssistantName:r,styleAssistantName:i,iconAssistantName:l,accessibilityAssistantName:p,suiteName:h,libKey:v,components:g}=e,u=new w(o,{title:s,description:n,requiredAccess:e.requiredAccess,inputSchema:{userIntent:A.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:A.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:A.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:A.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:A.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:A.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:A.array(A.enum(g)).optional().describe(`Optional list of specific ${h} components needed for the project.`)}},async({userIntent:m,needsComponentsDocsConfidence:y,needsLayoutConfidence:c,needsStylingConfidence:f,needsResponsiveBehaviorConfidence:k,needsIconsConfidence:S,componentsNeeded:R},{_meta:N})=>{let H=T(u,N);b("UI Orchestrator called with:",{userIntent:m,needsComponentsDocsConfidence:y,needsLayoutConfidence:c,needsStylingConfidence:f,needsResponsiveBehaviorConfidence:k,needsIconsConfidence:S});try{await t.recordOrchestratorUserRequest({meta:{userIntent:m,componentsNeeded:R,...H}})}catch(_){throw L(_)}let E=u.server?.server.getClientCapabilities?.()?.elicitation,K;if(E&&f>.3&&f<=.6){let _=await u.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"]}});_?.action==="accept"&&_.content?.includeCustomTheming&&(K=!0)}return{content:[{type:"text",text:B({name:o,userIntent:m,includeComponentsDocs:y>.3,includeTheming:f>.6||!!K,includeLayout:c>.5,includeIcons:S>.6,includeResponsive:c>.5&&k>.4,layoutAssistantName:a,codeAssistantName:r,styleAssistantName:i,iconAssistantName:l,accessibilityAssistantName:p,suiteName:h,libKey:v,components:R})}]}});return u}function fe(e,t){let{name:o,title:s,description:n,iconAssistantName:a,codeAssistantName:r,suiteName:i,libKey:l,components:p}=e,h=new w(o,{title:s,description:n,inputSchema:{userIntent:A.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:A.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:A.array(A.enum(p)).optional().describe(`Optional list of specific ${i} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:v,needsIconsConfidence:g,componentsNeeded:u},{_meta:m})=>{let y=T(h,m);b("Assistant Orchestrator called with:",{userIntent:v,needsIconsConfidence:g,componentsNeeded:u});try{await t.recordOrchestratorUserRequest({meta:{userIntent:v,componentsNeeded:u,...y}})}catch(f){throw L(f)}return{content:[{type:"text",text:J({name:o,userIntent:v,includeComponentsDocs:!0,includeIcons:g>.5,codeAssistantName:r,iconAssistantName:a,suiteName:i,libKey:l,components:u})}]}});return h}function ye(e,t){let{name:o,title:s,description:n,suiteName:a,libKey:r,getPreContent:i}=e,l=new w(o,{title:s,description:n,requiredAccess:e.requiredAccess,inputSchema:{prompt:A.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve."),includeBuildingBlockExamples:A.boolean().describe("Whether to include building block examples. Defaults to false.").default(!1)}},async({prompt:p,includeBuildingBlockExamples:h},{_meta:v})=>{let g=T(l,v);b("Layout Assistant called with:",{prompt:p,includeBuildingBlockExamples:h});try{let m=(await t.queryCssUtils({query:p},{...g})).values.join(`
131
- `)||"No CSS utilities found for the given prompt.",y=i?.()??"",c=f=>`${y}
134
+ `)}function Ne(e,t){let{name:o,title:s,description:r,layoutAssistantName:a,codeAssistantName:n,styleAssistantName:l,iconAssistantName:m,accessibilityAssistantName:d,suiteName:h,libKey:v,components:g}=e,i=new S(o,{title:s,description:r,requiredAccess:e.requiredAccess,inputSchema:{userIntent:b.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:b.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:b.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:b.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:b.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:b.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:b.array(b.enum(g)).optional().describe(`Optional list of specific ${h} components needed for the project.`)}},async({userIntent:c,needsComponentsDocsConfidence:y,needsLayoutConfidence:f,needsStylingConfidence:p,needsResponsiveBehaviorConfidence:k,needsIconsConfidence:x,componentsNeeded:G},R)=>{let T=re(R,o),ie={...I(i,R._meta),...T.metadata};C("UI Orchestrator called with:",{userIntent:c,needsComponentsDocsConfidence:y,needsLayoutConfidence:f,needsStylingConfidence:p,needsResponsiveBehaviorConfidence:k,needsIconsConfidence:x});let N={componentsDocs:y>.3,layout:f>.5,theming:p>.6,responsive:f>.5&&k>.4,icons:x>.6};try{await t.recordOrchestratorUserRequest({meta:{...ie,userIntent:c,componentsNeeded:G,confidence:{componentsDocs:y,layout:f,styling:p,responsive:k,icons:x},routing:N}})}catch(L){if(!Le(L))throw _(L);C("Unable to record UI orchestrator trace metadata:",L)}let E=i.server?.server.getClientCapabilities?.()?.elicitation,j;if(E&&p>.3&&p<=.6){let L=await i.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"]}});L?.action==="accept"&&L.content?.includeCustomTheming&&(j=!0)}return{content:[{type:"text",text:W({name:o,workflowId:T.metadata.langfuseSessionId,userIntent:c,includeComponentsDocs:y>.3,includeTheming:p>.6||!!j,includeLayout:f>.5,includeIcons:x>.6,includeResponsive:f>.5&&k>.4,layoutAssistantName:a,codeAssistantName:n,styleAssistantName:l,iconAssistantName:m,accessibilityAssistantName:d,suiteName:h,libKey:v,components:G})}]}});return i}function Ee(e,t){let{name:o,title:s,description:r,iconAssistantName:a,codeAssistantName:n,suiteName:l,libKey:m,components:d}=e,h=new S(o,{title:s,description:r,inputSchema:{userIntent:b.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 ${l}.`),needsIconsConfidence:b.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:b.array(b.enum(d)).optional().describe(`Optional list of specific ${l} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:v,needsIconsConfidence:g,componentsNeeded:i},c)=>{let y=re(c,o),f={...I(h,c._meta),...y.metadata};C("Assistant Orchestrator called with:",{userIntent:v,needsIconsConfidence:g,componentsNeeded:i});let p={componentsDocs:!0,icons:g>.5};try{await t.recordOrchestratorUserRequest({meta:{...f,userIntent:v,componentsNeeded:i,confidence:{icons:g},routing:p}})}catch(x){if(!Le(x))throw _(x);C("Unable to record assistant orchestrator trace metadata:",x)}return{content:[{type:"text",text:te({name:o,workflowId:y.metadata.langfuseSessionId,userIntent:v,includeComponentsDocs:!0,includeIcons:g>.5,codeAssistantName:n,iconAssistantName:a,suiteName:l,libKey:m,components:i})}]}});return h}function Ue(e,t){let{name:o,title:s,description:r,getPreContent:a}=e,n=new S(o,{title:s,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),prompt:b.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve.")}},async({workflowId:l,prompt:m},d)=>{let h={...I(n,d._meta),...M(d,o,l)};C("Layout Assistant called with:",{prompt:m});try{let g=(await t.queryCssUtils({query:m},{...h})).values.join(`
135
+ `)||"No CSS utilities found for the given prompt.";return g=`${a?.()??""}
132
136
 
133
137
  # Kendo Design System CSS Utilities
134
138
 
135
- ${m}
136
- ${f??""}
137
- `;if(h)try{let f=await t.queryBuildingBlocks({query:p,lib_name:r},{...g}),k="";f.items?.length>0&&(k=`
138
- ## Building Blocks Examples
139
-
140
- The examples here are for demonstration purpose how CSS utils can be implemented in various building blocks.
141
- However, consider your own design requirements and specifics in order to implement your templates/building blocks correctly.
142
-
143
- ${f.items.map(S=>`
144
- ### ${S.name}
145
-
146
- ${S.description}
147
-
148
- \`\`\`code
149
- ${S.code}
150
- \`\`\`
151
- `).join(`
152
- `)}`),m=c(k)}catch(f){b("Error calling building-blocks service:",f),m=c()}else m=c();return{content:[{type:"text",text:m}]}}catch(u){throw L(u)}});return l}function be(e,t){let{name:o,title:s,description:n,libKey:a,getPreContent:r}=e,i=new w(o,{title:s,description:n,requiredAccess:e.requiredAccess,inputSchema:{prompt:A.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:l},{_meta:p})=>{let h=T(i,p);b("Style Assistant called with:",{prompt:l});let v="";try{let m=await t.queryThemeGenerate({prompt:l},{...h});if(m.variables_json){let y=JSON.parse(m.variables_json),c=[];if(y)for(let f of Object.keys(y))typeof y[f]=="string"&&c.push(`${f}: ${y[f]}`);v=c.join(`
139
+ ${g}
140
+ `,{content:[{type:"text",text:g}]}}catch(v){throw _(v)}});return n}function Pe(e,t){let{name:o,title:s,description:r,libKey:a,getPreContent:n}=e,l=new S(o,{title:s,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),prompt:b.string().describe("A natural language description of the desired visual style or theme. For example: 'Create a modern dark theme with high contrast'.")}},async({workflowId:m,prompt:d},h)=>{let v={...I(l,h._meta),...M(h,o,m)};C("Style Assistant called with:",{prompt:d});let g="";try{let y=await t.queryThemeGenerate({prompt:d},{...v});if(y.variables_json){let f=JSON.parse(y.variables_json),p=[];if(f)for(let k of Object.keys(f))typeof f[k]=="string"&&p.push(`${k}: ${f[k]}`);g=p.join(`
153
141
 
154
- `)}}catch(m){throw L(m)}let g=r?.()??"";return{content:[{type:"text",text:v?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
142
+ `)}}catch(y){throw _(y)}let i=n?.()??"";return{content:[{type:"text",text:g?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
155
143
  Ensure the variables are applied consistently across all relevant elements.
156
144
  Do NOT set any inline styles. CSS variables should be defined in global or component-level CSS files, or via supported theming mechanisms.
157
145
 
158
- ${g}
146
+ ${i}
159
147
 
160
148
  ## Generated CSS Variables
161
149
 
162
150
  \`\`\`css
163
- ${v}
151
+ ${g}
164
152
  \`\`\`
165
- `:"No CSS variables were generated for the given prompt."}]}});return i}function Ce(e,t){let{name:o,title:s,description:n,libKey:a,getPostContent:r}=e,i=new w(o,{title:s,description:n,requiredAccess:e.requiredAccess,inputSchema:{query:A.string().describe("A search query for finding icons. Be specific about the icon purpose, style, or action."),limit:A.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:l,limit:p},{_meta:h})=>{let v=T(i,h);b("Icon Search called with:",{query:l,limit:p});try{let g=await t.queryIconsSearch({query:l,limit:p*100},{...v}),u=r?.()??"";return{content:[{type:"text",text:`${g.values.join(`
153
+ `:"No CSS variables were generated for the given prompt."}]}});return l}function De(e,t){let{name:o,title:s,description:r,libKey:a,getPostContent:n}=e,l=new S(o,{title:s,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),query:b.string().describe("A search query for finding icons. Be specific about the icon purpose, style, or action."),limit:b.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({workflowId:m,query:d,limit:h},v)=>{let g={...I(l,v._meta),...M(v,o,m)};C("Icon Search called with:",{query:d,limit:h});try{let i=await t.queryIconsSearch({query:d,limit:h*100},{...g}),c=n?.()??"";return{content:[{type:"text",text:`${i.values.join(`
166
154
 
167
155
  `)}
168
156
 
169
- ${u}`}]}}catch(g){throw L(g)}});return i}function ve(e,t){let{name:o,title:s,description:n,libKey:a,suiteName:r,components:i,componentAliases:l,getPostContent:p}=e,h=new w(o,{title:s,description:n,requiredAccess:e.requiredAccess,inputSchema:{query:A.string().describe("The query to search for."),component:A.enum(i).describe("The component to search for. If not specified, use General.")}},async({query:v,component:g},{_meta:u})=>{let m=T(h,u);b("Code Assistant called with:",{query:v,component:g});let y=g;if(l){let c=l[g];c&&(y=c)}try{let f=(await t.query({query:v,component:y?.toLowerCase()??"general",lib_name:a,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]},{...m})).values.map(R=>R.replace(/\0/g,"")),k=p?.({component:g})??"";return{content:[{type:"text",text:`${f.join(`
157
+ ${c}`}]}}catch(i){throw _(i)}});return l}function _e(e,t){let{name:o,title:s,description:r,libKey:a,suiteName:n,components:l,componentAliases:m,getPostContent:d}=e,h=new S(o,{title:s,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),query:b.string().describe("The query to search for."),component:b.enum(l).describe("The component to search for. If not specified, use General.")}},async({workflowId:v,query:g,component:i},c)=>{let y={...I(h,c._meta),...M(c,o,v)};C("Code Assistant called with:",{query:g,component:i});let f=i;if(m){let p=m[i];p&&(f=p)}try{let k=(await t.query({query:g,component:f?.toLowerCase()??"general",lib_name:a,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]},{...y})).values.map(R=>R.replace(/\0/g,"")),x=d?.({component:i})??"";return{content:[{type:"text",text:`${k.join(`
170
158
 
171
159
  `)}
172
160
 
173
- ${k}`}]}}catch(c){throw L(c)}});return h}function Ae(e,t){let{name:o,title:s,description:n,libKey:a,suiteName:r,components:i,componentAliases:l}=e,p=new w(o,{title:s,description:n,requiredAccess:e.requiredAccess,inputSchema:{query:A.string().describe("The query to search for."),component:A.enum(i).describe("The component to search for. If not specified, use General."),includeGeneralGuidelines:A.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:h,component:v,includeGeneralGuidelines:g},{_meta:u})=>{let m=T(p,u);b("Accessibility Assistant called with:",{query:h,component:v,includeGeneralGuidelines:g});let y=v;if(l){let c=l[v];c&&(y=c)}try{let c="";if(g){let N=ce();c+=`# WCAG 2.2 Level AA General Accessibility Guidelines
161
+ ${x}`}]}}catch(p){throw _(p)}});return h}function Ge(e,t){let{name:o,title:s,description:r,libKey:a,suiteName:n,components:l,componentAliases:m}=e,d=new S(o,{title:s,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),query:b.string().describe("The query to search for."),component:b.enum(l).describe("The component to search for. If not specified, use General."),includeGeneralGuidelines:b.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({workflowId:h,query:v,component:g,includeGeneralGuidelines:i},c)=>{let y={...I(d,c._meta),...M(c,o,h)};C("Accessibility Assistant called with:",{query:v,component:g,includeGeneralGuidelines:i});let f=g;if(m){let p=m[g];p&&(f=p)}try{let p="";if(i){let T=ye();p+=`# WCAG 2.2 Level AA General Accessibility Guidelines
174
162
 
175
- `,c+=N,c+=`
163
+ `,p+=T,p+=`
176
164
 
177
165
  ---
178
166
 
179
- `}let R=(await t.getApiRefMatches({query:h,component:y?.toLowerCase()??"general",lib_name:a,filters_json:'{"type":{"$in":["accessibility"]}}'},{...m})).values.map(N=>N.replace(/\0/g,"")).map(N=>Tt(N,y?.toLowerCase()??"general")).join(`
167
+ `}let R=(await t.getApiRefMatches({query:v,component:f?.toLowerCase()??"general",lib_name:a,filters_json:'{"type":{"$in":["accessibility"]}}'},{...y})).values.map(T=>T.replace(/\0/g,"")).map(T=>Ft(T,f?.toLowerCase()??"general")).join(`
180
168
 
181
- `);return R?(g&&(c+=`# Component-Specific Accessibility Information
169
+ `);return R?(i&&(p+=`# Component-Specific Accessibility Information
182
170
 
183
- `),c+=R):g||(c="No component-specific accessibility guidelines found."),{content:[{type:"text",text:c}]}}catch(c){throw L(c)}});return p}function L(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.
171
+ `),p+=R):i||(p="No component-specific accessibility guidelines found."),{content:[{type:"text",text:p}]}}catch(p){throw _(p)}});return d}function Le(e){let t=e?.code;return typeof t=="number"&&t!==16&&t!==7&&t!==8}function _(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.
184
172
 
185
- Error Code: ${t.code} Error Message: ${t.message}`)}var It=20*1024*1024,xe=1200*1e3;function ge(e){return{content:[{type:"text",text:`Upgrade timed out after ${xe/6e4} minutes.
173
+ Error Code: ${t.code} Error Message: ${t.message}`)}var Bt=20*1024*1024,$e=1200*1e3;function Re(e){return{content:[{type:"text",text:`Upgrade timed out after ${$e/6e4} minutes.
186
174
 
187
175
  **Some codemods may have already been applied to your files.** Review any modified files before proceeding.
188
176
 
189
177
  To complete the upgrade, run this tool again with specific package names via the \`packageNames\` parameter to upgrade one package at a time.${e?`
190
178
 
191
179
  ## Partial output before timeout
192
- `+e:""}`}]}}function ke(e,t){let{name:o,title:s,description:n,suiteName:a,packagePrefix:r}=e,i=new w(o,{title:s,description:n,requiredAccess:e.requiredAccess,inputSchema:{workingDirectory:A.string().describe('The absolute path to the project directory where the upgrade should be executed (e.g., "/Users/username/my-app")'),packageNames:A.array(A.string()).optional().describe(`The package names to target for codemod upgrade (e.g., ["${r}grid", "${r}buttons"]). Defaults to upgrading all installed @progress packages if not specified. When specified, skips package installation and only runs codemods \u2014 the packages must already be installed at the target version before calling this tool.`),skipInstall:A.boolean().optional().describe("Skip npm package installation and only run codemods. Use this when package installation has already been done manually.")}},async({workingDirectory:l,packageNames:p,skipInstall:h},{_meta:v})=>{let g=T(i,v);try{await t.recordToolUserRequest({toolName:o,meta:g})}catch(u){console.error("Error recording tool request:",u)}try{try{await wt(l)}catch{return{content:[{type:"text",text:`The working directory does not exist: "${l}". Please provide a valid absolute path to your project.`}]}}let u=!1;try{await me("npx",["--no","--","kendo","--version"],{cwd:l}),u=!0}catch{u=!1}let m=[],y=async(E,K=!1)=>{try{let P=!K&&u?["--no","--","kendo",...E]:["-y","@progress/kendo-cli",...E],{stdout:_,stderr:at}=await me("npx",P,{cwd:l,maxBuffer:It,timeout:xe});return{timedOut:!1,stdout:_,stderr:at}}catch(P){return P.killed?{timedOut:!0,partialOutput:P.stdout?.trim()}:{timedOut:!1,stdout:P.stdout||"",stderr:P.stderr||P.message}}},c=["migrate",...p??[],"--codemods","--force","--ai-mode"];(h||p?.length)&&c.push("--no-install");let f=await y(c);if(f.timedOut)return ge(f.partialOutput);let k=f.stdout,S=f.stderr;if(S?.includes("Unknown argument")){let E=await y(c,!0);if(E.timedOut)return ge(E.partialOutput);k=E.stdout,S=E.stderr}S?.trim()&&m.push(`
180
+ `+e:""}`}]}}function Oe(e,t){let{name:o,title:s,description:r,suiteName:a,packagePrefix:n}=e,l=new S(o,{title:s,description:r,requiredAccess:e.requiredAccess,inputSchema:{workingDirectory:b.string().describe('The absolute path to the project directory where the upgrade should be executed (e.g., "/Users/username/my-app")'),packageNames:b.array(b.string()).optional().describe(`The package names to target for codemod upgrade (e.g., ["${n}grid", "${n}buttons"]). Defaults to upgrading all installed @progress packages if not specified. When specified, skips package installation and only runs codemods \u2014 the packages must already be installed at the target version before calling this tool.`),skipInstall:b.boolean().optional().describe("Skip npm package installation and only run codemods. Use this when package installation has already been done manually.")}},async({workingDirectory:m,packageNames:d,skipInstall:h},{_meta:v})=>{let g=I(l,v);try{await t.recordToolUserRequest({toolName:o,meta:g})}catch(i){console.error("Error recording tool request:",i)}try{try{await Mt(m)}catch{return{content:[{type:"text",text:`The working directory does not exist: "${m}". Please provide a valid absolute path to your project.`}]}}let i=!1;try{await Te("npx",["--no","--","kendo","--version"],{cwd:m}),i=!0}catch{i=!1}let c=[],y=async(N,le=!1)=>{try{let E=!le&&i?["--no","--","kendo",...N]:["-y","@progress/kendo-cli",...N],{stdout:j,stderr:ce}=await Te("npx",E,{cwd:m,maxBuffer:Bt,timeout:$e});return{timedOut:!1,stdout:j,stderr:ce}}catch(E){return E.killed?{timedOut:!0,partialOutput:E.stdout?.trim()}:{timedOut:!1,stdout:E.stdout||"",stderr:E.stderr||E.message}}},f=["migrate",...d??[],"--codemods","--force","--ai-mode"];(h||d?.length)&&f.push("--no-install");let p=await y(f);if(p.timedOut)return Re(p.partialOutput);let k=p.stdout,x=p.stderr;if(x?.includes("Unknown argument")){let N=await y(f,!0);if(N.timedOut)return Re(N.partialOutput);k=N.stdout,x=N.stderr}x?.trim()&&c.push(`
193
181
  Errors:
194
- ${S}`),k?.trim()&&m.push(k.trim());let R=k.includes("Packages installed successfully."),N=k.includes("Package installation failed:"),H=k.includes("Running codemod:");return N?m.push(`
182
+ ${x}`),k?.trim()&&c.push(k.trim());let G=k.includes("Packages installed successfully."),R=k.includes("Package installation failed:"),T=k.includes("Running codemod:");return R?c.push(`
195
183
  ## Upgrade Status
196
- Package installation failed. The npm packages were not updated. Inform the user of the error and update the package versions in package.json manually to the target version. Once done, call this tool again with skipInstall set to true.`):R&&m.push(`
184
+ Package installation failed. The npm packages were not updated. Inform the user of the error and update the package versions in package.json manually to the target version. Once done, call this tool again with skipInstall set to true.`):G&&c.push(`
197
185
  ## Upgrade Status
198
- Upgrade complete. npm packages have been installed and updated in the project.`),H&&m.push(Z()),{content:[{type:"text",text:m.join(`
199
- `)}]}}catch(u){return{content:[{type:"text",text:`Error: ${u.message||u.toString()}`}]}}});return i}var we=e=>`${e}_ui_generator`,Se=e=>`${e}_assistant`,Te=e=>`${e}_layout_assistant`,Ie=e=>`${e}_component_assistant`,Re=e=>`${e}_style_assistant`,Ne=e=>`${e}_icon_assistant`,Ee=e=>`${e}_accessibility_assistant`,Ue=e=>`${e}_getting_started_assistant`,Pe=e=>`${e}_upgrade_assistant`;var De=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.
186
+ Upgrade complete. npm packages have been installed and updated in the project.`),T&&c.push(oe()),{content:[{type:"text",text:c.join(`
187
+ `)}]}}catch(i){return{content:[{type:"text",text:`Error: ${i.message||i.toString()}`}]}}});return l}var Me=e=>`${e}_ui_generator`,qe=e=>`${e}_assistant`,Fe=e=>`${e}_layout_assistant`,Be=e=>`${e}_component_assistant`,Ke=e=>`${e}_style_assistant`,We=e=>`${e}_icon_assistant`,je=e=>`${e}_accessibility_assistant`,He=e=>`${e}_getting_started_assistant`,Ye=e=>`${e}_upgrade_assistant`;var Ve=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.
200
188
 
201
189
  Use the tool when:
202
190
  - Want to build or modify a complete page or section layout
@@ -205,7 +193,7 @@ Upgrade complete. npm packages have been installed and updated in the project.`)
205
193
  - You want to enforce best practices in styling, performance, and accessibility
206
194
 
207
195
  Returns:
208
- A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,Le=e=>`Provides guidance for discovering and using ${e} components and icons. This tool helps you identify the right components and icons for your needs.
196
+ A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,ze=e=>`Provides guidance for discovering and using ${e} components and icons. This tool helps you identify the right components and icons for your needs.
209
197
 
210
198
  Use this tool when:
211
199
  - You need to discover which ${e} components are suitable for a specific use case
@@ -214,20 +202,20 @@ Use this tool when:
214
202
  - You want to gather component documentation and examples
215
203
 
216
204
  Returns:
217
- A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,_e=`Retrieves Progress/Kendo Design System CSS utility classes and styling recommendations based on layout and design requirements.
205
+ A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,Xe=`Retrieves Progress/Kendo Design System CSS utility classes and styling recommendations based on layout and design requirements.
218
206
  Use this tool to find the right CSS utilities for styling Kendo UI components or general web elements.
219
207
  It analyzes the provided design context and returns relevant utility classes with explanations and examples.
220
- Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,Ge=`Generates CSS variables using an external style agent based on the user's styling prompt.
208
+ Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,Qe=`Generates CSS variables using an external style agent based on the user's styling prompt.
221
209
 
222
210
  Use this tool when the user wants to:
223
211
  - Update the visual theme of an application
224
212
  - Modify color schemes
225
213
  - Restyle the UI with CSS variables
226
214
 
227
- The tool outputs a set of CSS variable definitions ready to be applied to style files.`,$e=`Searches for icons in the Telerik Icons library.
215
+ The tool outputs a set of CSS variable definitions ready to be applied to style files.`,Je=`Searches for icons in the Telerik Icons library.
228
216
  Use this tool when the user needs to find specific icons for UI components or design elements.
229
217
  It supports searching by icon name, category, or keyword and returns matching icons from the Telerik Icons library.
230
- `,Oe=e=>`Provides answers and retrieves official documentation for ${e}.
218
+ `,Ze=e=>`Provides answers and retrieves official documentation for ${e}.
231
219
 
232
220
  Use this tool when the user asks about:
233
221
  - ${e} features or capabilities
@@ -237,7 +225,7 @@ Use this tool when the user asks about:
237
225
 
238
226
  Set the user's full question as the 'query' parameter.
239
227
  If the question refers to a specific ${e} component, include its name in the 'component' parameter.
240
- `,qe=e=>`Retrieves accessibility guidance for ${e} components with optional general WCAG 2.2 Level AA guidelines.
228
+ `,et=e=>`Retrieves accessibility guidance for ${e} components with optional general WCAG 2.2 Level AA guidelines.
241
229
 
242
230
  Use this tool when:
243
231
  - You need component-specific accessibility information and API references
@@ -255,7 +243,7 @@ Set 'includeGeneralGuidelines=true' ONLY on the first call to include general WC
255
243
  Returns:
256
244
  - When includeGeneralGuidelines=true: General WCAG 2.2 Level AA guidelines + component-specific recommendations
257
245
  - When includeGeneralGuidelines=false: Only component-specific accessibility recommendations
258
- `,Me=(e,t)=>`Runs codemods to upgrade ${e} code from one version directly to another using @progress/kendo-cli.
246
+ `,tt=(e,t)=>`Runs codemods to upgrade ${e} code from one version directly to another using @progress/kendo-cli.
259
247
 
260
248
  To upgrade to the latest version, call this tool directly. It handles installation automatically.
261
249
 
@@ -280,7 +268,7 @@ Workflow:
280
268
  1. Run this upgrade tool to apply codemods.
281
269
  2. After the codemods complete, grep the project source files for every outdated value mentioned in the codemod output (e.g. old property names, renamed enum values) to find any remaining occurrences the codemod doesn't handle automatically, and fix them all.
282
270
  3. Follow the additional instructions to complete the upgrade process.
283
- `;var Rt={createOrchestrator:he,createAssistantOrchestrator:fe,createLayoutAssistant:ye,createStyleAssistant:be,createIconSearch:Ce,createCodeAssistant:ve,createAccessibilityAssistant:Ae,createUpgrade:ke},Nt={orchestrator:we,assistantOrchestrator:Se,layoutAssistant:Te,codeAssistant:Ie,styleAssistant:Re,iconAssistant:Ne,accessibilityAssistant:Ee,gettingStartedAssistant:Ue,upgradeAssistant:Pe},Et={orchestrator:De,assistantOrchestrator:Le,layoutAssistant:_e,styleAssistant:Ge,iconAssistant:$e,codeAssistant:Oe,accessibilityAssistant:qe,upgradeAssistant:Me},Ut={Orchestrator:{render:B},UX:{getInstructions:$}},C={Tools:Rt,ToolNames:Nt,ToolDescriptions:Et,Templates:Ut};var Fe=()=>`# Kendo Design System Guidelines for ${d}
271
+ `;var Kt={createOrchestrator:Ne,createAssistantOrchestrator:Ee,createLayoutAssistant:Ue,createStyleAssistant:Pe,createIconSearch:De,createCodeAssistant:_e,createAccessibilityAssistant:Ge,createUpgrade:Oe},Wt={orchestrator:Me,assistantOrchestrator:qe,layoutAssistant:Fe,codeAssistant:Be,styleAssistant:Ke,iconAssistant:We,accessibilityAssistant:je,gettingStartedAssistant:He,upgradeAssistant:Ye},jt={orchestrator:Ve,assistantOrchestrator:ze,layoutAssistant:Xe,styleAssistant:Qe,iconAssistant:Je,codeAssistant:Ze,accessibilityAssistant:et,upgradeAssistant:tt},Ht={Orchestrator:{render:W},UX:{getInstructions:O}},A={Tools:Kt,ToolNames:Wt,ToolDescriptions:jt,Templates:Ht};var ot=()=>`# Kendo Design System Guidelines for ${u}
284
272
  ## Setting up Styles/CSS
285
273
  Include a reference to the kendo-theme-utils CSS package and use the same import mechanism as the existing Kendo theme.
286
274
 
@@ -294,9 +282,9 @@ Alternatively, use CDN: \`<link rel="stylesheet" href="https://unpkg.com/@progre
294
282
  - Use the Kendo Design System utilities for layout.
295
283
  - Use theme utility classes instead of custom CSS whenever a utility exists. Write custom CSS only for properties without a utility equivalent.
296
284
  - Do not use overrides for Kendo internals when a utility or component configuration can express the rule.
297
- - Prioritize using ${d} components instead of building ones from scratch.
285
+ - Prioritize using ${u} components instead of building ones from scratch.
298
286
 
299
- - ${d} Card component.
287
+ - ${u} Card component.
300
288
  - Generally use 100% width (e.g., \`<Card style={{ width: '100%' }}>\`)
301
289
  - Or set width based on the layout requirements (e.g., \`<Card style={{ width: '150px' }}>\`)
302
290
 
@@ -324,7 +312,7 @@ Use only the four surface levels defined by the Kendo themes
324
312
  2. Component background (\`var(--kendo-component-bg)\`) \u2014 cards, panels, Grid body
325
313
  3. Header / hover surface (\`var(--kendo-grid-header-bg)\`) \u2014 Grid headers, highlighted rows
326
314
  4. Active / selected surface \u2014 managed by the theme automatically
327
- `;var Be=()=>`## Design Standards for ${d} Theming
315
+ `;var st=()=>`## Design Standards for ${u} Theming
328
316
 
329
317
  ### Color & Contrast Requirements
330
318
  - Body text contrast: \u2265 4.5:1. Large text / UI component borders: \u2265 3:1.
@@ -362,7 +350,7 @@ This is the most common source of dark mode breakage in custom UI.
362
350
 
363
351
  ---
364
352
 
365
- ## Applying CSS Variables in ${d}
353
+ ## Applying CSS Variables in ${u}
366
354
 
367
355
  Apply these CSS variables in the React application using one of these methods:
368
356
 
@@ -451,7 +439,7 @@ export function ThemeProvider({ children }: { children: React.ReactNode }) {
451
439
 
452
440
  export const useTheme = () => useContext(ThemeContext);
453
441
  \`\`\`
454
- `;var Ke=C.ToolNames.codeAssistant("kendoreact"),je=()=>`### SVG Icon Export Names
442
+ `;var rt=A.ToolNames.codeAssistant("kendoreact"),nt=()=>`### SVG Icon Export Names
455
443
 
456
444
  For an icon listed above, map its listed value to the SVG export from \`@progress/kendo-svg-icons\` as follows:
457
445
  1. Append \`-icon\` to the listed value.
@@ -460,7 +448,7 @@ For an icon listed above, map its listed value to the SVG export from \`@progres
460
448
  ### Font Icon Class Names
461
449
  Prepend \`k-i-\` to the listed value to form the font icon CSS class name. Keep the value in kebab case.
462
450
 
463
- ## Using ${d} Icons
451
+ ## Using ${u} Icons
464
452
 
465
453
  Important: Attempt to prioritize SVG icons over font icons.
466
454
 
@@ -468,13 +456,13 @@ Important: Attempt to prioritize SVG icons over font icons.
468
456
 
469
457
  - Make sure @progress/kendo-svg-icons is installed: \`npm install @progress/kendo-svg-icons\`
470
458
  - Make sure @progress/kendo-react-common is installed (contains SvgIcon component): \`npm install @progress/kendo-react-common\`
471
- - You can call ${Ke} tool for ${d} SvgIcon component for docs and API reference.
459
+ - You can call ${rt} tool for ${u} SvgIcon component for docs and API reference.
472
460
  - [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.
473
- - [optional] If using font icons you can call ${Ke} tool for ${d} Icon component for docs and API reference.
461
+ - [optional] If using font icons you can call ${rt} tool for ${u} Icon component for docs and API reference.
474
462
 
475
463
  ### Examples
476
464
 
477
- Using ${d} SvgIcon component with @progress/kendo-svg-icons:
465
+ Using ${u} SvgIcon component with @progress/kendo-svg-icons:
478
466
 
479
467
  \`\`\`tsx
480
468
  import { SvgIcon } from "@progress/kendo-react-common";
@@ -518,10 +506,10 @@ Here are some frequently used icons from @progress/kendo-svg-icons:
518
506
  - \`sortAscIcon\`, \`sortDescIcon\` - Sorting
519
507
  - \`chevronUpIcon\`, \`chevronDownIcon\`, \`chevronLeftIcon\`, \`chevronRightIcon\` - Navigation
520
508
  - \`checkIcon\`, \`xIcon\` - Confirmation/Cancel
521
- `;var We=e=>{let t=`## ${d} Implementation Rules
509
+ `;var at=e=>{let t=`## ${u} Implementation Rules
522
510
 
523
- - Follow the project's existing React and ${d} setup; use function components and Hooks for new code.
524
- - Before using a component, confirm its required ${d} package is already declared in the project. Install only missing, required packages using the project's approved package-management workflow.
511
+ - Follow the project's existing React and ${u} setup; use function components and Hooks for new code.
512
+ - Before using a component, confirm its required ${u} package is already declared in the project. Install only missing, required packages using the project's approved package-management workflow.
525
513
  - Keep imports named, minimal, and limited to packages and subcomponents actually used. Do not use side-effect imports or leave unused imports.
526
514
  - Compile under strict TypeScript: define source-data types; type component events, render callbacks, and handlers with exported types; do not use \`any\` or unsafe casts.
527
515
  - Keep data flow predictable and render a graceful empty state for invalid or empty data.
@@ -529,7 +517,7 @@ Here are some frequently used icons from @progress/kendo-svg-icons:
529
517
  ## Component-Specific Guidelines
530
518
 
531
519
  ${e.componentInstructions}
532
- `),t};var Pt={meridian:"@progress/kendo-theme-meridian",default:"@progress/kendo-theme-default",bootstrap:"@progress/kendo-theme-bootstrap",material:"@progress/kendo-theme-material",fluent:"@progress/kendo-theme-fluent"},Dt={meridian:"Meridian",default:"Default",bootstrap:"Bootstrap",material:"Material Design",fluent:"Fluent UI"};function He(e="kendo-react-app",t=!0,o="meridian"){let s=Pt[o],n=Dt[o],a=t?`This instructions will walk you through creating a new React project with the Kendo CLI and setting up ${d}.`:`This instructions will walk you through adding ${d} to your existing React project.`,r=1,i=t?`## Step ${r++}: Ensure Kendo CLI is Installed
520
+ `),t};var Yt={meridian:"@progress/kendo-theme-meridian",default:"@progress/kendo-theme-default",bootstrap:"@progress/kendo-theme-bootstrap",material:"@progress/kendo-theme-material",fluent:"@progress/kendo-theme-fluent"},Vt={meridian:"Meridian",default:"Default",bootstrap:"Bootstrap",material:"Material Design",fluent:"Fluent UI"};function it(e="kendo-react-app",t=!0,o="meridian"){let s=Yt[o],r=Vt[o],a=t?`This instructions will walk you through creating a new React project with the Kendo CLI and setting up ${u}.`:`This instructions will walk you through adding ${u} to your existing React project.`,n=1,l=t?`## Step ${n++}: Ensure Kendo CLI is Installed
533
521
 
534
522
  First, ensure the Kendo CLI tool is installed globally:
535
523
 
@@ -539,7 +527,7 @@ npm i -g @progress/kendo-cli@latest
539
527
 
540
528
  This CLI tool will handle the entire project setup including all necessary dependencies and configurations.
541
529
 
542
- ## Step ${r++}: Create the Project
530
+ ## Step ${n++}: Create the Project
543
531
 
544
532
  Create a new Kendo React project using the CLI:
545
533
 
@@ -548,7 +536,7 @@ npx kendo react create vite ${e} --theme=${o}
548
536
  \`\`\`
549
537
 
550
538
  This command will create a complete Kendo React project with Vite, including:
551
- - All necessary ${d} packages
539
+ - All necessary ${u} packages
552
540
  - Proper licensing configuration
553
541
  - Theme setup
554
542
  - Project structure
@@ -559,21 +547,21 @@ Navigate to the project directory:
559
547
  cd ${e}
560
548
  \`\`\`
561
549
 
562
- ## Step ${r++}: Remove Dark Color Schema from index.css
550
+ ## Step ${n++}: Remove Dark Color Schema from index.css
563
551
 
564
552
  Open the \`src/index.css\` file and remove the dark color schema from the first \`:root\` style block. Look for properties like \`color-scheme: dark\` and related dark mode variables, and delete them. Keep only the light theme configuration.
565
553
 
566
- `:"",l=t?"":`## Step ${r++}: Install ${d} Packages
554
+ `:"",m=t?"":`## Step ${n++}: Install ${u} Packages
567
555
 
568
- Install all required ${d} packages and dependencies:
556
+ Install all required ${u} packages and dependencies:
569
557
 
570
558
  \`\`\`bash
571
559
  npm i @progress/kendo-data-query @progress/kendo-react-buttons @progress/kendo-react-excel-export @progress/kendo-react-grid @progress/kendo-react-layout @progress/kendo-react-pdf @progress/kendo-svg-icons @progress/kendo-drawing @progress/kendo-licensing @progress/kendo-react-animation @progress/kendo-react-charts @progress/kendo-react-common @progress/kendo-react-conversational-ui @progress/kendo-react-data-tools @progress/kendo-react-dateinputs @progress/kendo-react-dialogs @progress/kendo-react-dropdowns @progress/kendo-react-editor @progress/kendo-react-form @progress/kendo-react-gantt @progress/kendo-react-gauges @progress/kendo-react-indicators @progress/kendo-react-inputs @progress/kendo-react-intl @progress/kendo-react-labels @progress/kendo-react-listbox @progress/kendo-react-listview @progress/kendo-react-map @progress/kendo-react-notification @progress/kendo-react-orgchart @progress/kendo-react-pivotgrid @progress/kendo-react-popup @progress/kendo-react-progressbars @progress/kendo-react-ripple @progress/kendo-react-scheduler @progress/kendo-react-scrollview @progress/kendo-react-sortable @progress/kendo-react-spreadsheet @progress/kendo-react-tooltip @progress/kendo-react-treelist @progress/kendo-react-treeview @progress/kendo-react-upload @progress/kendo-react-pdf-viewer @progress/kendo-react-taskboard
572
560
  \`\`\`
573
561
 
574
- ## Step ${r++}: Install and Import the Theme
562
+ ## Step ${n++}: Install and Import the Theme
575
563
 
576
- Install the ${n} theme package:
564
+ Install the ${r} theme package:
577
565
 
578
566
  \`\`\`bash
579
567
  npm i ${s}
@@ -591,7 +579,7 @@ Also add the Kendo CSS utilities CDN link in your \`index.html\` \`<head>\`:
591
579
  <link rel="stylesheet" href="https://unpkg.com/@progress/kendo-theme-utils/dist/all.css" />
592
580
  \`\`\`
593
581
 
594
- `,p=`## Step ${r++}: Activate Kendo License
582
+ `,d=`## Step ${n++}: Activate Kendo License
595
583
 
596
584
  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:
597
585
 
@@ -599,7 +587,7 @@ This step is required to use Kendo React components without watermarks and with
599
587
  npx kendo license activate
600
588
  \`\`\`
601
589
 
602
- `;return`# Getting Started with ${d}
590
+ `;return`# Getting Started with ${u}
603
591
 
604
592
  ${a}
605
593
 
@@ -612,7 +600,7 @@ Before you begin, ensure you have:
612
600
  - **Node.js 18 or later** installed on your machine
613
601
  - If Node.js is not available, you need to install the latest Node.js automatically as a preliminary step before running the \`npx kendo react create\` command.
614
602
 
615
- ${i}${l}${p}## Step ${r++}: Run Your Application
603
+ ${l}${m}${d}## Step ${n++}: Run Your Application
616
604
 
617
605
  ${t?"The Kendo CLI has set up everything you need. Start the development server:":"Build and run the application:"}
618
606
 
@@ -623,13 +611,13 @@ ${t?"The Kendo CLI has set up everything you need. Start the development server:
623
611
  cd ${t?e:"."} && npm run dev
624
612
  \`\`\`
625
613
 
626
- ${t?`The application should start and open your browser to see your ${d} application.`:`The application should start and open in your browser. Verify that the ${d} components are rendering correctly with the theme applied.`}
614
+ ${t?`The application should start and open your browser to see your ${u} application.`:`The application should start and open in your browser. Verify that the ${u} components are rendering correctly with the theme applied.`}
627
615
 
628
- ## Step ${r++}: Create Sample page
616
+ ## Step ${n++}: Create Sample page
629
617
 
630
618
  Before adding new content to the homepage, clear all existing CSS on the page. Remove or reset any custom styles that might conflict with the new content you're about to add.
631
619
 
632
- Replace the content of \`src/Home.tsx\` with the following to showcase ${d} features and verify components are working correctly:
620
+ Replace the content of \`src/Home.tsx\` with the following to showcase ${u} features and verify components are working correctly:
633
621
 
634
622
  \`\`\`tsx
635
623
  import { Card, CardHeader, CardTitle, CardBody } from '@progress/kendo-react-layout';
@@ -750,7 +738,7 @@ Add the following styles to \`src/Home.css\`:
750
738
  }
751
739
  \`\`\`
752
740
 
753
- `}var Ye=`
741
+ `}var lt=`
754
742
  ## KendoReact Chart Reliability Instructions
755
743
  Applies to ALL KendoReact chart types. Generate only current, runnable KendoReact Chart APIs with strongly typed data. You MUST follow every rule in addition to the common guidelines. If any rule cannot be satisfied, fix and re-check before emitting code.
756
744
 
@@ -892,7 +880,7 @@ const pieLabel = (e: { category?: string; percentage?: number }) =>
892
880
 
893
881
  ### 11. Expected output behavior
894
882
  - The generated page MUST compile under strict TypeScript and render the requested chart(s) with correct data shape, required axes/labels for the chosen series family, formatted tooltips/labels, and no forbidden patterns.
895
- `;var ze=`
883
+ `;var ct=`
896
884
  ## Grid Deprecated Properties Awareness
897
885
  For Grid component cases, avoid using deprecated properties and always use their modern replacements. The following properties are deprecated and should not be used:
898
886
 
@@ -924,7 +912,7 @@ Key points:
924
912
  Example:
925
913
  Deprecated: selectedField="isSelected" editField="inEdit"
926
914
  Modern: Use select and edit state properties with proper configuration
927
- `;var Ve=`
915
+ `;var dt=`
928
916
  ## Editor Tools Awareness
929
917
  For Editor component cases, always use the proper EditorTools import structure and never define tools as strings. Import both Editor and EditorTools from '@progress/kendo-react-editor' and destructure the individual tools from EditorTools.
930
918
 
@@ -956,7 +944,7 @@ Key points:
956
944
  Example:
957
945
  Correct: tools={[[Bold, Italic, Underline], [AlignLeft, AlignCenter]]}
958
946
  Incorrect: tools={[['bold', 'italic', 'underline'], ['alignLeft', 'alignCenter']]}
959
- `;var Xe=`
947
+ `;var pt=`
960
948
  ## Smart Grid (AI-Enhanced Grid) Implementation Guidelines
961
949
  **CRITICAL: When users ask about ANY of these AI grid terms, ALWAYS provide GridToolbarAIAssistant implementation (not basic Grid):**
962
950
 
@@ -990,8 +978,8 @@ Smart Grid: Complete AI-enhanced setup with GridToolbarAIAssistant, proper callb
990
978
  Important Disclaimer:
991
979
  Always include this disclaimer when providing Smart Grid examples:
992
980
  "The demos in this article use a Telerik-hosted AI service for demonstration purposes only. For production applications, you should implement your own AI service that understands your specific domain, data, and business requirements."
993
- `;var Lt={grid:[ze,Xe].join(`
981
+ `;var zt={grid:[ct,pt].join(`
994
982
 
995
- `),editor:Ve,chart:Ye},O=!!process.env.PLUGIN_MODE,Qe=C.ToolNames.layoutAssistant(U),ee=C.ToolNames.codeAssistant(U),Je=C.ToolNames.styleAssistant(U),te=C.ToolNames.iconAssistant(U),Ze=C.ToolNames.gettingStartedAssistant(U),et=C.ToolNames.accessibilityAssistant(U),_t=C.ToolNames.upgradeAssistant(U);function tt(e,t){return[...O?[]:[C.Tools.createOrchestrator({name:C.ToolNames.orchestrator(U),title:"KendoReact Generator",description:C.ToolDescriptions.orchestrator(d),layoutAssistantName:Qe,codeAssistantName:ee,styleAssistantName:Je,iconAssistantName:te,accessibilityAssistantName:et,suiteName:d,libKey:I,components:M,requiredAccess:["agent"]},e),C.Tools.createAssistantOrchestrator({name:"kendo_react_assistant",title:"KendoReact Assistant",description:C.ToolDescriptions.assistantOrchestrator(d),codeAssistantName:ee,iconAssistantName:te,suiteName:d,libKey:I,components:M,requiredAccess:["assistant"]},e)],C.Tools.createLayoutAssistant({name:Qe,title:"KendoReact Layout Assistant",description:C.ToolDescriptions.layoutAssistant,suiteName:d,libKey:I,getPreContent:O?void 0:()=>`${Fe()}
983
+ `),editor:dt,chart:lt},q=!!process.env.PLUGIN_MODE,ut=A.ToolNames.layoutAssistant(P),ne=A.ToolNames.codeAssistant(P),mt=A.ToolNames.styleAssistant(P),ae=A.ToolNames.iconAssistant(P),gt=A.ToolNames.gettingStartedAssistant(P),ht=A.ToolNames.accessibilityAssistant(P),Xt=A.ToolNames.upgradeAssistant(P);function ft(e,t){return[...q?[]:[A.Tools.createOrchestrator({name:A.ToolNames.orchestrator(P),title:"KendoReact Generator",description:A.ToolDescriptions.orchestrator(u),layoutAssistantName:ut,codeAssistantName:ne,styleAssistantName:mt,iconAssistantName:ae,accessibilityAssistantName:ht,suiteName:u,libKey:U,components:B,requiredAccess:["agent"]},e),A.Tools.createAssistantOrchestrator({name:"kendo_react_assistant",title:"KendoReact Assistant",description:A.ToolDescriptions.assistantOrchestrator(u),codeAssistantName:ne,iconAssistantName:ae,suiteName:u,libKey:U,components:B,requiredAccess:["assistant"]},e)],A.Tools.createLayoutAssistant({name:ut,title:"KendoReact Layout Assistant",description:A.ToolDescriptions.layoutAssistant,getPreContent:q?void 0:()=>`${ot()}
996
984
 
997
- ${$()}`,requiredAccess:["agent"]},e),C.Tools.createStyleAssistant({name:Je,title:"KendoReact Style Assistant",description:C.ToolDescriptions.styleAssistant,libKey:I,getPreContent:O?void 0:Be,requiredAccess:["agent"]},e),C.Tools.createIconSearch({name:te,title:"KendoReact Icon Assistant",description:C.ToolDescriptions.iconAssistant,libKey:I,getPostContent:O?void 0:je,requiredAccess:["assistant","agent"]},e),C.Tools.createCodeAssistant({name:ee,title:"KendoReact Component Assistant",description:C.ToolDescriptions.codeAssistant(d),libKey:I,suiteName:d,components:M,getPostContent:O?void 0:({component:s})=>{let n=s?.trim().toLowerCase(),a=Lt[n];return We({component:s,componentInstructions:a})},requiredAccess:["assistant","agent"]},e),...O?[]:[(()=>{let s=new w(Ze,{title:"KendoReact Getting Started",description:`Creates a new React project with Kendo CLI and provides essential getting started guidance for ${d} including installation, configuration, and setup instructions.`,requiredAccess:["agent"],inputSchema:pe(d,"kendo-react-app")},async({projectName:n,createNewProject:a,theme:r},{_meta:i})=>{let l=T(s,i);try{await e.recordToolUserRequest({toolName:Ze,meta:{projectName:n,createNewProject:a,theme:r,...l}})}catch(h){console.error("Error recording tool request:",h)}return{content:[{type:"text",text:He(n,a,r)}]}});return s})()],C.Tools.createAccessibilityAssistant({name:et,title:"KendoReact Accessibility Assistant",description:C.ToolDescriptions.accessibilityAssistant(d),libKey:I,suiteName:d,components:M,requiredAccess:["agent"]},e),C.Tools.createUpgrade({name:_t,title:"KendoReact Upgrade Assistant",description:C.ToolDescriptions.upgradeAssistant(d,"@progress/kendo-react-"),suiteName:d,packagePrefix:"@progress/kendo-react-",requiredAccess:["agent"]},e)].filter(s=>s.hasAccess(t))}var Mt=qt(import.meta.url),Ft=st.dirname(Mt),Bt=st.resolve(Ft,"../package.json"),nt=JSON.parse(Ot.readFileSync(Bt,"utf-8")),ot=new Gt({name:"kendo-mcp",title:"Kendo MCP Server",version:nt.version});async function Kt(){let e=new $t;b("Starting server... ");let t=await le(async()=>{let s=(await ue())?.entitlement;return s?.Product?.Code||s?.product?.code});t!=="none"&&(F.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",tt(F,t).forEach(s=>s.register(ot)),de({serverName:"react",contextApi:F,enrichWithUserData:!0,additionalFields:{version:nt.version,access_type:t}})),await ot.connect(e)}Kt();
985
+ ${O()}`,requiredAccess:["agent"]},e),A.Tools.createStyleAssistant({name:mt,title:"KendoReact Style Assistant",description:A.ToolDescriptions.styleAssistant,libKey:U,getPreContent:q?void 0:st,requiredAccess:["agent"]},e),A.Tools.createIconSearch({name:ae,title:"KendoReact Icon Assistant",description:A.ToolDescriptions.iconAssistant,libKey:U,getPostContent:q?void 0:nt,requiredAccess:["assistant","agent"]},e),A.Tools.createCodeAssistant({name:ne,title:"KendoReact Component Assistant",description:A.ToolDescriptions.codeAssistant(u),libKey:U,suiteName:u,components:B,getPostContent:q?void 0:({component:s})=>{let r=s?.trim().toLowerCase(),a=zt[r];return at({component:s,componentInstructions:a})},requiredAccess:["assistant","agent"]},e),...q?[]:[(()=>{let s=new S(gt,{title:"KendoReact Getting Started",description:`Creates a new React project with Kendo CLI and provides essential getting started guidance for ${u} including installation, configuration, and setup instructions.`,requiredAccess:["agent"],inputSchema:ve(u,"kendo-react-app")},async({projectName:r,createNewProject:a,theme:n},{_meta:l})=>{let m=I(s,l);try{await e.recordToolUserRequest({toolName:gt,meta:{projectName:r,createNewProject:a,theme:n,...m}})}catch(h){console.error("Error recording tool request:",h)}return{content:[{type:"text",text:it(r,a,n)}]}});return s})()],A.Tools.createAccessibilityAssistant({name:ht,title:"KendoReact Accessibility Assistant",description:A.ToolDescriptions.accessibilityAssistant(u),libKey:U,suiteName:u,components:B,requiredAccess:["agent"]},e),A.Tools.createUpgrade({name:Xt,title:"KendoReact Upgrade Assistant",description:A.ToolDescriptions.upgradeAssistant(u,"@progress/kendo-react-"),suiteName:u,packagePrefix:"@progress/kendo-react-",requiredAccess:["agent"]},e)].filter(s=>s.hasAccess(t))}var to=eo(import.meta.url),oo=bt.dirname(to),so=bt.resolve(oo,"../package.json"),vt=JSON.parse(Zt.readFileSync(so,"utf-8")),yt=new Qt({name:"kendo-mcp",title:"Kendo MCP Server",version:vt.version});async function ro(){let e=new Jt;C("Starting server... ");let t=await fe(async()=>{let s=(await Ce())?.entitlement;return s?.Product?.Code||s?.product?.code});t!=="none"&&(K.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",ft(K,t).forEach(s=>s.register(yt)),be({serverName:"react",contextApi:K,enrichWithUserData:!0,additionalFields:{version:vt.version,access_type:t}})),await yt.connect(e)}ro();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-mcp",
3
- "version": "1.10.2",
3
+ "version": "1.11.0",
4
4
  "type": "module",
5
5
  "bin": "./dist/index.js",
6
6
  "license": "See LICENSE.md",
@@ -24,10 +24,10 @@
24
24
  "!**/*.tsbuildinfo"
25
25
  ],
26
26
  "dependencies": {
27
- "@grpc/grpc-js": "^1.14.4",
27
+ "@grpc/grpc-js": "^1.14.5",
28
28
  "@grpc/proto-loader": "^0.8.1",
29
29
  "@modelcontextprotocol/sdk": "^1.30.0",
30
- "@progress/kendo-licensing": "^1.11.2",
30
+ "@progress/kendo-licensing": "^1.11.3",
31
31
  "tslib": "^2.3.0"
32
32
  },
33
33
  "devDependencies": {