Files
claude-mem/docs/i18n/README.pl.md
T
Alex Newman 36b0929fae Server-beta: Postgres storage + independent runtime + BullMQ queue (Phases 1–3) (#2351)
* 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>
2026-05-08 01:20:07 -07:00

13 KiB

🌐 To jest automatyczne tłumaczenie. Korekty społeczności są mile widziane!


Claude-Mem

🇨🇳 中文🇹🇼 繁體中文🇯🇵 日本語🇧🇷 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

System trwałej kompresji pamięci stworzony dla Claude Code.

License Version Node Mentioned in Awesome Claude Code

thedotmack/claude-mem | Trendshift


Claude-Mem Preview

Szybki StartJak To DziałaNarzędzia WyszukiwaniaDokumentacjaKonfiguracjaRozwiązywanie ProblemówLicencja

Claude-Mem płynnie zachowuje kontekst między sesjami, automatycznie przechwytując obserwacje użycia narzędzi, generując semantyczne podsumowania i udostępniając je przyszłym sesjom. To umożliwia Claude utrzymanie ciągłości wiedzy o projektach nawet po zakończeniu lub ponownym połączeniu sesji.


Szybki Start

Uruchom nową sesję Claude Code w terminalu i wprowadź następujące polecenia:

> /plugin marketplace add thedotmack/claude-mem

> /plugin install claude-mem

Uruchom ponownie Claude Code. Kontekst z poprzednich sesji automatycznie pojawi się w nowych sesjach.

Kluczowe Funkcje:

  • 🧠 Trwała Pamięć - Kontekst przetrwa między sesjami
  • 📊 Stopniowe Ujawnianie - Warstwowe pobieranie pamięci z widocznością kosztów tokenów
  • 🔍 Wyszukiwanie Oparte na Umiejętnościach - Przeszukuj historię projektu za pomocą umiejętności mem-search
  • 🖥️ Interfejs Przeglądarki Internetowej - Strumień pamięci w czasie rzeczywistym pod adresem http://localhost:37777
  • 💻 Umiejętność Claude Desktop - Przeszukuj pamięć z konwersacji Claude Desktop
  • 🔒 Kontrola Prywatności - Użyj tagów <private>, aby wykluczyć wrażliwe treści z przechowywania
  • ⚙️ Konfiguracja Kontekstu - Szczegółowa kontrola nad tym, jaki kontekst jest wstrzykiwany
  • 🤖 Automatyczne Działanie - Nie wymaga ręcznej interwencji
  • 🔗 Cytowania - Odniesienia do przeszłych obserwacji za pomocą identyfikatorów (dostęp przez http://localhost:37777/api/observation/{id} lub wyświetl wszystkie w przeglądarce internetowej pod adresem http://localhost:37777)
  • 🧪 Kanał Beta - Wypróbuj eksperymentalne funkcje, takie jak Endless Mode, poprzez przełączanie wersji

Dokumentacja

📚 Wyświetl Pełną Dokumentację - Przeglądaj na oficjalnej stronie

Pierwsze Kroki

Najlepsze Praktyki

Architektura

Konfiguracja i Rozwój


Jak To Działa

Główne Komponenty:

  1. 5 Hooków Cyklu Życia - SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd (6 skryptów hooków)
  2. Inteligentna Instalacja - Buforowany sprawdzacz zależności (skrypt pre-hook, nie hook cyklu życia)
  3. Usługa Worker - HTTP API na porcie 37777 z interfejsem przeglądarki internetowej i 10 punktami końcowymi wyszukiwania, zarządzana przez Bun
  4. Baza Danych SQLite - Przechowuje sesje, obserwacje, podsumowania
  5. Umiejętność mem-search - Zapytania w języku naturalnym ze stopniowym ujawnianiem
  6. Baza Wektorów Chroma - Hybrydowe wyszukiwanie semantyczne + słowa kluczowe dla inteligentnego pobierania kontekstu

Zobacz Przegląd Architektury dla szczegółów.


Claude-Mem zapewnia inteligentne wyszukiwanie poprzez umiejętność mem-search, która automatycznie aktywuje się, gdy pytasz o przeszłą pracę:

Jak To Działa:

  • Po prostu pytaj naturalnie: "Co robiliśmy w ostatniej sesji?" lub "Czy naprawiliśmy ten błąd wcześniej?"
  • Claude automatycznie wywołuje umiejętność mem-search, aby znaleźć odpowiedni kontekst

Dostępne Operacje Wyszukiwania:

  1. Search Observations - Wyszukiwanie pełnotekstowe w obserwacjach
  2. Search Sessions - Wyszukiwanie pełnotekstowe w podsumowaniach sesji
  3. Search Prompts - Wyszukiwanie surowych żądań użytkownika
  4. By Concept - Znajdź według tagów koncepcyjnych (discovery, problem-solution, pattern, itp.)
  5. By File - Znajdź obserwacje odnoszące się do określonych plików
  6. By Type - Znajdź według typu (decision, bugfix, feature, refactor, discovery, change)
  7. Recent Context - Pobierz ostatni kontekst sesji dla projektu
  8. Timeline - Uzyskaj ujednoliconą oś czasu kontekstu wokół określonego punktu w czasie
  9. Timeline by Query - Wyszukaj obserwacje i uzyskaj kontekst osi czasu wokół najlepszego dopasowania
  10. API Help - Uzyskaj dokumentację API wyszukiwania

Przykładowe Zapytania w Języku Naturalnym:

"What bugs did we fix last session?"
"How did we implement authentication?"
"What changes were made to worker-service.ts?"
"Show me recent work on this project"
"What was happening when we added the viewer UI?"

Zobacz Przewodnik Narzędzi Wyszukiwania dla szczegółowych przykładów.


Funkcje Beta

Claude-Mem oferuje kanał beta z eksperymentalnymi funkcjami, takimi jak Endless Mode (biomimetyczna architektura pamięci dla rozszerzonych sesji). Przełączaj się między stabilnymi a beta wersjami z interfejsu przeglądarki internetowej pod adresem http://localhost:37777 → Settings.

Zobacz Dokumentacja Funkcji Beta dla szczegółów dotyczących Endless Mode i sposobu wypróbowania.


Wymagania Systemowe

  • Node.js: 18.0.0 lub wyższy
  • Claude Code: Najnowsza wersja z obsługą wtyczek
  • Bun: Środowisko uruchomieniowe JavaScript i menedżer procesów (automatycznie instalowany, jeśli brakuje)
  • uv: Menedżer pakietów Python do wyszukiwania wektorowego (automatycznie instalowany, jeśli brakuje)
  • SQLite 3: Do trwałego przechowywania (dołączony)

Konfiguracja

Ustawienia są zarządzane w ~/.claude-mem/settings.json (automatycznie tworzone z domyślnymi wartościami przy pierwszym uruchomieniu). Skonfiguruj model AI, port workera, katalog danych, poziom logowania i ustawienia wstrzykiwania kontekstu.

Zobacz Przewodnik Konfiguracji dla wszystkich dostępnych ustawień i przykładów.


Rozwój

Zobacz Przewodnik Rozwoju dla instrukcji budowania, testowania i przepływu pracy współpracy.


Rozwiązywanie Problemów

Jeśli napotkasz problemy, opisz problem Claude, a umiejętność troubleshoot automatycznie zdiagnozuje i dostarczy poprawki.

Zobacz Przewodnik Rozwiązywania Problemów dla typowych problemów i rozwiązań.


Zgłoszenia Błędów

Twórz kompleksowe raporty błędów za pomocą automatycznego generatora:

cd ~/.claude/plugins/marketplaces/thedotmack
npm run bug-report

Współpraca

Wkład jest mile widziany! Proszę:

  1. Forkuj repozytorium
  2. Utwórz gałąź funkcji
  3. Dokonaj zmian z testami
  4. Zaktualizuj dokumentację
  5. Prześlij Pull Request

Zobacz Przewodnik Rozwoju dla przepływu pracy współpracy.


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.


Wsparcie


Zbudowano za pomocą Claude Agent SDK | Zasilane przez Claude Code | Wykonane w TypeScript