Skip to content

Wiki 서비스별 독립 워크스페이스 설정 및 색인 상태 조회#4

Open
zaruous wants to merge 7 commits into
masterfrom
claude/tag-build-failure-cwh073
Open

Wiki 서비스별 독립 워크스페이스 설정 및 색인 상태 조회#4
zaruous wants to merge 7 commits into
masterfrom
claude/tag-build-failure-cwh073

Conversation

@zaruous

@zaruous zaruous commented Jun 25, 2026

Copy link
Copy Markdown
Owner

개요

wiki-mcp 서비스를 여러 개 등록할 때 각 서비스가 독립적인 워크스페이스를 가질 수 있도록 아키텍처를 개선했습니다. 또한 위키 워크스페이스의 벡터 색인 상태를 페이지별로 조회하는 UI를 추가했습니다.

주요 변경사항

1. 플러그인-서비스 연동 아키텍처

  • ServiceDefinition.packId 필드 추가: 서비스를 생성한 원본 팩 id 저장 (예: "wiki-mcp")
  • PluginManifest.linkedServiceType 필드 추가: 플러그인이 연동할 서비스 팩 선언
  • PluginManager.getCommands(ServiceRegistry) 오버로드: packId가 일치하는 서비스가 정확히 1개일 때만 linkedServiceId 해석
  • ServiceRegistry.findById(), findByPackId() 추가: 서비스 조회 헬퍼 메서드

2. 서비스별 워크스페이스 설정

  • WikiWorkspaceInitializer.rememberWorkspace(ServiceRegistry, serviceId, workspace) 오버로드 추가: 서비스 argValues["workspace"]에 직접 저장
  • BuiltinServiceSetupController: wiki-mcp 등록 시 전역 설정 wiki.defaultCwdargValues["workspace"]에 초기값으로 주입
  • 위키 다이얼로그 (WikiQueryDialog, WikiIngestDialog, WikiBrowserDialog):
    • resolveWorkspace() 메서드 추가로 linkedServiceId 유무에 따라 서비스 또는 전역 설정에서 경로 읽기
    • 워크스페이스 저장 시 서비스 연동 여부에 따라 분기 처리

3. 위키 색인 상태 조회 UI

  • WikiIndexStatusDialog 신규 추가: 워크스페이스의 벡터 색인 상태를 페이지별로 조회
    • 경로 입력 + 찾기 버튼
    • 색인 상태(최신/갱신 필요/미색인/빈 파일/고아) 테이블 표시
    • 청크 수, 파일 크기 등 메타데이터 표시
    • 요약 통계 (총 페이지 수, 상태별 분류)

4. 마크다운 전처리 및 청킹

  • WikiPreprocessor 신규 추가: 위키 마크다운을 임베딩용 청크로 전처리
    • YAML frontmatter에서 type·tags 추출
    • 경로·분류·태그 접두어 추가로 임베딩 품질 향상
    • 단락 경계 우선 청킹 + 단어 경계 강제 분할
    • 청크 간 중첩(overlap) 지원으로 검색 경계 손실 완화

5. 플러그인 설정

  • plugins/wiki-agent/plugin.json: `

https://claude.ai/code/session_0117hJRu1N61JNxohud5Cfms

claude added 7 commits June 24, 2026 15:52
v1.1.0 태그 빌드에서 누락된 두 클래스 참조로 10개 컴파일 에러 발생.

- WikiPreprocessor: Options(targetChunkChars/maxChunkChars/chunkOverlapChars) +
  PreparedDocument(chunks/type/tags/warnings) 레코드, preprocess() 정적 메서드 구현.
  WikiChunker·WikiIndexService에서 참조.
- WikiIndexStatusDialog: SettingsDialog의 '선택 디렉토리 색인 상태 확인' 버튼에서
  열리는 모달. WikiIndexService.inspectWorkspace()를 백그라운드로 호출해
  페이지별 CURRENT/STALE/NOT_INDEXED/ORPHANED 상태를 테이블로 표시.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117hJRu1N61JNxohud5Cfms
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117hJRu1N61JNxohud5Cfms
- ServiceDefinition에 packId 추가 — 팩에서 등록된 서비스에 원본 pack id 영속화
- BuiltinServiceSetupController: 등록 시 packId 설정, wiki-mcp 신규 서비스에 defaultCwd 주입
- PluginManifest에 linkedServiceType 추가 — 플러그인-서비스 연동 선언
- ServiceRegistry: findById / findByPackId 메서드 추가
- PluginManager: PluginCommandContribution에 linkedServiceId 추가,
  getCommands(ServiceRegistry) 오버로드로 단일 서비스 인스턴스 자동 연결
- plugin.json: linkedServiceType: "wiki-mcp" 선언, wiki.defaultCwd 설명 갱신
- WikiQueryDialog / WikiIngestDialog: linkedServiceId 기반 서비스 argValues["workspace"] 조회,
  서비스 연동 시 전역 설정 대신 서비스 정의 갱신
- WikiBrowserDialog: PluginCommandContribution 파라미터 추가, 서비스 workspace 우선 사용
- WikiWorkspaceInitializer: rememberWorkspace(ServiceRegistry, serviceId, workspace) 오버로드 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117hJRu1N61JNxohud5Cfms
- WikiBrowserDialog.resolveWorkspace(): 하드코딩된 "wiki-agent" → contribution.pluginId()로 수정
- WikiBrowserDialog/WikiQueryDialog/WikiIngestDialog: resolveWorkspace()에 contribution != null 가드 추가 및 @return Javadoc 추가
- PluginCommandContribution 레코드: 파라미터 목록 내 /** */ Javadoc(유효하지 않은 Java 문법) 제거 → 클래스 수준 @param으로 이동
- getCommands() 오버로드: @return Javadoc 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117hJRu1N61JNxohud5Cfms
- 설정 3계층(전역 앱/플러그인 전역/서비스 인스턴스) 구조와 역할 문서화
- 플러그인 전역 설정은 생성 시 기본값 전용 원칙 명시
- ServiceDefinition.packId, linkedServiceType, linkedServiceId 연동 흐름 기술
- resolveWorkspace() 결정 순서(linkedServiceId → argValues → pluginSettings 폴백) 명시
- 위키 서비스별 워크스페이스 설정 작업 이력 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117hJRu1N61JNxohud5Cfms
- 설정 원칙 4(wiki 다이얼로그 resolveWorkspace) 제거 — 특정 기능 종속 내용
- 원칙 1~3 예시를 wiki 종속 키명에서 일반 표현으로 변경
- 빌드 상태(상세 구현 일지) → 현재 구현 기능 요약 표로 재편
- 상세 구현 내용은 docs/와 git 로그로 관리

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117hJRu1N61JNxohud5Cfms
- docs/done/wiki-per-service-workspace.md: wiki-mcp 서비스별 워크스페이스 설정
  아키텍처 전환(전역 defaultCwd → 서비스 argValues) 상세 기록
- docs/llm-manager/plugin-service-linking.md: 플러그인-서비스 연동 아키텍처
  (linkedServiceType/linkedServiceId/packId 흐름, 인스턴스별 설정 저장 방식)
- docs/llm-manager/wiki-agent.md: 구현 메모에 서비스별 워크스페이스 패턴 참조 추가

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117hJRu1N61JNxohud5Cfms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants