docuking-mcp 2.0.6 → 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.
- package/index.js +0 -26
- 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,11 +248,9 @@ 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);
|
|
@@ -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);
|