* Add server beta runtime foundation * Address server beta review findings * Resolve server beta review comments * Tighten server beta review follow-ups * Harden server beta auth and search * Avoid unnecessary FTS rebuilds * Block scoped keys from creating projects * Release BullMQ claims best effort on close * Address server beta review blockers * Reset BullMQ claims best effort * Add Postgres observation storage foundation * feat(server-beta): add independent runtime service Introduce src/server/runtime/ as a self-contained server-beta runtime that owns its lifecycle, Postgres bootstrap, and HTTP boundary without depending on WorkerService. ServerBetaService wraps the existing Server class, exposes /healthz and /v1/info with runtime="server-beta", and persists state to dedicated paths (.server-beta.pid|.port|.runtime.json). The four boundary managers (queue, generation worker, provider registry, event broadcaster) are intentionally disabled in this phase and report their status through /v1/info; later phases activate them. Adds plans/2026-05-07-finish-bullmq-branch-ship-plan.md to track the remaining work for this branch. Phase 2 of plans/2026-05-07-server-beta-independent-bullmq-observation-runtime.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(server-beta): route CLI lifecycle and bundle separate runtime scripts/build-hooks.js now produces plugin/scripts/server-beta-service.cjs as a separate Node CJS bundle, alongside the existing worker-service bundle. The server-beta runtime is now installable independently. src/npx-cli/commands/server.ts routes start|stop|restart|status to the server-beta lifecycle instead of the legacy worker. The worker keeps its own start|stop|restart|status under the worker namespace; the two runtimes can be operated independently. src/services/worker-service.ts adds a server-* command parser branch that delegates to the sibling server-beta-service.cjs bundle so direct worker-service invocations still route to the right runtime. tests/npx-cli-server-namespace.test.ts updated to expect server-beta lifecycle routing. Includes rebuilt plugin/scripts/*.cjs bundles produced by build-and-sync. Phase 2 of plans/2026-05-07-server-beta-independent-bullmq-observation-runtime.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(server-beta): add BullMQ job queue primitives Introduce src/server/jobs/ as the queue-side primitives that Phase 3 of the server-beta runtime needs to operate. types.ts defines a discriminated union over the four job kinds (event, event-batch, summary, reindex) and maps each to a per-kind BullMQ queue name and deterministic-ID prefix. job-id.ts builds deterministic, colon-free BullMQ jobIds from (kind, team, project, source). The colon ban exists because BullMQ uses ':' as a Redis key separator internally; embedding ':' in jobIds breaks scan and state lookups. ServerJobQueue.ts is a thin wrapper over BullMQ Queue + Worker that enforces autorun:false, default concurrency 1, and an attached error listener — all per BullMQ docs requirements. Test seams accept queue and worker factories so unit tests do not need Redis. outbox.ts publishes through the Postgres ObservationGenerationJob repository as canonical history. enqueueOutbox writes the row first, then publishes to BullMQ; if BullMQ throws, the row is transitioned to failed and a failed event is appended. reconcileOnStartup re-enqueues queued + processing rows after a restart, replacing terminal BullMQ jobs that may still be holding the deterministic ID slot. markCompleted and markFailed wrap transitionStatus and append the matching event row. Includes 20 unit tests covering deterministic ID stability, colon-free output, queue lifecycle, error-listener attachment, double-start refusal, idempotent enqueue, BullMQ failure rollback, startup reconciliation, max-attempts skipping, and completion / failure / retry transitions. Phase 3 commit 1 of plans/2026-05-07-server-beta-independent-bullmq-observation-runtime.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * feat(server-beta): activate queue boundary in runtime service Wire ActiveServerBetaQueueManager into the server-beta runtime graph. The active manager owns one ServerJobQueue per generation kind (event, event-batch, summary, reindex) and surfaces lane metadata through boundary health. Selection is opt-in and fail-fast: if CLAUDE_MEM_QUEUE_ENGINE is set to bullmq the active manager is constructed (and any Redis/config error throws — no silent fallback to SQLite, per Phase 3 anti-pattern guard). For any other engine the disabled boundary remains so worker-era and test setups stay compatible. Widens ServerBetaBoundaryHealth.status to a discriminated union ('disabled' | 'active' | 'errored') with optional details. The disabled adapter still emits status='disabled', which keeps the existing server-beta-service test green. ServerBetaService receives the manager through a new optional queueManager field on CreateServerBetaServiceOptions so test graphs and Phase 4 wiring can inject custom managers. Adds tests/server/runtime/active-queue-manager.test.ts covering bullmq guard, active health shape, per-kind queue access, close behavior, and post-close errored health. Phase 3 commit 2 of plans/2026-05-07-server-beta-independent-bullmq-observation-runtime.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(server-beta): cap /v1/events/batch at 500 events Prevents unbounded array DoS surface flagged in PR review. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
13 KiB
🌐 이것은 자동 번역입니다. 커뮤니티의 수정 제안을 환영합니다!
🇨🇳 中文 • 🇹🇼 繁體中文 • 🇯🇵 日本語 • 🇧🇷 Português • 🇰🇷 한국어 • 🇪🇸 Español • 🇩🇪 Deutsch • 🇫🇷 Français 🇮🇱 עברית • 🇸🇦 العربية • 🇷🇺 Русский • 🇵🇱 Polski • 🇨🇿 Čeština • 🇳🇱 Nederlands • 🇹🇷 Türkçe • 🇺🇦 Українська • 🇻🇳 Tiếng Việt • 🇮🇩 Indonesia • 🇹🇭 ไทย • 🇮🇳 हिन्दी • 🇧🇩 বাংলা • 🇵🇰 اردو • 🇷🇴 Română • 🇸🇪 Svenska • 🇮🇹 Italiano • 🇬🇷 Ελληνικά • 🇭🇺 Magyar • 🇫🇮 Suomi • 🇩🇰 Dansk • 🇳🇴 Norsk
Claude Code를 위해 구축된 지속적인 메모리 압축 시스템.
빠른 시작 • 작동 방식 • 검색 도구 • 문서 • 설정 • 문제 해결 • 라이선스
Claude-Mem은 도구 사용 관찰을 자동으로 캡처하고 의미론적 요약을 생성하여 향후 세션에서 사용할 수 있도록 함으로써 세션 간 컨텍스트를 원활하게 보존합니다. 이를 통해 Claude는 세션이 종료되거나 재연결된 후에도 프로젝트에 대한 지식의 연속성을 유지할 수 있습니다.
빠른 시작
터미널에서 새 Claude Code 세션을 시작하고 다음 명령을 입력하세요:
> /plugin marketplace add thedotmack/claude-mem
> /plugin install claude-mem
Claude Code를 재시작하세요. 이전 세션의 컨텍스트가 자동으로 새 세션에 나타납니다.
주요 기능:
- 🧠 지속적인 메모리 - 세션 간 컨텍스트 유지
- 📊 점진적 공개 - 토큰 비용 가시성을 갖춘 계층화된 메모리 검색
- 🔍 스킬 기반 검색 - mem-search 스킬로 프로젝트 기록 쿼리
- 🖥️ 웹 뷰어 UI - http://localhost:37777 에서 실시간 메모리 스트림 확인
- 💻 Claude Desktop 스킬 - Claude Desktop 대화에서 메모리 검색
- 🔒 개인정보 제어 -
<private>태그를 사용하여 민감한 콘텐츠를 저장소에서 제외 - ⚙️ 컨텍스트 설정 - 주입되는 컨텍스트에 대한 세밀한 제어
- 🤖 자동 작동 - 수동 개입 불필요
- 🔗 인용 - ID로 과거 관찰 참조 (http://localhost:37777/api/observation/{id} 를 통해 액세스하거나 http://localhost:37777 의 웹 뷰어에서 모두 보기)
- 🧪 베타 채널 - 버전 전환을 통해 Endless Mode와 같은 실험적 기능 사용
문서
📚 전체 문서 보기 - 공식 웹사이트에서 찾아보기
시작하기
- 설치 가이드 - 빠른 시작 및 고급 설치
- 사용 가이드 - Claude-Mem이 자동으로 작동하는 방법
- 검색 도구 - 자연어로 프로젝트 기록 쿼리
- 베타 기능 - Endless Mode와 같은 실험적 기능 시도
모범 사례
- 컨텍스트 엔지니어링 - AI 에이전트 컨텍스트 최적화 원칙
- 점진적 공개 - Claude-Mem의 컨텍스트 프라이밍 전략의 철학
아키텍처
- 개요 - 시스템 구성 요소 및 데이터 흐름
- 아키텍처 진화 - v3에서 v5로의 여정
- 후크 아키텍처 - Claude-Mem이 라이프사이클 후크를 사용하는 방법
- 후크 참조 - 7개 후크 스크립트 설명
- 워커 서비스 - HTTP API 및 Bun 관리
- 데이터베이스 - SQLite 스키마 및 FTS5 검색
- 검색 아키텍처 - Chroma 벡터 데이터베이스를 활용한 하이브리드 검색
설정 및 개발
작동 방식
핵심 구성 요소:
- 5개 라이프사이클 후크 - SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd (6개 후크 스크립트)
- 스마트 설치 - 캐시된 종속성 검사기 (사전 후크 스크립트, 라이프사이클 후크 아님)
- 워커 서비스 - 웹 뷰어 UI와 10개 검색 엔드포인트를 갖춘 포트 37777의 HTTP API, Bun으로 관리
- SQLite 데이터베이스 - 세션, 관찰, 요약 저장
- mem-search 스킬 - 점진적 공개를 통한 자연어 쿼리
- Chroma 벡터 데이터베이스 - 지능형 컨텍스트 검색을 위한 하이브리드 의미론적 + 키워드 검색
자세한 내용은 아키텍처 개요를 참조하세요.
mem-search 스킬
Claude-Mem은 과거 작업에 대해 질문할 때 자동으로 호출되는 mem-search 스킬을 통해 지능형 검색을 제공합니다:
작동 방식:
- 자연스럽게 질문하세요: "지난 세션에서 무엇을 했나요?" 또는 "이 버그를 이전에 수정했나요?"
- Claude가 관련 컨텍스트를 찾기 위해 mem-search 스킬을 자동으로 호출합니다
사용 가능한 검색 작업:
- 관찰 검색 - 관찰에 대한 전체 텍스트 검색
- 세션 검색 - 세션 요약에 대한 전체 텍스트 검색
- 프롬프트 검색 - 원시 사용자 요청 검색
- 개념별 - 개념 태그로 찾기 (discovery, problem-solution, pattern 등)
- 파일별 - 특정 파일을 참조하는 관찰 찾기
- 유형별 - 유형별로 찾기 (decision, bugfix, feature, refactor, discovery, change)
- 최근 컨텍스트 - 프로젝트의 최근 세션 컨텍스트 가져오기
- 타임라인 - 특정 시점 주변의 통합된 컨텍스트 타임라인 가져오기
- 쿼리별 타임라인 - 관찰을 검색하고 가장 일치하는 항목 주변의 타임라인 컨텍스트 가져오기
- API 도움말 - 검색 API 문서 가져오기
자연어 쿼리 예제:
"지난 세션에서 어떤 버그를 수정했나요?"
"인증을 어떻게 구현했나요?"
"worker-service.ts에 어떤 변경 사항이 있었나요?"
"이 프로젝트의 최근 작업을 보여주세요"
"뷰어 UI를 추가할 때 무슨 일이 있었나요?"
자세한 예제는 검색 도구 가이드를 참조하세요.
베타 기능
Claude-Mem은 Endless Mode(확장된 세션을 위한 생체모방 메모리 아키텍처)와 같은 실험적 기능을 제공하는 베타 채널을 제공합니다. http://localhost:37777 → Settings의 웹 뷰어 UI에서 안정 버전과 베타 버전 간 전환이 가능합니다.
Endless Mode 및 사용 방법에 대한 자세한 내용은 **베타 기능 문서**를 참조하세요.
시스템 요구 사항
- Node.js: 18.0.0 이상
- Claude Code: 플러그인 지원이 있는 최신 버전
- Bun: JavaScript 런타임 및 프로세스 관리자 (누락 시 자동 설치)
- uv: 벡터 검색을 위한 Python 패키지 관리자 (누락 시 자동 설치)
- SQLite 3: 영구 저장을 위한 데이터베이스 (번들 포함)
설정
설정은 ~/.claude-mem/settings.json에서 관리됩니다 (첫 실행 시 기본값으로 자동 생성). AI 모델, 워커 포트, 데이터 디렉토리, 로그 수준 및 컨텍스트 주입 설정을 구성할 수 있습니다.
사용 가능한 모든 설정 및 예제는 **설정 가이드**를 참조하세요.
개발
빌드 지침, 테스트 및 기여 워크플로우는 **개발 가이드**를 참조하세요.
문제 해결
문제가 발생하면 Claude에게 문제를 설명하면 troubleshoot 스킬이 자동으로 진단하고 수정 사항을 제공합니다.
일반적인 문제 및 해결 방법은 **문제 해결 가이드**를 참조하세요.
버그 보고
자동화된 생성기로 포괄적인 버그 보고서를 작성하세요:
cd ~/.claude/plugins/marketplaces/thedotmack
npm run bug-report
기여
기여를 환영합니다! 다음 절차를 따라주세요:
- 저장소 포크
- 기능 브랜치 생성
- 테스트와 함께 변경 사항 작성
- 문서 업데이트
- Pull Request 제출
기여 워크플로우는 개발 가이드를 참조하세요.
License
This project is licensed under the Apache License 2.0 (Apache-2.0).
Copyright (C) 2025 Alex Newman (@thedotmack). All rights reserved.
See the LICENSE file for full details.
Apache-2.0 allows broad use, modification, distribution, and commercial use, subject to its terms.
Ragtime note: The ragtime/ directory is licensed under the Apache License 2.0. See ragtime/LICENSE for details.
지원
- 문서: docs/
- 이슈: GitHub Issues
- 저장소: github.com/thedotmack/claude-mem
- 작성자: Alex Newman (@thedotmack)
Claude Agent SDK로 구축 | Claude Code 기반 | TypeScript로 제작