@progress/kendo-angular-mcp 1.7.0 → 1.8.0-dev.97316fdc.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.
- package/dist/index.js +139 -87
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{McpServer as
|
|
3
|
-
`,
|
|
2
|
+
import{McpServer as oo}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as no}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as Ot,join as Ut}from"path";import{fileURLToPath as Gt}from"url";import{loadLicense as wt,decodeLicenseKey as Ct,decodeLicenseEvidence as St}from"@progress/kendo-licensing/utils";var z=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function pe(e){return e.replace(/^\uFEFF/,"")}async function Y(e){let t=null,n=null;try{let o=wt();if(!o.success){let s=new z(o.message);throw e&&await e("license_load_failed",{error:o.message}).catch(()=>{}),s}try{t=(await Ct(o.value)).licenses.find(async i=>!!(await St(i)).userId)}catch(s){console.log(s.message),e&&await e("license_load_failed",{error:s.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[pe(o.value),null]}catch(o){return n=o.message||"Unknown error loading license.",e&&await e("license_load_failed",{error:n}).catch(()=>{}),[null,n]}return[pe(t),null]}import L from"node:fs";import j from"node:path";var H=!1,O=process.env.DEBUG_LOG_FILE,ue=!!(O&&typeof O=="string");if(ue){let e=j.resolve(O),t=j.dirname(e);if(t!=="."&&t!==process.cwd()&&!L.existsSync(t))try{L.mkdirSync(t,{recursive:!0})}catch(n){console.error("Error creating log directory:",n)}if(!L.existsSync(e))try{L.writeFileSync(e,"")}catch(n){console.error("Error creating log file:",n)}}else H=!1;H=ue&&!!O&&L.existsSync(j.resolve(O));function k(...e){if(H&&O){let o=`${new Date().toISOString()}: ${e.join(" ")}
|
|
3
|
+
`,s=j.resolve(O);L.appendFile(s,o,i=>{i&&console.error("Error writing to log file:",i)})}}import xt from"@grpc/proto-loader";import $ from"@grpc/grpc-js";import he from"path";import me from"fs";import{fileURLToPath as Tt}from"url";var It=Tt(import.meta.url),Nt=he.dirname(It),fe={version:"unknown"},ge=he.resolve(Nt,"../package.json");me.existsSync(ge)&&(fe=JSON.parse(me.readFileSync(ge,"utf-8")));function Et(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var V=class{constructor(t,n,o){this.contextApiUrl=t;this.protoPath=n;this.options=o;this.toolNameHeader="assistant";let s=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"),k("Using ContextApi URl:",this.contextApiUrl);let i=$.loadPackageDefinition(s);this.client=new i.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?$.credentials.createInsecure():$.credentials.createSsl())}buildRequestMetadata(t={}){return Et(JSON.stringify({...t,source:"npm",version:fe.version,os:process.platform,node_version:process.version}))}async getMetadata({meta:t}={meta:{}}){let[n,o]=this.isDev?["fake_license",null]:await Y((p,u)=>this.logEvent(p,u)),s=process.env.CONTEXTAPI_API_KEY,i=s&&typeof s=="string",a=n&&typeof n=="string";if(!a&&!i&&o)throw new Error(`Failed to authenticate with API key or License key!
|
|
4
4
|
|
|
5
|
-
License Error: ${o}`);let i=new U.Metadata;if(a)try{i.add("x-license-key",s)}catch(d){throw b("Error adding license key to metadata:",d),new Error(`Failed to use license key: ${d.message}`)}return r&&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,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.query(t,o,(a,i)=>{a?r(new Error(a)):n(i)})})}async getApiRefMatches(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.getApiRefMatches(t,o,(a,i)=>{a?r(new Error(a)):n(i)})})}async queryCssUtils(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.cssUtilsSearch(t,o,(a,i)=>{a?(b("Error querying CSS Utils:",a),r(new Error(a))):n(i)})})}async queryIconsSearch(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.iconsSearch(t,o,(a,i)=>{a?(b("Error querying Icons Search:",a),r(new Error(a))):n(i)})})}async queryBuildingBlocks(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.buildingBlocksSearch(t,o,(a,i)=>{a?(b("Error querying Building Blocks:",a),r(new Error(a))):n(i)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((s,o)=>{this.client.validateUserLicense(null,t,(n,r)=>{n?(b("Error validating user license:",n),o(new Error(n))):s(r)})})}async queryThemeGenerate(t,s){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.generateTheme(t,o,(a,i)=>{a?(b("Error querying context API/GenerateTheme:",a),r(new Error(a))):n(i)})})}async recordOrchestratorUserRequest({meta:t}){let s=await this.getMetadata({meta:t});return new Promise((o,n)=>{this.client.recordOrchestratorUserRequest(null,s,(r,a)=>{r?(b("Error recording orchestrator user request:",r),n(new Error(r))):o(a)})})}async recordToolUserRequest({toolName:t,meta:s}){let o=await this.getMetadata({meta:s});return new Promise((n,r)=>{this.client.recordToolUserRequest({tool_name:t},o,(a,i)=>{a?(b("Error recording tool user request:",a),r(new Error(a))):n(i)})})}async logEvent(t,s,o={}){let n="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq",{enrichWithUserData:r=!1,meta:a={}}=o,i=n&&typeof n=="string",d=null;if(r)try{let[m]=this.isDev?["fake_license",null]:await W();m&&typeof m=="string"&&(d=m)}catch{}if(!i&&!d){b("Neither LOGGING_API_KEY nor license key available, skipping log event");return}let p=new U.Metadata;return i&&p.add("x-api-key",n),d&&(p.add("x-license-key",d),p.add("x-request-metadata",this.buildRequestMetadata(a)),this.options?.libName&&p.add("x-library-name",this.options.libName)),new Promise((m,f)=>{this.client.logEvent({event_name:t,fields:s||{}},p,(u,y)=>{u?(b("Error logging event:",u),f(new Error(u))):m()})})}};import{z as j}from"zod";var mo=j.object({user_id:j.string(),user_email:j.string().email()});import{z as w}from"zod";var kt=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())}),fo=w.array(kt);function x(e,t){let s=e.server?.server.getClientVersion?.(),o=t||{};return s&&(o.clientInfo={name:s.name,version:s.version}),o}async function de(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 s=await e();return s?.toLocaleLowerCase()==="agentic_ui_generator"?"agent":s?.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function pe(){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 At=1440*60*1e3;function ue(e){let{serverName:t,contextApi:s,additionalFields:o={},intervalMs:n=At,enrichWithUserData:r=!1}=e,a="mcp_server_heartbeat",i=async()=>{try{let p={server_name:t,timestamp:new Date().toISOString(),...o};await s.logEvent(a,p,{enrichWithUserData:r})}catch(p){b(`Failed to send heartbeat for ${t}:`,p)}};i();let d=setInterval(i,n);return()=>{clearInterval(d),b(`Heartbeat stopped for ${t}`)}}import{z}from"zod";var wt=["default","bootstrap","material","fluent"];function me(e,t){return{projectName:z.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:z.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:z.enum(wt).default("default").describe("The Kendo UI theme to use. Determines which theme package is installed and imported.")}}var l="Kendo UI for Angular",T="angular",E="kendo",L=["AIPrompt","ActionSheet","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","BreadCrumb","Button","ButtonGroup","Calendar","Card","ChartWizard","Charts","CheckBox","Chip","ChipList","ChunkProgressBar","CircularGauge","CircularProgressBar","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataQuery","DateInput","DateMath","DatePicker","DateRange","DateTimePicker","Diagram","Dialog","DragandDrop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","ExcelExport","ExpansionPanel","FileSaver","FileSelect","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","Forms","FormField","Gantt","Gauges","General","Grid","GridLayout","Icon","InlineAIPrompt","Label","LinearGauge","ListBox","ListView","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OTPInput","Pager","PanelBar","PDFExport","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RangeSlider","Rating","Ripple","Sankey","Scheduler","ScrollView","Signature","Skeleton","Slider","SmartPasteButton","Sortable","StockChart","Sparkline","SpeechToTextButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","SVGIcon","Switch","TabStrip","TextArea","TextBox","TileLayout","Timeline","TimePicker","ToolBar","Tooltip","TreeList","TreeView","Typography","Upload","Window"],ge=new Map([["actionsheet","@progress/kendo-angular-navigation"],["aiprompt","@progress/kendo-angular-conversational-ui"],["appbar","@progress/kendo-angular-navigation"],["arcgauge","@progress/kendo-angular-gauges"],["autocomplete","@progress/kendo-angular-dropdowns"],["avatar","@progress/kendo-angular-layout"],["badge","@progress/kendo-angular-indicators"],["barcode","@progress/kendo-angular-barcodes"],["bottomnavigation","@progress/kendo-angular-navigation"],["breadcrumb","@progress/kendo-angular-navigation"],["button","@progress/kendo-angular-buttons"],["buttongroup","@progress/kendo-angular-buttons"],["calendar","@progress/kendo-angular-dateinputs"],["card","@progress/kendo-angular-layout"],["chartwizard","@progress/kendo-angular-chart-wizard"],["checkbox","@progress/kendo-angular-inputs"],["chip","@progress/kendo-angular-buttons"],["chiplist","@progress/kendo-angular-buttons"],["chunkprogressbar","@progress/kendo-angular-progressbar"],["circulargauge","@progress/kendo-angular-gauges"],["circularprogressbar","@progress/kendo-angular-progressbar"],["colorgradient","@progress/kendo-angular-inputs"],["colorpalette","@progress/kendo-angular-inputs"],["colorpicker","@progress/kendo-angular-inputs"],["combobox","@progress/kendo-angular-dropdowns"],["contextmenu","@progress/kendo-angular-menu"],["dataquery","@progress/kendo-data-query"],["dateinput","@progress/kendo-angular-dateinputs"],["datemath","@progress/kendo-date-math"],["datepicker","@progress/kendo-angular-dateinputs"],["daterangepicker","@progress/kendo-angular-dateinputs"],["datetimepicker","@progress/kendo-angular-dateinputs"],["diagram","@progress/kendo-angular-diagrams"],["dialog","@progress/kendo-angular-dialog"],["drawer","@progress/kendo-angular-layout"],["drawing","@progress/kendo-drawing"],["dropdownbutton","@progress/kendo-angular-buttons"],["dropdownlist","@progress/kendo-angular-dropdowns"],["dropdowntree","@progress/kendo-angular-dropdowns"],["editor","@progress/kendo-angular-editor"],["excelexport","@progress/kendo-angular-excel-export"],["expansionpanel","@progress/kendo-angular-layout"],["filesaver","@progress/kendo-file-saver"],["fileselect","@progress/kendo-angular-upload"],["filter","@progress/kendo-angular-filter"],["flatcolorpicker","@progress/kendo-angular-inputs"],["floatingactionbutton","@progress/kendo-angular-buttons"],["floatinglabel","@progress/kendo-angular-label"],["formfield","@progress/kendo-angular-inputs"],["forms","@progress/kendo-angular-inputs"],["gantt","@progress/kendo-angular-gantt"],["grid","@progress/kendo-angular-grid"],["gridlayout","@progress/kendo-angular-layout"],["icon","@progress/kendo-angular-icons"],["inlineaiprompt","@progress/kendo-angular-conversational-ui"],["label","@progress/kendo-angular-label"],["lineargauge","@progress/kendo-angular-gauges"],["listbox","@progress/kendo-angular-listbox"],["listview","@progress/kendo-angular-listview"],["loader","@progress/kendo-angular-indicators"],["map","@progress/kendo-angular-map"],["maskedtextbox","@progress/kendo-angular-inputs"],["menu","@progress/kendo-angular-menu"],["multicolumncombobox","@progress/kendo-angular-dropdowns"],["multiselect","@progress/kendo-angular-dropdowns"],["multiselecttree","@progress/kendo-angular-dropdowns"],["multiviewcalendar","@progress/kendo-angular-dateinputs"],["notification","@progress/kendo-angular-notification"],["numerictextbox","@progress/kendo-angular-inputs"],["otpinput","@progress/kendo-angular-inputs"],["pager","@progress/kendo-angular-pager"],["panelbar","@progress/kendo-angular-layout"],["pdfexport","@progress/kendo-angular-pdf-export"],["pdfviewer","@progress/kendo-angular-pdfviewer"],["pivotgrid","@progress/kendo-angular-pivotgrid"],["popover","@progress/kendo-angular-tooltip"],["popup","@progress/kendo-angular-popup"],["progressbar","@progress/kendo-angular-progressbar"],["promptbox","@progress/kendo-angular-conversational-ui"],["qrcode","@progress/kendo-angular-barcodes"],["radialgauge","@progress/kendo-angular-gauges"],["radiobutton","@progress/kendo-angular-inputs"],["rangeslider","@progress/kendo-angular-inputs"],["rating","@progress/kendo-angular-inputs"],["ripple","@progress/kendo-angular-ripple"],["sankey","@progress/kendo-angular-charts"],["scheduler","@progress/kendo-angular-scheduler"],["scrollview","@progress/kendo-angular-scrollview"],["signature","@progress/kendo-angular-inputs"],["skeleton","@progress/kendo-angular-indicators"],["slider","@progress/kendo-angular-inputs"],["smartpastebutton","@progress/kendo-angular-buttons"],["sortable","@progress/kendo-angular-sortable"],["sparkline","@progress/kendo-angular-charts"],["speechtotextbutton","@progress/kendo-angular-buttons"],["splitbutton","@progress/kendo-angular-buttons"],["splitter","@progress/kendo-angular-layout"],["spreadsheet","@progress/kendo-angular-spreadsheet"],["stacklayout","@progress/kendo-angular-layout"],["stepper","@progress/kendo-angular-layout"],["stockchart","@progress/kendo-angular-charts"],["svgicon","@progress/kendo-angular-icons"],["switch","@progress/kendo-angular-inputs"],["tabstrip","@progress/kendo-angular-layout"],["textarea","@progress/kendo-angular-inputs"],["textbox","@progress/kendo-angular-inputs"],["tilelayout","@progress/kendo-angular-layout"],["timeline","@progress/kendo-angular-layout"],["timepicker","@progress/kendo-angular-dateinputs"],["toolbar","@progress/kendo-angular-toolbar"],["treelist","@progress/kendo-angular-treelist"],["treeview","@progress/kendo-angular-treeview"],["typography","@progress/kendo-angular-typography"],["upload","@progress/kendo-angular-upload"],["window","@progress/kendo-angular-dialog"],["charts","@progress/kendo-angular-charts"],["conversationalui","@progress/kendo-angular-conversational-ui"],["tooltip","@progress/kendo-angular-tooltip"]]);var Tt=St(Ct(xt(import.meta.url)),"../proto/service.proto"),M=new F("contextapi.telerik.com:443",Tt,{libName:T});var he=async()=>M.validateUserLicense();import Kt from"fs";import it from"path";import{fileURLToPath as Wt}from"url";import{z as A}from"zod";var C=class{constructor(t,s,o){this.name=t;this.config=s;this.cb=o}register(t){this.server=t,this.server.registerTool(this.name,this.config,this.cb)}hasAccess(t){return!this.config.requiredAccess||this.config.requiredAccess.length===0?!0:t==="full"||this.config.requiredAccess.includes(t)}};var $=(e,t)=>`# ${e.suiteName} - Code Validation & Quality Assurance
|
|
5
|
+
License Error: ${o}`);let r=new $.Metadata;if(a)try{r.add("x-license-key",n)}catch(p){throw k("Error adding license key to metadata:",p),new Error(`Failed to use license key: ${p.message}`)}return i&&r.add("x-api-key",s),this.options?.libName&&r.add("x-library-name",this.options.libName),r.add("x-tool-name",this.toolNameHeader),r.add("x-request-metadata",this.buildRequestMetadata(t)),r}async query(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.query(t,o,(a,r)=>{a?i(new Error(a)):s(r)})})}async getApiRefMatches(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.getApiRefMatches(t,o,(a,r)=>{a?i(new Error(a)):s(r)})})}async queryCssUtils(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.cssUtilsSearch(t,o,(a,r)=>{a?(k("Error querying CSS Utils:",a),i(new Error(a))):s(r)})})}async queryIconsSearch(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.iconsSearch(t,o,(a,r)=>{a?(k("Error querying Icons Search:",a),i(new Error(a))):s(r)})})}async queryBuildingBlocks(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.buildingBlocksSearch(t,o,(a,r)=>{a?(k("Error querying Building Blocks:",a),i(new Error(a))):s(r)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((n,o)=>{this.client.validateUserLicense({},t,(s,i)=>{s?(k("Error validating user license:",s),o(new Error(s))):n(i)})})}async queryThemeGenerate(t,n){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.generateTheme(t,o,(a,r)=>{a?(k("Error querying context API/GenerateTheme:",a),i(new Error(a))):s(r)})})}async recordOrchestratorUserRequest({meta:t}){let n=await this.getMetadata({meta:t});return new Promise((o,s)=>{this.client.recordOrchestratorUserRequest({},n,(i,a)=>{i?(k("Error recording orchestrator user request:",i),s(new Error(i))):o(a)})})}async recordToolUserRequest({toolName:t,meta:n}){let o=await this.getMetadata({meta:n});return new Promise((s,i)=>{this.client.recordToolUserRequest({tool_name:t},o,(a,r)=>{a?(k("Error recording tool user request:",a),i(new Error(a))):s(r)})})}async logEvent(t,n,o={}){let s="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq",{enrichWithUserData:i=!1,meta:a={}}=o,r=s&&typeof s=="string",p=null;if(i)try{let[f]=this.isDev?["fake_license",null]:await Y();f&&typeof f=="string"&&(p=f)}catch{}if(!r&&!p){k("Neither LOGGING_API_KEY nor license key available, skipping log event");return}let u=new $.Metadata;return r&&u.add("x-api-key",s),p&&(u.add("x-license-key",p),u.add("x-request-metadata",this.buildRequestMetadata(a)),this.options?.libName&&u.add("x-library-name",this.options.libName)),new Promise((f,v)=>{this.client.logEvent({event_name:t,fields:n||{}},u,(c,m)=>{c?(k("Error logging event:",c),v(new Error(c))):f()})})}};import{z as Q}from"zod";var To=Q.object({user_id:Q.string(),user_email:Q.string().email()});import{z as w}from"zod";var Rt=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())}),Eo=w.array(Rt);function x(e,t){let n=e.server?.server.getClientVersion?.(),o=t||{};return n&&(o.clientInfo={name:n.name,version:n.version}),o}async function ye(e){let t=process.env.KENDO_MCP_ACCESS;if(t==="true"||t==="1"||t==="full")return"full";if(typeof t=="string"&&(t.toLowerCase()==="agent"||t.toLowerCase()==="assistant"))return t.toLowerCase();let n=await e();return n?.toLocaleLowerCase()==="agentic_ui_generator"?"agent":n?.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function be(){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 Pt=1440*60*1e3;function ve(e){let{serverName:t,contextApi:n,additionalFields:o={},intervalMs:s=Pt,enrichWithUserData:i=!1}=e,a="mcp_server_heartbeat",r=async()=>{try{let u={server_name:t,timestamp:new Date().toISOString(),...o};await n.logEvent(a,u,{enrichWithUserData:i})}catch(u){k(`Failed to send heartbeat for ${t}:`,u)}};r();let p=setInterval(r,s);return()=>{clearInterval(p),k(`Heartbeat stopped for ${t}`)}}import{z as J}from"zod";var Dt=["meridian","default","bootstrap","material","fluent"];function ke(e,t){return{projectName:J.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:J.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:J.enum(Dt).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 l="Kendo UI for Angular",N="angular",D="kendo",_=["AIPrompt","ActionSheet","AppBar","ArcGauge","AutoComplete","Avatar","Badge","Barcode","BottomNavigation","BreadCrumb","Button","ButtonGroup","Calendar","Card","ChartWizard","Charts","CheckBox","Chip","ChipList","ChunkProgressBar","CircularGauge","CircularProgressBar","ColorGradient","ColorPalette","ColorPicker","ComboBox","ContextMenu","ConversationalUI","DataQuery","DateInput","DateMath","DatePicker","DateRange","DateTimePicker","Diagram","Dialog","DragandDrop","Drawer","Drawing","DropDownButton","DropDownList","DropDownTree","Editor","ExcelExport","ExpansionPanel","FileSaver","FileSelect","Filter","FlatColorPicker","FloatingActionButton","FloatingLabel","Forms","FormField","Gantt","Gauges","General","Grid","GridLayout","Icon","InlineAIPrompt","Label","LinearGauge","ListBox","ListView","Loader","Map","MaskedTextBox","Menu","MultiColumnComboBox","MultiSelect","MultiSelectTree","MultiViewCalendar","Notification","NumericTextBox","OTPInput","Pager","PanelBar","PDFExport","PDFViewer","PivotGrid","Popover","Popup","ProgressBar","PromptBox","QRCode","RadialGauge","RadioButton","RangeSlider","Rating","Ripple","Sankey","SegmentedControl","Scheduler","ScrollView","Signature","Skeleton","Slider","SmartPasteButton","Sortable","StockChart","Sparkline","SpeechToTextButton","SplitButton","Splitter","Spreadsheet","StackLayout","Stepper","SVGIcon","Switch","TabStrip","TextArea","TextBox","TileLayout","Timeline","TimePicker","ToolBar","Tooltip","TreeList","TreeView","Typography","Upload","Window"],Ae=new Map([["actionsheet","@progress/kendo-angular-navigation"],["aiprompt","@progress/kendo-angular-conversational-ui"],["appbar","@progress/kendo-angular-navigation"],["arcgauge","@progress/kendo-angular-gauges"],["autocomplete","@progress/kendo-angular-dropdowns"],["avatar","@progress/kendo-angular-layout"],["badge","@progress/kendo-angular-indicators"],["barcode","@progress/kendo-angular-barcodes"],["bottomnavigation","@progress/kendo-angular-navigation"],["breadcrumb","@progress/kendo-angular-navigation"],["button","@progress/kendo-angular-buttons"],["buttongroup","@progress/kendo-angular-buttons"],["calendar","@progress/kendo-angular-dateinputs"],["card","@progress/kendo-angular-layout"],["chartwizard","@progress/kendo-angular-chart-wizard"],["checkbox","@progress/kendo-angular-inputs"],["chip","@progress/kendo-angular-buttons"],["chiplist","@progress/kendo-angular-buttons"],["chunkprogressbar","@progress/kendo-angular-progressbar"],["circulargauge","@progress/kendo-angular-gauges"],["circularprogressbar","@progress/kendo-angular-progressbar"],["colorgradient","@progress/kendo-angular-inputs"],["colorpalette","@progress/kendo-angular-inputs"],["colorpicker","@progress/kendo-angular-inputs"],["combobox","@progress/kendo-angular-dropdowns"],["contextmenu","@progress/kendo-angular-menu"],["dataquery","@progress/kendo-data-query"],["dateinput","@progress/kendo-angular-dateinputs"],["datemath","@progress/kendo-date-math"],["datepicker","@progress/kendo-angular-dateinputs"],["daterangepicker","@progress/kendo-angular-dateinputs"],["datetimepicker","@progress/kendo-angular-dateinputs"],["diagram","@progress/kendo-angular-diagrams"],["dialog","@progress/kendo-angular-dialog"],["drawer","@progress/kendo-angular-layout"],["drawing","@progress/kendo-drawing"],["dropdownbutton","@progress/kendo-angular-buttons"],["dropdownlist","@progress/kendo-angular-dropdowns"],["dropdowntree","@progress/kendo-angular-dropdowns"],["editor","@progress/kendo-angular-editor"],["excelexport","@progress/kendo-angular-excel-export"],["expansionpanel","@progress/kendo-angular-layout"],["filesaver","@progress/kendo-file-saver"],["fileselect","@progress/kendo-angular-upload"],["filter","@progress/kendo-angular-filter"],["flatcolorpicker","@progress/kendo-angular-inputs"],["floatingactionbutton","@progress/kendo-angular-buttons"],["floatinglabel","@progress/kendo-angular-label"],["formfield","@progress/kendo-angular-inputs"],["forms","@progress/kendo-angular-inputs"],["gantt","@progress/kendo-angular-gantt"],["grid","@progress/kendo-angular-grid"],["gridlayout","@progress/kendo-angular-layout"],["icon","@progress/kendo-angular-icons"],["inlineaiprompt","@progress/kendo-angular-conversational-ui"],["label","@progress/kendo-angular-label"],["lineargauge","@progress/kendo-angular-gauges"],["listbox","@progress/kendo-angular-listbox"],["listview","@progress/kendo-angular-listview"],["loader","@progress/kendo-angular-indicators"],["map","@progress/kendo-angular-map"],["maskedtextbox","@progress/kendo-angular-inputs"],["menu","@progress/kendo-angular-menu"],["multicolumncombobox","@progress/kendo-angular-dropdowns"],["multiselect","@progress/kendo-angular-dropdowns"],["multiselecttree","@progress/kendo-angular-dropdowns"],["multiviewcalendar","@progress/kendo-angular-dateinputs"],["notification","@progress/kendo-angular-notification"],["numerictextbox","@progress/kendo-angular-inputs"],["otpinput","@progress/kendo-angular-inputs"],["pager","@progress/kendo-angular-pager"],["panelbar","@progress/kendo-angular-layout"],["pdfexport","@progress/kendo-angular-pdf-export"],["pdfviewer","@progress/kendo-angular-pdfviewer"],["pivotgrid","@progress/kendo-angular-pivotgrid"],["popover","@progress/kendo-angular-tooltip"],["popup","@progress/kendo-angular-popup"],["progressbar","@progress/kendo-angular-progressbar"],["promptbox","@progress/kendo-angular-conversational-ui"],["qrcode","@progress/kendo-angular-barcodes"],["radialgauge","@progress/kendo-angular-gauges"],["radiobutton","@progress/kendo-angular-inputs"],["rangeslider","@progress/kendo-angular-inputs"],["rating","@progress/kendo-angular-inputs"],["ripple","@progress/kendo-angular-ripple"],["sankey","@progress/kendo-angular-charts"],["segmentedcontrol","@progress/kendo-angular-buttons"],["scheduler","@progress/kendo-angular-scheduler"],["scrollview","@progress/kendo-angular-scrollview"],["signature","@progress/kendo-angular-inputs"],["skeleton","@progress/kendo-angular-indicators"],["slider","@progress/kendo-angular-inputs"],["smartpastebutton","@progress/kendo-angular-buttons"],["sortable","@progress/kendo-angular-sortable"],["sparkline","@progress/kendo-angular-charts"],["speechtotextbutton","@progress/kendo-angular-buttons"],["splitbutton","@progress/kendo-angular-buttons"],["splitter","@progress/kendo-angular-layout"],["spreadsheet","@progress/kendo-angular-spreadsheet"],["stacklayout","@progress/kendo-angular-layout"],["stepper","@progress/kendo-angular-layout"],["stockchart","@progress/kendo-angular-charts"],["svgicon","@progress/kendo-angular-icons"],["switch","@progress/kendo-angular-inputs"],["tabstrip","@progress/kendo-angular-layout"],["textarea","@progress/kendo-angular-inputs"],["textbox","@progress/kendo-angular-inputs"],["tilelayout","@progress/kendo-angular-layout"],["timeline","@progress/kendo-angular-layout"],["timepicker","@progress/kendo-angular-dateinputs"],["toolbar","@progress/kendo-angular-toolbar"],["treelist","@progress/kendo-angular-treelist"],["treeview","@progress/kendo-angular-treeview"],["typography","@progress/kendo-angular-typography"],["upload","@progress/kendo-angular-upload"],["window","@progress/kendo-angular-dialog"],["charts","@progress/kendo-angular-charts"],["conversationalui","@progress/kendo-angular-conversational-ui"],["tooltip","@progress/kendo-angular-tooltip"]]);var Lt=Ut(Ot(Gt(import.meta.url)),"../proto/service.proto"),B=new V("contextapi.telerik.com:443",Lt,{libName:N});var we=async()=>B.validateUserLicense();import so from"fs";import kt from"path";import{fileURLToPath as ao}from"url";import{z as A}from"zod";var S=class{constructor(t,n,o){this.name=t;this.config=n;this.cb=o}register(t){this.server=t,this.server.registerTool(this.name,this.config,this.cb)}hasAccess(t){return!this.config.requiredAccess||this.config.requiredAccess.length===0?!0:t==="full"||this.config.requiredAccess.includes(t)}};var F=(e,t)=>`# ${e.suiteName} - Code Validation & Quality Assurance
|
|
6
6
|
|
|
7
7
|
## Comprehensive Code Validation Checklist
|
|
8
8
|
Execute these validation steps systematically to ensure high-quality, maintainable code:
|
|
@@ -46,7 +46,7 @@ Responsive Design:
|
|
|
46
46
|
- Graceful error handling for all user interactions
|
|
47
47
|
- Meaningful error messages for users
|
|
48
48
|
- Network error handling for API calls
|
|
49
|
-
`;var
|
|
49
|
+
`;var X=()=>`## UX/UI Design Best Practices
|
|
50
50
|
|
|
51
51
|
> **These are default guidelines \u2014 follow them when the user has not stated otherwise.** If the user explicitly requests different behavior (e.g., a specific component size, a custom row limit, alternate breakpoints, a different layout pattern), defer to the user's stated preference and disregard the conflicting default below. Only accessibility and WCAG requirements (contrast ratios, focus indicators, semantic HTML, ARIA) apply regardless of user preference.
|
|
52
52
|
|
|
@@ -147,7 +147,7 @@ When no design token system is defined by the project, apply these minimum spaci
|
|
|
147
147
|
- Section separators: \u2265 24px vertical gap between distinct content areas.
|
|
148
148
|
- Card internal padding: 16\u201324px.
|
|
149
149
|
- Form field vertical gap: \u2265 16px between fields (24px for multi-column groups).
|
|
150
|
-
- Page left/right margin: 24\u201332px minimum, even at desktop widths.`;var
|
|
150
|
+
- Page left/right margin: 24\u201332px minimum, even at desktop widths.`;var q=(e,t)=>{let n=F({suiteName:e.suiteName,libKey:e.libKey},t.validationSteps),o=e.libKey==="angular"?"- **Drag and Drop**: Consider using the DragandDrop and Sortable components when drag-and-drop functionality is needed.":"",s=e.components?e.components.join(", "):"components";return`# \u{1F3AF} ${e.suiteName} - Execution Plan
|
|
151
151
|
|
|
152
152
|
**Current Goal:**
|
|
153
153
|
|
|
@@ -187,7 +187,7 @@ ${e.includeLayout?`**STYLING AND LAYOUT REQUIREMENTS:**
|
|
|
187
187
|
|
|
188
188
|
`:""}---
|
|
189
189
|
|
|
190
|
-
${
|
|
190
|
+
${X()}
|
|
191
191
|
|
|
192
192
|
---
|
|
193
193
|
|
|
@@ -266,7 +266,7 @@ Based on your current goal, analyze what other ${e.suiteName} components are nee
|
|
|
266
266
|
${o}
|
|
267
267
|
|
|
268
268
|
**IMPORTANT COMPONENT USAGE REQUIREMENTS:**
|
|
269
|
-
- Make sure to identify all necessary features related to the ${
|
|
269
|
+
- Make sure to identify all necessary features related to the ${s} based on the current goal.
|
|
270
270
|
- Make sure to identify specific features needed for other ${e.suiteName} components based on the current goal.
|
|
271
271
|
- Make sure to generate a query for ${e.codeAssistantName} tool for each component and call the tool for each specific feature or functionality.
|
|
272
272
|
- Always specify the exact features you want for each component. Describe only the needed functionality, and behavior you need. Be concise and don't include any information about the use case.
|
|
@@ -364,7 +364,7 @@ ${t.injectedPlan??""}
|
|
|
364
364
|
**Step 1: Code Validation**
|
|
365
365
|
** CRITICAL REQUIREMENT: You MUST validate the generated UI code using this comprehensive checklist to ensure code quality and compliance:**
|
|
366
366
|
|
|
367
|
-
${
|
|
367
|
+
${n}
|
|
368
368
|
|
|
369
369
|
**Step 2: Final Review and Testing**
|
|
370
370
|
** Implementation Validation:**
|
|
@@ -386,7 +386,7 @@ After code implementation and validation you can make quick fixes as needed:
|
|
|
386
386
|
- Do NOT generate or suggest any code until all tools have been used and validated responses are incorporated.
|
|
387
387
|
- Focus on planning and sequencing.
|
|
388
388
|
- Summarize the components, layouts, and utilities gathered.
|
|
389
|
-
- Confirm all required inputs from tools have been provided.`};var
|
|
389
|
+
- Confirm all required inputs from tools have been provided.`};var Z=e=>`# ${e.suiteName} Assistant
|
|
390
390
|
|
|
391
391
|
**What you're looking for:**
|
|
392
392
|
|
|
@@ -500,7 +500,7 @@ After implementing the code:
|
|
|
500
500
|
**Important Notes:**
|
|
501
501
|
- These tools provide documentation and guidance, not code generation
|
|
502
502
|
- Always refer to official ${e.suiteName} documentation for the most up-to-date information
|
|
503
|
-
- Tool responses include usage examples and best practices`;var
|
|
503
|
+
- Tool responses include usage examples and best practices`;var U=(e,t)=>({SETUP_VALIDATION:`
|
|
504
504
|
UI Library Setup:
|
|
505
505
|
- ${e} modules properly imported and configured
|
|
506
506
|
- ${e} theme properly loaded and applied
|
|
@@ -519,77 +519,104 @@ After implementing the code:
|
|
|
519
519
|
- Consistent ${e} theme application across all components
|
|
520
520
|
- Custom theme variables properly defined and scoped
|
|
521
521
|
- ${e} icons properly loaded and optimized
|
|
522
|
-
- Brand colors integrated with ${e} component themes`});
|
|
523
|
-
|
|
522
|
+
- Brand colors integrated with ${e} component themes`});var ee=()=>`
|
|
523
|
+
**REQUIRED ACTIONS \u2014 apply all fixes directly to the source files:**
|
|
524
|
+
- 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.
|
|
525
|
+
- Search all .ts, .css, and .scss files for every outdated CSS class mentioned in the codemod output and update it with an appropriate replacement.
|
|
526
|
+
- Fix any logic errors or unintended side effects introduced by the codemods
|
|
527
|
+
- Update any edge cases, custom implementations, or complex code patterns that were broken or left incomplete by the automated migration
|
|
528
|
+
- Replace hardcoded values, dynamic expressions, or conditional logic that the codemod could not handle automatically
|
|
529
|
+
- Correct any TypeScript type errors or mismatches introduced by the upgrade
|
|
530
|
+
- Adjust any patterns that do not align with the project's existing coding standards
|
|
531
|
+
|
|
532
|
+
**OUTPUT REQUIREMENTS:**
|
|
533
|
+
- For each file you change, briefly describe what was wrong and what fix you applied
|
|
534
|
+
- If a problem requires a decision from the developer that you cannot make automatically, call it out explicitly with the file path
|
|
535
|
+
- If all automated changes look correct and no further fixes are needed, explicitly confirm this`;import{execFile as Mt}from"child_process";import{access as $t}from"fs/promises";import{promisify as _t}from"util";var Ce=_t(Mt);function Bt(e,t){let n;try{n=JSON.parse(e)}catch{return e}let o=n?.Item;if(!o)return e;let s=[],i=o.FullName??o.Name??"",a=o.Type??"",r=o.Summary??"",p=o.SyntaxContent??"";s.push(`## API Reference Item
|
|
536
|
+
- Name: ${i}
|
|
524
537
|
- Type: ${a}
|
|
525
|
-
- Summary: ${
|
|
526
|
-
- Syntax: ${
|
|
527
|
-
`,g=0;for(let
|
|
538
|
+
- Summary: ${r}
|
|
539
|
+
- Syntax: ${p}`);let u=n.RelatedItemsByType?.return_type;if(u?.length){let m=u[0].Text;m&&s.push(`- Return Type: ${m}`)}let f=o.Examples??[];if(f.length>0){let m=`## Examples
|
|
540
|
+
`,g=0;for(let b of f){let d=(b.Component??"").toLowerCase(),y=t.toLowerCase();if(d&&d!==y&&d!=="general")continue;g+=1;let C=b.Code??"";m+=`### Example ${g}
|
|
528
541
|
\`\`\`
|
|
529
|
-
${
|
|
542
|
+
${C}
|
|
530
543
|
\`\`\`
|
|
531
|
-
`}g>0&&
|
|
532
|
-
${
|
|
533
|
-
`+
|
|
544
|
+
`}g>0&&s.push(m)}let v=n.RelatedItemsByType??{},c=[];for(let[m,g]of Object.entries(v))if(!(m==="return_type"||m==="render_fragment"))for(let b of g??[]){let d=b.FullName??"",y=b.ShortText??"";c.push(`### ${d} (${m})
|
|
545
|
+
${y}`)}return c.length>0&&s.push(`## Additional Context
|
|
546
|
+
`+c.join(`
|
|
534
547
|
---
|
|
535
|
-
`)),
|
|
548
|
+
`)),s.join(`
|
|
536
549
|
|
|
537
|
-
`)}function
|
|
538
|
-
`)||"No CSS utilities found for the given prompt.",
|
|
550
|
+
`)}function xe(e,t,n){let{name:o,title:s,description:i,layoutAssistantName:a,codeAssistantName:r,styleAssistantName:p,iconAssistantName:u,accessibilityAssistantName:f,suiteName:v,libKey:c,components:m}=e,g=new S(o,{title:s,description:i,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 ${v} 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(m)).optional().describe(`Optional list of specific ${v} components needed for the project.`)}},async({userIntent:b,needsComponentsDocsConfidence:d,needsLayoutConfidence:y,needsStylingConfidence:C,needsResponsiveBehaviorConfidence:T,needsIconsConfidence:E,componentsNeeded:I},{_meta:le})=>{let R=x(g,le);k("UI Orchestrator called with:",{userIntent:b,needsComponentsDocsConfidence:d,needsLayoutConfidence:y,needsStylingConfidence:C,needsResponsiveBehaviorConfidence:T,needsIconsConfidence:E});try{await n.recordOrchestratorUserRequest({meta:{userIntent:b,componentsNeeded:I,...R}})}catch(W){throw G(W)}let P=g.server?.server.getClientCapabilities?.()?.elicitation,K;if(P&&C>.3&&C<=.6){let W=await g.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"]}});W?.action==="accept"&&W.content?.includeCustomTheming&&(K=!0)}return{content:[{type:"text",text:q({name:o,userIntent:b,includeComponentsDocs:d>.3,includeTheming:C>.6||!!K,includeLayout:y>.5,includeIcons:E>.6,includeResponsive:y>.5&&T>.4,layoutAssistantName:a,codeAssistantName:r,styleAssistantName:p,iconAssistantName:u,accessibilityAssistantName:f,suiteName:v,libKey:c,components:I},t)}]}});return g}function Te(e,t){let{name:n,title:o,description:s,iconAssistantName:i,codeAssistantName:a,suiteName:r,libKey:p,components:u}=e,f=new S(n,{title:o,description:s,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 ${r}.`),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(u)).optional().describe(`Optional list of specific ${r} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:v,needsIconsConfidence:c,componentsNeeded:m},{_meta:g})=>{let b=x(f,g);k("Assistant Orchestrator called with:",{userIntent:v,needsIconsConfidence:c,componentsNeeded:m});try{await t.recordOrchestratorUserRequest({meta:{userIntent:v,componentsNeeded:m,...b}})}catch(y){throw G(y)}return{content:[{type:"text",text:Z({name:n,userIntent:v,includeComponentsDocs:!0,includeIcons:c>.5,codeAssistantName:a,iconAssistantName:i,suiteName:r,libKey:p,components:m})}]}});return f}function Ie(e,t){let{name:n,title:o,description:s,suiteName:i,libKey:a,getPreContent:r}=e,p=new S(n,{title:o,description:s,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:u,includeBuildingBlockExamples:f},{_meta:v})=>{let c=x(p,v);k("Layout Assistant called with:",{prompt:u,includeBuildingBlockExamples:f});try{let g=(await t.queryCssUtils({query:u},{...c})).values.join(`
|
|
551
|
+
`)||"No CSS utilities found for the given prompt.",b=r?.()??"",d=y=>`${b}
|
|
539
552
|
|
|
540
553
|
# Kendo Design System CSS Utilities
|
|
541
554
|
|
|
542
555
|
${g}
|
|
543
|
-
${
|
|
544
|
-
`;if(
|
|
556
|
+
${y??""}
|
|
557
|
+
`;if(f)try{let y=await t.queryBuildingBlocks({query:u,lib_name:a},{...c}),C="";y.items?.length>0&&(C=`
|
|
545
558
|
## Building Blocks Examples
|
|
546
559
|
|
|
547
560
|
The examples here are for demonstration purpose how CSS utils can be implemented in various building blocks.
|
|
548
561
|
However, consider your own design requirements and specifics in order to implement your templates/building blocks correctly.
|
|
549
562
|
|
|
550
|
-
${
|
|
551
|
-
### ${
|
|
563
|
+
${y.items.map(T=>`
|
|
564
|
+
### ${T.name}
|
|
552
565
|
|
|
553
|
-
${
|
|
566
|
+
${T.description}
|
|
554
567
|
|
|
555
568
|
\`\`\`code
|
|
556
|
-
${
|
|
569
|
+
${T.code}
|
|
557
570
|
\`\`\`
|
|
558
571
|
`).join(`
|
|
559
|
-
`)}`),g=
|
|
572
|
+
`)}`),g=d(C)}catch(y){k("Error calling building-blocks service:",y),g=d()}else g=d();return{content:[{type:"text",text:g}]}}catch(m){throw G(m)}});return p}function Ne(e,t){let{name:n,title:o,description:s,libKey:i,getPreContent:a}=e,r=new S(n,{title:o,description:s,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:p},{_meta:u})=>{let f=x(r,u);k("Style Assistant called with:",{prompt:p});let v="";try{let g=await t.queryThemeGenerate({prompt:p},{...f});if(g.variables_json){let b=JSON.parse(g.variables_json),d=[];if(b)for(let y of Object.keys(b))typeof b[y]=="string"&&d.push(`${y}: ${b[y]}`);v=d.join(`
|
|
560
573
|
|
|
561
|
-
`)}}catch(g){throw
|
|
574
|
+
`)}}catch(g){throw G(g)}let c=a?.()??"";return{content:[{type:"text",text:v?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
|
|
562
575
|
Ensure the variables are applied consistently across all relevant elements.
|
|
563
576
|
Do NOT set any inline styles. CSS variables should be defined in global or component-level CSS files, or via supported theming mechanisms.
|
|
564
577
|
|
|
565
|
-
${
|
|
578
|
+
${c}
|
|
566
579
|
|
|
567
580
|
## Generated CSS Variables
|
|
568
581
|
|
|
569
582
|
\`\`\`css
|
|
570
|
-
${
|
|
583
|
+
${v}
|
|
571
584
|
\`\`\`
|
|
572
|
-
`:"No CSS variables were generated for the given prompt."}]}});return
|
|
585
|
+
`:"No CSS variables were generated for the given prompt."}]}});return r}function Ee(e,t){let{name:n,title:o,description:s,libKey:i,getPostContent:a}=e,r=new S(n,{title:o,description:s,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:p,limit:u},{_meta:f})=>{let v=x(r,f);k("Icon Search called with:",{query:p,limit:u});try{let c=await t.queryIconsSearch({query:p,limit:u*100},{...v}),m=a?.()??"";return{content:[{type:"text",text:`${c.values.join(`
|
|
573
586
|
|
|
574
587
|
`)}
|
|
575
588
|
|
|
576
|
-
${
|
|
589
|
+
${m}`}]}}catch(c){throw G(c)}});return r}function Re(e,t){let{name:n,title:o,description:s,libKey:i,suiteName:a,components:r,componentAliases:p,getPostContent:u}=e,f=new S(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:A.string().describe("The query to search for."),component:A.enum(r).describe("The component to search for. If not specified, use General.")}},async({query:v,component:c},{_meta:m})=>{let g=x(f,m);k("Code Assistant called with:",{query:v,component:c});let b=c;if(p){let d=p[c];d&&(b=d)}try{let y=(await t.query({query:v,component:b?.toLowerCase()??"general",lib_name:i,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]},{...g})).values.map(E=>E.replace(/\0/g,"")),C=u?.({component:c})??"";return{content:[{type:"text",text:`${y.join(`
|
|
577
590
|
|
|
578
591
|
`)}
|
|
579
592
|
|
|
580
|
-
${
|
|
593
|
+
${C}`}]}}catch(d){throw G(d)}});return f}function Pe(e,t){let{name:n,title:o,description:s,libKey:i,suiteName:a,components:r,componentAliases:p}=e,u=new S(n,{title:o,description:s,requiredAccess:e.requiredAccess,inputSchema:{query:A.string().describe("The query to search for."),component:A.enum(r).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:f,component:v,includeGeneralGuidelines:c},{_meta:m})=>{let g=x(u,m);k("Accessibility Assistant called with:",{query:f,component:v,includeGeneralGuidelines:c});let b=v;if(p){let d=p[v];d&&(b=d)}try{let d="";if(c){let I=be();d+=`# WCAG 2.2 Level AA General Accessibility Guidelines
|
|
581
594
|
|
|
582
|
-
`,
|
|
595
|
+
`,d+=I,d+=`
|
|
583
596
|
|
|
584
597
|
---
|
|
585
598
|
|
|
586
|
-
`}let
|
|
599
|
+
`}let E=(await t.getApiRefMatches({query:f,component:b?.toLowerCase()??"general",lib_name:i,filters_json:'{"type":{"$in":["accessibility"]}}'},{...g})).values.map(I=>I.replace(/\0/g,"")).map(I=>Bt(I,b?.toLowerCase()??"general")).join(`
|
|
587
600
|
|
|
588
|
-
`);return
|
|
601
|
+
`);return E?(c&&(d+=`# Component-Specific Accessibility Information
|
|
589
602
|
|
|
590
|
-
`),
|
|
603
|
+
`),d+=E):c||(d="No component-specific accessibility guidelines found."),{content:[{type:"text",text:d}]}}catch(d){throw G(d)}});return u}function G(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.
|
|
591
604
|
|
|
592
|
-
Error Code: ${t.code} Error Message: ${t.message}`)}var
|
|
605
|
+
Error Code: ${t.code} Error Message: ${t.message}`)}var Ft=20*1024*1024,De=1200*1e3;function Se(e){return{content:[{type:"text",text:`Upgrade timed out after ${De/6e4} minutes.
|
|
606
|
+
|
|
607
|
+
**Some codemods may have already been applied to your files.** Review any modified files before proceeding.
|
|
608
|
+
|
|
609
|
+
To complete the upgrade, run this tool again with specific package names via the \`packageNames\` parameter to upgrade one package at a time.${e?`
|
|
610
|
+
|
|
611
|
+
## Partial output before timeout
|
|
612
|
+
`+e:""}`}]}}function Oe(e,t){let{name:n,title:o,description:s,suiteName:i}=e,a=new S(n,{title:o,description:s,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., ["@progress/kendo-angular-grid", "@progress/kendo-angular-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:r,packageNames:p,skipInstall:u},{_meta:f})=>{let v=x(a,f);try{await t.recordToolUserRequest({toolName:n,meta:v})}catch(c){console.error("Error recording tool request:",c)}try{try{await $t(r)}catch{return{content:[{type:"text",text:`The working directory does not exist: "${r}". Please provide a valid absolute path to your project.`}]}}let c=!1;try{await Ce("npx",["--no","--","kendo","--version"],{cwd:r}),c=!0}catch{c=!1}let m=[],g=async(R,ce=!1)=>{try{let P=!ce&&c?["--no","--","kendo",...R]:["-y","@progress/kendo-cli",...R],{stdout:K,stderr:de}=await Ce("npx",P,{cwd:r,maxBuffer:Ft,timeout:De});return{timedOut:!1,stdout:K,stderr:de}}catch(P){return P.killed?{timedOut:!0,partialOutput:P.stdout?.trim()}:{timedOut:!1,stdout:P.stdout||"",stderr:P.stderr||P.message}}},b=["migrate",...p??[],"--codemods","--force","--ai-mode"];(u||p?.length)&&b.push("--no-install");let d=await g(b);if(d.timedOut)return Se(d.partialOutput);let y=d.stdout,C=d.stderr;if(C?.includes("Unknown argument")){let R=await g(b,!0);if(R.timedOut)return Se(R.partialOutput);y=R.stdout,C=R.stderr}C?.trim()&&m.push(`
|
|
613
|
+
Errors:
|
|
614
|
+
${C}`),y?.trim()&&m.push(y.trim());let T=y.includes("Packages installed successfully."),E=y.includes("Package installation failed:"),I=y.includes("Running codemod:");return E?m.push(`
|
|
615
|
+
## Upgrade Status
|
|
616
|
+
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.`):T&&m.push(`
|
|
617
|
+
## Upgrade Status
|
|
618
|
+
Upgrade complete. npm packages have been installed and updated in the project.`),I&&m.push(ee()),{content:[{type:"text",text:m.join(`
|
|
619
|
+
`)}]}}catch(c){return{content:[{type:"text",text:`Error: ${c.message||c.toString()}`}]}}});return a}var Ue=e=>`${e}_ui_generator`,Ge=e=>`${e}_assistant`,Le=e=>`${e}_layout_assistant`,Me=e=>`${e}_component_assistant`,$e=e=>`${e}_style_assistant`,_e=e=>`${e}_icon_assistant`,Be=e=>`${e}_accessibility_assistant`,Fe=e=>`${e}_getting_started_assistant`,qe=e=>`${e}_upgrade_assistant`;var Ke=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.
|
|
593
620
|
|
|
594
621
|
Use the tool when:
|
|
595
622
|
- Want to build or modify a complete page or section layout
|
|
@@ -598,7 +625,7 @@ Error Code: ${t.code} Error Message: ${t.message}`)}var Ce=e=>`${e}_ui_generator
|
|
|
598
625
|
- You want to enforce best practices in styling, performance, and accessibility
|
|
599
626
|
|
|
600
627
|
Returns:
|
|
601
|
-
A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,
|
|
628
|
+
A detailed execution plan with validated tool calls, parameters, and reasoning \u2014 ensuring consistent, high-quality UI generation.`,We=e=>`Provides guidance for discovering and using ${e} components and icons. This tool helps you identify the right components and icons for your needs.
|
|
602
629
|
|
|
603
630
|
Use this tool when:
|
|
604
631
|
- You need to discover which ${e} components are suitable for a specific use case
|
|
@@ -607,20 +634,20 @@ Use this tool when:
|
|
|
607
634
|
- You want to gather component documentation and examples
|
|
608
635
|
|
|
609
636
|
Returns:
|
|
610
|
-
A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,
|
|
637
|
+
A focused plan for gathering component documentation and icon suggestions using the Component Assistant and Icon Assistant tools.`,je=`Retrieves Progress/Kendo Design System CSS utility classes and styling recommendations based on layout and design requirements.
|
|
611
638
|
Use this tool to find the right CSS utilities for styling Kendo UI components or general web elements.
|
|
612
639
|
It analyzes the provided design context and returns relevant utility classes with explanations and examples.
|
|
613
|
-
Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,
|
|
640
|
+
Best suited for styling questions related to typography, spacing, colors, layout, transforms, and other utilities in the Progress/Kendo Design System.`,Ve=`Generates CSS variables using an external style agent based on the user's styling prompt.
|
|
614
641
|
|
|
615
642
|
Use this tool when the user wants to:
|
|
616
643
|
- Update the visual theme of an application
|
|
617
644
|
- Modify color schemes
|
|
618
645
|
- Restyle the UI with CSS variables
|
|
619
646
|
|
|
620
|
-
The tool outputs a set of CSS variable definitions ready to be applied to style files.`,
|
|
647
|
+
The tool outputs a set of CSS variable definitions ready to be applied to style files.`,ze=`Searches for icons in the Telerik Icons library.
|
|
621
648
|
Use this tool when the user needs to find specific icons for UI components or design elements.
|
|
622
649
|
It supports searching by icon name, category, or keyword and returns matching icons from the Telerik Icons library.
|
|
623
|
-
`,
|
|
650
|
+
`,Ye=e=>`Provides answers and retrieves official documentation for ${e}.
|
|
624
651
|
|
|
625
652
|
Use this tool when the user asks about:
|
|
626
653
|
- ${e} features or capabilities
|
|
@@ -630,7 +657,7 @@ Use this tool when the user asks about:
|
|
|
630
657
|
|
|
631
658
|
Set the user's full question as the 'query' parameter.
|
|
632
659
|
If the question refers to a specific ${e} component, include its name in the 'component' parameter.
|
|
633
|
-
`,
|
|
660
|
+
`,He=e=>`Retrieves accessibility guidance for ${e} components with optional general WCAG 2.2 Level AA guidelines.
|
|
634
661
|
|
|
635
662
|
Use this tool when:
|
|
636
663
|
- You need component-specific accessibility information and API references
|
|
@@ -648,7 +675,32 @@ Set 'includeGeneralGuidelines=true' ONLY on the first call to include general WC
|
|
|
648
675
|
Returns:
|
|
649
676
|
- When includeGeneralGuidelines=true: General WCAG 2.2 Level AA guidelines + component-specific recommendations
|
|
650
677
|
- When includeGeneralGuidelines=false: Only component-specific accessibility recommendations
|
|
651
|
-
|
|
678
|
+
`,Qe=e=>`Runs codemods to upgrade ${e} code from one version directly to another using @progress/kendo-cli.
|
|
679
|
+
|
|
680
|
+
To upgrade to the latest version, call this tool directly. It handles installation automatically.
|
|
681
|
+
|
|
682
|
+
To upgrade to a specific version:
|
|
683
|
+
1. Set all @progress/kendo-angular-* package versions to the target version (e.g. "20.0.0")
|
|
684
|
+
2. Run: npm install
|
|
685
|
+
3. Call this tool with skipInstall: true
|
|
686
|
+
|
|
687
|
+
This tool applies automated code transformations to update your codebase when upgrading ${e} packages. The upgrade runs directly from your current version to the target version \u2014 do not upgrade through intermediate versions.
|
|
688
|
+
|
|
689
|
+
Use this tool when:
|
|
690
|
+
- You need to update existing ${e} code to a newer version
|
|
691
|
+
- You want to automatically apply breaking change fixes
|
|
692
|
+
- You need to update deprecated API usage
|
|
693
|
+
|
|
694
|
+
The tool handles:
|
|
695
|
+
- Component property renames and removals
|
|
696
|
+
- Deprecated feature replacements
|
|
697
|
+
- Breaking API changes
|
|
698
|
+
|
|
699
|
+
Workflow:
|
|
700
|
+
1. Run this upgrade tool to apply codemods.
|
|
701
|
+
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.
|
|
702
|
+
3. Follow the additional instructions to complete the upgrade process.
|
|
703
|
+
`;var te=U("Kendo UI","Kendo"),oe=`
|
|
652
704
|
### Angular Component Validation
|
|
653
705
|
Component Structure:
|
|
654
706
|
- Use proper @Component decorator configuration
|
|
@@ -656,22 +708,22 @@ Component Structure:
|
|
|
656
708
|
- Correct selector naming convention (kebab-case)
|
|
657
709
|
- Appropriate template and style file organization
|
|
658
710
|
|
|
659
|
-
${
|
|
711
|
+
${te.SETUP_VALIDATION}
|
|
660
712
|
- Kendo animations module configured (if animations are used)
|
|
661
713
|
- Internationalization properly configured for Kendo components
|
|
662
714
|
|
|
663
|
-
${
|
|
715
|
+
${te.PERFORMANCE_OPTIMIZATION}
|
|
664
716
|
- OnPush change detection strategy where appropriate
|
|
665
|
-
- Efficient
|
|
717
|
+
- Efficient \`track\` expression used in \`@for\` blocks with Kendo components
|
|
666
718
|
- Minimal unnecessary change detection cycles
|
|
667
719
|
|
|
668
|
-
${
|
|
720
|
+
${te.THEME_AND_STYLING}
|
|
669
721
|
- Proper theme switching functionality (if implemented)
|
|
670
722
|
- Only ONE theme reference exists across angular.json and styles files
|
|
671
723
|
- Make sure theme import mechanism is consistent with existing project setup
|
|
672
724
|
|
|
673
725
|
Accessibility
|
|
674
|
-
- Accessibility guidelines retrieved and applied to all components`;var
|
|
726
|
+
- Accessibility guidelines retrieved and applied to all components`;var ne=`**Angular Specific Requirements:**
|
|
675
727
|
|
|
676
728
|
**NgModule vs Standalone setup**: Search and detect the current project setup to determine whether to use NgModule or Standalone components based on the following rules:
|
|
677
729
|
1. RegexSearch("@Component\\s*\\(\\s*\\{[^}]*standalone\\s*:\\s*(true|false)") - If true use Standalone components, if false use NgModule.
|
|
@@ -695,7 +747,7 @@ Accessibility
|
|
|
695
747
|
- Look for @import statements containing "@progress/kendo-theme-" to determine existing theme/utils usage
|
|
696
748
|
- Read the application's main html file (e.g., index.html)
|
|
697
749
|
- Look for link tags containing "@progress/kendo-theme-" referencing Kendo theme/util CSS files
|
|
698
|
-
- Note which theme is found (default, material, bootstrap, or fluent)
|
|
750
|
+
- Note which theme is found (meridian, default, material, bootstrap, or fluent)
|
|
699
751
|
- Note whether the kendo-theme-utils package is already used
|
|
700
752
|
- Note the mechanism used to include the theme (angular.json or styles file)
|
|
701
753
|
|
|
@@ -708,7 +760,7 @@ Accessibility
|
|
|
708
760
|
2. Match the discovered patterns in all generated code
|
|
709
761
|
3. Maintain consistent formatting, indentation, and code organization with existing files
|
|
710
762
|
4. Always use the same theme import mechanism (unless user specifies otherwise)
|
|
711
|
-
`;var
|
|
763
|
+
`;var se=U("Kendo UI","KendoReact"),ae=`
|
|
712
764
|
### React Component Validation
|
|
713
765
|
Component Structure:
|
|
714
766
|
- Use proper function component patterns with Hooks
|
|
@@ -716,22 +768,22 @@ Component Structure:
|
|
|
716
768
|
- Appropriate file organization (components, hooks, utils)
|
|
717
769
|
- Props interface/type definitions where needed
|
|
718
770
|
|
|
719
|
-
${
|
|
771
|
+
${se.SETUP_VALIDATION}
|
|
720
772
|
- KendoReact license validation (if required)
|
|
721
773
|
- Appropriate bundler configuration for KendoReact packages
|
|
722
774
|
|
|
723
|
-
${
|
|
775
|
+
${se.PERFORMANCE_OPTIMIZATION}
|
|
724
776
|
- React.memo for components that receive stable props
|
|
725
777
|
- useMemo/useCallback for expensive computations and callbacks
|
|
726
778
|
- Proper key props for list rendering with KendoReact components
|
|
727
779
|
|
|
728
|
-
${
|
|
780
|
+
${se.THEME_AND_STYLING}
|
|
729
781
|
- Proper theme switching functionality (if implemented)
|
|
730
782
|
- Only ONE theme import exists across the application
|
|
731
783
|
- Make sure theme import mechanism is consistent with existing project setup
|
|
732
784
|
|
|
733
785
|
Accessibility
|
|
734
|
-
- Accessibility guidelines retrieved and applied to all components`;var
|
|
786
|
+
- Accessibility guidelines retrieved and applied to all components`;var qt={createOrchestrator:xe,createAssistantOrchestrator:Te,createLayoutAssistant:Ie,createStyleAssistant:Ne,createIconSearch:Ee,createCodeAssistant:Re,createAccessibilityAssistant:Pe,createUpgrade:Oe},Kt={orchestrator:Ue,assistantOrchestrator:Ge,layoutAssistant:Le,codeAssistant:Me,styleAssistant:$e,iconAssistant:_e,accessibilityAssistant:Be,gettingStartedAssistant:Fe,upgradeAssistant:qe},Wt={orchestrator:Ke,assistantOrchestrator:We,layoutAssistant:je,styleAssistant:Ve,iconAssistant:ze,codeAssistant:Ye,accessibilityAssistant:He,upgradeAssistant:Qe},jt={Orchestrator:{render:q},Validator:{render:F},SharedValidation:{getSteps:U}},Vt={Angular:{steps:oe,additionalPlan:ne},React:{steps:ae}},h={Tools:qt,ToolNames:Kt,ToolDescriptions:Wt,Templates:jt,Validation:Vt};var zt=h.ToolNames.codeAssistant("kendo"),Je=()=>`# Kendo Design System Guidelines for ${l}
|
|
735
787
|
|
|
736
788
|
## Setting up Styles/CSS
|
|
737
789
|
|
|
@@ -760,7 +812,7 @@ Alternatively, you can also consume them directly from the Unpkg CDN.
|
|
|
760
812
|
|
|
761
813
|
In the ${l} there are available components to create layout. Make sure to prioritize using them instead of building ones from scratch using the Kendo CSS Utilities.
|
|
762
814
|
|
|
763
|
-
For any Layout component you can also call the ${
|
|
815
|
+
For any Layout component you can also call the ${zt} tool in order to get specific API reference and docs.
|
|
764
816
|
|
|
765
817
|
- ${l} Card component.
|
|
766
818
|
- Generally, it is recommended to use 100% width (e.g., \`<kendo-card width="100%">\`)
|
|
@@ -868,7 +920,7 @@ Use the \`kendo-splitter\` component only for **user-resizable** content areas (
|
|
|
868
920
|
## Popup Z-Index Trap
|
|
869
921
|
|
|
870
922
|
CSS \`transform\` (including \`translate3d(0,0,0)\` GPU-compositing tricks) on any ancestor element creates a new stacking context. This clips Kendo popups (which use \`z-index ~10000\`), causing DropDownList, DatePicker, and ComboBox popups to appear behind other elements. Avoid \`transform\` on layout ancestors that contain Kendo overlay components.
|
|
871
|
-
`;var
|
|
923
|
+
`;var Xe=()=>`## Design Standards for ${l} Theming
|
|
872
924
|
|
|
873
925
|
### Color & Contrast Requirements
|
|
874
926
|
- Body text contrast: \u2265 4.5:1. Large text / UI component borders: \u2265 3:1.
|
|
@@ -968,7 +1020,7 @@ export class ThemeService {
|
|
|
968
1020
|
}
|
|
969
1021
|
}
|
|
970
1022
|
\`\`\`
|
|
971
|
-
`;var
|
|
1023
|
+
`;var Ze=h.ToolNames.codeAssistant("kendo"),et=()=>`## Using ${l} Icons
|
|
972
1024
|
|
|
973
1025
|
Important: Always prefer SVG icons over font icons. Only fall back to font icons if SVG is explicitly not an option.
|
|
974
1026
|
|
|
@@ -976,9 +1028,9 @@ Important: Always prefer SVG icons over font icons. Only fall back to font icons
|
|
|
976
1028
|
|
|
977
1029
|
- Make sure @progress/kendo-svg-icons is installed.
|
|
978
1030
|
- Make sure @progress/kendo-angular-icons is installed.
|
|
979
|
-
- You can call ${
|
|
1031
|
+
- You can call ${Ze} tool for ${l} SVGIcon component for docs and API reference.
|
|
980
1032
|
- [optional] If SVG is not an option fallback to font icon - make sure \`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-font-icons/dist/index.css" />\` is added as a reference.
|
|
981
|
-
- [optional] If using font icons you can call ${
|
|
1033
|
+
- [optional] If using font icons you can call ${Ze} tool for ${l} Icon component for docs and API reference.
|
|
982
1034
|
|
|
983
1035
|
### Examples
|
|
984
1036
|
|
|
@@ -1019,18 +1071,18 @@ import { KENDO_ICONS } from "@progress/kendo-angular-icons";
|
|
|
1019
1071
|
})
|
|
1020
1072
|
export class AppComponent {}
|
|
1021
1073
|
\`\`\`
|
|
1022
|
-
`;var
|
|
1074
|
+
`;var tt=e=>{let t=e.component?.trim().toLowerCase(),n=Ae.get(t),o=`## ${l} Common Guidelines
|
|
1023
1075
|
|
|
1024
|
-
`;return
|
|
1076
|
+
`;return n&&(o+=`### Package Installation
|
|
1025
1077
|
Always use minimal, targeted package installation.
|
|
1026
1078
|
Ensure all necessary Angular packages are installed, including @angular/localize.
|
|
1027
1079
|
|
|
1028
1080
|
Process:
|
|
1029
1081
|
1. Identify the required components
|
|
1030
1082
|
2. Determine the specific Kendo Angular packages needed
|
|
1031
|
-
3. Use the "ng add ${
|
|
1083
|
+
3. Use the "ng add ${n}" command
|
|
1032
1084
|
|
|
1033
|
-
For ${e.component} component: \`ng add ${
|
|
1085
|
+
For ${e.component} component: \`ng add ${n}\`
|
|
1034
1086
|
`),e.componentInstructions&&(o+=`
|
|
1035
1087
|
## Component-Specific Guidelines
|
|
1036
1088
|
|
|
@@ -1046,7 +1098,7 @@ Only fall back to font icons if SVG icons are explicitly not an option.
|
|
|
1046
1098
|
Always use the correct ${l} types for component inputs, outputs, and event handler parameters.
|
|
1047
1099
|
Do not substitute plain strings, plain objects, or \`any\` for a typed union, enum, or interface provided by the library.
|
|
1048
1100
|
Import all required types from the appropriate ${l} package.
|
|
1049
|
-
`,o};function
|
|
1101
|
+
`,o};function ot(e="kendo-angular-app",t=!0,n="meridian"){let o=t?`These instructions will walk you through creating a new Angular project and setting up ${l}.`:`These instructions will walk you through adding ${l} to your existing Angular project.`,s=1,i=t?`## Step ${s++}: Install Angular CLI
|
|
1050
1102
|
|
|
1051
1103
|
First, ensure the Angular CLI is installed globally:
|
|
1052
1104
|
|
|
@@ -1054,7 +1106,7 @@ First, ensure the Angular CLI is installed globally:
|
|
|
1054
1106
|
npm install -g @angular/cli@latest
|
|
1055
1107
|
\`\`\`
|
|
1056
1108
|
|
|
1057
|
-
## Step ${
|
|
1109
|
+
## Step ${s++}: Create the Project
|
|
1058
1110
|
|
|
1059
1111
|
Create a new Angular project using the Angular CLI:
|
|
1060
1112
|
|
|
@@ -1083,7 +1135,7 @@ Before you begin, ensure you have:
|
|
|
1083
1135
|
- **Node.js 18 or later** installed on your machine
|
|
1084
1136
|
- If Node.js is not available, you need to install the latest Node.js automatically as a preliminary step before installing the Angular CLI tool.
|
|
1085
1137
|
|
|
1086
|
-
${
|
|
1138
|
+
${i}## Step ${s++}: Configure animations
|
|
1087
1139
|
|
|
1088
1140
|
This ensures animations that ${l} components rely on are configurated correctly.
|
|
1089
1141
|
|
|
@@ -1101,12 +1153,12 @@ export const appConfig: ApplicationConfig = {
|
|
|
1101
1153
|
};
|
|
1102
1154
|
\`\`\`
|
|
1103
1155
|
|
|
1104
|
-
## Step ${
|
|
1156
|
+
## Step ${s++}: Install ${l} Packages
|
|
1105
1157
|
|
|
1106
1158
|
Use angular CLI to install grid package. While installing, confirm that you also want to install the underlying npm package with the suggested version from the ng tool.
|
|
1107
1159
|
|
|
1108
1160
|
\`\`\`bash
|
|
1109
|
-
ng add @progress/kendo-angular-grid@latest --skip-confirmation --theme=${
|
|
1161
|
+
ng add @progress/kendo-angular-grid@latest --skip-confirmation --theme=${n}
|
|
1110
1162
|
\`\`\`
|
|
1111
1163
|
|
|
1112
1164
|
Use npm to install additional required ${l} packages:
|
|
@@ -1115,7 +1167,7 @@ Use npm to install additional required ${l} packages:
|
|
|
1115
1167
|
npm install @progress/kendo-angular-barcodes @progress/kendo-angular-chart-wizard @progress/kendo-angular-charts @progress/kendo-angular-dateinputs @progress/kendo-angular-diagrams @progress/kendo-angular-editor @progress/kendo-angular-filter @progress/kendo-angular-gantt @progress/kendo-angular-gauges @progress/kendo-angular-icons @progress/kendo-angular-listbox @progress/kendo-angular-listview @progress/kendo-angular-map @progress/kendo-angular-pdfviewer @progress/kendo-angular-pivotgrid @progress/kendo-angular-ripple @progress/kendo-angular-scheduler @progress/kendo-angular-scrollview @progress/kendo-angular-sortable @progress/kendo-angular-spreadsheet @progress/kendo-angular-tooltip @progress/kendo-angular-treelist @progress/kendo-angular-typography @progress/kendo-file-saver
|
|
1116
1168
|
\`\`\`
|
|
1117
1169
|
|
|
1118
|
-
## Step ${
|
|
1170
|
+
## Step ${s++}: Activate Kendo license
|
|
1119
1171
|
|
|
1120
1172
|
This step is required to use Kendo UI for Angular components without watermarks and with access to all features. At this point, the customer have the correct license file, and the command should be run to activate the component in this specific project. Run the following command to activate your license:
|
|
1121
1173
|
|
|
@@ -1130,7 +1182,7 @@ ng cache clean
|
|
|
1130
1182
|
\`\`\`
|
|
1131
1183
|
|
|
1132
1184
|
|
|
1133
|
-
## Step ${
|
|
1185
|
+
## Step ${s++}: Install the Kendo utils package
|
|
1134
1186
|
|
|
1135
1187
|
Add the following script to index.html to include the Kendo theme utils, which are required for the themes to work correctly:
|
|
1136
1188
|
|
|
@@ -1140,7 +1192,7 @@ Add the following script to index.html to include the Kendo theme utils, which a
|
|
|
1140
1192
|
|
|
1141
1193
|
${t?`The application should start and open your browser to see your ${l} application.`:`The application should start and open in your browser. Verify that the ${l} components are rendering correctly with the theme applied.`}
|
|
1142
1194
|
|
|
1143
|
-
## Step ${
|
|
1195
|
+
## Step ${s++}: Create Sample Page
|
|
1144
1196
|
|
|
1145
1197
|
Add the sample page below to your application to verify that everything is working correctly.
|
|
1146
1198
|
|
|
@@ -1274,7 +1326,7 @@ export class App {}
|
|
|
1274
1326
|
}
|
|
1275
1327
|
\`\`\`
|
|
1276
1328
|
|
|
1277
|
-
## Step ${
|
|
1329
|
+
## Step ${s++}: Run Your Application
|
|
1278
1330
|
|
|
1279
1331
|
**Verification:** Automatically run the application. Do not just inform the user\u2014execute the following command and keep the application running:
|
|
1280
1332
|
|
|
@@ -1282,7 +1334,7 @@ export class App {}
|
|
|
1282
1334
|
cd ${e} && ng serve
|
|
1283
1335
|
\`\`\`
|
|
1284
1336
|
|
|
1285
|
-
`}var
|
|
1337
|
+
`}var nt=`
|
|
1286
1338
|
## Grid Data Binding
|
|
1287
1339
|
|
|
1288
1340
|
MUST use kendoGridBinding directive for basic Grid operations
|
|
@@ -1341,7 +1393,7 @@ CORRECT: <button kendoGridExcelCommand>Export to Excel</button>
|
|
|
1341
1393
|
Column width Property: The width property for columns should be set as a number for pixel values, not a string.
|
|
1342
1394
|
CORRECT: <kendo-grid-column [width]="120">
|
|
1343
1395
|
WRONG: <kendo-grid-column width="120px">
|
|
1344
|
-
`;var
|
|
1396
|
+
`;var st=`
|
|
1345
1397
|
## kendoButton Must Not Be Combined with Command Directives
|
|
1346
1398
|
|
|
1347
1399
|
Never apply kendoButton to the same element as any of these TreeList command directives - they render their own button internally.
|
|
@@ -1355,7 +1407,7 @@ Affected directives:
|
|
|
1355
1407
|
|
|
1356
1408
|
WRONG: <button kendoTreeListExcelCommand kendoButton>Export to Excel</button>
|
|
1357
1409
|
CORRECT: <button kendoTreeListExcelCommand>Export to Excel</button>
|
|
1358
|
-
`;var
|
|
1410
|
+
`;var at=`
|
|
1359
1411
|
## kendoButton Must Not Be Combined with Command Directives
|
|
1360
1412
|
|
|
1361
1413
|
Never apply kendoButton to the same element as any of these ListView command directives - they render their own button internally.
|
|
@@ -1372,7 +1424,7 @@ Affected directives:
|
|
|
1372
1424
|
|
|
1373
1425
|
WRONG: <button kendoListViewAddCommand kendoButton>Add</button>
|
|
1374
1426
|
CORRECT: <button kendoListViewAddCommand>Add</button>
|
|
1375
|
-
`;var
|
|
1427
|
+
`;var rt=`
|
|
1376
1428
|
## kendoButton Must Not Be Combined with Command Directives
|
|
1377
1429
|
|
|
1378
1430
|
Never apply kendoButton to the same element as the Scheduler PDF command directive - it renders its own button internally.
|
|
@@ -1385,7 +1437,7 @@ Affected directives:
|
|
|
1385
1437
|
|
|
1386
1438
|
WRONG: <button kendoSchedulerPDFCommand kendoButton>Export to PDF</button>
|
|
1387
1439
|
CORRECT: <button kendoSchedulerPDFCommand>Export to PDF</button>
|
|
1388
|
-
`;var
|
|
1440
|
+
`;var it=`
|
|
1389
1441
|
## kendoButton Must Not Be Combined with Action Directives
|
|
1390
1442
|
|
|
1391
1443
|
Never apply kendoButton to the same element as any of these Window action directives - they render their own button internally.
|
|
@@ -1401,7 +1453,7 @@ Affected directives:
|
|
|
1401
1453
|
|
|
1402
1454
|
WRONG: <button kendoWindowCloseAction kendoButton></button>
|
|
1403
1455
|
CORRECT: <button kendoWindowCloseAction></button>
|
|
1404
|
-
`;var
|
|
1456
|
+
`;var lt=`
|
|
1405
1457
|
## Charts Data Binding
|
|
1406
1458
|
|
|
1407
1459
|
Never bind the Chart's data to a getter property. Using a getter causes the chart to rerender on every Angular change detection cycle.
|
|
@@ -1409,7 +1461,7 @@ Never bind the Chart's data to a getter property. Using a getter causes the char
|
|
|
1409
1461
|
BAD: get chartData() { return [ /* data items */ ] }
|
|
1410
1462
|
GOOD: public chartData = [ /* data items */ ];
|
|
1411
1463
|
GOOD: public chartData = this.data.map(...)
|
|
1412
|
-
`;var
|
|
1464
|
+
`;var ct=["combobox","dropdownlist","dropdowntree","multicolumncombobox","multiselect","multiselecttree","autocomplete"],dt=e=>e==="autocomplete"?Ht:e==="dropdowntree"?Qt:e==="multiselecttree"?Jt:e==="multicolumncombobox"?Xt:Yt(e),Yt=e=>`
|
|
1413
1465
|
## ${e}
|
|
1414
1466
|
When implementing or updating the ${e} component, always follow these rules for \`textField\` and \`valueField\`:
|
|
1415
1467
|
|
|
@@ -1459,7 +1511,7 @@ If \`valuePrimitive\` is false, which is the default, the value must be an objec
|
|
|
1459
1511
|
\`\`\`typescript
|
|
1460
1512
|
public selectedValue = { id: 2, name: 'B' };
|
|
1461
1513
|
\`\`\`
|
|
1462
|
-
`,
|
|
1514
|
+
`,Ht=`
|
|
1463
1515
|
## AutoComplete
|
|
1464
1516
|
|
|
1465
1517
|
### Primitive Data
|
|
@@ -1467,7 +1519,7 @@ If the data is an array of primitives (e.g., [data]="['A', 'B']"), never set \`v
|
|
|
1467
1519
|
|
|
1468
1520
|
### Complex Data
|
|
1469
1521
|
If the data is an array of objects (e.g., [data]="[{ id, name }]"), always set \`valueField\` to a string property for value binding (e.g., "id").
|
|
1470
|
-
`,
|
|
1522
|
+
`,Qt='\n## DropDownTree\nWhen implementing or updating the DropDownTree component, always follow these rules:\n\nAlways set both `textField` and `valueField`:\n- `textField` is the property to display (e.g., "name")\n- `valueField` is the property for value binding (e.g., "id")\nWhen `valueField` and `textField` are string[], always specify `valueDepth`.\n\n### Primitive `value`\nIf the `value` is of a primitive type, `valuePrimitive` must be true and `dataItem` is required.\nThe `value` property of the `dataItem` will be associated with the `valueField`.\n',Jt='\n## MultiSelectTree\nWhen implementing or updating the MultiSelectTree component, always follow these rules:\n\nAlways set both `textField` and `valueField`:\n- `textField` is the property to display (e.g., "name")\n- `valueField` is the property for value binding (e.g., "id")\nWhen `valueField` and `textField` are string[], always specify `valueDepth`.\n\n### Primitive `value`\nIf the `value` is of a primitive type, `valuePrimitive` must be true and `dataItems` is required.\nThe `value` property of the `dataItems` will be associated with the `valueField`.\n',Xt='\n## MultiColumnComboBox\nWhen implementing or updating the MultiColumnComboBox component, always follow these rules:\n\nAlways set both `textField` and `valueField`:\n- `textField` is the property to display (e.g., "name")\n- `valueField` is the property for value binding (e.g., "id")\n\n### Primitive `value`\nIf the `value` is of a primitive type, `valuePrimitive` must be true.\n';var pt=`
|
|
1471
1523
|
|
|
1472
1524
|
## Smart Grid (AI-Enhanced) Instructions
|
|
1473
1525
|
|
|
@@ -1486,6 +1538,6 @@ Suggestion Examples by Domain:
|
|
|
1486
1538
|
|
|
1487
1539
|
Required Disclaimer:
|
|
1488
1540
|
"The examples use a Telerik-hosted AI service for demonstration purposes only. For production applications, use an AI service that understands your specific domain, data, and business requirements."
|
|
1489
|
-
`;var
|
|
1541
|
+
`;var ut=["button","buttongroup","splitbutton","dropdownbutton","chip","chiplist","floatingactionbutton","smartpastebutton","speechtotextbutton"],mt=e=>e==="button"||e==="buttongroup"||e==="splitbutton"||e==="dropdownbutton"||e==="chip"?Zt:"",Zt='\n## Deprecated Properties & Modern Replacements\n\nButton `look` property: The `look` property is deprecated. Use `fillMode` instead.\n Type: `ButtonFillMode = "solid" | "flat" | "outline" | "link" | "clear"`\n CORRECT: <button kendoButton fillMode="flat">Button</button>\n WRONG: <button kendoButton look="flat">Button</button>\n\nButton `primary` property: The `primary` property is deprecated. Use `themeColor="primary"` instead.\n CORRECT: <button kendoButton themeColor="primary">Button</button>\n WRONG: <button kendoButton [primary]="true">Button</button>\n';function eo(e){let t=e?.trim().toLowerCase();if(t==="grid")return[nt,pt].join(`
|
|
1490
1542
|
|
|
1491
|
-
`);if(t==="treelist")return
|
|
1543
|
+
`);if(t==="treelist")return st;if(t==="listview")return at;if(t==="scheduler")return rt;if(t==="window")return it;if(t==="charts")return lt;if(ct.includes(t))return dt(t);if(ut.includes(t))return mt(t)}var M=!!process.env.PLUGIN_MODE,gt=h.ToolNames.layoutAssistant(D),re=h.ToolNames.codeAssistant(D),ht=h.ToolNames.styleAssistant(D),ie=h.ToolNames.iconAssistant(D),ft=h.ToolNames.gettingStartedAssistant(D),yt=h.ToolNames.accessibilityAssistant(D),to=h.ToolNames.upgradeAssistant(D);function bt(e,t){return[...M?[]:[h.Tools.createOrchestrator({name:h.ToolNames.orchestrator(D),title:"Kendo UI Generator",description:h.ToolDescriptions.orchestrator(l),layoutAssistantName:gt,codeAssistantName:re,styleAssistantName:ht,iconAssistantName:ie,accessibilityAssistantName:yt,suiteName:l,libKey:N,components:_,requiredAccess:["agent"]},{validationSteps:h.Validation.Angular.steps,injectedPlan:h.Validation.Angular.additionalPlan},e),h.Tools.createAssistantOrchestrator({name:"kendo_angular_assistant",title:"Kendo UI Assistant",description:h.ToolDescriptions.assistantOrchestrator(l),codeAssistantName:re,iconAssistantName:ie,suiteName:l,libKey:N,components:_,requiredAccess:["assistant"]},e)],h.Tools.createLayoutAssistant({name:gt,title:"Kendo UI Layout Assistant",description:h.ToolDescriptions.layoutAssistant,suiteName:l,libKey:N,getPreContent:M?void 0:Je,requiredAccess:["agent"]},e),h.Tools.createStyleAssistant({name:ht,title:"Kendo UI Style Assistant",description:h.ToolDescriptions.styleAssistant,libKey:N,getPreContent:M?void 0:Xe,requiredAccess:["agent"]},e),h.Tools.createIconSearch({name:ie,title:"Kendo UI Icon Assistant",description:h.ToolDescriptions.iconAssistant,libKey:N,getPostContent:M?void 0:et,requiredAccess:["assistant","agent"]},e),h.Tools.createCodeAssistant({name:re,title:"Kendo UI Component Assistant",description:h.ToolDescriptions.codeAssistant(l),libKey:N,suiteName:l,components:_,getPostContent:M?void 0:({component:o})=>{let s=eo(o);return tt({component:o,componentInstructions:s})},requiredAccess:["assistant","agent"]},e),...M?[]:[(()=>{let o=new S(ft,{title:"Kendo UI Getting Started",description:`Creates a new Angular project with Angular CLI and provides essential getting started guidance for ${l} including installation, configuration, and setup instructions.`,requiredAccess:["agent"],inputSchema:ke(l,"kendo-angular-app")},async({projectName:s,createNewProject:i,theme:a},{_meta:r})=>{let p=x(o,r);try{await e.recordToolUserRequest({toolName:ft,meta:{projectName:s,createNewProject:i,theme:a,...p}})}catch(f){console.error("Error recording tool request:",f)}return{content:[{type:"text",text:ot(s,i,a)}]}});return o})()],h.Tools.createAccessibilityAssistant({name:yt,title:"Kendo UI Accessibility Assistant",description:h.ToolDescriptions.accessibilityAssistant(l),libKey:N,suiteName:l,components:_,requiredAccess:["agent"]},e),h.Tools.createUpgrade({name:to,title:"Kendo UI Upgrade Assistant",description:h.ToolDescriptions.upgradeAssistant(l),suiteName:l,requiredAccess:["agent"]},e)].filter(o=>o.hasAccess(t))}var ro=ao(import.meta.url),io=kt.dirname(ro),lo=kt.resolve(io,"../package.json"),At=JSON.parse(so.readFileSync(lo,"utf-8")),vt=new oo({name:"kendo-mcp",title:"Kendo MCP Server",version:At.version});async function co(){let e=new no;k("Starting server...");let t=await ye(async()=>{let o=(await we())?.entitlement;return o?.Product?.Code||o?.product?.code});t!=="none"&&(B.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",bt(B,t).forEach(o=>o.register(vt)),ve({serverName:"angular",contextApi:B,enrichWithUserData:!0,additionalFields:{version:At.version,access_type:t}})),await vt.connect(e)}co();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0-dev.97316fdc.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"license": "See LICENSE.md",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"!**/*.tsbuildinfo"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@grpc/grpc-js": "^1.14.
|
|
27
|
-
"@grpc/proto-loader": "^0.8.
|
|
26
|
+
"@grpc/grpc-js": "^1.14.4",
|
|
27
|
+
"@grpc/proto-loader": "^0.8.1",
|
|
28
28
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
29
|
-
"@progress/kendo-licensing": "^1.11.
|
|
29
|
+
"@progress/kendo-licensing": "^1.11.2",
|
|
30
30
|
"tslib": "^2.3.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|