feat: Discord /ingest content 파라미터 추가 및 /confirm_ingest 슬래시 커맨드 등록#245
Merged
seyoung4503 merged 9 commits intoJul 19, 2026
Merged
Conversation
Google OKF 스펙을 따라 KV 용어를 .md 파일로 내보내고 불러오는 OkfBundle 어댑터를 추가한다. - adapters/storage/okf_bundle.py 신규: export/import, kind별 폴더 라우팅 - pyproject.toml: PyYAML 의존성 추가 - 신규 테스트 9개: 직렬화 단위, 폴더 구조, round-trip Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ingest_doc: 추출된 후보를 KV에 pending_ingest:{ref} 키로 임시 저장
- confirm_ingest: pending 후보를 FedEntry로 변환해 KV 등록 (all/인덱스 선택)
- OKF_BUNDLE_DIR env var 설정 시 confirm 후 OkfBundle로 자동 export
- HarnessContext.okf_bundle_dir 필드 추가 (ContextConcierge가 env에서 주입)
- 테스트 14개 신규 추가
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- confirm_ingest: FedEntry 등록 성공 후 pending_ingest:{ref} 키 삭제
- ingest_doc: content 인라인 입력 시 ref를 md5 해시 기반으로 고유화
('inline' 고정 → 'inline:{md5[:8]}')하여 연속 ingestion 시 키 충돌 방지
- 테스트: pending 키 삭제 검증 케이스 추가
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- _validate_layer 공통 함수 추출: layer 정규화, guild is_admin 체크,
빈 channel_id 가드를 define/confirm_ingest 양쪽에서 공유
- okf_bundle: term에 /,\ 포함 시 path traversal 차단 + is_relative_to 가드
- okf_bundle: frontmatter 파싱을 split("\n---\n") 방식으로 교체해
definition 본문에 --- 포함 시 조용히 유실되던 버그 수정
- 테스트: guild 비관리자, 빈 channel_id, 잘못된 layer 케이스 3개 추가
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
_concept_path의 ValueError를 try/except 범위 안으로 포함해 악의적인 term 하나가 export 루프 전체를 중단시키지 않도록 수정 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- /ingest: ref(파일명) 외에 content(텍스트 직접 입력) 파라미터 지원 - /confirm_ingest: ingest 후보를 시멘틱 레이어에 등록하는 슬래시 커맨드 추가 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#️⃣ Issue Number
없음
📝 요약(Summary)
한 줄 요약: ingest → confirm 흐름을 Discord 슬래시 커맨드로 완성합니다.
해결하려는 문제
PR3(#243)에서
confirm_ingest툴이 추가됐지만 Discord 프론트엔드에 연결되지 않아 사용자가 Discord에서 직접 호출할 방법이 없었습니다. 또한 기존/ingest가 파일ref만 받고 텍스트 직접 입력(content)을 지원하지 않아 Discord 환경에서 실용성이 낮았습니다.이번 변경으로 달라지는 것
/ingest— content 파라미터 추가/confirm_ingest— 새 슬래시 커맨드ingest로 추출한 후보를 검토 후 시멘틱 레이어에 등록합니다.
완성된 Discord 사용 플로우
다음 PR과의 관계
PR3(#243) 머지 후 순차 머지 부탁드립니다.
PR Checklist