@axboot-mcp/mcp-server 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +119 -0
- package/MCP_TOOL_PLAN.md +710 -0
- package/MCP_USAGE.md +914 -0
- package/README.md +168 -0
- package/REPOSITORY_CONVENTIONS.md +250 -0
- package/SEARCH_PARAMS_MCP_TOOL_COMPLETE_PLAN.md +646 -0
- package/SEARCH_PARAMS_PLAN.md +2570 -0
- package/STORE_PATTERNS.md +1178 -0
- package/debug-dto.js +72 -0
- package/generate-banner-store.js +62 -0
- package/generation-plan.json +2176 -0
- package/generation-results.json +1817 -0
- package/package.json +45 -0
- package/scripts/batch-generate-all.js +159 -0
- package/scripts/batch-generate-mcp.js +329 -0
- package/scripts/batch-generate-stores-v2.js +272 -0
- package/scripts/batch-generate-stores.js +179 -0
- package/scripts/batch-plan.json +3810 -0
- package/scripts/batch-process.py +90 -0
- package/scripts/batch-regenerate.js +356 -0
- package/scripts/direct-generate.js +227 -0
- package/scripts/execute-batches.js +1911 -0
- package/scripts/generate-all-stores.js +144 -0
- package/scripts/generate-stores-mcp.js +161 -0
- package/scripts/generate-stores-v2.js +450 -0
- package/scripts/generate-stores-v3.js +412 -0
- package/scripts/generate-stores-v4.js +521 -0
- package/scripts/generate-stores.js +382 -0
- package/scripts/repos-to-process.json +1899 -0
- package/src/config/nh-layout-patterns.ts +166 -0
- package/src/docs/HOOK_GENERATION_PLAN.md +2226 -0
- package/src/docs/NH_STORE_PATTERNS.md +297 -0
- package/src/docs/README.md +216 -0
- package/src/docs/index.ts +28 -0
- package/src/docs/loader.ts +568 -0
- package/src/docs/patterns.json +419 -0
- package/src/docs/practical-examples.md +732 -0
- package/src/docs/quick-start.md +257 -0
- package/src/docs/requirements-analysis-guide.md +364 -0
- package/src/docs/rules.json +321 -0
- package/src/docs/store-pattern-analysis.md +664 -0
- package/src/docs/store-patterns-rules.md +1168 -0
- package/src/docs/store-patterns-usage-guide.md +1835 -0
- package/src/docs/troubleshooting.md +544 -0
- package/src/docs/type-selection-guide.md +572 -0
- package/src/docs//354/202/254/354/232/251/353/262/225/AntD-/354/273/264/355/217/254/353/204/214/355/212/270-/354/202/254/354/232/251/353/262/225.md +1515 -0
- package/src/docs//354/202/254/354/232/251/353/262/225/DataGrid-/354/202/254/354/232/251/353/262/225.md +866 -0
- package/src/docs//354/202/254/354/232/251/353/262/225/FormItem-/354/202/254/354/232/251/353/262/225.md +903 -0
- package/src/docs//354/202/254/354/232/251/353/262/225/FormModal-/354/202/254/354/232/251/353/262/225.md +1155 -0
- package/src/docs//354/202/254/354/232/251/353/262/225/MCP-/353/260/224/354/235/264/353/270/214/354/275/224/353/224/251-/352/260/200/354/235/264/353/223/234.md +1133 -0
- package/src/docs//354/202/254/354/232/251/353/262/225/MSW-Mock-/353/215/260/354/235/264/355/204/260-/354/202/254/354/232/251/353/262/225.md +579 -0
- package/src/docs//354/202/254/354/232/251/353/262/225/Search-/354/273/264/355/217/254/353/204/214/355/212/270-/354/202/254/354/232/251/353/262/225.md +738 -0
- package/src/docs//354/202/254/354/232/251/353/262/225/Store-/355/214/250/355/204/264-/354/202/254/354/232/251/353/262/225.md +1135 -0
- package/src/docs//354/202/254/354/232/251/353/262/225//355/231/224/353/251/264/352/265/254/354/204/261-/355/203/200/354/236/205/353/263/204-/352/260/234/353/260/234/354/210/234/354/204/234.md +1805 -0
- package/src/docs//354/202/254/354/232/251/353/262/225//355/231/224/353/251/264/355/203/200/354/236/205/353/263/204-/352/260/234/353/260/234-/355/224/204/353/241/254/355/224/204/355/212/270-/352/260/200/354/235/264/353/223/234.md +946 -0
- package/src/docs//354/202/254/354/232/251/353/262/225//355/231/225/354/236/245/355/231/224/353/251/264/355/203/200/354/236/205/353/263/204-/354/203/201/354/204/270-/355/224/204/353/241/254/355/224/204/355/212/270/352/260/200/354/235/264/353/223/234.md +2422 -0
- package/src/features/store-features.ts +232 -0
- package/src/handlers/analyze-requirements.ts +403 -0
- package/src/handlers/analyze.ts +1373 -0
- package/src/handlers/generate-from-requirements.ts +250 -0
- package/src/handlers/generate-hook.ts +950 -0
- package/src/handlers/generate-interactive.ts +840 -0
- package/src/handlers/generate-listdatagrid.ts +521 -0
- package/src/handlers/generate-multi-stores.ts +577 -0
- package/src/handlers/generate-requirements-from-layout.ts +160 -0
- package/src/handlers/generate-search-params.ts +717 -0
- package/src/handlers/generate.ts +911 -0
- package/src/handlers/list-templates.ts +104 -0
- package/src/handlers/scan-metadata.ts +485 -0
- package/src/handlers/suggest-layout.ts +326 -0
- package/src/index.ts +959 -0
- package/src/prompts/search-params.md +793 -0
- package/src/templates/index.ts +107 -0
- package/src/templates/unified.ts +462 -0
- package/store-generation-error-patterns.md +225 -0
- package/test/useAgentStore.ts +136 -0
- package/test-server.js +78 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# Store 생성 MCP 오류 패턴 분석
|
|
2
|
+
|
|
3
|
+
Axboot MCP를 사용하여 생성된 Store 파일들의 오류 패턴을 정리한 문서입니다.
|
|
4
|
+
|
|
5
|
+
## 개요
|
|
6
|
+
|
|
7
|
+
- 분석 대상: `/src/pages/resources/NH/test/*Store.ts` (271개 파일)
|
|
8
|
+
- 분석 기간: 2026-01-13
|
|
9
|
+
- 목적: MCP 서버 수정을 위한 오류 패턴 식별
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 오류 패턴 분석
|
|
14
|
+
|
|
15
|
+
### Case 1: TypeScript 키워드를 잘못 import한 경우
|
|
16
|
+
|
|
17
|
+
**오류 유형**: `error TS1003: Identifier expected.`
|
|
18
|
+
|
|
19
|
+
**원인**: TypeScript의 기본 타입 키워드(`void`, `any`, `unknown`)를 "services" 모듈에서 import하려고 시도
|
|
20
|
+
|
|
21
|
+
**영향받은 Store 파일**:
|
|
22
|
+
- `useBizDeptListStore.ts` (line 7)
|
|
23
|
+
- `useDeliveryListStore.ts` (line 5)
|
|
24
|
+
- `useIndvdlztnProfileListStore.ts` (line 5)
|
|
25
|
+
- `useIsmsListStore.ts` (line 8)
|
|
26
|
+
- `useMemberNotificationListStore.ts` (line 5)
|
|
27
|
+
- `useNaverEpListStore.ts` (line 8)
|
|
28
|
+
- `useOpCnsltMainListStore.ts` (line 5)
|
|
29
|
+
- `useOpCommonListStore.ts` (line 5)
|
|
30
|
+
- `useOrderClmMngListStore.ts` (line 5)
|
|
31
|
+
- `usePbIsmsListStore.ts` (line 5)
|
|
32
|
+
- `usePbPayStupListStore.ts` (line 5)
|
|
33
|
+
- `useProdRgstBnefListStore.ts` (line 8)
|
|
34
|
+
- `useUsrProdRgstListStore.ts` (line 12)
|
|
35
|
+
- `useUsrProfileListStore.ts` (line 12)
|
|
36
|
+
- `useXoProdgrpStupListStore.ts` (line 7)
|
|
37
|
+
- `useXoStdrInfoListStore.ts` (line 11)
|
|
38
|
+
|
|
39
|
+
**문제 코드 예시**:
|
|
40
|
+
```typescript
|
|
41
|
+
import { ..., void } from "services";
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**올바른 코드**:
|
|
45
|
+
```typescript
|
|
46
|
+
// void는 TypeScript 기본 타입이므로 import할 필요 없음
|
|
47
|
+
import { ..., SomeType } from "services";
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
### Case 2: TypeScript 키워드를 extends 한 경우
|
|
53
|
+
|
|
54
|
+
**오류 유형**: `error TS1109: Expression expected.`
|
|
55
|
+
|
|
56
|
+
**원인**: TypeScript의 기본 타입(`void`, `any`)을 interface에서 extends 하려고 시도
|
|
57
|
+
|
|
58
|
+
**영향받은 Store 파일**:
|
|
59
|
+
- `useBizDeptListStore.ts` (line 18)
|
|
60
|
+
- `useDeliveryListStore.ts` (line 12)
|
|
61
|
+
- `useIndvdlztnProfileListStore.ts` (line 12)
|
|
62
|
+
- `useIsmsListStore.ts` (line 19)
|
|
63
|
+
- `useMemberNotificationListStore.ts` (line 12)
|
|
64
|
+
- `useOpCnsltMainListStore.ts` (line 12)
|
|
65
|
+
- `useOpCommonListStore.ts` (line 12)
|
|
66
|
+
- `useOrderClmMngListStore.ts` (line 12)
|
|
67
|
+
- `usePbIsmsListStore.ts` (line 12)
|
|
68
|
+
- `usePbPayStupListStore.ts` (line 12)
|
|
69
|
+
- `useProdRgstBnefListStore.ts` (line 19)
|
|
70
|
+
- `useUsrProdRgstListStore.ts` (line 22)
|
|
71
|
+
- `useUsrProfileListStore.ts` (line 24)
|
|
72
|
+
- `useXoProdgrpStupListStore.ts` (line 18)
|
|
73
|
+
- `useXoStdrInfoListStore.ts` (line 23)
|
|
74
|
+
|
|
75
|
+
**문제 코드 예시**:
|
|
76
|
+
```typescript
|
|
77
|
+
interface ListRequest extends void {
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**올바른 코드**:
|
|
82
|
+
```typescript
|
|
83
|
+
interface ListRequest {
|
|
84
|
+
// 빈 객체 또는 필요한 필드 정의
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
### Case 3: 서비스 메서드 누락
|
|
91
|
+
|
|
92
|
+
**오류 유형**: `error TS1003: Identifier expected.`
|
|
93
|
+
|
|
94
|
+
**원인**: 서비스 호출 시 메서드 이름이 누락되고 함수 호출 연산자만 존재
|
|
95
|
+
|
|
96
|
+
**영향받은 Store 파일**:
|
|
97
|
+
- `useIlSmsListStore.ts` (line 66)
|
|
98
|
+
- `useMemberSnsLoginListStore.ts` (line 66)
|
|
99
|
+
- `useMsghubListStore.ts` (line 66)
|
|
100
|
+
- `useNaverEpPbListStore.ts` (line 66)
|
|
101
|
+
- `useOnOffEstmtListStore.ts` (line 66)
|
|
102
|
+
|
|
103
|
+
**문제 코드 예시**:
|
|
104
|
+
```typescript
|
|
105
|
+
const response = await IlSmsService.(deleteEmptyValue({
|
|
106
|
+
apiParam,
|
|
107
|
+
}));
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**올바른 코드**:
|
|
111
|
+
```typescript
|
|
112
|
+
const response = await IlSmsService.postIlSmsList(deleteEmptyValue({
|
|
113
|
+
apiParam,
|
|
114
|
+
}));
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
### Case 4: any/unknown 타입을 잘못 사용한 경우
|
|
120
|
+
|
|
121
|
+
**오류 유형**: `error TS1003: Identifier expected.`
|
|
122
|
+
|
|
123
|
+
**원인**: `any` 또는 `unknown` 타입을 "services"에서 import하려고 시도
|
|
124
|
+
|
|
125
|
+
**영향받은 Store 파일**:
|
|
126
|
+
- `useIlSmsListStore.ts` (line 5) - `any`, `unknown` import
|
|
127
|
+
- `useMemberSnsLoginListStore.ts` (line 5) - `any`, `unknown` import
|
|
128
|
+
- `useMsghubListStore.ts` (line 5) - `any`, `unknown` import
|
|
129
|
+
- `useNaverEpPbListStore.ts` (line 5) - `any`, `unknown` import
|
|
130
|
+
|
|
131
|
+
**문제 코드 예시**:
|
|
132
|
+
```typescript
|
|
133
|
+
import { IlSmsService, any, unknown } from "services";
|
|
134
|
+
|
|
135
|
+
interface ListRequest extends any {
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
**올바른 코드**:
|
|
140
|
+
```typescript
|
|
141
|
+
import { IlSmsService } from "services";
|
|
142
|
+
|
|
143
|
+
interface ListRequest {
|
|
144
|
+
// 빈 객체 또는 필요한 필드 정의
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## 오류별 Store 파일 목록
|
|
151
|
+
|
|
152
|
+
| Store 파일 | 오류 라인 | 오류 타입 | 원인 |
|
|
153
|
+
|-----------|----------|----------|------|
|
|
154
|
+
| `useBizDeptListStore.ts` | 7, 18 | TS1003, TS1109 | void import/extends |
|
|
155
|
+
| `useDeliveryListStore.ts` | 5, 12 | TS1003, TS1109 | void import/extends |
|
|
156
|
+
| `useIlSmsListStore.ts` | 5, 66 | TS1003 | any/unknown import, 메서드 누락 |
|
|
157
|
+
| `useIndvdlztnProfileListStore.ts` | 5, 12 | TS1003, TS1109 | void import/extends |
|
|
158
|
+
| `useIsmsListStore.ts` | 8, 19 | TS1003, TS1109 | void import/extends |
|
|
159
|
+
| `useMemberNotificationListStore.ts` | 5, 12 | TS1003, TS1109 | void import/extends |
|
|
160
|
+
| `useMemberSnsLoginListStore.ts` | 5, 66 | TS1003 | any/unknown import, 메서드 누락 |
|
|
161
|
+
| `useMsghubListStore.ts` | 5, 66 | TS1003 | any/unknown import, 메서드 누락 |
|
|
162
|
+
| `useNaverEpListStore.ts` | 8 | TS1003 | void import |
|
|
163
|
+
| `useNaverEpPbListStore.ts` | 5, 66 | TS1003 | any/unknown import, 메서드 누락 |
|
|
164
|
+
| `useOnOffEstmtListStore.ts` | 66 | TS1003 | 메서드 누락 |
|
|
165
|
+
| `useOpCnsltMainListStore.ts` | 5, 12 | TS1003, TS1109 | void import/extends |
|
|
166
|
+
| `useOpCommonListStore.ts` | 5, 12 | TS1003, TS1109 | void import/extends |
|
|
167
|
+
| `useOrderClmMngListStore.ts` | 5, 12 | TS1003, TS1109 | void import/extends |
|
|
168
|
+
| `usePbIsmsListStore.ts` | 5, 12 | TS1003, TS1109 | void import/extends |
|
|
169
|
+
| `usePbPayStupListStore.ts` | 5, 12 | TS1003, TS1109 | void import/extends |
|
|
170
|
+
| `useProdRgstBnefListStore.ts` | 8, 19 | TS1003, TS1109 | void import/extends |
|
|
171
|
+
| `useUsrProdRgstListStore.ts` | 12, 22 | TS1003, TS1109 | void import/extends |
|
|
172
|
+
| `useUsrProfileListStore.ts` | 12, 24 | TS1003, TS1109 | void import/extends |
|
|
173
|
+
| `useXoProdgrpStupListStore.ts` | 7, 18 | TS1003, TS1109 | void import/extends |
|
|
174
|
+
| `useXoStdrInfoListStore.ts` | 11, 23 | TS1003, TS1109 | void import/extends |
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## MCP 서버 수정 권장사항
|
|
179
|
+
|
|
180
|
+
### 1. TypeScript 타입 처리 로직 수정
|
|
181
|
+
|
|
182
|
+
**문제**: Repository 분석 시 TypeScript 기본 타입(`void`, `any`, `unknown`)을 별도 import로 처리
|
|
183
|
+
|
|
184
|
+
**해결 방안**:
|
|
185
|
+
- TypeScript 기본 타입 키워드 목록을 정의하고 필터링
|
|
186
|
+
- `void`, `any`, `unknown`, `never`, `null`, `undefined`, `boolean`, `number`, `string`, `object`, `symbol`, `bigint` 등은 import에서 제외
|
|
187
|
+
|
|
188
|
+
### 2. 빈 Request 타입 처리
|
|
189
|
+
|
|
190
|
+
**문제**: API의 Request 타입이 없을 때 `void`를 extends 하려고 시도
|
|
191
|
+
|
|
192
|
+
**해결 방안**:
|
|
193
|
+
- Request 타입이 없는 경우 빈 interface로 정의
|
|
194
|
+
```typescript
|
|
195
|
+
interface ListRequest {
|
|
196
|
+
// 필요한 경우 빈 상태로 유지
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### 3. 서비스 메서드 이름 추출 로직 개선
|
|
201
|
+
|
|
202
|
+
**문제**: Repository 메서드 이름을 올바르게 추출하지 못하는 경우 발생
|
|
203
|
+
|
|
204
|
+
**해결 방안**:
|
|
205
|
+
- Repository 분석 시 메서드 이름 추출 로직 검증
|
|
206
|
+
- 빈 메서드 이름이나 잘못된 파싱 결과를 필터링
|
|
207
|
+
|
|
208
|
+
### 4. Interface Repository 파싱 개선
|
|
209
|
+
|
|
210
|
+
**검토 필요 항목**:
|
|
211
|
+
- JSDoc 주석에서 타입 정보 추출 정확도
|
|
212
|
+
- 제네릭 타입 파싱 처리
|
|
213
|
+
- 복잡한 타입 상속 구조 처리
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## 정리
|
|
218
|
+
|
|
219
|
+
총 **30개 Store 파일**에서 오류가 발견되었으며, 주요 패턴은:
|
|
220
|
+
|
|
221
|
+
1. **TypeScript 키워드 잘못 import (Case 1, 4)**: 21개 파일
|
|
222
|
+
2. **TypeScript 키워드 잘못 extends (Case 2)**: 18개 파일
|
|
223
|
+
3. **서비스 메서드 누락 (Case 3)**: 5개 파일
|
|
224
|
+
|
|
225
|
+
이러한 오류 패턴을 수정하면 MCP 서버가 정상적인 Store 코드를 생성할 수 있습니다.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { AXDGDataItem, AXDGSortParam } from "@axboot/datagrid";
|
|
2
|
+
import { StoreActions } from "@core/stores/types";
|
|
3
|
+
import { deleteEmptyValue } from "@core/utils/object";
|
|
4
|
+
import { ProgramFn } from "@types";
|
|
5
|
+
|
|
6
|
+
import { getTabStoreListener } from "stores";
|
|
7
|
+
import { create } from "zustand";
|
|
8
|
+
import { subscribeWithSelector } from "zustand/middleware";
|
|
9
|
+
import { shallow } from "zustand/shallow";
|
|
10
|
+
|
|
11
|
+
interface ListRequest {}
|
|
12
|
+
|
|
13
|
+
interface DtoItem extends {}
|
|
14
|
+
|
|
15
|
+
// ========== interface MetaData ==========
|
|
16
|
+
interface MetaData {
|
|
17
|
+
programFn?: ProgramFn;
|
|
18
|
+
|
|
19
|
+
listColWidths: number[];
|
|
20
|
+
listSortParams: AXDGSortParam[];
|
|
21
|
+
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// ========== interface States ==========
|
|
25
|
+
interface States extends MetaData {
|
|
26
|
+
routePath?: string;
|
|
27
|
+
listSpinning: boolean;
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
listData: AXDGDataItem<DtoItem>[];
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
// 마스터-디테일 (오른쪽 상세)
|
|
35
|
+
selectedItem?: DtoItem;
|
|
36
|
+
detail?: DtoItem;
|
|
37
|
+
detailSpinning: boolean;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// ========== const createState ==========
|
|
41
|
+
const createState: States = {
|
|
42
|
+
listColWidths: [],
|
|
43
|
+
listSortParams: [],
|
|
44
|
+
listSpinning: false,
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
listData: [],
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
selectedItem: undefined,
|
|
52
|
+
detail: undefined,
|
|
53
|
+
detailSpinning: false,
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// ========== interface Actions ==========
|
|
57
|
+
interface Actions extends Record<string, any> {
|
|
58
|
+
setListColWidths: (colWidths: number[]) => void;
|
|
59
|
+
setListSpinning: (spinning: boolean) => void;
|
|
60
|
+
callListApi: (request?: ListRequest) => Promise<void>;
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
setSelectedItem: (selectedItem?: DtoItem) => void;
|
|
66
|
+
setDetail: (detail?: DtoItem) => void;
|
|
67
|
+
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// ========== const createActions ==========
|
|
71
|
+
const createActions: StoreActions<States & Actions, Actions> = (set, get) => ({
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
setListColWidths: (colWidths) => set({ listColWidths: colWidths }),
|
|
75
|
+
|
|
76
|
+
setListSpinning: (spinning) => set({ listSpinning: spinning }),
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
callListApi: async (request) => {
|
|
80
|
+
if (get().listSpinning) return;
|
|
81
|
+
set({ listSpinning: true });
|
|
82
|
+
|
|
83
|
+
try {
|
|
84
|
+
|
|
85
|
+
const response = await .();
|
|
86
|
+
|
|
87
|
+
set({
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
listData: [],
|
|
91
|
+
|
|
92
|
+
});
|
|
93
|
+
} finally {
|
|
94
|
+
set({ listSpinning: false });
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
setSelectedItem: (selectedItem) => {
|
|
100
|
+
set({ selectedItem, detailSpinning: true });
|
|
101
|
+
set({ detailSpinning: false });
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
setDetail: (detail) => {
|
|
105
|
+
set({ detail });
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// ========== export ==========
|
|
118
|
+
export interface extends States, Actions {}
|
|
119
|
+
|
|
120
|
+
export const = create(
|
|
121
|
+
subscribeWithSelector<>((set, get) => ({
|
|
122
|
+
...createState,
|
|
123
|
+
...createActions(set, get),
|
|
124
|
+
})),
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
// ========== Store.subscribe ==========
|
|
128
|
+
.subscribe(
|
|
129
|
+
(s): Record<keyof MetaData, any> => ({
|
|
130
|
+
programFn: s.programFn,
|
|
131
|
+
listColWidths: s.listColWidths,
|
|
132
|
+
listSortParams: s.listSortParams,
|
|
133
|
+
}),
|
|
134
|
+
getTabStoreListener<MetaData>(createState.routePath),
|
|
135
|
+
{ equalityFn: shallow },
|
|
136
|
+
);
|
package/test-server.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// MCP 서버 테스트 스크립트
|
|
4
|
+
import { spawn } from 'child_process';
|
|
5
|
+
|
|
6
|
+
const serverProcess = spawn('node', ['/Users/kyle/work/mcp-axboot/dist/index.js'], {
|
|
7
|
+
stdio: ['pipe', 'pipe', 'inherit']
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
let messageId = 0;
|
|
11
|
+
|
|
12
|
+
function sendRequest(method, params = {}) {
|
|
13
|
+
const request = {
|
|
14
|
+
jsonrpc: '2.0',
|
|
15
|
+
id: messageId++,
|
|
16
|
+
method,
|
|
17
|
+
params
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
console.log('\n→ Sending:', JSON.stringify(request, null, 2));
|
|
21
|
+
serverProcess.stdin.write(JSON.stringify(request) + '\n');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// 서버 시작 대기
|
|
25
|
+
setTimeout(() => {
|
|
26
|
+
console.log('서버가 시작되었습니다. 요청을 보냅니다...\n');
|
|
27
|
+
|
|
28
|
+
// 1. tools/list 요청 - 사용 가능한 도구 목록 조회
|
|
29
|
+
sendRequest('tools/list');
|
|
30
|
+
|
|
31
|
+
}, 1000);
|
|
32
|
+
|
|
33
|
+
// 응답 수신
|
|
34
|
+
serverProcess.stdout.on('data', (data) => {
|
|
35
|
+
const responses = data.toString().trim().split('\n');
|
|
36
|
+
|
|
37
|
+
for (const responseStr of responses) {
|
|
38
|
+
if (!responseStr.trim()) continue;
|
|
39
|
+
|
|
40
|
+
try {
|
|
41
|
+
const response = JSON.parse(responseStr);
|
|
42
|
+
console.log('\n← Received:', JSON.stringify(response, null, 2));
|
|
43
|
+
|
|
44
|
+
// tools/list 응답을 받은 후 tools/call 요청
|
|
45
|
+
if (response.result && response.result.tools) {
|
|
46
|
+
console.log('\n=== 사용 가능한 도구 목록 ===');
|
|
47
|
+
response.result.tools.forEach(tool => {
|
|
48
|
+
console.log(`- ${tool.name}: ${tool.description}`);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// 첫 번째 도구 호출 테스트 (list_templates)
|
|
52
|
+
setTimeout(() => {
|
|
53
|
+
console.log('\n\nlist_templates 도구 호출 테스트...');
|
|
54
|
+
sendRequest('tools/call', {
|
|
55
|
+
name: 'list_templates',
|
|
56
|
+
arguments: {}
|
|
57
|
+
});
|
|
58
|
+
}, 500);
|
|
59
|
+
}
|
|
60
|
+
} catch (e) {
|
|
61
|
+
console.log('\n← Raw:', responseStr);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
serverProcess.on('error', (error) => {
|
|
67
|
+
console.error('서버 오류:', error);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
serverProcess.on('exit', (code) => {
|
|
71
|
+
console.log(`\n서버가 종료되었습니다 (exit code: ${code})`);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// 10초 후 종료
|
|
75
|
+
setTimeout(() => {
|
|
76
|
+
serverProcess.kill();
|
|
77
|
+
process.exit(0);
|
|
78
|
+
}, 10000);
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "CommonJS",
|
|
5
|
+
"moduleResolution": "Node",
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"rootDir": "./src",
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"declaration": true,
|
|
13
|
+
"declarationMap": true,
|
|
14
|
+
"sourceMap": true,
|
|
15
|
+
"resolveJsonModule": true,
|
|
16
|
+
"allowSyntheticDefaultImports": true
|
|
17
|
+
},
|
|
18
|
+
"include": ["src/**/*"],
|
|
19
|
+
"exclude": ["node_modules", "dist"]
|
|
20
|
+
}
|