@ncds/ui-admin 1.6.4-alpha.0 → 1.6.4-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/mcp/bin/server.js CHANGED
@@ -13,6 +13,7 @@ const searchComponent_js_1 = require("./tools/searchComponent.js");
13
13
  const getComponentHtml_js_1 = require("./tools/getComponentHtml.js");
14
14
  const getComponentProps_js_1 = require("./tools/getComponentProps.js");
15
15
  const validateHtml_js_1 = require("./tools/validateHtml.js");
16
+ const ping_js_1 = require("./tools/ping.js");
16
17
  const version_js_1 = require("./version.js");
17
18
  const server = new mcp_js_1.McpServer({
18
19
  name: 'ncds-ui-admin',
@@ -21,6 +22,10 @@ const server = new mcp_js_1.McpServer({
21
22
  const main = async () => {
22
23
  // server.ts가 componentMap 소유 — tool 핸들러에 파라미터로 전달
23
24
  const componentMap = (0, dataLoader_js_1.loadComponentsFromDir)(dataLoader_js_1.DEFAULT_DATA_DIR);
25
+ const cdnMeta = (0, dataLoader_js_1.loadCdnMeta)(dataLoader_js_1.DEFAULT_DATA_DIR);
26
+ server.registerTool('ping', {
27
+ description: 'NCUA MCP 서버 연결 확인 + 버전 + capabilities/rules 조회',
28
+ }, () => (0, ping_js_1.ping)(componentMap, cdnMeta, version_js_1.VERSION));
24
29
  server.registerTool('list_components', {
25
30
  description: '사용 가능한 전체 UI 컴포넌트 목록을 가져옵니다.',
26
31
  }, () => (0, listComponents_js_1.listComponents)(componentMap));
@@ -53,7 +58,7 @@ const main = async () => {
53
58
  }, ({ html }) => (0, validateHtml_js_1.validateHtml)(componentMap, html));
54
59
  const transport = new stdio_js_1.StdioServerTransport();
55
60
  await server.connect(transport);
56
- logger_js_1.logger.info(`NCDS MCP 서버 시작됨 (ncds-ui-admin v${version_js_1.VERSION})`);
61
+ logger_js_1.logger.info(`NCUA MCP 서버 시작됨 (ncds-ui-admin v${version_js_1.VERSION})`);
57
62
  };
58
63
  main().catch((err) => {
59
64
  const message = err instanceof Error ? err.message : String(err);
File without changes
@@ -0,0 +1,11 @@
1
+ /**
2
+ * ping tool — NCUA MCP 서버 health check + capabilities/rules 제공 (순수 함수)
3
+ */
4
+ import type { ComponentData } from '../types.js';
5
+ import type { CdnMeta } from '../utils/dataLoader.js';
6
+ import { type McpToolResponse } from '../utils/response.js';
7
+ export interface Capability {
8
+ tool: string;
9
+ description: string;
10
+ }
11
+ export declare const ping: (componentMap: Map<string, ComponentData>, cdnMeta: CdnMeta | null, version: string) => McpToolResponse;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ping = void 0;
4
+ const response_js_1 = require("../utils/response.js");
5
+ const CAPABILITIES = [
6
+ { tool: 'ping', description: '서버 연결 확인 + 버전 + capabilities/rules 조회' },
7
+ { tool: 'list_components', description: '전체 컴포넌트 목록 조회' },
8
+ { tool: 'search_component', description: '키워드로 컴포넌트 검색' },
9
+ { tool: 'get_component_html', description: '컴포넌트 HTML 마크업 조회 (variant 지원)' },
10
+ { tool: 'get_component_props', description: '컴포넌트 Props 스펙 조회' },
11
+ { tool: 'validate_html', description: 'HTML BEM 클래스 유효성 검증 + 자동 수정' },
12
+ ];
13
+ const RULES = [
14
+ '이 라이브러리의 컴포넌트를 사용할 때는 CDN CSS/JS를 포함하세요',
15
+ 'HTML 스니펫은 get_component_html에서 받은 구조를 그대로 사용하세요',
16
+ '커스텀 CSS로 ncua- 클래스를 재정의하지 마세요',
17
+ ];
18
+ const ping = (componentMap, cdnMeta, version) => {
19
+ return (0, response_js_1.successResponse)({
20
+ status: 'ok',
21
+ name: 'ncds-ui-admin',
22
+ description: 'NCDS UI Admin 컴포넌트 라이브러리',
23
+ version,
24
+ componentCount: componentMap.size,
25
+ cdn: cdnMeta ?? undefined,
26
+ capabilities: CAPABILITIES,
27
+ rules: RULES,
28
+ });
29
+ };
30
+ exports.ping = ping;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateHtml = void 0;
4
4
  /**
5
- * validate_html tool — NCDS HTML 마크업 검증 (순수 함수)
5
+ * validate_html tool — NCUA HTML 마크업 검증 (순수 함수)
6
6
  */
7
7
  const node_html_parser_1 = require("node-html-parser");
8
8
  const response_js_1 = require("../utils/response.js");
@@ -1 +1 @@
1
- export declare const VERSION = "1.6.4-alpha.0";
1
+ export declare const VERSION = "1.6.3";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '1.6.4-alpha.0';
4
+ exports.VERSION = '1.6.3';
@@ -1,4 +1,4 @@
1
- # NCDS MCP 서버 설정 템플릿
1
+ # NCUA MCP 서버 설정 템플릿
2
2
 
3
3
  ## 빠른 시작
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ncds/ui-admin",
3
- "version": "1.6.4-alpha.0",
3
+ "version": "1.6.4-alpha.1",
4
4
  "description": "nhn-commerce의 어드민 디자인 시스템입니다.",
5
5
  "scripts": {
6
6
  "barrel": "node barrel.js",
@@ -52,8 +52,10 @@
52
52
  "require": "./dist/cjs/index.js",
53
53
  "import": "./dist/esm/index.js",
54
54
  "types": "./dist/types/index.d.ts"
55
- },
56
- "./mcp": "./mcp/bin/server.mjs"
55
+ }
56
+ },
57
+ "bin": {
58
+ "ncua-mcp": "./mcp/bin/server.mjs"
57
59
  },
58
60
  "files": [
59
61
  "dist",