docuking-mcp 2.2.0 → 2.3.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/index.js +31 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1416,6 +1416,7 @@ docuking_init을 먼저 실행하세요.`,
1416
1416
  };
1417
1417
  }
1418
1418
  workingPath = mainFolderPath;
1419
+ serverPathPrefix = 'yy_All_Docu/'; // 오너도 yy_All_Docu/ 접두사 필요
1419
1420
  }
1420
1421
 
1421
1422
  // .env 파일 자동 백업: _Infra_Config/ 폴더에 복사
@@ -2016,9 +2017,20 @@ async function handlePull(args) {
2016
2017
 
2017
2018
  const data = await response.json();
2018
2019
 
2019
- // 서버 경로를 그대로 yy_All_Docu/ 아래에 저장
2020
- // 협업자 폴더(yy_이름/)도 yy_All_Docu/ 안에 있으므로 동일하게 처리
2021
- const fullPath = path.join(mainFolderPath, file.path);
2020
+ // 서버 경로에 따라 로컬 저장 위치 결정
2021
+ // - yy_All_Docu/xxx yy_All_Docu/xxx (오너 문서)
2022
+ // - yy_Coworker_xxx/yyy → yy_Coworker_xxx/yyy (협업자 폴더, 루트에 별도)
2023
+ let fullPath;
2024
+ if (file.path.startsWith('yy_All_Docu/')) {
2025
+ // 오너 문서: yy_All_Docu/ 접두사 포함된 채로 로컬에 저장
2026
+ fullPath = path.join(localPath, file.path);
2027
+ } else if (file.path.startsWith('yy_Coworker_')) {
2028
+ // 협업자 폴더: 루트에 별도 폴더로 저장
2029
+ fullPath = path.join(localPath, file.path);
2030
+ } else {
2031
+ // 기타 (구버전 호환): yy_All_Docu/ 안에 저장
2032
+ fullPath = path.join(mainFolderPath, file.path);
2033
+ }
2022
2034
 
2023
2035
  // 디렉토리 생성
2024
2036
  fs.mkdirSync(path.dirname(fullPath), { recursive: true });
@@ -2042,11 +2054,26 @@ async function handlePull(args) {
2042
2054
  }
2043
2055
  }
2044
2056
 
2057
+ // 결과 요약
2058
+ const successCount = results.filter(r => r.startsWith('✓')).length;
2059
+ const failCount = results.filter(r => r.startsWith('✗')).length;
2060
+
2061
+ // 실패한 파일만 상세 표시, 성공은 개수만
2062
+ const failedFiles = results.filter(r => r.startsWith('✗'));
2063
+
2064
+ let summary = `Pull 완료! (${successCount}개 성공`;
2065
+ if (failCount > 0) {
2066
+ summary += `, ${failCount}개 실패)`;
2067
+ summary += `\n\n실패 목록:\n${failedFiles.join('\n')}`;
2068
+ } else {
2069
+ summary += ')';
2070
+ }
2071
+
2045
2072
  return {
2046
2073
  content: [
2047
2074
  {
2048
2075
  type: 'text',
2049
- text: `Pull 완료!\n\n${results.join('\n')}`,
2076
+ text: summary,
2050
2077
  },
2051
2078
  ],
2052
2079
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docuking-mcp",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "DocuKing MCP Server - AI 시대의 문서 협업 플랫폼",
5
5
  "type": "module",
6
6
  "main": "index.js",