@progress/kendo-angular-mcp 1.10.1 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +36 -33
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import{McpServer as ho}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as fo}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as Vt,join as zt}from"path";import{fileURLToPath as Ht}from"url";import{loadLicense as Dt,decodeLicenseKey as Ot,decodeLicenseEvidence as Gt}from"@progress/kendo-licensing/utils";var Y=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function de(e){return e.replace(/^\uFEFF/,"")}async function Q(e){let t=null,o=null;try{let n=Dt();if(!n.success){let r=new Y(n.message);throw e&&await e("license_load_failed",{error:n.message}).catch(()=>{}),r}try{t=(await Ot(n.value)).licenses.find(async s=>!!(await Gt(s)).userId)}catch(r){console.log(r.message),e&&await e("license_load_failed",{error:r.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[de(n.value),null]}catch(n){return o=n.message||"Unknown error loading license.",e&&await e("license_load_failed",{error:o}).catch(()=>{}),[null,o]}return[de(t),null]}import L from"node:fs";import V from"node:path";var X=!1,D=process.env.DEBUG_LOG_FILE,pe=!!(D&&typeof D=="string");if(pe){let e=V.resolve(D),t=V.dirname(e);if(t!=="."&&t!==process.cwd()&&!L.existsSync(t))try{L.mkdirSync(t,{recursive:!0})}catch(o){console.error("Error creating log directory:",o)}if(!L.existsSync(e))try{L.writeFileSync(e,"")}catch(o){console.error("Error creating log file:",o)}}else X=!1;X=pe&&!!D&&L.existsSync(V.resolve(D));function v(...e){if(X&&D){let n=`${new Date().toISOString()}: ${e.join(" ")}
3
- `,r=V.resolve(D);L.appendFile(r,n,s=>{s&&console.error("Error writing to log file:",s)})}}import Lt from"@grpc/proto-loader";import q from"@grpc/grpc-js";import ge from"path";import ue from"fs";import{fileURLToPath as Mt}from"url";var $t=Mt(import.meta.url),Bt=ge.dirname($t),he={version:"unknown"},me=ge.resolve(Bt,"../package.json");ue.existsSync(me)&&(he=JSON.parse(ue.readFileSync(me,"utf-8")));function J(e){return typeof e=="string"&&e.length>0&&e.length<200&&/^[\x20-\x7e]+$/.test(e)}function qt(e){return e==="semantic"||e==="fallback"}function Ft(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var z=class{constructor(t,o,n){this.contextApiUrl=t;this.protoPath=o;this.options=n;this.toolNameHeader="assistant";let r=Lt.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"),v("Using ContextApi URl:",this.contextApiUrl);let s=q.loadPackageDefinition(r);this.client=new s.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?q.credentials.createInsecure():q.credentials.createSsl())}buildRequestMetadata(t={}){return Ft(JSON.stringify({...t,source:"npm",version:he.version,os:process.platform,node_version:process.version,plugin_mode:!!process.env.PLUGIN_MODE,install_source:process.env.INSTALL_SOURCE?.toLowerCase()}))}async getMetadata({meta:t}={meta:{}}){let o=t??{},{langfuseSessionId:n,toolInvocationId:r,mcpToolName:s,workflowSessionSource:a,workflowSessionExplicitIdRejected:l,...g}=o;delete g["progress.com/kendo-ui-workflow-session-id"];let[p,h]=this.isDev?["fake_license",null]:await Q((y,f)=>this.logEvent(y,f)),k=process.env.CONTEXTAPI_API_KEY,m=k&&typeof k=="string",i=p&&typeof p=="string";if(!i&&!m&&h)throw new Error(`Failed to authenticate with API key or License key!
2
+ import{McpServer as ho}from"@modelcontextprotocol/sdk/server/mcp.js";import{StdioServerTransport as fo}from"@modelcontextprotocol/sdk/server/stdio.js";import{dirname as Vt,join as zt}from"path";import{fileURLToPath as Ht}from"url";import{loadLicense as Dt,decodeLicenseKey as Ot,decodeLicenseEvidence as Gt}from"@progress/kendo-licensing/utils";var Q=class extends Error{constructor(t){super(t),this.name="LicenseError"}};function de(e){return e.replace(/^\uFEFF/,"")}async function X(e){let t=null,o=null;try{let n=Dt();if(!n.success){let r=new Q(n.message);throw e&&await e("license_load_failed",{error:n.message}).catch(()=>{}),r}try{t=(await Ot(n.value)).licenses.find(async s=>!!(await Gt(s)).userId)}catch(r){console.log(r.message),e&&await e("license_load_failed",{error:r.message||"Unknown decoding error"}).catch(()=>{})}if(!t)return[de(n.value),null]}catch(n){return o=n.message||"Unknown error loading license.",e&&await e("license_load_failed",{error:o}).catch(()=>{}),[null,o]}return[de(t),null]}import M from"node:fs";import V from"node:path";var J=!1,O=process.env.DEBUG_LOG_FILE,pe=!!(O&&typeof O=="string");if(pe){let e=V.resolve(O),t=V.dirname(e);if(t!=="."&&t!==process.cwd()&&!M.existsSync(t))try{M.mkdirSync(t,{recursive:!0})}catch(o){console.error("Error creating log directory:",o)}if(!M.existsSync(e))try{M.writeFileSync(e,"")}catch(o){console.error("Error creating log file:",o)}}else J=!1;J=pe&&!!O&&M.existsSync(V.resolve(O));function v(...e){if(J&&O){let n=`${new Date().toISOString()}: ${e.join(" ")}
3
+ `,r=V.resolve(O);M.appendFile(r,n,s=>{s&&console.error("Error writing to log file:",s)})}}import Lt from"@grpc/proto-loader";import F from"@grpc/grpc-js";import ge from"path";import ue from"fs";import{fileURLToPath as Mt}from"url";var $t=Mt(import.meta.url),qt=ge.dirname($t),he={version:"unknown"},me=ge.resolve(qt,"../package.json");ue.existsSync(me)&&(he=JSON.parse(ue.readFileSync(me,"utf-8")));function Z(e){return typeof e=="string"&&e.length>0&&e.length<200&&/^[\x20-\x7e]+$/.test(e)}function Bt(e){return e==="semantic"||e==="fallback"}function Ft(e){return e.replace(/\u2014/g,"--").replace(/\u2013/g,"-").replace(/[^\x20-\x7E]/g,"")}var z=class{constructor(t,o,n){this.contextApiUrl=t;this.protoPath=o;this.options=n;this.toolNameHeader="assistant";let r=Lt.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"),v("Using ContextApi URl:",this.contextApiUrl);let s=F.loadPackageDefinition(r);this.client=new s.ContextQueryService(this.contextApiUrl||"contextapi.telerik.com:443",this.isDev?F.credentials.createInsecure():F.credentials.createSsl())}buildRequestMetadata(t={}){return Ft(JSON.stringify({...t,source:"npm",version:he.version,os:process.platform,node_version:process.version,plugin_mode:!!process.env.PLUGIN_MODE,install_source:process.env.INSTALL_SOURCE?.toLowerCase()}))}async getMetadata({meta:t}={meta:{}}){let o=t??{},{langfuseSessionId:n,toolInvocationId:r,mcpToolName:s,workflowSessionSource:a,workflowSessionExplicitIdRejected:l,...g}=o;delete g["progress.com/kendo-ui-workflow-session-id"];let[d,h]=this.isDev?["fake_license",null]:await X((f,y)=>this.logEvent(f,y)),k=process.env.CONTEXTAPI_API_KEY,m=k&&typeof k=="string",i=d&&typeof d=="string";if(!i&&!m&&h)throw new Error(`Failed to authenticate with API key or License key!
4
4
 
5
- License Error: ${h}`);let c=new q.Metadata;if(i)try{c.add("x-license-key",p)}catch(y){throw v("Error adding license key to metadata:",y),new Error(`Failed to use license key: ${y.message}`)}return m&&c.add("x-api-key",k),this.options?.libName&&c.add("x-library-name",this.options.libName),c.add("x-tool-name",this.toolNameHeader),J(n)&&c.add("x-langfuse-session-id",n),J(r)&&c.add("x-tool-invocation-id",r),J(s)&&c.add("x-mcp-tool-name",s),qt(a)&&c.add("x-workflow-session-source",a),typeof l=="boolean"&&c.add("x-workflow-session-explicit-id-rejected",String(l)),c.add("x-request-metadata",this.buildRequestMetadata(g)),c}async query(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.query(t,n,(a,l)=>{a?s(a):r(l)})})}async getApiRefMatches(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.getApiRefMatches(t,n,(a,l)=>{a?s(a):r(l)})})}async queryCssUtils(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.cssUtilsSearch(t,n,(a,l)=>{a?(v("Error querying CSS Utils:",a),s(a)):r(l)})})}async queryIconsSearch(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.iconsSearch(t,n,(a,l)=>{a?(v("Error querying Icons Search:",a),s(a)):r(l)})})}async queryBuildingBlocks(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.buildingBlocksSearch(t,n,(a,l)=>{a?(v("Error querying Building Blocks:",a),s(a)):r(l)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((o,n)=>{this.client.validateUserLicense({},t,(r,s)=>{r?(v("Error validating user license:",r),n(r)):o(s)})})}async queryThemeGenerate(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.generateTheme(t,n,(a,l)=>{a?(v("Error querying context API/GenerateTheme:",a),s(a)):r(l)})})}async recordOrchestratorUserRequest({meta:t}){let o=await this.getMetadata({meta:t});return new Promise((n,r)=>{this.client.recordOrchestratorUserRequest({},o,(s,a)=>{s?(v("Error recording orchestrator user request:",s),r(s)):n(a)})})}async recordToolUserRequest({toolName:t,meta:o}){let n=await this.getMetadata({meta:o});return new Promise(r=>{this.client.recordToolUserRequest({tool_name:t},n,(s,a)=>{s?(s.code===7?v("recordToolUserRequest: license does not cover Kendo AI Tools, skipping telemetry."):v("Error recording tool user request:",s),r(null)):r(a)})})}async logEvent(t,o,n={}){let r="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq",{enrichWithUserData:s=!1,meta:a={}}=n,l=r&&typeof r=="string",g=null;if(s)try{let[h]=this.isDev?["fake_license",null]:await Q();h&&typeof h=="string"&&(g=h)}catch{}if(!l&&!g){v("Neither LOGGING_API_KEY nor license key available, skipping log event");return}let p=new q.Metadata;return l&&p.add("x-api-key",r),g&&(p.add("x-license-key",g),p.add("x-request-metadata",this.buildRequestMetadata(a)),this.options?.libName&&p.add("x-library-name",this.options.libName)),new Promise((h,k)=>{this.client.logEvent({event_name:t,fields:o||{}},p,(m,i)=>{m?(v("Error logging event:",m),k(m)):h()})})}};import{z as Z}from"zod";var $o=Z.object({user_id:Z.string(),user_email:Z.string().email()});import{z as x}from"zod";var Wt=x.object({Product:x.object({Id:x.number().int(),Code:x.string(),Name:x.string()}),License:x.nullable(x.object({Id:x.number().int(),Name:x.string(),Type:x.string(),Active:x.boolean()})),Availability:x.array(x.object({LicenseStart:x.nullable(x.string().datetime()),LicenseEnd:x.nullable(x.string().datetime())})),IsLicenseAvailable:x.optional(x.boolean())}),Fo=x.array(Wt);function S(e,t){let o=e.server?.server.getClientVersion?.(),n=t||{};return o&&(n.clientInfo={name:o.name,version:o.version}),n}async function fe(e){let t=process.env.KENDO_MCP_ACCESS;if(t==="true"||t==="1"||t==="full")return"full";if(typeof t=="string"&&(t.toLowerCase()==="agent"||t.toLowerCase()==="assistant"))return t.toLowerCase();let o=await e();return o?.toLocaleLowerCase()==="agentic_ui_generator"?"agent":o?.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function ye(){return'**Accessibility Guidelines: WCAG 2.2 Level AA Compliance**\n\n**Core Principles:**\n1. Use semantic HTML and ARIA correctly\n2. Ensure WCAG 2.2 AA compliance\n3. Follow W3C ARIA Authoring Practices\n4. Provide standards-based accessibility fixes\n\n**1. Form Control Labels** (WCAG 1.3.1, 3.3.2, 4.1.2)\nEvery input must have an associated label.\nCORRECT: `<input type="search" aria-label="Search products" placeholder="Search...">`\nCORRECT: `<label for="qty">Quantity</label><input type="number" id="qty">`\nWRONG: `<span>Email</span><input type="email">` (no association)\nWRONG: `<input type="email" placeholder="Email">` (placeholder as label)\n\n**2. Button Accessibility** (WCAG 4.1.2, 2.4.6, 2.5.3)\nAll buttons need accessible names describing their purpose.\nCORRECT: `<button type="button">Save Changes</button>`\nCORRECT: `<button aria-label="Close dialog"><svg aria-hidden="true" focusable="false">...</svg></button>`\nWRONG: `<button><svg>...</svg></button>` (no accessible name)\nWRONG: `<button>Click here</button>` (generic text)\n\n**3. Popup/Menu Triggers** (WCAG 4.1.2, 1.3.1)\nIndicate popup purpose and state using aria-haspopup, aria-expanded, aria-controls.\nCORRECT: `<button aria-expanded="false" aria-haspopup="menu" aria-controls="menu-id">Settings</button>`\n\n**4. Image Accessibility** (WCAG 1.1.1)\nInformative: `<img src="chart.png" alt="Sales increased 25% in Q4 2024">`\nFunctional: `<a href="/home"><img src="logo.png" alt="Company Name Home"></a>`\nDecorative: `<img src="border.png" alt="" role="presentation">`\nComplex: `<img src="chart.png" alt="Sales data" aria-describedby="desc-id">`\nWRONG: Missing alt, filename as alt, generic alt for decorative images\n\n**5. Link Accessibility** (WCAG 2.4.4, 2.4.6)\nLinks must be descriptive and understandable out of context.\nCORRECT: `<a href="/products">View All Products</a>`\nCORRECT: `<a href="/article" aria-label="Read more about New Product Launch">Read more</a>`\nWRONG: "Click here", "Read more", "Learn more" without context\n\n**6. Form Validation** (WCAG 3.3.1, 3.3.2, 3.3.3)\nErrors must be identified, associated with inputs, and provide suggestions. Use aria-describedby, aria-invalid="true", and role="alert".\n\n**7. Heading Structure** (WCAG 1.3.1, 2.4.6)\nEach page must have an `<h1>` that describes its content. Use hierarchical, descriptive headings with no skipped levels (h1\u2192h2\u2192h3).\nCORRECT: `<h1>Dashboard</h1> <h2>Sales</h2> <h3>By Region</h3>`\nWRONG: No `<h1>` on the page, or skipping levels (h1\u2192h3)\nIf a heading should look smaller than its semantic level, use CSS: `<h2 class="text-sm">Subtitle</h2>`\n\n**8. Page Component Landmark Rules** (WCAG 1.3.1, 4.1.2)\nPage components (route components) may be rendered inside a layout that already provides `<main>`, `<header>`, or `<footer>`. Since the layout configuration is unknown, avoid using these landmarks in page components to prevent potential duplication and nesting violations. Use `<div>`, `<section>`, or `<article>` as the top-level wrapper instead.\n- Avoid adding `<main>`, `role="main"`, `<header>`, or `<footer>` in page components \u2014 the layout typically provides them. Duplicating them can cause `landmark-no-duplicate-main` and `landmark-main-is-top-level` violations.\n- Avoid adding `role="banner"` or using a semantic `<header>` element in page components \u2014 the layout\'s `<header>` already claims the banner landmark. Adding another causes `landmark-banner-is-top-level` violations.\n- Avoid adding `role="contentinfo"` to elements inside page components \u2014 the contentinfo landmark should be a top-level landmark, not nested inside `<main>` or other landmarks. Nesting it can cause `landmark-contentinfo-is-top-level` violations.\n- When multiple `<section>` or `<nav>` elements exist on a page, give each a unique `aria-label` to avoid `landmark-unique` violations.\n\n**9. ARIA Role and Attribute Restrictions** (WCAG 4.1.2)\nOnly use ARIA roles that are valid for the given HTML element. Avoid adding `aria-label` or `aria-labelledby` to elements that do not permit naming.\n- `<article>` has an implicit `article` role. Do NOT override it with `role="listitem"`, `role="button"`, `role="link"`, or any other role \u2014 none are allowed on `<article>`. Use `<li>` for list items, `<button>` for interactive cards, or `<a>` for clickable cards instead.\n- `<button>` already has an implicit `button` role. Do NOT add `role="listitem"` or other incompatible roles.\n- `<span>` and `<div>` without roles are generic elements. Do NOT add `aria-label` to them \u2014 it is a prohibited attribute on elements with no accessible role and can cause `aria-prohibited-attr` violations. Instead, use `role="img"` + `aria-label` for visual indicators, or use visually hidden text.\n- Do NOT add `aria-label` to non-interactive `<div>` wrappers \u2014 it has no effect and triggers violations.\n- `aria-pressed` is only valid on elements with `role="button"`, `role="checkbox"`, `role="menuitemcheckbox"`, `role="option"`, `role="radio"`, or `role="switch"`. Do NOT use `aria-pressed` on elements with `role="listitem"` or other roles.\nCORRECT: `<ul role="list"><li class="product-card">...</li></ul>` (listitem inside list)\nCORRECT: `<span role="img" aria-label="Status: pending" class="status-dot"></span>` (role added before aria-label)\nCORRECT: `<span class="status-dot" aria-hidden="true"></span><span class="visually-hidden">Pending</span>` (hidden text alternative)\nWRONG: `<article role="listitem">` (listitem not allowed on article)\nWRONG: `<article role="button">` (button not allowed on article \u2014 use `<button>` or `<div role="button">`)\nWRONG: `<span aria-label="pending" class="status-dot"></span>` (aria-label prohibited on generic span)\nWRONG: `<div aria-label="Product badges" class="badges"></div>` (aria-label prohibited on generic div)\n\n**Quick Checklist:**\n- **Forms:** Associated labels, aria-required on required fields, autocomplete attributes, aria-describedby for errors, aria-invalid for invalid fields, fieldsets with legends\n- **Buttons/Links:** Accessible names, aria-label for icon buttons, aria-hidden on decorative icons, descriptive link text\n- **Popups/Dialogs:** aria-haspopup, aria-expanded, aria-controls, role="dialog", aria-modal="true", aria-labelledby, focus trap, Escape to close\n- **Images:** alt on all images, descriptive alt for informative, empty alt for decorative, aria-describedby for complex\n- **Structure:** One h1, logical heading hierarchy, avoid `<main>`, `<header>`, `<footer>`, `role="main"`, `role="contentinfo"`, `role="banner"` in page/route components (the layout may already provide them), use `<section>` or `<div>` as page-level wrappers, unique aria-labels on duplicate landmark types\n- **ARIA Rules:** Avoid adding `aria-label` to generic `<span>`/`<div>` without a role, avoid using `role="listitem"` or `role="button"` on `<article>` \u2014 use `<li>` for list items, add `role="img"` before `aria-label` on visual indicators, `aria-pressed` only on button-like roles\n- **Scrollable Regions:** Any scrollable container must have `tabindex="0"` or contain keyboard-interactive children\n- **Nested Interactive:** Do not add interactive role/tabindex to a container that already has focusable children\n- **List Roles:** `role="list"` containers must have `role="listitem"` children \u2014 prefer `<ul>/<li>` natively\n- **Dynamic Content:** role="status"/aria-live="polite" for updates, role="alert"/aria-live="assertive" for critical alerts\n- **Keyboard/Focus:** All interactive elements keyboard accessible, logical focus order, visible focus indicators, no keyboard traps (except modals)\n- **Color/Contrast:** 4.5:1 text contrast (3:1 large text), 3:1 UI component contrast, no color-only information, 3:1 focus indicator contrast'}var Kt=1440*60*1e3;function be(e){let{serverName:t,contextApi:o,additionalFields:n={},intervalMs:r=Kt,enrichWithUserData:s=!1}=e,a="mcp_server_heartbeat",l=async()=>{try{let p={server_name:t,timestamp:new Date().toISOString(),...n};await o.logEvent(a,p,{enrichWithUserData:s})}catch(p){v(`Failed to send heartbeat for ${t}:`,p)}};l();let g=setInterval(l,r);return()=>{clearInterval(g),v(`Heartbeat stopped for ${t}`)}}import{z as ee}from"zod";var jt=["meridian","default","bootstrap","material","fluent"];function ke(e,t){return{projectName:ee.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:ee.boolean().default(!0).describe(`Whether to create a new project before configuring ${e}. Set to true to scaffold a brand-new project, or false if the project already exists and you only want to add ${e} to it.`),theme:ee.enum(jt).default("meridian").describe("The Kendo UI theme to use. Determines which theme package is installed and imported. Available themes: meridian (default), default, bootstrap, material, fluent.")}}var u="Kendo UI for Angular",U="angular",P="kendo",F=["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","FloatingToolbar","Forms","FormField","Gantt","Gauges","General","Grid","GridLayout","Icon","InlineAIPrompt","Label","LinearGauge","ListBox","ListView","LLMKit","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"],ve=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 Yt=zt(Vt(Ht(import.meta.url)),"../proto/service.proto"),W=new z(process.env.CONTEXTAPI_URL,Yt,{libName:U});var we=async()=>W.validateUserLicense();import yo from"fs";import Ut from"path";import{fileURLToPath as bo}from"url";import{z as b}from"zod";var I=class{constructor(t,o,n){this.name=t;this.config=o;this.cb=n}register(t){this.server=t,this.server.registerTool(this.name,this.config,this.cb)}hasAccess(t){return!this.config.requiredAccess||this.config.requiredAccess.length===0?!0:t==="full"||this.config.requiredAccess.includes(t)}};var K=e=>{let t=[`1. \`${e.accessibilityAssistantName}\`: Call first with \`includeGeneralGuidelines=true\`; use \`false\` for component-specific follow-ups.`];if(e.includeLayout){let r=e.includeResponsive?"structure, responsive behavior, and UX policy":"structure and UX policy";t.push(`${t.length+1}. \`${e.layoutAssistantName}\`: Get Kendo Design System utilities for the requested ${r}. Use only those utilities for styling and layout.`)}if(e.includeTheming&&t.push(`${t.length+1}. \`${e.styleAssistantName}\`: Generate the requested Kendo theme variables.`),e.includeIcons&&t.push(`${t.length+1}. \`${e.iconAssistantName}\`: Find icons only for the required actions and states.`),e.includeComponentsDocs){let r=e.components?.length?e.components.join(", "):"each Kendo component selected for the implementation";t.push(`${t.length+1}. \`${e.codeAssistantName}\`: Call once per component (${r}) with a concise, feature-specific query before writing Kendo markup.`)}t.push(`${t.length+1}. After each assistant call, use the output to decide how to incorporate the guidance into the feature where applicable.`),t.push(`${t.length+1}. Implement the requested UI using ${e.suiteName} components and the gathered guidance.`),t.push(`${t.length+1}. Run \`npm run build\`, resolve failures, and repeat until it succeeds.`);let o=e.libKey==="angular"?"- Before editing, inspect the project for Standalone or NgModule setup, built-in or structural template syntax, and the existing Kendo theme import mechanism. Match those conventions; default to Standalone and built-in control flow for Angular 17+ only when no existing pattern is found.":"- Use React function components, Hooks, typed props where needed, stable list keys, and the project's existing KendoReact theme and package setup.",n=e.libKey==="angular"?`
5
+ License Error: ${h}`);let c=new F.Metadata;if(i)try{c.add("x-license-key",d)}catch(f){throw v("Error adding license key to metadata:",f),new Error(`Failed to use license key: ${f.message}`)}return m&&c.add("x-api-key",k),this.options?.libName&&c.add("x-library-name",this.options.libName),c.add("x-tool-name",this.toolNameHeader),Z(n)&&c.add("x-langfuse-session-id",n),Z(r)&&c.add("x-tool-invocation-id",r),Z(s)&&c.add("x-mcp-tool-name",s),Bt(a)&&c.add("x-workflow-session-source",a),typeof l=="boolean"&&c.add("x-workflow-session-explicit-id-rejected",String(l)),c.add("x-request-metadata",this.buildRequestMetadata(g)),c}async query(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.query(t,n,(a,l)=>{a?s(a):r(l)})})}async getApiRefMatches(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.getApiRefMatches(t,n,(a,l)=>{a?s(a):r(l)})})}async queryCssUtils(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.cssUtilsSearch(t,n,(a,l)=>{a?(v("Error querying CSS Utils:",a),s(a)):r(l)})})}async queryIconsSearch(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.iconsSearch(t,n,(a,l)=>{a?(v("Error querying Icons Search:",a),s(a)):r(l)})})}async queryBuildingBlocks(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.buildingBlocksSearch(t,n,(a,l)=>{a?(v("Error querying Building Blocks:",a),s(a)):r(l)})})}async validateUserLicense(){let t=await this.getMetadata();return new Promise((o,n)=>{this.client.validateUserLicense({},t,(r,s)=>{r?(v("Error validating user license:",r),n(r)):o(s)})})}async queryThemeGenerate(t,o){let n=await this.getMetadata({meta:o});return new Promise((r,s)=>{this.client.generateTheme(t,n,(a,l)=>{a?(v("Error querying context API/GenerateTheme:",a),s(a)):r(l)})})}async recordOrchestratorUserRequest({meta:t}){let o=await this.getMetadata({meta:t});return new Promise((n,r)=>{this.client.recordOrchestratorUserRequest({},o,(s,a)=>{s?(v("Error recording orchestrator user request:",s),r(s)):n(a)})})}async recordToolUserRequest({toolName:t,meta:o}){let n=await this.getMetadata({meta:o});return new Promise(r=>{this.client.recordToolUserRequest({tool_name:t},n,(s,a)=>{s?(s.code===7?v("recordToolUserRequest: license does not cover Kendo AI Tools, skipping telemetry."):v("Error recording tool user request:",s),r(null)):r(a)})})}async logEvent(t,o,n={}){let r="h8utJ6rk4PpIWX4JMn9beQDsjVUri6KV0XYfiVwq",{enrichWithUserData:s=!1,meta:a={}}=n,l=r&&typeof r=="string",g=null;if(s)try{let[h]=this.isDev?["fake_license",null]:await X();h&&typeof h=="string"&&(g=h)}catch{}if(!l&&!g){v("Neither LOGGING_API_KEY nor license key available, skipping log event");return}let d=new F.Metadata;return l&&d.add("x-api-key",r),g&&d.add("x-license-key",g),d.add("x-request-metadata",this.buildRequestMetadata(a)),this.options?.libName&&d.add("x-library-name",this.options.libName),new Promise((h,k)=>{this.client.logEvent({event_name:t,fields:o||{}},d,(m,i)=>{m?(v("Error logging event:",m),k(m)):h()})})}};import{z as ee}from"zod";var $o=ee.object({user_id:ee.string(),user_email:ee.string().email()});import{z as x}from"zod";var Wt=x.object({Product:x.object({Id:x.number().int(),Code:x.string(),Name:x.string()}),License:x.nullable(x.object({Id:x.number().int(),Name:x.string(),Type:x.string(),Active:x.boolean()})),Availability:x.array(x.object({LicenseStart:x.nullable(x.string().datetime()),LicenseEnd:x.nullable(x.string().datetime())})),IsLicenseAvailable:x.optional(x.boolean())}),Fo=x.array(Wt);function S(e,t){let o=e.server?.server.getClientVersion?.(),n=t||{};return o&&(n.clientInfo={name:o.name,version:o.version}),n}async function fe(e){let t=process.env.KENDO_MCP_ACCESS;if(t==="true"||t==="1"||t==="full")return"full";if(typeof t=="string"&&(t.toLowerCase()==="agent"||t.toLowerCase()==="assistant"))return t.toLowerCase();let o=await e();return o?.toLocaleLowerCase()==="agentic_ui_generator"?"agent":o?.toLocaleLowerCase()==="ai_coding_assistants"?"assistant":"none"}function ye(){return'**Accessibility Guidelines: WCAG 2.2 Level AA Compliance**\n\n**Core Principles:**\n1. Use semantic HTML and ARIA correctly\n2. Ensure WCAG 2.2 AA compliance\n3. Follow W3C ARIA Authoring Practices\n4. Provide standards-based accessibility fixes\n\n**1. Form Control Labels** (WCAG 1.3.1, 3.3.2, 4.1.2)\nEvery input must have an associated label.\nCORRECT: `<input type="search" aria-label="Search products" placeholder="Search...">`\nCORRECT: `<label for="qty">Quantity</label><input type="number" id="qty">`\nWRONG: `<span>Email</span><input type="email">` (no association)\nWRONG: `<input type="email" placeholder="Email">` (placeholder as label)\n\n**2. Button Accessibility** (WCAG 4.1.2, 2.4.6, 2.5.3)\nAll buttons need accessible names describing their purpose.\nCORRECT: `<button type="button">Save Changes</button>`\nCORRECT: `<button aria-label="Close dialog"><svg aria-hidden="true" focusable="false">...</svg></button>`\nWRONG: `<button><svg>...</svg></button>` (no accessible name)\nWRONG: `<button>Click here</button>` (generic text)\n\n**3. Popup/Menu Triggers** (WCAG 4.1.2, 1.3.1)\nIndicate popup purpose and state using aria-haspopup, aria-expanded, aria-controls.\nCORRECT: `<button aria-expanded="false" aria-haspopup="menu" aria-controls="menu-id">Settings</button>`\n\n**4. Image Accessibility** (WCAG 1.1.1)\nInformative: `<img src="chart.png" alt="Sales increased 25% in Q4 2024">`\nFunctional: `<a href="/home"><img src="logo.png" alt="Company Name Home"></a>`\nDecorative: `<img src="border.png" alt="" role="presentation">`\nComplex: `<img src="chart.png" alt="Sales data" aria-describedby="desc-id">`\nWRONG: Missing alt, filename as alt, generic alt for decorative images\n\n**5. Link Accessibility** (WCAG 2.4.4, 2.4.6)\nLinks must be descriptive and understandable out of context.\nCORRECT: `<a href="/products">View All Products</a>`\nCORRECT: `<a href="/article" aria-label="Read more about New Product Launch">Read more</a>`\nWRONG: "Click here", "Read more", "Learn more" without context\n\n**6. Form Validation** (WCAG 3.3.1, 3.3.2, 3.3.3)\nErrors must be identified, associated with inputs, and provide suggestions. Use aria-describedby, aria-invalid="true", and role="alert".\n\n**7. Heading Structure** (WCAG 1.3.1, 2.4.6)\nEach page must have an `<h1>` that describes its content. Use hierarchical, descriptive headings with no skipped levels (h1\u2192h2\u2192h3).\nCORRECT: `<h1>Dashboard</h1> <h2>Sales</h2> <h3>By Region</h3>`\nWRONG: No `<h1>` on the page, or skipping levels (h1\u2192h3)\nIf a heading should look smaller than its semantic level, use CSS: `<h2 class="text-sm">Subtitle</h2>`\n\n**8. Page Component Landmark Rules** (WCAG 1.3.1, 4.1.2)\nPage components (route components) may be rendered inside a layout that already provides `<main>`, `<header>`, or `<footer>`. Since the layout configuration is unknown, avoid using these landmarks in page components to prevent potential duplication and nesting violations. Use `<div>`, `<section>`, or `<article>` as the top-level wrapper instead.\n- Avoid adding `<main>`, `role="main"`, `<header>`, or `<footer>` in page components \u2014 the layout typically provides them. Duplicating them can cause `landmark-no-duplicate-main` and `landmark-main-is-top-level` violations.\n- Avoid adding `role="banner"` or using a semantic `<header>` element in page components \u2014 the layout\'s `<header>` already claims the banner landmark. Adding another causes `landmark-banner-is-top-level` violations.\n- Avoid adding `role="contentinfo"` to elements inside page components \u2014 the contentinfo landmark should be a top-level landmark, not nested inside `<main>` or other landmarks. Nesting it can cause `landmark-contentinfo-is-top-level` violations.\n- When multiple `<section>` or `<nav>` elements exist on a page, give each a unique `aria-label` to avoid `landmark-unique` violations.\n\n**9. ARIA Role and Attribute Restrictions** (WCAG 4.1.2)\nOnly use ARIA roles that are valid for the given HTML element. Avoid adding `aria-label` or `aria-labelledby` to elements that do not permit naming.\n- `<article>` has an implicit `article` role. Do NOT override it with `role="listitem"`, `role="button"`, `role="link"`, or any other role \u2014 none are allowed on `<article>`. Use `<li>` for list items, `<button>` for interactive cards, or `<a>` for clickable cards instead.\n- `<button>` already has an implicit `button` role. Do NOT add `role="listitem"` or other incompatible roles.\n- `<span>` and `<div>` without roles are generic elements. Do NOT add `aria-label` to them \u2014 it is a prohibited attribute on elements with no accessible role and can cause `aria-prohibited-attr` violations. Instead, use `role="img"` + `aria-label` for visual indicators, or use visually hidden text.\n- Do NOT add `aria-label` to non-interactive `<div>` wrappers \u2014 it has no effect and triggers violations.\n- `aria-pressed` is only valid on elements with `role="button"`, `role="checkbox"`, `role="menuitemcheckbox"`, `role="option"`, `role="radio"`, or `role="switch"`. Do NOT use `aria-pressed` on elements with `role="listitem"` or other roles.\nCORRECT: `<ul role="list"><li class="product-card">...</li></ul>` (listitem inside list)\nCORRECT: `<span role="img" aria-label="Status: pending" class="status-dot"></span>` (role added before aria-label)\nCORRECT: `<span class="status-dot" aria-hidden="true"></span><span class="visually-hidden">Pending</span>` (hidden text alternative)\nWRONG: `<article role="listitem">` (listitem not allowed on article)\nWRONG: `<article role="button">` (button not allowed on article \u2014 use `<button>` or `<div role="button">`)\nWRONG: `<span aria-label="pending" class="status-dot"></span>` (aria-label prohibited on generic span)\nWRONG: `<div aria-label="Product badges" class="badges"></div>` (aria-label prohibited on generic div)\n\n**Quick Checklist:**\n- **Forms:** Associated labels, aria-required on required fields, autocomplete attributes, aria-describedby for errors, aria-invalid for invalid fields, fieldsets with legends\n- **Buttons/Links:** Accessible names, aria-label for icon buttons, aria-hidden on decorative icons, descriptive link text\n- **Popups/Dialogs:** aria-haspopup, aria-expanded, aria-controls, role="dialog", aria-modal="true", aria-labelledby, focus trap, Escape to close\n- **Images:** alt on all images, descriptive alt for informative, empty alt for decorative, aria-describedby for complex\n- **Structure:** One h1, logical heading hierarchy, avoid `<main>`, `<header>`, `<footer>`, `role="main"`, `role="contentinfo"`, `role="banner"` in page/route components (the layout may already provide them), use `<section>` or `<div>` as page-level wrappers, unique aria-labels on duplicate landmark types\n- **ARIA Rules:** Avoid adding `aria-label` to generic `<span>`/`<div>` without a role, avoid using `role="listitem"` or `role="button"` on `<article>` \u2014 use `<li>` for list items, add `role="img"` before `aria-label` on visual indicators, `aria-pressed` only on button-like roles\n- **Scrollable Regions:** Any scrollable container must have `tabindex="0"` or contain keyboard-interactive children\n- **Nested Interactive:** Do not add interactive role/tabindex to a container that already has focusable children\n- **List Roles:** `role="list"` containers must have `role="listitem"` children \u2014 prefer `<ul>/<li>` natively\n- **Dynamic Content:** role="status"/aria-live="polite" for updates, role="alert"/aria-live="assertive" for critical alerts\n- **Keyboard/Focus:** All interactive elements keyboard accessible, logical focus order, visible focus indicators, no keyboard traps (except modals)\n- **Color/Contrast:** 4.5:1 text contrast (3:1 large text), 3:1 UI component contrast, no color-only information, 3:1 focus indicator contrast'}var Kt=1440*60*1e3;function be(e){let{serverName:t,contextApi:o,additionalFields:n={},intervalMs:r=Kt,enrichWithUserData:s=!1}=e,a="mcp_server_heartbeat",l=async()=>{try{let d={server_name:t,timestamp:new Date().toISOString(),...n};await o.logEvent(a,d,{enrichWithUserData:s})}catch(d){v(`Failed to send heartbeat for ${t}:`,d)}};l();let g=setInterval(l,r);return()=>{clearInterval(g),v(`Heartbeat stopped for ${t}`)}}import{z as te}from"zod";var jt=["meridian","default","bootstrap","material","fluent"];function ke(e,t){return{projectName:te.string().default(t).describe("The name of the project. Used as the project folder name when creating a new project."),createNewProject:te.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:te.enum(jt).default("meridian").describe("The Kendo UI theme to use. Determines which theme package is installed and imported. Available themes: meridian (default), default, bootstrap, material, fluent.")}}var u="Kendo UI for Angular",E="angular",P="kendo",W=["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","FloatingToolbar","Forms","FormField","Gantt","Gauges","General","Grid","GridLayout","Icon","InlineAIPrompt","Label","LinearGauge","ListBox","ListView","LLMKit","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"],ve=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 Yt=zt(Vt(Ht(import.meta.url)),"../proto/service.proto"),K=new z(process.env.CONTEXTAPI_URL,Yt,{libName:E});var we=async()=>K.validateUserLicense();import yo from"fs";import Pt from"path";import{fileURLToPath as bo}from"url";import{z as b}from"zod";var I=class{constructor(t,o,n){this.name=t;this.config=o;this.cb=n}register(t){this.server=t,this.server.registerTool(this.name,this.config,this.cb)}hasAccess(t){return!this.config.requiredAccess||this.config.requiredAccess.length===0?!0:t==="full"||this.config.requiredAccess.includes(t)}};var j=e=>{let t=[`1. \`${e.accessibilityAssistantName}\`: Call first with \`includeGeneralGuidelines=true\`; use \`false\` for component-specific follow-ups.`];if(e.includeLayout){let r=e.includeResponsive?"structure, responsive behavior, and UX policy":"structure and UX policy";t.push(`${t.length+1}. \`${e.layoutAssistantName}\`: Get Kendo Design System utilities for the requested ${r}. Use only those utilities for styling and layout.`)}if(e.includeTheming&&t.push(`${t.length+1}. \`${e.styleAssistantName}\`: Generate the requested Kendo theme variables.`),e.includeIcons&&t.push(`${t.length+1}. \`${e.iconAssistantName}\`: Find icons only for the required actions and states.`),e.includeComponentsDocs){let r=e.components?.length?e.components.join(", "):"each Kendo component selected for the implementation";t.push(`${t.length+1}. \`${e.codeAssistantName}\`: Call once per component (${r}) with a concise, feature-specific query before writing Kendo markup.`)}t.push(`${t.length+1}. After each assistant call, use the output to decide how to incorporate the guidance into the feature where applicable.`),t.push(`${t.length+1}. Implement the requested UI using ${e.suiteName} components and the gathered guidance.`),t.push(`${t.length+1}. Run \`npm run build\`, resolve failures, and repeat until it succeeds.`);let o=e.libKey==="angular"?"- Before editing, inspect the project for Standalone or NgModule setup, built-in or structural template syntax, and the existing Kendo theme import mechanism. Match those conventions; default to Standalone and built-in control flow for Angular 17+ only when no existing pattern is found.":"- Use React function components, Hooks, typed props where needed, stable list keys, and the project's existing KendoReact theme and package setup.",n=e.libKey==="angular"?`
6
6
  - When drag-and-drop is required, consider the DragAndDrop and Sortable components.`:"";return`# ${e.suiteName} Execution Plan
7
7
 
8
8
  <orchestrator-plan>
@@ -27,7 +27,7 @@ ${t.map(r=>` ${r}`).join(`
27
27
  - Required Kendo component, accessibility, layout, and framework-specific requirements are implemented.
28
28
  - Do not report completion while either condition is unresolved.
29
29
  </completion>
30
- </orchestrator-plan>`};var te=e=>{let t=e.components?.length?e.components.join(", "):"each Kendo component selected for the implementation",o=[`1. \`${e.codeAssistantName}\`: Call once per component (${t}) with a concise, feature-specific query before writing Kendo markup.`];return e.includeIcons&&o.push(`${o.length+1}. \`${e.iconAssistantName}\`: Find icons only for the required actions and states.`),o.push(`${o.length+1}. Implement using the gathered ${e.suiteName} documentation.`),o.push(`${o.length+1}. Run \`npm run build\`, resolve failures, and repeat until it succeeds.`),`# ${e.suiteName} Execution Plan
30
+ </orchestrator-plan>`};var oe=e=>{let t=e.components?.length?e.components.join(", "):"each Kendo component selected for the implementation",o=[`1. \`${e.codeAssistantName}\`: Call once per component (${t}) with a concise, feature-specific query before writing Kendo markup.`];return e.includeIcons&&o.push(`${o.length+1}. \`${e.iconAssistantName}\`: Find icons only for the required actions and states.`),o.push(`${o.length+1}. Implement using the gathered ${e.suiteName} documentation.`),o.push(`${o.length+1}. Run \`npm run build\`, resolve failures, and repeat until it succeeds.`),`# ${e.suiteName} Execution Plan
31
31
 
32
32
  <assistant-plan>
33
33
  <workflow-id>${e.workflowId}</workflow-id>
@@ -45,7 +45,7 @@ ${o.map(n=>` ${n}`).join(`
45
45
  - \`npm run build\` succeeds without errors.
46
46
  - Do not report completion while the build is failing.
47
47
  </completion>
48
- </assistant-plan>`};var M=()=>`## UX/UI Design Best Practices
48
+ </assistant-plan>`};var $=()=>`## UX/UI Design Best Practices
49
49
 
50
50
  Follow the constraints and conventions unless the prompt or project defines a stronger convention. Accessibility and WCAG rules always override other guidance.
51
51
 
@@ -103,7 +103,7 @@ Follow the constraints and conventions unless the prompt or project defines a st
103
103
 
104
104
  ### Dialog vs Window
105
105
  - Dialog: blocking choice or confirmation; title should be action-oriented
106
- - Window: non-modal content that can stay alongside the background(resizable/draggable panels, editors)`;var oe=()=>`
106
+ - Window: non-modal content that can stay alongside the background(resizable/draggable panels, editors)`;var ne=()=>`
107
107
  **REQUIRED ACTIONS \u2014 apply all fixes directly to the source files:**
108
108
  - Search all .ts files for every outdated API mentioned in the codemod output \u2014 this includes renamed or removed properties, method names, and enum values.
109
109
  - Search all .ts, .css, and .scss files for every outdated CSS class mentioned in the codemod output and update it with an appropriate replacement.
@@ -116,29 +116,30 @@ Follow the constraints and conventions unless the prompt or project defines a st
116
116
  **OUTPUT REQUIREMENTS:**
117
117
  - For each file you change, briefly describe what was wrong and what fix you applied
118
118
  - If a problem requires a decision from the developer that you cannot make automatically, call it out explicitly with the file path
119
- - If all automated changes look correct and no further fixes are needed, explicitly confirm this`;import{execFile as Xt}from"child_process";import{access as Jt}from"fs/promises";import{promisify as Zt}from"util";import{randomUUID as ne}from"node:crypto";var xe="progress.com/kendo-ui-workflow-session-id";function Ae(e){return typeof e=="string"&&e.length>0&&e.length<200&&/^[\x20-\x7e]+$/.test(e)}var Ce=900*1e3;function Ie(){return{sessionId:ne(),expiresAt:Date.now()+Ce}}var H=Ie();function Qt(){return Date.now()>=H.expiresAt&&(H=Ie()),H}function Se(e){let t=e._meta?.[xe],n=t!==void 0&&!Ae(t);return Ae(t)?{sessionId:t,sessionSource:"semantic",explicitSessionIdRejected:!1}:{sessionId:Qt().sessionId,sessionSource:"fallback",explicitSessionIdRejected:n}}function Te(e,t){return{langfuseSessionId:e.sessionId,toolInvocationId:ne(),mcpToolName:t,workflowSessionSource:e.sessionSource,workflowSessionExplicitIdRejected:e.explicitSessionIdRejected}}function $(e,t,o){let n=o?{...e,_meta:{...e._meta,[xe]:o}}:e;return Te(Se(n),t)}function re(e,t){let o=Se(e),n=o.sessionSource==="semantic"?o:{sessionId:ne(),sessionSource:"fallback",explicitSessionIdRejected:o.explicitSessionIdRejected};return n.sessionSource==="fallback"&&(H={sessionId:n.sessionId,expiresAt:Date.now()+Ce}),{metadata:Te(n,t)}}var Re=Zt(Xt);function eo(e,t){let o;try{o=JSON.parse(e)}catch{return e}let n=o?.Item;if(!n)return e;let r=[],s=n.FullName??n.Name??"",a=n.Type??"",l=n.Summary??"",g=n.SyntaxContent??"";r.push(`## API Reference Item
119
+ - If all automated changes look correct and no further fixes are needed, explicitly confirm this`;import{execFile as Xt}from"child_process";import{access as Jt}from"fs/promises";import{promisify as Zt}from"util";import{randomUUID as re}from"node:crypto";var xe="progress.com/kendo-ui-workflow-session-id";function Ae(e){return typeof e=="string"&&e.length>0&&e.length<200&&/^[\x20-\x7e]+$/.test(e)}var Ce=900*1e3;function Ie(){return{sessionId:re(),expiresAt:Date.now()+Ce}}var H=Ie();function Qt(){return Date.now()>=H.expiresAt&&(H=Ie()),H}function Se(e){let t=e._meta?.[xe],n=t!==void 0&&!Ae(t);return Ae(t)?{sessionId:t,sessionSource:"semantic",explicitSessionIdRejected:!1}:{sessionId:Qt().sessionId,sessionSource:"fallback",explicitSessionIdRejected:n}}function Te(e,t){return{langfuseSessionId:e.sessionId,toolInvocationId:re(),mcpToolName:t,workflowSessionSource:e.sessionSource,workflowSessionExplicitIdRejected:e.explicitSessionIdRejected}}function q(e,t,o){let n=o?{...e,_meta:{...e._meta,[xe]:o}}:e;return Te(Se(n),t)}function se(e,t){let o=Se(e),n=o.sessionSource==="semantic"?o:{sessionId:re(),sessionSource:"fallback",explicitSessionIdRejected:o.explicitSessionIdRejected};return n.sessionSource==="fallback"&&(H={sessionId:n.sessionId,expiresAt:Date.now()+Ce}),{metadata:Te(n,t)}}var Re=Zt(Xt);function eo(e,t){let o;try{o=JSON.parse(e)}catch{return e}let n=o?.Item;if(!n)return e;let r=[],s=n.FullName??n.Name??"",a=n.Type??"",l=n.Summary??"",g=n.SyntaxContent??"";r.push(`## API Reference Item
120
120
  - Name: ${s}
121
121
  - Type: ${a}
122
122
  - Summary: ${l}
123
- - Syntax: ${g}`);let p=o.RelatedItemsByType?.return_type;if(p?.length){let i=p[0].Text;i&&r.push(`- Return Type: ${i}`)}let h=n.Examples??[];if(h.length>0){let i=`## Examples
124
- `,c=0;for(let y of h){let f=(y.Component??"").toLowerCase(),d=t.toLowerCase();if(f&&f!==d&&f!=="general")continue;c+=1;let A=y.Code??"";i+=`### Example ${c}
123
+ - Syntax: ${g}`);let d=o.RelatedItemsByType?.return_type;if(d?.length){let i=d[0].Text;i&&r.push(`- Return Type: ${i}`)}let h=n.Examples??[];if(h.length>0){let i=`## Examples
124
+ `,c=0;for(let f of h){let y=(f.Component??"").toLowerCase(),p=t.toLowerCase();if(y&&y!==p&&y!=="general")continue;c+=1;let A=f.Code??"";i+=`### Example ${c}
125
125
  \`\`\`
126
126
  ${A}
127
127
  \`\`\`
128
- `}c>0&&r.push(i)}let k=o.RelatedItemsByType??{},m=[];for(let[i,c]of Object.entries(k))if(!(i==="return_type"||i==="render_fragment"))for(let y of c??[]){let f=y.FullName??"",d=y.ShortText??"";m.push(`### ${f} (${i})
129
- ${d}`)}return m.length>0&&r.push(`## Additional Context
128
+ `}c>0&&r.push(i)}let k=o.RelatedItemsByType??{},m=[];for(let[i,c]of Object.entries(k))if(!(i==="return_type"||i==="render_fragment"))for(let f of c??[]){let y=f.FullName??"",p=f.ShortText??"";m.push(`### ${y} (${i})
129
+ ${p}`)}return m.length>0&&r.push(`## Additional Context
130
130
  `+m.join(`
131
131
  ---
132
132
  `)),r.join(`
133
133
 
134
- `)}function Ee(e,t){let{name:o,title:n,description:r,layoutAssistantName:s,codeAssistantName:a,styleAssistantName:l,iconAssistantName:g,accessibilityAssistantName:p,suiteName:h,libKey:k,components:m}=e,i=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{userIntent:b.string().describe(`Detailed description and intent of what the user wants to build. Include the type of page/component, main functionality, visual requirements, and any specific ${h} components you want to use.`),needsComponentsDocsConfidence:b.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:b.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:b.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:b.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:b.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:b.array(b.enum(m)).optional().describe(`Optional list of specific ${h} components needed for the project.`)}},async({userIntent:c,needsComponentsDocsConfidence:y,needsLayoutConfidence:f,needsStylingConfidence:d,needsResponsiveBehaviorConfidence:A,needsIconsConfidence:C,componentsNeeded:G},R)=>{let T=re(R,o),ie={...S(i,R._meta),...T.metadata};v("UI Orchestrator called with:",{userIntent:c,needsComponentsDocsConfidence:y,needsLayoutConfidence:f,needsStylingConfidence:d,needsResponsiveBehaviorConfidence:A,needsIconsConfidence:C});let N={componentsDocs:y>.3,layout:f>.5,theming:d>.6,responsive:f>.5&&A>.4,icons:C>.6};try{await t.recordOrchestratorUserRequest({meta:{...ie,userIntent:c,componentsNeeded:G,confidence:{componentsDocs:y,layout:f,styling:d,responsive:A,icons:C},routing:N}})}catch(_){if(!Le(_))throw O(_);v("Unable to record UI orchestrator trace metadata:",_)}let E=i.server?.server.getClientCapabilities?.()?.elicitation,j;if(E&&d>.3&&d<=.6){let _=await i.server?.server.elicitInput({message:"I was unable to determine if you need custom Kendo Theme assistant. Can you please confirm?",requestedSchema:{type:"object",properties:{includeCustomTheming:{type:"boolean",description:"Whether to include Custom Theming assistance in the workflow."}},required:["includeCustomTheming"]}});_?.action==="accept"&&_.content?.includeCustomTheming&&(j=!0)}return{content:[{type:"text",text:K({name:o,workflowId:T.metadata.langfuseSessionId,userIntent:c,includeComponentsDocs:y>.3,includeTheming:d>.6||!!j,includeLayout:f>.5,includeIcons:C>.6,includeResponsive:f>.5&&A>.4,layoutAssistantName:s,codeAssistantName:a,styleAssistantName:l,iconAssistantName:g,accessibilityAssistantName:p,suiteName:h,libKey:k,components:G})}]}});return i}function Ue(e,t){let{name:o,title:n,description:r,iconAssistantName:s,codeAssistantName:a,suiteName:l,libKey:g,components:p}=e,h=new I(o,{title:n,description:r,inputSchema:{userIntent:b.string().describe(`Describe what you want to build or what components you're looking for. Include the type of functionality, features, or UI elements you need from ${l}.`),needsIconsConfidence:b.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:b.array(b.enum(p)).optional().describe(`Optional list of specific ${l} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:k,needsIconsConfidence:m,componentsNeeded:i},c)=>{let y=re(c,o),f={...S(h,c._meta),...y.metadata};v("Assistant Orchestrator called with:",{userIntent:k,needsIconsConfidence:m,componentsNeeded:i});let d={componentsDocs:!0,icons:m>.5};try{await t.recordOrchestratorUserRequest({meta:{...f,userIntent:k,componentsNeeded:i,confidence:{icons:m},routing:d}})}catch(C){if(!Le(C))throw O(C);v("Unable to record assistant orchestrator trace metadata:",C)}return{content:[{type:"text",text:te({name:o,workflowId:y.metadata.langfuseSessionId,userIntent:k,includeComponentsDocs:!0,includeIcons:m>.5,codeAssistantName:a,iconAssistantName:s,suiteName:l,libKey:g,components:i})}]}});return h}function Pe(e,t){let{name:o,title:n,description:r,getPreContent:s}=e,a=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),prompt:b.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve.")}},async({workflowId:l,prompt:g},p)=>{let h={...S(a,p._meta),...$(p,o,l)};v("Layout Assistant called with:",{prompt:g});try{let m=(await t.queryCssUtils({query:g},{...h})).values.join(`
134
+ `)}function Ee(e,t){let{name:o,title:n,description:r,layoutAssistantName:s,codeAssistantName:a,styleAssistantName:l,iconAssistantName:g,accessibilityAssistantName:d,suiteName:h,libKey:k,components:m}=e,i=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{userIntent:b.string().describe(`Detailed description and intent of what the user wants to build. Include the type of page/component, main functionality, visual requirements, and any specific ${h} components you want to use.`),needsComponentsDocsConfidence:b.number().min(0).max(1).default(1).describe("Confidence (0-1) to include Component Documentation assistance. Default is 1."),needsLayoutConfidence:b.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Layout assistance. Default is 0."),needsStylingConfidence:b.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Theming/Styling assistance. Default is 0."),needsResponsiveBehaviorConfidence:b.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Responsive Behavior assistance. Default is 0."),needsIconsConfidence:b.number().min(0).max(1).default(0).describe("Confidence (0-1) to include Icons assistance. Default is 0."),componentsNeeded:b.array(b.enum(m)).optional().describe(`Optional list of specific ${h} components needed for the project.`)}},async({userIntent:c,needsComponentsDocsConfidence:f,needsLayoutConfidence:y,needsStylingConfidence:p,needsResponsiveBehaviorConfidence:A,needsIconsConfidence:C,componentsNeeded:_},N)=>{let T=se(N,o),le={...S(i,N._meta),...T.metadata};v("UI Orchestrator called with:",{userIntent:c,needsComponentsDocsConfidence:f,needsLayoutConfidence:y,needsStylingConfidence:p,needsResponsiveBehaviorConfidence:A,needsIconsConfidence:C});let Y=i.server?.server.getClientCapabilities?.()?.elicitation,R;if(Y&&p>.3&&p<=.6){let L=await i.server?.server.elicitInput({message:"I was unable to determine if you need custom Kendo Theme assistant. Can you please confirm?",requestedSchema:{type:"object",properties:{includeCustomTheming:{type:"boolean",description:"Whether to include Custom Theming assistance in the workflow."}},required:["includeCustomTheming"]}});L?.action==="accept"&&L.content?.includeCustomTheming&&(R=!0)}let D={componentsDocs:f>.3,layout:y>.5,theming:p>.6||!!R,responsive:y>.5&&A>.4,icons:C>.6};try{await t.recordOrchestratorUserRequest({meta:{...le,userIntent:c,componentsNeeded:_,confidence:{componentsDocs:f,layout:y,styling:p,responsive:A,icons:C},routing:D}})}catch(L){if(!Le(L))throw G(L);v("Unable to record UI orchestrator trace metadata:",L)}return{content:[{type:"text",text:j({name:o,workflowId:T.metadata.langfuseSessionId,userIntent:c,includeComponentsDocs:D.componentsDocs,includeTheming:D.theming,includeLayout:D.layout,includeIcons:D.icons,includeResponsive:D.responsive,layoutAssistantName:s,codeAssistantName:a,styleAssistantName:l,iconAssistantName:g,accessibilityAssistantName:d,suiteName:h,libKey:k,components:_})}]}});return i}function Pe(e,t){let{name:o,title:n,description:r,iconAssistantName:s,codeAssistantName:a,suiteName:l,libKey:g,components:d}=e,h=new I(o,{title:n,description:r,inputSchema:{userIntent:b.string().describe(`Describe what you want to build or what components you're looking for. Include the type of functionality, features, or UI elements you need from ${l}.`),needsIconsConfidence:b.number().min(0).max(1).default(.7).describe("Confidence (0-1) to include Icons assistance. Default is 0.7."),componentsNeeded:b.array(b.enum(d)).optional().describe(`Optional list of specific ${l} components you want to learn about.`)},requiredAccess:e.requiredAccess},async({userIntent:k,needsIconsConfidence:m,componentsNeeded:i},c)=>{let f=se(c,o),y={...S(h,c._meta),...f.metadata};v("Assistant Orchestrator called with:",{userIntent:k,needsIconsConfidence:m,componentsNeeded:i});let p={componentsDocs:!0,icons:m>.5};try{await t.recordOrchestratorUserRequest({meta:{...y,userIntent:k,componentsNeeded:i,confidence:{icons:m},routing:p}})}catch(C){if(!Le(C))throw G(C);v("Unable to record assistant orchestrator trace metadata:",C)}return{content:[{type:"text",text:oe({name:o,workflowId:f.metadata.langfuseSessionId,userIntent:k,includeComponentsDocs:!0,includeIcons:m>.5,codeAssistantName:a,iconAssistantName:s,suiteName:l,libKey:g,components:i})}]}});return h}function Ue(e,t){let{name:o,title:n,description:r,getPreContent:s}=e,a=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),prompt:b.string().describe("An enhanced prompt describing the HTML layout structure, design requirements or specific visual effects you want to achieve.")}},async({workflowId:l,prompt:g},d)=>{let h={...S(a,d._meta),...q(d,o,l)};v("Layout Assistant called with:",{prompt:g});try{let m=(await t.queryCssUtils({query:g},{...h})).values.join(`
135
+
135
136
  `)||"No CSS utilities found for the given prompt.";return m=`${s?.()??""}
136
137
 
137
138
  # Kendo Design System CSS Utilities
138
139
  ${m}
139
- `,{content:[{type:"text",text:m}]}}catch(k){throw O(k)}});return a}function De(e,t){let{name:o,title:n,description:r,libKey:s,getPreContent:a}=e,l=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),prompt:b.string().describe("A natural language description of the desired visual style or theme. For example: 'Create a modern dark theme with high contrast'.")}},async({workflowId:g,prompt:p},h)=>{let k={...S(l,h._meta),...$(h,o,g)};v("Style Assistant called with:",{prompt:p});let m="";try{let y=await t.queryThemeGenerate({prompt:p},{...k});if(y.variables_json){let f=JSON.parse(y.variables_json),d=[];if(f)for(let A of Object.keys(f))typeof f[A]=="string"&&d.push(`${A}: ${f[A]}`);m=d.join(`
140
+ `,{content:[{type:"text",text:m}]}}catch(k){throw G(k)}});return a}function De(e,t){let{name:o,title:n,description:r,libKey:s,getPreContent:a}=e,l=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),prompt:b.string().describe("A natural language description of the desired visual style or theme. For example: 'Create a modern dark theme with high contrast'.")}},async({workflowId:g,prompt:d},h)=>{let k={...S(l,h._meta),...q(h,o,g)};v("Style Assistant called with:",{prompt:d});let m="";try{let f=await t.queryThemeGenerate({prompt:d},{...k});if(f.variables_json){let y=JSON.parse(f.variables_json),p=[];if(y)for(let A of Object.keys(y))typeof y[A]=="string"&&p.push(`${A}: ${y[A]}`);m=p.join(`
140
141
 
141
- `)}}catch(y){throw O(y)}let i=a?.()??"";return{content:[{type:"text",text:m?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
142
+ `)}}catch(f){throw G(f)}let i=a?.()??"";return{content:[{type:"text",text:m?`Use the following CSS variables to style the web application, including colors, typography, spacing, and component appearance.
142
143
  Ensure the variables are applied consistently across all relevant elements.
143
144
  Do NOT set any inline styles. CSS variables should be defined in global or component-level CSS files, or via supported theming mechanisms.
144
145
 
@@ -149,25 +150,25 @@ ${i}
149
150
  \`\`\`css
150
151
  ${m}
151
152
  \`\`\`
152
- `:"No CSS variables were generated for the given prompt."}]}});return l}function Oe(e,t){let{name:o,title:n,description:r,libKey:s,getPostContent:a}=e,l=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),query:b.string().describe("A search query for finding icons. Be specific about the icon purpose, style, or action."),limit:b.number().min(.1).max(1).default(.1).describe("The proportion of matching icons to return (0.1 = 1 icon, 0.5 = 5 icons, 1.0 = many icons). Default is 0.1.")}},async({workflowId:g,query:p,limit:h},k)=>{let m={...S(l,k._meta),...$(k,o,g)};v("Icon Search called with:",{query:p,limit:h});try{let i=await t.queryIconsSearch({query:p,limit:h*100},{...m}),c=a?.()??"";return{content:[{type:"text",text:`${i.values.join(`
153
+ `:"No CSS variables were generated for the given prompt."}]}});return l}function Oe(e,t){let{name:o,title:n,description:r,libKey:s,getPostContent:a}=e,l=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),query:b.string().describe("A search query for finding icons. Be specific about the icon purpose, style, or action."),limit:b.number().min(.1).max(1).default(.1).describe("The proportion of matching icons to return (0.1 = 1 icon, 0.5 = 5 icons, 1.0 = many icons). Default is 0.1.")}},async({workflowId:g,query:d,limit:h},k)=>{let m={...S(l,k._meta),...q(k,o,g)};v("Icon Search called with:",{query:d,limit:h});try{let i=await t.queryIconsSearch({query:d,limit:h*100},{...m}),c=a?.()??"";return{content:[{type:"text",text:`${i.values.join(`
153
154
 
154
155
  `)}
155
156
 
156
- ${c}`}]}}catch(i){throw O(i)}});return l}function Ge(e,t){let{name:o,title:n,description:r,libKey:s,suiteName:a,components:l,componentAliases:g,getPostContent:p}=e,h=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),query:b.string().describe("The query to search for."),component:b.enum(l).describe("The component to search for. If not specified, use General.")}},async({workflowId:k,query:m,component:i},c)=>{let y={...S(h,c._meta),...$(c,o,k)};v("Code Assistant called with:",{query:m,component:i});let f=i;if(g){let d=g[i];d&&(f=d)}try{let A=(await t.query({query:m,component:f?.toLowerCase()??"general",lib_name:s,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]},{...y})).values.map(R=>R.replace(/\0/g,"")),C=p?.({component:i})??"";return{content:[{type:"text",text:`${A.join(`
157
+ ${c}`}]}}catch(i){throw G(i)}});return l}function Ge(e,t){let{name:o,title:n,description:r,libKey:s,suiteName:a,components:l,componentAliases:g,getPostContent:d}=e,h=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),query:b.string().describe("The query to search for."),component:b.enum(l).describe("The component to search for. If not specified, use General.")}},async({workflowId:k,query:m,component:i},c)=>{let f={...S(h,c._meta),...q(c,o,k)};v("Code Assistant called with:",{query:m,component:i});let y=i;if(g){let p=g[i];p&&(y=p)}try{let A=(await t.query({query:m,component:y?.toLowerCase()??"general",lib_name:s,text_matches_count:3,code_matches_count:0,allowed_types:["documentation"]},{...f})).values.map(N=>N.replace(/\0/g,"")),C=d?.({component:i})??"";return{content:[{type:"text",text:`${A.join(`
157
158
 
158
159
  `)}
159
160
 
160
- ${C}`}]}}catch(d){throw O(d)}});return h}function _e(e,t){let{name:o,title:n,description:r,libKey:s,suiteName:a,components:l,componentAliases:g}=e,p=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),query:b.string().describe("The query to search for."),component:b.enum(l).describe("The component to search for. If not specified, use General."),includeGeneralGuidelines:b.boolean().default(!1).describe("Set to true only on the first call to include comprehensive WCAG 2.2 Level AA general guidelines. After the first call, set to false to get only component-specific accessibility information. Default is false.")}},async({workflowId:h,query:k,component:m,includeGeneralGuidelines:i},c)=>{let y={...S(p,c._meta),...$(c,o,h)};v("Accessibility Assistant called with:",{query:k,component:m,includeGeneralGuidelines:i});let f=m;if(g){let d=g[m];d&&(f=d)}try{let d="";if(i){let T=ye();d+=`# WCAG 2.2 Level AA General Accessibility Guidelines
161
+ ${C}`}]}}catch(p){throw G(p)}});return h}function _e(e,t){let{name:o,title:n,description:r,libKey:s,suiteName:a,components:l,componentAliases:g}=e,d=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workflowId:b.string().optional().describe("Workflow ID returned by the UI orchestrator. Pass it unchanged to associate this call with that orchestrator."),query:b.string().describe("The query to search for."),component:b.enum(l).describe("The component to search for. If not specified, use General."),includeGeneralGuidelines:b.boolean().default(!1).describe("Set to true only on the first call to include comprehensive WCAG 2.2 Level AA general guidelines. After the first call, set to false to get only component-specific accessibility information. Default is false.")}},async({workflowId:h,query:k,component:m,includeGeneralGuidelines:i},c)=>{let f={...S(d,c._meta),...q(c,o,h)};v("Accessibility Assistant called with:",{query:k,component:m,includeGeneralGuidelines:i});let y=m;if(g){let p=g[m];p&&(y=p)}try{let p="";if(i){let T=ye();p+=`# WCAG 2.2 Level AA General Accessibility Guidelines
161
162
 
162
- `,d+=T,d+=`
163
+ `,p+=T,p+=`
163
164
 
164
165
  ---
165
166
 
166
- `}let R=(await t.getApiRefMatches({query:k,component:f?.toLowerCase()??"general",lib_name:s,filters_json:'{"type":{"$in":["accessibility"]}}'},{...y})).values.map(T=>T.replace(/\0/g,"")).map(T=>eo(T,f?.toLowerCase()??"general")).join(`
167
+ `}let N=(await t.getApiRefMatches({query:k,component:y?.toLowerCase()??"general",lib_name:s,filters_json:'{"type":{"$in":["accessibility"]}}'},{...f})).values.map(T=>T.replace(/\0/g,"")).map(T=>eo(T,y?.toLowerCase()??"general")).join(`
167
168
 
168
- `);return R?(i&&(d+=`# Component-Specific Accessibility Information
169
+ `);return N?(i&&(p+=`# Component-Specific Accessibility Information
169
170
 
170
- `),d+=R):i||(d="No component-specific accessibility guidelines found."),{content:[{type:"text",text:d}]}}catch(d){throw O(d)}});return p}function Le(e){let t=e?.code;return typeof t=="number"&&t!==16&&t!==7&&t!==8}function O(e){let t=e;return t.code===16?new Error("Error: You are not authenticated. Please verify the Telerik License Key provided is valid."):t.code===8?new Error(`Error: You have exceeded the extension quota. Upgrade to subscription licensing to unlock full access. Message: ${t.message}.`):t.code===7?new Error("Error: You do not have permission to access this resource. Please verify that you have a valid license."):new Error(`Error: An error occurred while calling the service. Please try again later.
171
+ `),p+=N):i||(p="No component-specific accessibility guidelines found."),{content:[{type:"text",text:p}]}}catch(p){throw G(p)}});return d}function Le(e){let t=e?.code;return typeof t=="number"&&t!==16&&t!==7&&t!==8}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.
171
172
 
172
173
  Error Code: ${t.code} Error Message: ${t.message}`)}var to=20*1024*1024,Me=1200*1e3;function Ne(e){return{content:[{type:"text",text:`Upgrade timed out after ${Me/6e4} minutes.
173
174
 
@@ -176,14 +177,14 @@ Error Code: ${t.code} Error Message: ${t.message}`)}var to=20*1024*1024,Me=1200*
176
177
  To complete the upgrade, run this tool again with specific package names via the \`packageNames\` parameter to upgrade one package at a time.${e?`
177
178
 
178
179
  ## Partial output before timeout
179
- `+e:""}`}]}}function $e(e,t){let{name:o,title:n,description:r,suiteName:s,packagePrefix:a}=e,l=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workingDirectory:b.string().describe('The absolute path to the project directory where the upgrade should be executed (e.g., "/Users/username/my-app")'),packageNames:b.array(b.string()).optional().describe(`The package names to target for codemod upgrade (e.g., ["${a}grid", "${a}buttons"]). Defaults to upgrading all installed @progress packages if not specified. When specified, skips package installation and only runs codemods \u2014 the packages must already be installed at the target version before calling this tool.`),skipInstall:b.boolean().optional().describe("Skip npm package installation and only run codemods. Use this when package installation has already been done manually.")}},async({workingDirectory:g,packageNames:p,skipInstall:h},{_meta:k})=>{let m=S(l,k);try{await t.recordToolUserRequest({toolName:o,meta:m})}catch(i){console.error("Error recording tool request:",i)}try{try{await Jt(g)}catch{return{content:[{type:"text",text:`The working directory does not exist: "${g}". Please provide a valid absolute path to your project.`}]}}let i=!1;try{await Re("npx",["--no","--","kendo","--version"],{cwd:g}),i=!0}catch{i=!1}let c=[],y=async(N,le=!1)=>{try{let E=!le&&i?["--no","--","kendo",...N]:["-y","@progress/kendo-cli",...N],{stdout:j,stderr:ce}=await Re("npx",E,{cwd:g,maxBuffer:to,timeout:Me});return{timedOut:!1,stdout:j,stderr:ce}}catch(E){return E.killed?{timedOut:!0,partialOutput:E.stdout?.trim()}:{timedOut:!1,stdout:E.stdout||"",stderr:E.stderr||E.message}}},f=["migrate",...p??[],"--codemods","--force","--ai-mode"];(h||p?.length)&&f.push("--no-install");let d=await y(f);if(d.timedOut)return Ne(d.partialOutput);let A=d.stdout,C=d.stderr;if(C?.includes("Unknown argument")){let N=await y(f,!0);if(N.timedOut)return Ne(N.partialOutput);A=N.stdout,C=N.stderr}C?.trim()&&c.push(`
180
+ `+e:""}`}]}}function $e(e,t){let{name:o,title:n,description:r,suiteName:s,packagePrefix:a}=e,l=new I(o,{title:n,description:r,requiredAccess:e.requiredAccess,inputSchema:{workingDirectory:b.string().describe('The absolute path to the project directory where the upgrade should be executed (e.g., "/Users/username/my-app")'),packageNames:b.array(b.string()).optional().describe(`The package names to target for codemod upgrade (e.g., ["${a}grid", "${a}buttons"]). Defaults to upgrading all installed @progress packages if not specified. When specified, skips package installation and only runs codemods \u2014 the packages must already be installed at the target version before calling this tool.`),skipInstall:b.boolean().optional().describe("Skip npm package installation and only run codemods. Use this when package installation has already been done manually.")}},async({workingDirectory:g,packageNames:d,skipInstall:h},{_meta:k})=>{let m=S(l,k);try{await t.recordToolUserRequest({toolName:o,meta:m})}catch(i){console.error("Error recording tool request:",i)}try{try{await Jt(g)}catch{return{content:[{type:"text",text:`The working directory does not exist: "${g}". Please provide a valid absolute path to your project.`}]}}let i=!1;try{await Re("npx",["--no","--","kendo","--version"],{cwd:g}),i=!0}catch{i=!1}let c=[],f=async(U,Y=!1)=>{try{let R=!Y&&i?["--no","--","kendo",...U]:["-y","@progress/kendo-cli",...U],{stdout:D,stderr:ce}=await Re("npx",R,{cwd:g,maxBuffer:to,timeout:Me});return{timedOut:!1,stdout:D,stderr:ce}}catch(R){return R.killed?{timedOut:!0,partialOutput:R.stdout?.trim()}:{timedOut:!1,stdout:R.stdout||"",stderr:R.stderr||R.message}}},y=["migrate",...d??[],"--codemods","--force","--ai-mode"];(h||d?.length)&&y.push("--no-install");let p=await f(y);if(p.timedOut)return Ne(p.partialOutput);let A=p.stdout,C=p.stderr;if(C?.includes("Unknown argument")){let U=await f(y,!0);if(U.timedOut)return Ne(U.partialOutput);A=U.stdout,C=U.stderr}C?.trim()&&c.push(`
180
181
  Errors:
181
- ${C}`),A?.trim()&&c.push(A.trim());let G=A.includes("Packages installed successfully."),R=A.includes("Package installation failed:"),T=A.includes("Running codemod:");return R?c.push(`
182
+ ${C}`),A?.trim()&&c.push(A.trim());let _=A.includes("Packages installed successfully."),N=A.includes("Package installation failed:"),T=A.includes("Running codemod:");return N?c.push(`
182
183
  ## Upgrade Status
183
- Package installation failed. The npm packages were not updated. Inform the user of the error and update the package versions in package.json manually to the target version. Once done, call this tool again with skipInstall set to true.`):G&&c.push(`
184
+ Package installation failed. The npm packages were not updated. Inform the user of the error and update the package versions in package.json manually to the target version. Once done, call this tool again with skipInstall set to true.`):_&&c.push(`
184
185
  ## Upgrade Status
185
- Upgrade complete. npm packages have been installed and updated in the project.`),T&&c.push(oe()),{content:[{type:"text",text:c.join(`
186
- `)}]}}catch(i){return{content:[{type:"text",text:`Error: ${i.message||i.toString()}`}]}}});return l}var Be=e=>`${e}_ui_generator`,qe=e=>`${e}_assistant`,Fe=e=>`${e}_layout_assistant`,We=e=>`${e}_component_assistant`,Ke=e=>`${e}_style_assistant`,je=e=>`${e}_icon_assistant`,Ve=e=>`${e}_accessibility_assistant`,ze=e=>`${e}_getting_started_assistant`,He=e=>`${e}_upgrade_assistant`;var Ye=e=>`This is the single entry point for all UI-related tasks. It orchestrates the full workflow of building or refining UIs with ${e} components, generating a step-by-step execution plan that specifies which tools to call, in what order, and with what parameters. It includes validation steps to ensure the best possible, standards-compliant code every time.
186
+ Upgrade complete. npm packages have been installed and updated in the project.`),T&&c.push(ne()),{content:[{type:"text",text:c.join(`
187
+ `)}]}}catch(i){return{content:[{type:"text",text:`Error: ${i.message||i.toString()}`}]}}});return l}var qe=e=>`${e}_ui_generator`,Be=e=>`${e}_assistant`,Fe=e=>`${e}_layout_assistant`,We=e=>`${e}_component_assistant`,Ke=e=>`${e}_style_assistant`,je=e=>`${e}_icon_assistant`,Ve=e=>`${e}_accessibility_assistant`,ze=e=>`${e}_getting_started_assistant`,He=e=>`${e}_upgrade_assistant`;var Ye=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.
187
188
 
188
189
  Use the tool when:
189
190
  - Want to build or modify a complete page or section layout
@@ -267,7 +268,7 @@ Workflow:
267
268
  1. Run this upgrade tool to apply codemods.
268
269
  2. After the codemods complete, grep the project source files for every outdated value mentioned in the codemod output (e.g. old property names, renamed enum values) to find any remaining occurrences the codemod doesn't handle automatically, and fix them all.
269
270
  3. Follow the additional instructions to complete the upgrade process.
270
- `;var oo={createOrchestrator:Ee,createAssistantOrchestrator:Ue,createLayoutAssistant:Pe,createStyleAssistant:De,createIconSearch:Oe,createCodeAssistant:Ge,createAccessibilityAssistant:_e,createUpgrade:$e},no={orchestrator:Be,assistantOrchestrator:qe,layoutAssistant:Fe,codeAssistant:We,styleAssistant:Ke,iconAssistant:je,accessibilityAssistant:Ve,gettingStartedAssistant:ze,upgradeAssistant:He},ro={orchestrator:Ye,assistantOrchestrator:Qe,layoutAssistant:Xe,styleAssistant:Je,iconAssistant:Ze,codeAssistant:et,accessibilityAssistant:tt,upgradeAssistant:ot},so={Orchestrator:{render:K},UX:{getInstructions:M}},w={Tools:oo,ToolNames:no,ToolDescriptions:ro,Templates:so};var nt=()=>`# Kendo Design System Guidelines for ${u}
271
+ `;var oo={createOrchestrator:Ee,createAssistantOrchestrator:Pe,createLayoutAssistant:Ue,createStyleAssistant:De,createIconSearch:Oe,createCodeAssistant:Ge,createAccessibilityAssistant:_e,createUpgrade:$e},no={orchestrator:qe,assistantOrchestrator:Be,layoutAssistant:Fe,codeAssistant:We,styleAssistant:Ke,iconAssistant:je,accessibilityAssistant:Ve,gettingStartedAssistant:ze,upgradeAssistant:He},ro={orchestrator:Ye,assistantOrchestrator:Qe,layoutAssistant:Xe,styleAssistant:Je,iconAssistant:Ze,codeAssistant:et,accessibilityAssistant:tt,upgradeAssistant:ot},so={Orchestrator:{render:j},UX:{getInstructions:$}},w={Tools:oo,ToolNames:no,ToolDescriptions:ro,Templates:so};var nt=()=>`# Kendo Design System Guidelines for ${u}
271
272
 
272
273
  ## Setting up Styles/CSS
273
274
  Include a reference to the kendo-theme-utils CSS package and use the same import mechanism as the existing Kendo theme.
@@ -276,11 +277,13 @@ To install: \`npm install --save @progress/kendo-theme-utils\`
276
277
  Also available as SCSS - \`@use '@progress/kendo-theme-utils/scss/all.scss' as *;\`
277
278
  Alternatively, use CDN: \`<link rel="stylesheet" href="https://unpkg.com/@progress/kendo-theme-utils/dist/all.css" />\`
278
279
 
279
- ### Default Behavior
280
- - Use the Kendo Design System utilities for layout.
281
- - Use theme utility classes instead of custom CSS whenever a utility exists. Write custom CSS only for properties without a utility equivalent.
282
- - Do not use \`::ng-deep\` or \`/deep/\` overrides for Kendo internals when a utility or component configuration can express the rule.
280
+ ## Default Behavior
281
+ Follow these defaults unless the project conventions or request specify otherwise.
282
+ - Prefer Kendo Design System utilities for layout.
283
+ - Use custom CSS when component configuration and available utilities do not adequately support the required values, responsive behavior, or interaction states.
284
+ - Avoid overriding component internals when supported configuration or utilities can achieve the same result.
283
285
  - Prioritize using ${u} components instead of building ones from scratch.
286
+ - Before finalizing, ensure layout choices follow this order without compromising the requested design or behavior.
284
287
 
285
288
  - ${u} Card component.
286
289
  - Generally use 100% width (e.g., \`<kendo-card width="100%">\`)
@@ -983,6 +986,6 @@ Extended example:
983
986
  - Keep the label, control, hint and error for one field inside the same \`kendo-formfield\`.
984
987
  - If using radio buttons, group all related options within a single \`kendo-formfield\`.`;function mo(e){let t=e?.trim().toLowerCase();if(t==="grid")return[ct,yt].join(`
985
988
 
986
- `);if(t==="treelist")return dt;if(t==="listview")return pt;if(t==="scheduler")return ut;if(t==="window")return mt;if(t==="charts")return gt;if(t==="forms")return Ct;if(t==="badge")return vt;if(t==="pivotgrid")return wt;if(t==="label")return At;if(t==="floatinglabel")return xt;if(ht.includes(t))return ft(t);if(bt.includes(t))return kt(t)}var B=!!process.env.PLUGIN_MODE,It=w.ToolNames.layoutAssistant(P),se=w.ToolNames.codeAssistant(P),St=w.ToolNames.styleAssistant(P),ae=w.ToolNames.iconAssistant(P),Tt=w.ToolNames.gettingStartedAssistant(P),Rt=w.ToolNames.accessibilityAssistant(P),go=w.ToolNames.upgradeAssistant(P);function Nt(e,t){return[...B?[]:[w.Tools.createOrchestrator({name:w.ToolNames.orchestrator(P),title:"Kendo UI Generator",description:w.ToolDescriptions.orchestrator(u),layoutAssistantName:It,codeAssistantName:se,styleAssistantName:St,iconAssistantName:ae,accessibilityAssistantName:Rt,suiteName:u,libKey:U,components:F,requiredAccess:["agent"]},e),w.Tools.createAssistantOrchestrator({name:"kendo_angular_assistant",title:"Kendo UI Assistant",description:w.ToolDescriptions.assistantOrchestrator(u),codeAssistantName:se,iconAssistantName:ae,suiteName:u,libKey:U,components:F,requiredAccess:["assistant"]},e)],w.Tools.createLayoutAssistant({name:It,title:"Kendo UI Layout Assistant",description:w.ToolDescriptions.layoutAssistant,getPreContent:B?void 0:()=>`${nt()}
989
+ `);if(t==="treelist")return dt;if(t==="listview")return pt;if(t==="scheduler")return ut;if(t==="window")return mt;if(t==="charts")return gt;if(t==="forms")return Ct;if(t==="badge")return vt;if(t==="pivotgrid")return wt;if(t==="label")return At;if(t==="floatinglabel")return xt;if(ht.includes(t))return ft(t);if(bt.includes(t))return kt(t)}var B=!!process.env.PLUGIN_MODE,It=w.ToolNames.layoutAssistant(P),ae=w.ToolNames.codeAssistant(P),St=w.ToolNames.styleAssistant(P),ie=w.ToolNames.iconAssistant(P),Tt=w.ToolNames.gettingStartedAssistant(P),Rt=w.ToolNames.accessibilityAssistant(P),go=w.ToolNames.upgradeAssistant(P);function Nt(e,t){return[...B?[]:[w.Tools.createOrchestrator({name:w.ToolNames.orchestrator(P),title:"Kendo UI Generator",description:w.ToolDescriptions.orchestrator(u),layoutAssistantName:It,codeAssistantName:ae,styleAssistantName:St,iconAssistantName:ie,accessibilityAssistantName:Rt,suiteName:u,libKey:E,components:W,requiredAccess:["agent"]},e),w.Tools.createAssistantOrchestrator({name:"kendo_angular_assistant",title:"Kendo UI Assistant",description:w.ToolDescriptions.assistantOrchestrator(u),codeAssistantName:ae,iconAssistantName:ie,suiteName:u,libKey:E,components:W,requiredAccess:["assistant"]},e)],w.Tools.createLayoutAssistant({name:It,title:"Kendo UI Layout Assistant",description:w.ToolDescriptions.layoutAssistant,getPreContent:B?void 0:()=>`${nt()}
987
990
 
988
- ${M()}`,requiredAccess:["agent"]},e),w.Tools.createStyleAssistant({name:St,title:"Kendo UI Style Assistant",description:w.ToolDescriptions.styleAssistant,libKey:U,getPreContent:B?void 0:rt,requiredAccess:["agent"]},e),w.Tools.createIconSearch({name:ae,title:"Kendo UI Icon Assistant",description:w.ToolDescriptions.iconAssistant,libKey:U,getPostContent:B?void 0:at,requiredAccess:["assistant","agent"]},e),w.Tools.createCodeAssistant({name:se,title:"Kendo UI Component Assistant",description:w.ToolDescriptions.codeAssistant(u),libKey:U,suiteName:u,components:F,getPostContent:B?void 0:({component:n})=>{let r=mo(n);return it({component:n,componentInstructions:r})},requiredAccess:["assistant","agent"]},e),...B?[]:[(()=>{let n=new I(Tt,{title:"Kendo UI Getting Started",description:`Creates a new Angular project with Angular CLI and provides essential getting started guidance for ${u} including installation, configuration, and setup instructions.`,requiredAccess:["agent"],inputSchema:ke(u,"kendo-angular-app")},async({projectName:r,createNewProject:s,theme:a},{_meta:l})=>{let g=S(n,l);try{await e.recordToolUserRequest({toolName:Tt,meta:{projectName:r,createNewProject:s,theme:a,...g}})}catch(h){console.error("Error recording tool request:",h)}return{content:[{type:"text",text:lt(r,s,a)}]}});return n})()],w.Tools.createAccessibilityAssistant({name:Rt,title:"Kendo UI Accessibility Assistant",description:w.ToolDescriptions.accessibilityAssistant(u),libKey:U,suiteName:u,components:F,requiredAccess:["agent"]},e),w.Tools.createUpgrade({name:go,title:"Kendo UI Upgrade Assistant",description:w.ToolDescriptions.upgradeAssistant(u,"@progress/kendo-angular-"),suiteName:u,packagePrefix:"@progress/kendo-angular-",requiredAccess:["agent"]},e)].filter(n=>n.hasAccess(t))}var ko=bo(import.meta.url),vo=Ut.dirname(ko),wo=Ut.resolve(vo,"../package.json"),Pt=JSON.parse(yo.readFileSync(wo,"utf-8")),Et=new ho({name:"kendo-mcp",title:"Kendo MCP Server",version:Pt.version});async function Ao(){let e=new fo;v("Starting server...");let t=await fe(async()=>{let n=(await we())?.entitlement;return n?.Product?.Code||n?.product?.code});t!=="none"&&(W.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",Nt(W,t).forEach(n=>n.register(Et)),be({serverName:"angular",contextApi:W,enrichWithUserData:!0,additionalFields:{version:Pt.version,access_type:t}})),await Et.connect(e)}Ao();
991
+ ${$()}`,requiredAccess:["agent"]},e),w.Tools.createStyleAssistant({name:St,title:"Kendo UI Style Assistant",description:w.ToolDescriptions.styleAssistant,libKey:E,getPreContent:B?void 0:rt,requiredAccess:["agent"]},e),w.Tools.createIconSearch({name:ie,title:"Kendo UI Icon Assistant",description:w.ToolDescriptions.iconAssistant,libKey:E,getPostContent:B?void 0:at,requiredAccess:["assistant","agent"]},e),w.Tools.createCodeAssistant({name:ae,title:"Kendo UI Component Assistant",description:w.ToolDescriptions.codeAssistant(u),libKey:E,suiteName:u,components:W,getPostContent:B?void 0:({component:n})=>{let r=mo(n);return it({component:n,componentInstructions:r})},requiredAccess:["assistant","agent"]},e),...B?[]:[(()=>{let n=new I(Tt,{title:"Kendo UI Getting Started",description:`Creates a new Angular project with Angular CLI and provides essential getting started guidance for ${u} including installation, configuration, and setup instructions.`,requiredAccess:["agent"],inputSchema:ke(u,"kendo-angular-app")},async({projectName:r,createNewProject:s,theme:a},{_meta:l})=>{let g=S(n,l);try{await e.recordToolUserRequest({toolName:Tt,meta:{projectName:r,createNewProject:s,theme:a,...g}})}catch(h){console.error("Error recording tool request:",h)}return{content:[{type:"text",text:lt(r,s,a)}]}});return n})()],w.Tools.createAccessibilityAssistant({name:Rt,title:"Kendo UI Accessibility Assistant",description:w.ToolDescriptions.accessibilityAssistant(u),libKey:E,suiteName:u,components:W,requiredAccess:["agent"]},e),w.Tools.createUpgrade({name:go,title:"Kendo UI Upgrade Assistant",description:w.ToolDescriptions.upgradeAssistant(u,"@progress/kendo-angular-"),suiteName:u,packagePrefix:"@progress/kendo-angular-",requiredAccess:["agent"]},e)].filter(n=>n.hasAccess(t))}var ko=bo(import.meta.url),vo=Pt.dirname(ko),wo=Pt.resolve(vo,"../package.json"),Ut=JSON.parse(yo.readFileSync(wo,"utf-8")),Et=new ho({name:"kendo-mcp",title:"Kendo MCP Server",version:Ut.version});async function Ao(){let e=new fo;v("Starting server...");let t=await fe(async()=>{let n=(await we())?.entitlement;return n?.Product?.Code||n?.product?.code});t!=="none"&&(K.toolNameHeader=t==="agent"||t==="full"?"agent":"assistant",Nt(K,t).forEach(n=>n.register(Et)),be({serverName:"angular",contextApi:K,enrichWithUserData:!0,additionalFields:{version:Ut.version,access_type:t}})),await Et.connect(e)}Ao();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-mcp",
3
- "version": "1.10.1",
3
+ "version": "1.11.0",
4
4
  "type": "module",
5
5
  "bin": "./dist/index.js",
6
6
  "license": "See LICENSE.md",
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@grpc/grpc-js": "^1.14.5",
27
27
  "@grpc/proto-loader": "^0.8.1",
28
- "@modelcontextprotocol/sdk": "^1.30.1",
28
+ "@modelcontextprotocol/sdk": "^1.32.1",
29
29
  "@progress/kendo-licensing": "^1.11.3",
30
30
  "tslib": "^2.3.0"
31
31
  },