docuking-mcp 2.0.5 → 2.0.7

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 +10 -32
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -206,7 +206,6 @@ function setupAutoApproval(localPath) {
206
206
  if (!settings.enableAllProjectMcpServers) {
207
207
  settings.enableAllProjectMcpServers = true;
208
208
  changed = true;
209
- console.log('[DocuKing] enableAllProjectMcpServers 활성화');
210
209
  }
211
210
 
212
211
  // 2. 와일드카드로 모든 docuking 도구 자동 승인
@@ -214,12 +213,10 @@ function setupAutoApproval(localPath) {
214
213
  if (!settings.permissions.allow.includes(wildcardPermission)) {
215
214
  settings.permissions.allow.push(wildcardPermission);
216
215
  changed = true;
217
- console.log('[DocuKing] MCP 와일드카드 권한 추가: mcp__docuking__*');
218
216
  }
219
217
 
220
218
  if (changed) {
221
219
  fs.writeFileSync(claudeSettingsPath, JSON.stringify(settings, null, 2), 'utf-8');
222
- console.log('[DocuKing] Claude Code 자동 승인 설정 완료');
223
220
  }
224
221
  } catch (e) {
225
222
  console.error('[DocuKing] Claude Code 설정 업데이트 실패:', e.message);
@@ -251,18 +248,16 @@ zzz_ai_Plan/
251
248
  }
252
249
  // 끝에 추가
253
250
  fs.appendFileSync(gitignorePath, docukingEntries, 'utf-8');
254
- console.log('[DocuKing] .gitignore에 DocuKing 폴더 추가');
255
251
  } else {
256
252
  // 파일 없으면 새로 생성
257
253
  fs.writeFileSync(gitignorePath, docukingEntries.trim() + '\n', 'utf-8');
258
- console.log('[DocuKing] .gitignore 생성');
259
254
  }
260
255
  } catch (e) {
261
256
  console.error('[DocuKing] .gitignore 업데이트 실패:', e.message);
262
257
  }
263
258
  }
264
259
 
265
-
260
+
266
261
  // 프로젝트 정보 조회 (로컬 config에서)
267
262
  function getProjectInfo(localPath) {
268
263
  const config = getLocalConfig(localPath);
@@ -1167,15 +1162,6 @@ docuking_init 호출 시 apiKey 파라미터를 포함해주세요.`,
1167
1162
  createdAt: new Date().toISOString(),
1168
1163
  });
1169
1164
 
1170
- // CLAUDE.md에 MCP 작업 기록 규칙 추가
1171
- updateClaudeMd(localPath);
1172
-
1173
- // IDE별 자동 승인 설정 추가 (Claude Code 등)
1174
- setupAutoApproval(localPath);
1175
-
1176
- // .gitignore에 DocuKing 폴더 추가
1177
- updateGitignore(localPath);
1178
-
1179
1165
  // 폴더 생성: 오너는 yy_All_Docu/, 협업자는 yy_All_Docu/yy_{이름}/
1180
1166
  const mainFolderName = 'yy_All_Docu';
1181
1167
  const mainFolderPath = path.join(localPath, mainFolderName);
@@ -1330,7 +1316,6 @@ Git처럼 무엇을 변경했는지 명확히 작성해주세요.
1330
1316
  if (!fs.existsSync(workingPath)) {
1331
1317
  // 폴더가 없으면 생성
1332
1318
  fs.mkdirSync(workingPath, { recursive: true });
1333
- console.log(`[DocuKing] 협업자 폴더 생성: yy_All_Docu/${coworkerFolderName}/`);
1334
1319
  }
1335
1320
  } else {
1336
1321
  // 오너: yy_All_Docu/ 폴더 사용
@@ -1382,9 +1367,6 @@ docuking_init을 먼저 실행하세요.`,
1382
1367
  file.serverPath = serverPathPrefix + file.path;
1383
1368
  }
1384
1369
 
1385
- if (isCoworker) {
1386
- console.log(`[DocuKing] 코워커 Push: ${filesToPush.length}개 파일 (${coworkerFolderName}/)`);
1387
- }
1388
1370
 
1389
1371
  // 대용량 파일 경고
1390
1372
  if (largeFiles.length > 0) {
@@ -1496,7 +1478,6 @@ docuking_init을 먼저 실행하세요.`,
1496
1478
  if (serverPathToHash[file.serverPath] === fileHash) {
1497
1479
  const resultText = `${progress} ⊘ ${file.serverPath} (변경 없음)`;
1498
1480
  results.push(resultText);
1499
- console.log(resultText);
1500
1481
  skipped++;
1501
1482
  continue;
1502
1483
  }
@@ -1521,7 +1502,6 @@ docuking_init을 먼저 실행하세요.`,
1521
1502
  if (moveResponse.ok) {
1522
1503
  const resultText = `${progress} ↷ ${existingPath} → ${file.serverPath}`;
1523
1504
  results.push(resultText);
1524
- console.log(resultText);
1525
1505
  moved++;
1526
1506
  // 이동된 파일의 해시 맵 업데이트
1527
1507
  delete serverHashToPath[fileHash];
@@ -1577,7 +1557,6 @@ docuking_init을 먼저 실행하세요.`,
1577
1557
  ? `${progress} ✓ ${file.path} (재시도 ${attempt}회 성공)`
1578
1558
  : `${progress} ✓ ${file.path}`;
1579
1559
  results.push(resultText);
1580
- console.log(resultText);
1581
1560
  success = true;
1582
1561
  break; // 성공하면 재시도 중단
1583
1562
  } else {
@@ -1590,7 +1569,6 @@ docuking_init을 먼저 실행하세요.`,
1590
1569
  // 5xx 에러만 재시도
1591
1570
  if (attempt < 3) {
1592
1571
  const waitTime = attempt * 1000; // 1초, 2초, 3초
1593
- console.log(`${progress} ⚠ ${file.path}: 재시도 ${attempt}/3 (${waitTime}ms 후)`);
1594
1572
  await new Promise(resolve => setTimeout(resolve, waitTime));
1595
1573
  }
1596
1574
  }
@@ -1599,7 +1577,6 @@ docuking_init을 먼저 실행하세요.`,
1599
1577
  // 네트워크 오류 등은 재시도
1600
1578
  if (attempt < 3 && !e.message.includes('타임아웃')) {
1601
1579
  const waitTime = attempt * 1000;
1602
- console.log(`${progress} ⚠ ${file.path}: 재시도 ${attempt}/3 (${waitTime}ms 후) - ${e.message}`);
1603
1580
  await new Promise(resolve => setTimeout(resolve, waitTime));
1604
1581
  } else {
1605
1582
  throw e;
@@ -1641,8 +1618,6 @@ docuking_init을 먼저 실행하세요.`,
1641
1618
  const pathsToDelete = serverAllPaths.filter(p => !processedLocalPaths.has(p));
1642
1619
 
1643
1620
  if (pathsToDelete.length > 0) {
1644
- console.log(`[DocuKing] 서버에만 있는 파일 ${pathsToDelete.length}개 삭제 중...`);
1645
-
1646
1621
  try {
1647
1622
  const deleteResponse = await fetch(`${API_ENDPOINT}/files/delete-batch`, {
1648
1623
  method: 'POST',
@@ -1660,7 +1635,6 @@ docuking_init을 먼저 실행하세요.`,
1660
1635
  const deleteResult = await deleteResponse.json();
1661
1636
  deleted = deleteResult.deleted || 0;
1662
1637
  deletedFiles.push(...pathsToDelete.slice(0, deleted));
1663
- console.log(`[DocuKing] ${deleted}개 파일 삭제 완료`);
1664
1638
  }
1665
1639
  } catch (e) {
1666
1640
  console.error('[DocuKing] 파일 삭제 실패:', e.message);
@@ -2314,7 +2288,8 @@ async function handleRollback(args) {
2314
2288
  }
2315
2289
 
2316
2290
  // 날짜 기반 파일명 생성 유틸
2317
- function generateDateFileName(title) {
2291
+ // prefix: 'T' for Talk, 'P' for Plan (optional)
2292
+ function generateDateFileName(title, prefix = '') {
2318
2293
  const now = new Date();
2319
2294
  const year = now.getFullYear();
2320
2295
  const month = String(now.getMonth() + 1).padStart(2, '0');
@@ -2328,8 +2303,11 @@ function generateDateFileName(title) {
2328
2303
  .replace(/\s+/g, '_') // 공백을 언더스코어로
2329
2304
  .substring(0, 50); // 50자 제한
2330
2305
 
2306
+ // 접두사가 있으면 "T_" 또는 "P_" 형태로 추가
2307
+ const prefixStr = prefix ? `${prefix}_` : '';
2308
+
2331
2309
  return {
2332
- fileName: `${year}-${month}-${day}_${hour}${minute}__${slug}.md`,
2310
+ fileName: `${prefixStr}${year}-${month}-${day}_${hour}${minute}__${slug}.md`,
2333
2311
  yearMonth: `${year}/${month}`,
2334
2312
  timestamp: `${year}-${month}-${day} ${hour}:${minute}`,
2335
2313
  };
@@ -2543,8 +2521,8 @@ async function handleTalk(args) {
2543
2521
  // zz_ai_Talk 폴더 경로 (로컬 전용, 킹톡)
2544
2522
  const talkBasePath = path.join(localPath, 'zz_ai_Talk');
2545
2523
 
2546
- // 날짜 기반 파일명 생성
2547
- const { fileName, timestamp } = generateDateFileName(title);
2524
+ // 날짜 기반 파일명 생성 (T_ 접두사)
2525
+ const { fileName, timestamp } = generateDateFileName(title, 'T');
2548
2526
  const talkFilePath = path.join(talkBasePath, fileName);
2549
2527
 
2550
2528
  // 폴더 생성
@@ -2620,7 +2598,7 @@ async function handlePlan(args) {
2620
2598
  } else {
2621
2599
  // 새 계획 생성
2622
2600
  targetPlanId = generatePlanId();
2623
- const { fileName, timestamp } = generateDateFileName(title);
2601
+ const { fileName, timestamp } = generateDateFileName(title, 'P');
2624
2602
 
2625
2603
  if (!fs.existsSync(planBasePath)) {
2626
2604
  fs.mkdirSync(planBasePath, { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docuking-mcp",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "DocuKing MCP Server - AI 시대의 문서 협업 플랫폼",
5
5
  "type": "module",
6
6
  "main": "index.js",