docuking-mcp 1.9.2 → 2.0.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/README.md +35 -74
- package/index.js +154 -142
- package/package.json +1 -1
- package/DEPLOY_TASK.md +0 -33
package/README.md
CHANGED
|
@@ -1,29 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# docuking-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
AI가 문서를 Push/Pull 할 수 있게 해주는 MCP 서버
|
|
4
4
|
|
|
5
5
|
## 설치
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npx
|
|
8
|
+
npx docuking-mcp
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## MCP 설정
|
|
12
12
|
|
|
13
|
-
### Claude Code
|
|
14
|
-
|
|
15
|
-
`~/.claude.json` 또는 프로젝트의 `.claude/settings.json`에 추가:
|
|
13
|
+
### Claude Code
|
|
16
14
|
|
|
17
15
|
```json
|
|
18
16
|
{
|
|
19
17
|
"mcpServers": {
|
|
20
|
-
"
|
|
18
|
+
"docuking": {
|
|
21
19
|
"command": "npx",
|
|
22
|
-
"args": ["
|
|
23
|
-
"env": {
|
|
24
|
-
"DOCUREPO_API_KEY": "sk_xxx",
|
|
25
|
-
"DOCUREPO_REPOS": "{\"C:/my-project\":\"project-uuid\"}"
|
|
26
|
-
}
|
|
20
|
+
"args": ["-y", "docuking-mcp"]
|
|
27
21
|
}
|
|
28
22
|
}
|
|
29
23
|
}
|
|
@@ -36,13 +30,9 @@ npx docurepo-mcp
|
|
|
36
30
|
```json
|
|
37
31
|
{
|
|
38
32
|
"mcpServers": {
|
|
39
|
-
"
|
|
33
|
+
"docuking": {
|
|
40
34
|
"command": "npx",
|
|
41
|
-
"args": ["
|
|
42
|
-
"env": {
|
|
43
|
-
"DOCUREPO_API_KEY": "sk_xxx",
|
|
44
|
-
"DOCUREPO_REPOS": "{\"C:/my-project\":\"project-uuid\"}"
|
|
45
|
-
}
|
|
35
|
+
"args": ["-y", "docuking-mcp"]
|
|
46
36
|
}
|
|
47
37
|
}
|
|
48
38
|
}
|
|
@@ -50,68 +40,39 @@ npx docurepo-mcp
|
|
|
50
40
|
|
|
51
41
|
## 도구
|
|
52
42
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
프로젝트를 DocuRepo에 연결합니다.
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
docurepo_init(projectId, localPath)
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
- Z_DocuRepo/ 폴더 생성
|
|
62
|
-
- 레포 매핑 추가 안내
|
|
63
|
-
|
|
64
|
-
### docurepo_push
|
|
65
|
-
|
|
66
|
-
Z_DocuRepo/ 폴더의 문서를 서버에 업로드합니다.
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
docurepo_push(localPath, [filePath])
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
- "피터해" 요청 시 사용
|
|
73
|
-
- filePath 생략 시 전체 동기화
|
|
74
|
-
|
|
75
|
-
### docurepo_pull
|
|
76
|
-
|
|
77
|
-
서버에서 문서를 다운로드합니다.
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
docurepo_pull(localPath, [filePath])
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
- "피터에서 가져와" 요청 시 사용
|
|
84
|
-
- filePath 생략 시 전체 동기화
|
|
85
|
-
|
|
86
|
-
### docurepo_list
|
|
87
|
-
|
|
88
|
-
서버에 저장된 파일 목록을 조회합니다.
|
|
89
|
-
|
|
90
|
-
```
|
|
91
|
-
docurepo_list(localPath)
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
## 환경변수
|
|
95
|
-
|
|
96
|
-
| 변수 | 설명 |
|
|
43
|
+
| 도구 | 설명 |
|
|
97
44
|
|------|------|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
102
|
-
|
|
45
|
+
| docuking_init | 프로젝트 연결, yy_All_Docu/ 및 zz_ai_* 폴더 생성 |
|
|
46
|
+
| docuking_push | yy_All_Docu/ → 서버 업로드 |
|
|
47
|
+
| docuking_pull | 서버 → yy_All_Docu/ 다운로드 |
|
|
48
|
+
| docuking_status | 동기화 상태 확인 |
|
|
49
|
+
| docuking_list | 서버 파일 목록 조회 |
|
|
50
|
+
| docuking_log | 커밋 히스토리 조회 |
|
|
51
|
+
| docuking_diff | 버전 간 차이 비교 |
|
|
52
|
+
| docuking_rollback | 특정 커밋으로 롤백 |
|
|
53
|
+
| docuking_talk | AI 대화록 저장 (zz_ai_Talk/) |
|
|
54
|
+
| docuking_plan | 작업 계획 관리 (zzz_ai_Plan/) |
|
|
55
|
+
| docuking_done | 작업 완료 처리 |
|
|
56
|
+
| docuking_todo | 킹투두 관리 (zz_ai_Todo/) |
|
|
57
|
+
|
|
58
|
+
## 폴더 구조
|
|
103
59
|
|
|
104
60
|
```
|
|
105
61
|
프로젝트/
|
|
106
|
-
├──
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
└── 뭐든지/
|
|
62
|
+
├── yy_All_Docu/ ← 동기화 대상 (Push/Pull)
|
|
63
|
+
│ └── yy_Coworker_{이름}/ ← 협업자 작업 폴더
|
|
64
|
+
├── zz_ai_Talk/ ← AI 대화록 (로컬 전용)
|
|
65
|
+
├── zz_ai_Todo/ ← AI 투두 (로컬 전용)
|
|
66
|
+
└── zzz_ai_Plan/ ← AI 플랜 (로컬 전용)
|
|
112
67
|
```
|
|
113
68
|
|
|
114
|
-
|
|
69
|
+
**접두사 규칙:**
|
|
70
|
+
- `yy_*`: 동기화 대상
|
|
71
|
+
- `zz_*`: 로컬 전용 (Push 제외)
|
|
72
|
+
|
|
73
|
+
## 웹사이트
|
|
74
|
+
|
|
75
|
+
https://docuking.ai
|
|
115
76
|
|
|
116
77
|
## 라이센스
|
|
117
78
|
|
package/index.js
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* DocuKing MCP Server
|
|
4
|
+
* DocuKing MCP Server v2.0
|
|
5
5
|
*
|
|
6
6
|
* AI 시대의 문서 협업 플랫폼 - AI가 문서를 Push/Pull 할 수 있게 해주는 MCP 서버
|
|
7
7
|
*
|
|
8
|
+
* 폴더 구조:
|
|
9
|
+
* - yy_All_Docu/ : 킹폴더와 동기화 (Push/Pull 대상)
|
|
10
|
+
* - yy_All_Docu/yy_{이름}/ : 협업자 폴더 (동기화 대상)
|
|
11
|
+
* - zz_ai_Talk/ : AI 대화록 (로컬 전용, 킹톡)
|
|
12
|
+
* - zz_ai_Todo/ : AI 투두 (로컬 전용, 킹투두)
|
|
13
|
+
* - zzz_ai_Plan/ : AI 플랜 (로컬 전용, 킹플랜)
|
|
14
|
+
*
|
|
15
|
+
* 접두사 규칙:
|
|
16
|
+
* - yy_* : 동기화 대상 (Push/Pull)
|
|
17
|
+
* - zz_* : 로컬 전용 (동기화 안 됨)
|
|
18
|
+
*
|
|
8
19
|
* 도구:
|
|
9
|
-
* - docuking_init: 레포 연결,
|
|
20
|
+
* - docuking_init: 레포 연결, yy_All_Docu/ 폴더 생성
|
|
10
21
|
* - docuking_push: 로컬 → 서버
|
|
11
22
|
* - docuking_pull: 서버 → 로컬
|
|
12
23
|
*/
|
|
@@ -130,7 +141,7 @@ docuking_done({
|
|
|
130
141
|
### 절대 규칙
|
|
131
142
|
- **작업 시작 전 반드시 \`docuking_plan\` 호출**
|
|
132
143
|
- **작업 완료 후 반드시 \`docuking_done\` 호출**
|
|
133
|
-
- 결과는 \`
|
|
144
|
+
- 결과는 \`zzz_ai_Plan/\`에 자동 저장됨 (로컬 전용)
|
|
134
145
|
`;
|
|
135
146
|
|
|
136
147
|
try {
|
|
@@ -248,7 +259,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
248
259
|
tools: [
|
|
249
260
|
{
|
|
250
261
|
name: 'docuking_init',
|
|
251
|
-
description: '프로젝트를 DocuKing에 연결합니다. .docuking/config.json에 설정 저장,
|
|
262
|
+
description: '프로젝트를 DocuKing에 연결합니다. .docuking/config.json에 설정 저장, yy_All_Docu/ 폴더 생성.\n\n**필수 파라미터:**\n- projectId: 프로젝트 UUID\n- projectName: 프로젝트 이름 (표시용)\n- apiKey: API 키 (sk_xxx 형식)\n- localPath: 로컬 프로젝트 경로',
|
|
252
263
|
inputSchema: {
|
|
253
264
|
type: 'object',
|
|
254
265
|
properties: {
|
|
@@ -274,7 +285,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
274
285
|
},
|
|
275
286
|
{
|
|
276
287
|
name: 'docuking_push',
|
|
277
|
-
description: '
|
|
288
|
+
description: 'yy_All_Docu/ 폴더의 문서를 서버에 업로드합니다. "DocuKing에 올려줘" 요청 시 사용. Git의 add + commit + push를 한 번에 수행.',
|
|
278
289
|
inputSchema: {
|
|
279
290
|
type: 'object',
|
|
280
291
|
properties: {
|
|
@@ -300,7 +311,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
300
311
|
},
|
|
301
312
|
{
|
|
302
313
|
name: 'docuking_pull',
|
|
303
|
-
description: '서버에서 문서를 다운로드하여
|
|
314
|
+
description: '서버에서 문서를 다운로드하여 yy_All_Docu/ 폴더에 저장합니다. "DocuKing에서 가져와" 요청 시 사용.',
|
|
304
315
|
inputSchema: {
|
|
305
316
|
type: 'object',
|
|
306
317
|
properties: {
|
|
@@ -412,7 +423,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
412
423
|
},
|
|
413
424
|
{
|
|
414
425
|
name: 'docuking_talk',
|
|
415
|
-
description: '의미 있는 대화 내용을
|
|
426
|
+
description: '의미 있는 대화 내용을 zz_ai_Talk/ 폴더에 기록합니다 (로컬 전용, 킹톡). AI가 중요한 논의/결정이라고 판단하거나, 사용자가 "이거 기록해줘"라고 요청할 때 사용.',
|
|
416
427
|
inputSchema: {
|
|
417
428
|
type: 'object',
|
|
418
429
|
properties: {
|
|
@@ -439,7 +450,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
439
450
|
},
|
|
440
451
|
{
|
|
441
452
|
name: 'docuking_plan',
|
|
442
|
-
description: '작업 계획 문서를
|
|
453
|
+
description: '작업 계획 문서를 zzz_ai_Plan/ 폴더에 생성/업데이트합니다 (로컬 전용, 킹플랜). 작업 시작 시 계획을 작성하고, 진행하면서 결과를 upsert합니다.',
|
|
443
454
|
inputSchema: {
|
|
444
455
|
type: 'object',
|
|
445
456
|
properties: {
|
|
@@ -508,7 +519,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
508
519
|
},
|
|
509
520
|
{
|
|
510
521
|
name: 'docuking_todo',
|
|
511
|
-
description: `킹투두(King Todo) - 프로젝트 공식 할일을
|
|
522
|
+
description: `킹투두(King Todo) - 프로젝트 공식 할일을 zz_ai_Todo/z_King_Todo.md에 관리합니다 (로컬 전용).
|
|
512
523
|
|
|
513
524
|
**AI 내장 TodoWrite와 다름!** 킹투두는 웹에 동기화되고 팀과 공유됩니다.
|
|
514
525
|
|
|
@@ -579,11 +590,12 @@ DocuKing은 문서 버전 관리 시스템입니다. Git이 코드를 관리하
|
|
|
579
590
|
|
|
580
591
|
## 핵심 개념
|
|
581
592
|
|
|
582
|
-
- **로컬**: 사용자의
|
|
583
|
-
- **웹탐색기**: DocuKing 서버의 파일 저장소 (
|
|
593
|
+
- **로컬**: 사용자의 yy_All_Docu/ 폴더 (동기화 대상)
|
|
594
|
+
- **웹탐색기**: DocuKing 서버의 파일 저장소 (킹폴더)
|
|
584
595
|
- **캔버스**: 선택된 파일을 시각화하는 작업 공간
|
|
596
|
+
- **AI 작업 폴더**: zz_ai_Talk/, zz_ai_Todo/, zzz_ai_Plan/ (로컬 전용)
|
|
585
597
|
|
|
586
|
-
작동 방식: 로컬
|
|
598
|
+
작동 방식: 로컬 yy_All_Docu/ → Push → 킹폴더 → 캔버스에서 시각화
|
|
587
599
|
|
|
588
600
|
## MCP 설정과 프로젝트 연결의 차이 (매우 중요!)
|
|
589
601
|
|
|
@@ -600,7 +612,7 @@ DocuKing은 문서 버전 관리 시스템입니다. Git이 코드를 관리하
|
|
|
600
612
|
### 프로젝트 연결 (각 폴더마다)
|
|
601
613
|
- **목적**: 특정 로컬 폴더를 DocuKing 서버의 프로젝트 ID와 연결
|
|
602
614
|
- **실행 방법**: \`docuking_init(projectId, localPath)\` 도구 호출
|
|
603
|
-
- **결과**: 해당 폴더에 \`
|
|
615
|
+
- **결과**: 해당 폴더에 \`yy_All_Docu/\` 폴더 생성 및 프로젝트 매핑 저장
|
|
604
616
|
- **재시작 불필요**: MCP가 이미 작동 중이면 바로 실행 가능
|
|
605
617
|
- **다중 프로젝트**: 한 컴퓨터에서 여러 폴더를 각각 다른 DocuKing 프로젝트와 연결 가능
|
|
606
618
|
|
|
@@ -615,10 +627,10 @@ DocuKing 문서 폴더는 git에서 제외해야 합니다. 코드는 git으로,
|
|
|
615
627
|
|
|
616
628
|
\`\`\`gitignore
|
|
617
629
|
# DocuKing 문서 폴더 (문서는 DocuKing으로 관리)
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
630
|
+
yy_All_Docu/
|
|
631
|
+
zz_ai_Talk/
|
|
632
|
+
zz_ai_Todo/
|
|
633
|
+
zzz_ai_Plan/
|
|
622
634
|
\`\`\`
|
|
623
635
|
|
|
624
636
|
**왜 gitignore에 등록해야 하나요?**
|
|
@@ -654,12 +666,12 @@ zz_Coworker_*/
|
|
|
654
666
|
특정 커밋으로 되돌립니다. (웹 탐색기에서 사용 가능)
|
|
655
667
|
|
|
656
668
|
### 9. docuking_talk
|
|
657
|
-
의미 있는 대화 내용을 \`
|
|
669
|
+
의미 있는 대화 내용을 \`zz_ai_Talk/\` 폴더에 기록합니다 (로컬 전용, 킹톡).
|
|
658
670
|
- AI가 중요한 논의/결정이라고 판단할 때
|
|
659
671
|
- 사용자가 "이거 기록해줘"라고 요청할 때
|
|
660
672
|
|
|
661
673
|
### 10. docuking_plan
|
|
662
|
-
작업 계획을 \`
|
|
674
|
+
작업 계획을 \`zzz_ai_Plan/\` 폴더에 생성/업데이트합니다 (로컬 전용, 킹플랜).
|
|
663
675
|
- 작업 시작 시 계획 생성
|
|
664
676
|
- 진행하면서 단계별 결과 upsert
|
|
665
677
|
- planId로 기존 계획 찾아서 업데이트
|
|
@@ -731,7 +743,7 @@ DocuKing에는 **오너(Owner)**와 **참여자(Co-worker)** 두 가지 권한
|
|
|
731
743
|
|
|
732
744
|
**예시:**
|
|
733
745
|
\`\`\`
|
|
734
|
-
|
|
746
|
+
yy_All_Docu/
|
|
735
747
|
├── 정책/
|
|
736
748
|
│ └── README.md ← 오너가 작성
|
|
737
749
|
├── 기획/
|
|
@@ -745,7 +757,7 @@ z_DocuKing/
|
|
|
745
757
|
**특징:**
|
|
746
758
|
- 프로젝트에 초대받아 참여한 사람
|
|
747
759
|
- **읽기**: 전체 문서 Pull 가능 (오너의 문서도 볼 수 있음)
|
|
748
|
-
- **쓰기**: 자신의 폴더(\`
|
|
760
|
+
- **쓰기**: 자신의 폴더(\`yy_All_Docu/yy_Coworker_{이름}/\`)에만 Push 가능
|
|
749
761
|
- API Key: \`sk_cw_\`로 시작
|
|
750
762
|
- 프로젝트 설정 변경 불가능
|
|
751
763
|
|
|
@@ -754,36 +766,39 @@ z_DocuKing/
|
|
|
754
766
|
2. MCP 설정 (한 번만)
|
|
755
767
|
3. 프로젝트 연결 (\`docuking_init\`)
|
|
756
768
|
4. Pull로 오너의 문서 가져오기 (\`docuking_pull\`)
|
|
757
|
-
5. 내 폴더에 문서 작성 (\`
|
|
769
|
+
5. 내 폴더에 문서 작성 (\`yy_All_Docu/yy_Coworker_{이름}/\`)
|
|
758
770
|
6. Push (\`docuking_push\`)
|
|
759
771
|
|
|
760
|
-
**폴더
|
|
772
|
+
**폴더 구조:**
|
|
761
773
|
\`\`\`
|
|
762
774
|
프로젝트/
|
|
763
|
-
├── src/
|
|
764
|
-
├──
|
|
775
|
+
├── src/ ← 소스 코드 (git 관리)
|
|
776
|
+
├── yy_All_Docu/ ← 동기화 대상 (Push/Pull)
|
|
765
777
|
│ ├── 정책/
|
|
766
|
-
│ │ └── README.md
|
|
767
|
-
│
|
|
768
|
-
│
|
|
769
|
-
└──
|
|
770
|
-
|
|
771
|
-
|
|
778
|
+
│ │ └── README.md ← 오너의 파일 (읽기만 가능)
|
|
779
|
+
│ ├── 기획/
|
|
780
|
+
│ │ └── 요구사항.md ← 오너의 파일 (읽기만 가능)
|
|
781
|
+
│ └── yy_Coworker_김개발/ ← 참여자 "김개발"의 폴더
|
|
782
|
+
│ ├── 제안서.md ← 여기에만 Push 가능
|
|
783
|
+
│ └── 수정안.md ← 여기에만 Push 가능
|
|
784
|
+
├── zz_ai_Talk/ ← AI 대화록 (로컬 전용)
|
|
785
|
+
├── zz_ai_Todo/ ← AI 투두 (로컬 전용)
|
|
786
|
+
└── zzz_ai_Plan/ ← AI 플랜 (로컬 전용)
|
|
772
787
|
\`\`\`
|
|
773
788
|
|
|
774
789
|
**중요 규칙:**
|
|
775
|
-
- 코워커 폴더(\`
|
|
776
|
-
- 참여자는 Pull로
|
|
790
|
+
- 코워커 폴더(\`yy_Coworker_{이름}/\`)는 yy_All_Docu/ 안에 생성됨
|
|
791
|
+
- 참여자는 Pull로 yy_All_Docu/ 폴더의 오너 문서를 볼 수 있음
|
|
777
792
|
- 참여자는 자신의 폴더에만 Push 가능
|
|
778
793
|
- \`docuking_status\`로 현재 권한과 작업 폴더 확인 가능
|
|
779
794
|
|
|
780
795
|
**참여자가 오너의 파일을 수정하고 싶을 때:**
|
|
781
|
-
1. Pull로 오너의 파일을 로컬에 가져옴 (
|
|
796
|
+
1. Pull로 오너의 파일을 로컬에 가져옴 (yy_All_Docu/에 저장됨)
|
|
782
797
|
2. 내용을 참고하여 자신의 폴더에 수정 제안 작성
|
|
783
|
-
- 예: \`
|
|
798
|
+
- 예: \`yy_All_Docu/yy_Coworker_김개발/정책_README_수정제안.md\`로 작성 후 Push
|
|
784
799
|
|
|
785
800
|
**AI가 참여자에게 안내해야 할 내용:**
|
|
786
|
-
- 참여자의 작업 폴더는 \`
|
|
801
|
+
- 참여자의 작업 폴더는 \`yy_All_Docu/yy_Coworker_{이름}/\`
|
|
787
802
|
- 오너의 파일을 직접 수정할 수 없으므로, 제안서 형태로 작성하도록 안내
|
|
788
803
|
|
|
789
804
|
## AI 응답 가이드 (중요!)
|
|
@@ -837,7 +852,7 @@ Push 완료! 총 10개 파일 중 3개 업로드, 6개 스킵(변경 없음), 1
|
|
|
837
852
|
### 핵심 원칙 (AI 행동 지침)
|
|
838
853
|
|
|
839
854
|
1. **프로젝트 = 폴더**: 하나의 폴더가 하나의 프로젝트
|
|
840
|
-
2. **각 폴더마다
|
|
855
|
+
2. **각 폴더마다 yy_All_Docu/ 생성**: 여러 폴더를 각각 연결 가능
|
|
841
856
|
3. **현재 열려있는 폴더 기준**: 명령어는 현재 작업 중인 폴더에 적용
|
|
842
857
|
4. **커밋 메시지 필수**: push 시 반드시 message 파라미터 포함
|
|
843
858
|
5. **변경 없는 파일 자동 스킵**: 해시 비교로 변경 감지, 스킵된 파일은 결과에 명시
|
|
@@ -867,7 +882,7 @@ AI: (결정이 내려졌으므로 docuking_talk 호출)
|
|
|
867
882
|
})
|
|
868
883
|
\`\`\`
|
|
869
884
|
|
|
870
|
-
**저장 위치:** \`
|
|
885
|
+
**저장 위치:** \`zz_ai_Talk/YYYY-MM-DD_HHMM__제목.md\` (플랫 구조, 로컬 전용)
|
|
871
886
|
|
|
872
887
|
### 작업 계획 관리 (docuking_plan, docuking_done)
|
|
873
888
|
|
|
@@ -918,7 +933,7 @@ AI: docuking_done({
|
|
|
918
933
|
})
|
|
919
934
|
\`\`\`
|
|
920
935
|
|
|
921
|
-
**저장 위치:** \`
|
|
936
|
+
**저장 위치:** \`zzz_ai_Plan/YYYY-MM-DD_HHMM__제목__planId.md\` (플랫 구조, 로컬 전용)
|
|
922
937
|
|
|
923
938
|
**핵심 가치:**
|
|
924
939
|
- AI 세션이 끊겨도 (컴팩션, 세션 종료) 다음 AI가 계획 문서를 보고 이어서 작업 가능
|
|
@@ -973,7 +988,7 @@ AI: docuking_done({
|
|
|
973
988
|
2. 프로젝트 ID, 이름, API 키 확인 (사용자가 제공하거나 요청)
|
|
974
989
|
3. \`docuking_init(projectId, projectName, apiKey, localPath)\` 호출
|
|
975
990
|
4. 연결 완료 메시지 전달:
|
|
976
|
-
- "DocuKing 연결 완료! 📁
|
|
991
|
+
- "DocuKing 연결 완료! 📁 yy_All_Docu/ 폴더가 생성되었습니다."
|
|
977
992
|
- "이제 'DocuKing에 올려줘' 명령을 사용할 수 있습니다."
|
|
978
993
|
|
|
979
994
|
**⚠️ 매우 중요:**
|
|
@@ -986,28 +1001,28 @@ AI: docuking_done({
|
|
|
986
1001
|
**핵심 개념:**
|
|
987
1002
|
- **프로젝트 = 하나의 폴더**
|
|
988
1003
|
- 한 컴퓨터에서 여러 폴더를 각각 다른 DocuKing 프로젝트와 연결 가능
|
|
989
|
-
- 각 폴더마다 \`
|
|
1004
|
+
- 각 폴더마다 \`yy_All_Docu/\` 폴더가 독립적으로 생성됨
|
|
990
1005
|
|
|
991
1006
|
**예시:**
|
|
992
1007
|
\`\`\`
|
|
993
1008
|
C:\\Projects\\MyApp\\
|
|
994
1009
|
├── src/
|
|
995
1010
|
├── package.json
|
|
996
|
-
|
|
1011
|
+
├── yy_All_Docu/ ← 프로젝트 A와 연결 (동기화)
|
|
1012
|
+
├── zz_ai_Talk/ ← AI 대화록 (로컬 전용)
|
|
1013
|
+
├── zz_ai_Todo/ ← AI 투두 (로컬 전용)
|
|
1014
|
+
└── zzz_ai_Plan/ ← AI 플랜 (로컬 전용)
|
|
997
1015
|
|
|
998
1016
|
C:\\Projects\\MyWebsite\\
|
|
999
1017
|
├── pages/
|
|
1000
1018
|
├── components/
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
D:\\Work\\ClientProject\\
|
|
1004
|
-
├── docs/
|
|
1005
|
-
└── z_DocuKing/ ← 프로젝트 C와 연결
|
|
1019
|
+
├── yy_All_Docu/ ← 프로젝트 B와 연결
|
|
1020
|
+
└── zz_ai_*/ ← 로컬 전용 폴더들
|
|
1006
1021
|
\`\`\`
|
|
1007
1022
|
|
|
1008
1023
|
**AI가 해야 할 일:**
|
|
1009
1024
|
- 각 폴더에서 \`docuking_init\`을 호출하면 해당 폴더만 연결됨
|
|
1010
|
-
- 다른 폴더로 이동하면 해당 폴더의 \`
|
|
1025
|
+
- 다른 폴더로 이동하면 해당 폴더의 \`yy_All_Docu/\`가 사용됨
|
|
1011
1026
|
- 여러 프로젝트를 동시에 관리할 수 있음을 인지하고, 현재 작업 중인 폴더 기준으로 동작
|
|
1012
1027
|
|
|
1013
1028
|
**고급: DOCUKING_REPOS 환경변수 (선택사항)**
|
|
@@ -1115,20 +1130,34 @@ docuking_init 호출 시 apiKey 파라미터를 포함해주세요.`,
|
|
|
1115
1130
|
// IDE별 자동 승인 설정 추가 (Claude Code 등)
|
|
1116
1131
|
setupAutoApproval(localPath);
|
|
1117
1132
|
|
|
1118
|
-
// 폴더 생성:
|
|
1119
|
-
|
|
1120
|
-
|
|
1133
|
+
// 폴더 생성: 오너는 yy_All_Docu/, 협업자는 yy_All_Docu/yy_{이름}/
|
|
1134
|
+
const mainFolderName = 'yy_All_Docu';
|
|
1135
|
+
const mainFolderPath = path.join(localPath, mainFolderName);
|
|
1121
1136
|
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
} else {
|
|
1126
|
-
folderName = 'z_DocuKing';
|
|
1127
|
-
workingPath = path.join(localPath, folderName);
|
|
1137
|
+
// yy_All_Docu 폴더는 항상 생성
|
|
1138
|
+
if (!fs.existsSync(mainFolderPath)) {
|
|
1139
|
+
fs.mkdirSync(mainFolderPath, { recursive: true });
|
|
1128
1140
|
}
|
|
1129
1141
|
|
|
1130
|
-
|
|
1131
|
-
|
|
1142
|
+
// zz_ai_* 폴더도 함께 생성 (로컬 전용)
|
|
1143
|
+
const aiFolders = ['zz_ai_Talk', 'zz_ai_Todo', 'zzz_ai_Plan'];
|
|
1144
|
+
for (const folder of aiFolders) {
|
|
1145
|
+
const folderPath = path.join(localPath, folder);
|
|
1146
|
+
if (!fs.existsSync(folderPath)) {
|
|
1147
|
+
fs.mkdirSync(folderPath, { recursive: true });
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
let coworkerFolderName = null;
|
|
1152
|
+
let coworkerFolderPath = null;
|
|
1153
|
+
|
|
1154
|
+
if (isCoworker) {
|
|
1155
|
+
// 협업자: yy_All_Docu/yy_Coworker_{이름}/ 폴더 추가 생성
|
|
1156
|
+
coworkerFolderName = `yy_Coworker_${coworkerName}`;
|
|
1157
|
+
coworkerFolderPath = path.join(mainFolderPath, coworkerFolderName);
|
|
1158
|
+
if (!fs.existsSync(coworkerFolderPath)) {
|
|
1159
|
+
fs.mkdirSync(coworkerFolderPath, { recursive: true });
|
|
1160
|
+
}
|
|
1132
1161
|
}
|
|
1133
1162
|
|
|
1134
1163
|
// 연결 완료 안내 (오너/코워커에 따라 다른 메시지)
|
|
@@ -1140,17 +1169,18 @@ docuking_init 호출 시 apiKey 파라미터를 포함해주세요.`,
|
|
|
1140
1169
|
text: `DocuKing 연결 완료! (참여자)
|
|
1141
1170
|
|
|
1142
1171
|
📁 프로젝트: ${projectName}
|
|
1143
|
-
📂
|
|
1172
|
+
📂 yy_All_Docu/ 폴더가 생성되었습니다.
|
|
1173
|
+
📂 yy_All_Docu/${coworkerFolderName}/ 작업 폴더가 생성되었습니다.
|
|
1144
1174
|
👤 참여자: ${coworkerName}
|
|
1145
1175
|
🔑 설정 저장: .docuking/config.json
|
|
1146
1176
|
|
|
1147
1177
|
참여자 사용법:
|
|
1148
|
-
- "DocuKing에서 가져와" →
|
|
1149
|
-
-
|
|
1178
|
+
- "DocuKing에서 가져와" → 전체 문서를 yy_All_Docu/에 Pull
|
|
1179
|
+
- yy_All_Docu/${coworkerFolderName}/ 폴더에 문서 작성
|
|
1150
1180
|
- "DocuKing에 올려줘" → 내 문서를 서버에 Push
|
|
1151
1181
|
|
|
1152
|
-
💡 참여자는
|
|
1153
|
-
|
|
1182
|
+
💡 참여자는 yy_All_Docu/${coworkerFolderName}/ 폴더에만 Push할 수 있습니다.
|
|
1183
|
+
다른 문서는 Pull로 읽을 수 있지만 수정은 자기 폴더에서 작성하세요.`,
|
|
1154
1184
|
},
|
|
1155
1185
|
],
|
|
1156
1186
|
};
|
|
@@ -1162,16 +1192,22 @@ docuking_init 호출 시 apiKey 파라미터를 포함해주세요.`,
|
|
|
1162
1192
|
text: `DocuKing 연결 완료!
|
|
1163
1193
|
|
|
1164
1194
|
📁 프로젝트: ${projectName}
|
|
1165
|
-
📂
|
|
1195
|
+
📂 yy_All_Docu/ 폴더가 생성되었습니다.
|
|
1166
1196
|
🔑 설정 저장: .docuking/config.json
|
|
1167
1197
|
|
|
1168
1198
|
이제부터 문서 관리는 DocuKing에서 시작합니다:
|
|
1169
|
-
-
|
|
1199
|
+
- yy_All_Docu/ 하위에 문서를 넣으면 DocuKing 서버로 암호화되어 저장됩니다
|
|
1170
1200
|
- 협업자들과 안전하게 문서를 공유할 수 있습니다
|
|
1171
1201
|
|
|
1172
1202
|
사용법:
|
|
1173
1203
|
- "DocuKing에 올려줘" → 로컬 문서를 서버에 Push
|
|
1174
|
-
- "DocuKing에서 가져와" → 서버 문서를 로컬로 Pull
|
|
1204
|
+
- "DocuKing에서 가져와" → 서버 문서를 로컬로 Pull
|
|
1205
|
+
|
|
1206
|
+
폴더 구조:
|
|
1207
|
+
- yy_All_Docu/ : 동기화 대상 (킹폴더)
|
|
1208
|
+
- zz_ai_Talk/ : AI 대화록 (로컬 전용, 킹톡)
|
|
1209
|
+
- zz_ai_Todo/ : AI 투두 (로컬 전용, 킹투두)
|
|
1210
|
+
- zzz_ai_Plan/ : AI 플랜 (로컬 전용, 킹플랜)`,
|
|
1175
1211
|
},
|
|
1176
1212
|
],
|
|
1177
1213
|
};
|
|
@@ -1231,37 +1267,37 @@ Git처럼 무엇을 변경했는지 명확히 작성해주세요.
|
|
|
1231
1267
|
const coworkerMatch = apiKey.match(/^sk_[a-f0-9]+_cw_([^_]+)_/);
|
|
1232
1268
|
const isCoworker = !!coworkerMatch;
|
|
1233
1269
|
const coworkerName = coworkerMatch ? coworkerMatch[1] : null;
|
|
1234
|
-
const coworkerFolderName = isCoworker ? `
|
|
1270
|
+
const coworkerFolderName = isCoworker ? `yy_Coworker_${coworkerName}` : null;
|
|
1235
1271
|
|
|
1236
|
-
// 작업 폴더 결정:
|
|
1272
|
+
// 작업 폴더 결정: 모두 yy_All_Docu/ 사용, 협업자는 yy_All_Docu/yy_Coworker_{이름}/ 에서 작업
|
|
1273
|
+
const mainFolderPath = path.join(localPath, 'yy_All_Docu');
|
|
1237
1274
|
let workingPath;
|
|
1238
1275
|
let serverPathPrefix = ''; // 서버에 저장될 때 경로 접두사
|
|
1239
1276
|
|
|
1240
1277
|
if (isCoworker) {
|
|
1241
|
-
//
|
|
1242
|
-
workingPath = path.join(
|
|
1278
|
+
// 협업자: yy_All_Docu/yy_Coworker_{이름}/ 폴더에서 Push
|
|
1279
|
+
workingPath = path.join(mainFolderPath, coworkerFolderName);
|
|
1243
1280
|
serverPathPrefix = `${coworkerFolderName}/`;
|
|
1244
1281
|
|
|
1245
1282
|
if (!fs.existsSync(workingPath)) {
|
|
1246
1283
|
// 폴더가 없으면 생성
|
|
1247
1284
|
fs.mkdirSync(workingPath, { recursive: true });
|
|
1248
|
-
console.log(`[DocuKing]
|
|
1285
|
+
console.log(`[DocuKing] 협업자 폴더 생성: yy_All_Docu/${coworkerFolderName}/`);
|
|
1249
1286
|
}
|
|
1250
1287
|
} else {
|
|
1251
|
-
// 오너:
|
|
1252
|
-
|
|
1253
|
-
if (!folderName) {
|
|
1288
|
+
// 오너: yy_All_Docu/ 폴더 사용
|
|
1289
|
+
if (!fs.existsSync(mainFolderPath)) {
|
|
1254
1290
|
return {
|
|
1255
1291
|
content: [
|
|
1256
1292
|
{
|
|
1257
1293
|
type: 'text',
|
|
1258
|
-
text: `오류:
|
|
1294
|
+
text: `오류: yy_All_Docu 폴더가 없습니다.
|
|
1259
1295
|
docuking_init을 먼저 실행하세요.`,
|
|
1260
1296
|
},
|
|
1261
1297
|
],
|
|
1262
1298
|
};
|
|
1263
1299
|
}
|
|
1264
|
-
workingPath =
|
|
1300
|
+
workingPath = mainFolderPath;
|
|
1265
1301
|
}
|
|
1266
1302
|
|
|
1267
1303
|
// 파일 목록 수집
|
|
@@ -1284,7 +1320,7 @@ docuking_init을 먼저 실행하세요.`,
|
|
|
1284
1320
|
};
|
|
1285
1321
|
}
|
|
1286
1322
|
|
|
1287
|
-
// 서버 경로: 코워커는
|
|
1323
|
+
// 서버 경로: 코워커는 yy_Coworker_{이름}/파일경로, 오너는 파일경로
|
|
1288
1324
|
const serverFilePath = serverPathPrefix + filePath;
|
|
1289
1325
|
filesToPush.push({ path: filePath, serverPath: serverFilePath, fullPath, fileType });
|
|
1290
1326
|
}
|
|
@@ -1451,7 +1487,7 @@ docuking_init을 먼저 실행하세요.`,
|
|
|
1451
1487
|
},
|
|
1452
1488
|
body: JSON.stringify({
|
|
1453
1489
|
projectId,
|
|
1454
|
-
path: file.serverPath, // 서버 경로 (코워커는
|
|
1490
|
+
path: file.serverPath, // 서버 경로 (코워커는 yy_Coworker_{이름}/파일경로)
|
|
1455
1491
|
content,
|
|
1456
1492
|
encoding, // 'utf-8' 또는 'base64'
|
|
1457
1493
|
message, // 커밋 메시지
|
|
@@ -1679,10 +1715,11 @@ async function handlePull(args) {
|
|
|
1679
1715
|
|
|
1680
1716
|
const projectId = projectInfo.projectId;
|
|
1681
1717
|
|
|
1682
|
-
//
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1718
|
+
// yy_All_Docu 폴더 (없으면 생성)
|
|
1719
|
+
const mainFolderName = 'yy_All_Docu';
|
|
1720
|
+
const mainFolderPath = path.join(localPath, mainFolderName);
|
|
1721
|
+
if (!fs.existsSync(mainFolderPath)) {
|
|
1722
|
+
fs.mkdirSync(mainFolderPath, { recursive: true });
|
|
1686
1723
|
}
|
|
1687
1724
|
|
|
1688
1725
|
// 파일 목록 조회
|
|
@@ -1750,17 +1787,9 @@ async function handlePull(args) {
|
|
|
1750
1787
|
|
|
1751
1788
|
const data = await response.json();
|
|
1752
1789
|
|
|
1753
|
-
// 서버
|
|
1754
|
-
//
|
|
1755
|
-
|
|
1756
|
-
const coworkerPrefixMatch = file.path.match(/^(zz_Coworker_[^/]+)\//);
|
|
1757
|
-
if (coworkerPrefixMatch) {
|
|
1758
|
-
// 코워커 폴더 파일: 프로젝트 루트에 zz_Coworker_{이름}/ 폴더로 저장
|
|
1759
|
-
fullPath = path.join(localPath, file.path);
|
|
1760
|
-
} else {
|
|
1761
|
-
// 오너 폴더 파일: z_DocuKing/ 폴더에 저장
|
|
1762
|
-
fullPath = path.join(localPath, ownerFolderName, file.path);
|
|
1763
|
-
}
|
|
1790
|
+
// 서버 경로를 그대로 yy_All_Docu/ 아래에 저장
|
|
1791
|
+
// 협업자 폴더(yy_이름/)도 yy_All_Docu/ 안에 있으므로 동일하게 처리
|
|
1792
|
+
const fullPath = path.join(mainFolderPath, file.path);
|
|
1764
1793
|
|
|
1765
1794
|
// 디렉토리 생성
|
|
1766
1795
|
fs.mkdirSync(path.dirname(fullPath), { recursive: true });
|
|
@@ -1941,31 +1970,15 @@ function getFileType(fileName) {
|
|
|
1941
1970
|
return 'binary';
|
|
1942
1971
|
}
|
|
1943
1972
|
|
|
1944
|
-
// 유틸:
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
const entries = fs.readdirSync(projectPath, { withFileTypes: true });
|
|
1949
|
-
for (const entry of entries) {
|
|
1950
|
-
// .docuking은 설정 폴더이므로 제외 (숨김 폴더)
|
|
1951
|
-
if (entry.name.startsWith('.')) {
|
|
1952
|
-
continue;
|
|
1953
|
-
}
|
|
1954
|
-
if (entry.isDirectory() && entry.name.toLowerCase().includes('docuking')) {
|
|
1955
|
-
return entry.name;
|
|
1956
|
-
}
|
|
1957
|
-
}
|
|
1958
|
-
} catch (e) {
|
|
1959
|
-
// 디렉토리 읽기 실패
|
|
1960
|
-
}
|
|
1961
|
-
return null;
|
|
1973
|
+
// 유틸: yy_All_Docu 폴더 존재 확인
|
|
1974
|
+
function hasAllDocuFolder(projectPath) {
|
|
1975
|
+
const allDocuPath = path.join(projectPath, 'yy_All_Docu');
|
|
1976
|
+
return fs.existsSync(allDocuPath);
|
|
1962
1977
|
}
|
|
1963
1978
|
|
|
1964
1979
|
// 유틸: 디렉토리 재귀 탐색
|
|
1965
1980
|
// excludedFiles: 제외된 파일 목록을 수집할 배열 (선택)
|
|
1966
|
-
//
|
|
1967
|
-
const AI_WORK_FOLDERS = ['z_Talk', 'z_Todo', 'z_King_Todo', 'zz_Plan_Result'];
|
|
1968
|
-
|
|
1981
|
+
// zz_* 폴더는 로컬 전용이므로 동기화에서 제외
|
|
1969
1982
|
function collectFiles(basePath, relativePath, results, excludedFiles = null) {
|
|
1970
1983
|
const fullPath = path.join(basePath, relativePath);
|
|
1971
1984
|
const entries = fs.readdirSync(fullPath, { withFileTypes: true });
|
|
@@ -1974,9 +1987,9 @@ function collectFiles(basePath, relativePath, results, excludedFiles = null) {
|
|
|
1974
1987
|
const entryRelPath = relativePath ? `${relativePath}/${entry.name}` : entry.name;
|
|
1975
1988
|
|
|
1976
1989
|
if (entry.isDirectory()) {
|
|
1977
|
-
//
|
|
1978
|
-
if (
|
|
1979
|
-
console.error(`[DocuKing] 제외됨: ${entryRelPath}/ (
|
|
1990
|
+
// zz_* 폴더는 로컬 전용 (AI 작업 기록 등)이므로 동기화에서 제외
|
|
1991
|
+
if (entry.name.startsWith('zz_')) {
|
|
1992
|
+
console.error(`[DocuKing] 제외됨: ${entryRelPath}/ (zz_* 폴더 - 로컬 전용)`);
|
|
1980
1993
|
continue;
|
|
1981
1994
|
}
|
|
1982
1995
|
collectFiles(basePath, entryRelPath, results, excludedFiles);
|
|
@@ -2056,20 +2069,20 @@ async function handleStatus(args) {
|
|
|
2056
2069
|
const coworkerMatch = apiKey.match(/^sk_[a-f0-9]+_cw_([^_]+)_/);
|
|
2057
2070
|
const isCoworker = !!coworkerMatch;
|
|
2058
2071
|
const coworkerName = coworkerMatch ? coworkerMatch[1] : null;
|
|
2059
|
-
const coworkerFolderName = isCoworker ? `
|
|
2072
|
+
const coworkerFolderName = isCoworker ? `yy_Coworker_${coworkerName}` : null;
|
|
2060
2073
|
|
|
2061
2074
|
// 권한 정보 구성
|
|
2062
2075
|
let permissionInfo = '';
|
|
2063
2076
|
if (isCoworker) {
|
|
2064
2077
|
permissionInfo = `\n\n## 현재 권한: 참여자 (Co-worker)
|
|
2065
2078
|
- 이름: ${coworkerName}
|
|
2066
|
-
- 읽기 권한: 전체 문서 (Pull로
|
|
2067
|
-
- 쓰기 권한:
|
|
2068
|
-
- 설명:
|
|
2079
|
+
- 읽기 권한: 전체 문서 (Pull로 yy_All_Docu/ 폴더의 문서 가져오기 가능)
|
|
2080
|
+
- 쓰기 권한: yy_All_Docu/${coworkerFolderName}/ 폴더만
|
|
2081
|
+
- 설명: 협업자 폴더에서 작업하면 자동으로 서버에 Push됩니다.`;
|
|
2069
2082
|
} else {
|
|
2070
2083
|
permissionInfo = `\n\n## 현재 권한: 오너 (Owner)
|
|
2071
2084
|
- 읽기 권한: 전체 문서
|
|
2072
|
-
- 쓰기 권한:
|
|
2085
|
+
- 쓰기 권한: yy_All_Docu/ 폴더 전체 (제한 없음)
|
|
2073
2086
|
- 설명: 프로젝트의 모든 폴더에 Push할 수 있습니다.`;
|
|
2074
2087
|
}
|
|
2075
2088
|
|
|
@@ -2095,26 +2108,25 @@ async function handleStatus(args) {
|
|
|
2095
2108
|
// 로컬 파일 목록 조회
|
|
2096
2109
|
let localFiles = [];
|
|
2097
2110
|
let pushableFiles = [];
|
|
2111
|
+
const mainFolderPath = path.join(localPath, 'yy_All_Docu');
|
|
2098
2112
|
|
|
2099
2113
|
if (isCoworker) {
|
|
2100
|
-
//
|
|
2101
|
-
const coworkerPath = path.join(
|
|
2114
|
+
// 협업자: yy_All_Docu/yy_{이름}/ 폴더에서 파일 수집
|
|
2115
|
+
const coworkerPath = path.join(mainFolderPath, coworkerFolderName);
|
|
2102
2116
|
if (fs.existsSync(coworkerPath)) {
|
|
2103
2117
|
collectFiles(coworkerPath, '', localFiles);
|
|
2104
2118
|
}
|
|
2105
|
-
pushableFiles = localFiles; //
|
|
2119
|
+
pushableFiles = localFiles; // 협업자는 자기 폴더의 모든 파일 Push 가능
|
|
2106
2120
|
} else {
|
|
2107
|
-
// 오너:
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
if (docuKingPath && fs.existsSync(docuKingPath)) {
|
|
2111
|
-
collectFiles(docuKingPath, '', localFiles);
|
|
2121
|
+
// 오너: yy_All_Docu/ 폴더에서 파일 수집
|
|
2122
|
+
if (fs.existsSync(mainFolderPath)) {
|
|
2123
|
+
collectFiles(mainFolderPath, '', localFiles);
|
|
2112
2124
|
}
|
|
2113
2125
|
pushableFiles = localFiles; // 오너는 모든 파일 Push 가능
|
|
2114
2126
|
}
|
|
2115
2127
|
|
|
2116
2128
|
const projectNameInfo = projectName ? ` (${projectName})` : '';
|
|
2117
|
-
const workingFolder = isCoworker ? coworkerFolderName : '
|
|
2129
|
+
const workingFolder = isCoworker ? `yy_All_Docu/${coworkerFolderName}` : 'yy_All_Docu';
|
|
2118
2130
|
const statusText = `DocuKing 동기화 상태
|
|
2119
2131
|
|
|
2120
2132
|
**프로젝트**: ${projectId}${projectNameInfo}
|
|
@@ -2252,8 +2264,8 @@ function generatePlanId() {
|
|
|
2252
2264
|
async function handleTodo(args) {
|
|
2253
2265
|
const { localPath, action, todo, todoId } = args;
|
|
2254
2266
|
|
|
2255
|
-
//
|
|
2256
|
-
const todoBasePath = path.join(localPath, '
|
|
2267
|
+
// zz_ai_Todo 폴더 경로 (로컬 전용, 킹투두)
|
|
2268
|
+
const todoBasePath = path.join(localPath, 'zz_ai_Todo');
|
|
2257
2269
|
const todoFilePath = path.join(todoBasePath, 'z_King_Todo.md');
|
|
2258
2270
|
|
|
2259
2271
|
// 폴더 생성
|
|
@@ -2414,7 +2426,7 @@ async function handleTodo(args) {
|
|
|
2414
2426
|
text: `📋 킹투두 미결: 없음
|
|
2415
2427
|
|
|
2416
2428
|
✅ 완료: ${completedCount}개
|
|
2417
|
-
📁 전체 기록:
|
|
2429
|
+
📁 전체 기록: zz_ai_Todo/z_King_Todo.md`,
|
|
2418
2430
|
}],
|
|
2419
2431
|
};
|
|
2420
2432
|
}
|
|
@@ -2429,7 +2441,7 @@ async function handleTodo(args) {
|
|
|
2429
2441
|
${listText}
|
|
2430
2442
|
|
|
2431
2443
|
✅ 완료: ${completedCount}개
|
|
2432
|
-
📁 전체 기록:
|
|
2444
|
+
📁 전체 기록: zz_ai_Todo/z_King_Todo.md`,
|
|
2433
2445
|
}],
|
|
2434
2446
|
};
|
|
2435
2447
|
}
|
|
@@ -2443,8 +2455,8 @@ ${listText}
|
|
|
2443
2455
|
async function handleTalk(args) {
|
|
2444
2456
|
const { localPath, title, content, tags = [] } = args;
|
|
2445
2457
|
|
|
2446
|
-
//
|
|
2447
|
-
const talkBasePath = path.join(localPath, '
|
|
2458
|
+
// zz_ai_Talk 폴더 경로 (로컬 전용, 킹톡)
|
|
2459
|
+
const talkBasePath = path.join(localPath, 'zz_ai_Talk');
|
|
2448
2460
|
|
|
2449
2461
|
// 날짜 기반 파일명 생성
|
|
2450
2462
|
const { fileName, timestamp } = generateDateFileName(title);
|
|
@@ -2496,8 +2508,8 @@ ${content}
|
|
|
2496
2508
|
async function handlePlan(args) {
|
|
2497
2509
|
const { localPath, planId, title, goal, steps = [], notes } = args;
|
|
2498
2510
|
|
|
2499
|
-
//
|
|
2500
|
-
const planBasePath = path.join(localPath, '
|
|
2511
|
+
// zzz_ai_Plan 폴더 경로 (로컬 전용, 킹플랜)
|
|
2512
|
+
const planBasePath = path.join(localPath, 'zzz_ai_Plan');
|
|
2501
2513
|
|
|
2502
2514
|
// 기존 계획 업데이트 또는 새 계획 생성
|
|
2503
2515
|
let targetPlanId = planId;
|
|
@@ -2646,8 +2658,8 @@ function findPlanFiles(basePath, planId) {
|
|
|
2646
2658
|
async function handleDone(args) {
|
|
2647
2659
|
const { localPath, planId, summary, artifacts = [] } = args;
|
|
2648
2660
|
|
|
2649
|
-
//
|
|
2650
|
-
const planBasePath = path.join(localPath, '
|
|
2661
|
+
// zzz_ai_Plan 폴더 경로 (로컬 전용, 킹플랜)
|
|
2662
|
+
const planBasePath = path.join(localPath, 'zzz_ai_Plan');
|
|
2651
2663
|
|
|
2652
2664
|
// 계획 파일 찾기
|
|
2653
2665
|
const planFiles = findPlanFiles(planBasePath, planId);
|
package/package.json
CHANGED
package/DEPLOY_TASK.md
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# MCP 패키지 배포 작업지시
|
|
2
|
-
|
|
3
|
-
## 작업 개요
|
|
4
|
-
docurepo-mcp 패키지 v1.0.5를 npm에 배포
|
|
5
|
-
|
|
6
|
-
## 변경 사항
|
|
7
|
-
- Push 시 Sync 상태 API 호출 추가
|
|
8
|
-
- 시작: `POST /projects/:id/sync/start` (totalFiles 전달)
|
|
9
|
-
- 진행: `POST /projects/:id/sync/progress` (5개마다)
|
|
10
|
-
- 완료: `POST /projects/:id/sync/complete`
|
|
11
|
-
|
|
12
|
-
## 배포 절차
|
|
13
|
-
|
|
14
|
-
### 1. npm 로그인 확인
|
|
15
|
-
```bash
|
|
16
|
-
cd c:\2025_Project\docurepo\docurepo-mcp
|
|
17
|
-
npm whoami
|
|
18
|
-
```
|
|
19
|
-
- 로그인 안되어 있으면: `npm login`
|
|
20
|
-
|
|
21
|
-
### 2. 패키지 배포
|
|
22
|
-
```bash
|
|
23
|
-
npm publish
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
### 3. 배포 확인
|
|
27
|
-
```bash
|
|
28
|
-
npm view docurepo-mcp version
|
|
29
|
-
```
|
|
30
|
-
- 1.0.5가 나오면 성공
|
|
31
|
-
|
|
32
|
-
## 완료 후
|
|
33
|
-
- 사용자가 `npx docurepo-mcp` 재실행하면 새 버전 적용됨
|