Files
claude-mem/docs/i18n/README.fi.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

🌐 Tämä on automaattinen käännös. Yhteisön korjaukset ovat tervetulleita!


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

Pysyvä muistinpakkaamisjärjestelmä, joka on rakennettu Claude Code -ympäristöön.

License Version Node Mentioned in Awesome Claude Code

thedotmack/claude-mem | Trendshift


Claude-Mem Preview

PikaopasMiten se toimiiHakutyökalutDokumentaatioAsetuksetVianmääritysLisenssi

Claude-Mem säilyttää kontekstin saumattomasti istuntojen välillä tallentamalla automaattisesti työkalujen käyttöhavaintoja, luomalla semanttisia yhteenvetoja ja asettamalla ne tulevien istuntojen saataville. Tämä mahdollistaa Clauden säilyttää tiedon jatkuvuuden projekteista senkin jälkeen, kun istunnot päättyvät tai yhteys palautuu.


Pikaopas

Aloita uusi Claude Code -istunto terminaalissa ja syötä seuraavat komennot:

> /plugin marketplace add thedotmack/claude-mem

> /plugin install claude-mem

Käynnistä Claude Code uudelleen. Aiempien istuntojen konteksti ilmestyy automaattisesti uusiin istuntoihin.

Keskeiset ominaisuudet:

  • 🧠 Pysyvä muisti - Konteksti säilyy istuntojen välillä
  • 📊 Asteittainen paljastaminen - Kerrostettu muistin haku tokenikustannusten näkyvyydellä
  • 🔍 Taitopohjainen haku - Kysy projektihistoriaasi mem-search-taidolla
  • 🖥️ Web-katselukäyttöliittymä - Reaaliaikainen muistivirta osoitteessa http://localhost:37777
  • 💻 Claude Desktop -taito - Hae muistista Claude Desktop -keskusteluissa
  • 🔒 Yksityisyyden hallinta - Käytä <private>-tageja arkaluonteisen sisällön poissulkemiseen tallennuksesta
  • ⚙️ Kontekstin määrittely - Tarkka hallinta siitä, mikä konteksti injektoidaan
  • 🤖 Automaattinen toiminta - Ei vaadi manuaalista puuttumista
  • 🔗 Viittaukset - Viittaa aiempiin havaintoihin ID:llä (käytettävissä osoitteessa http://localhost:37777/api/observation/{id} tai näytä kaikki web-katselussa osoitteessa http://localhost:37777)
  • 🧪 Beta-kanava - Kokeile kokeellisia ominaisuuksia kuten Endless Mode versionvaihdolla

Dokumentaatio

📚 Näytä täydellinen dokumentaatio - Selaa virallisella verkkosivustolla

Aloitus

Parhaat käytännöt

Arkkitehtuuri

Asetukset ja kehitys


Miten se toimii

Keskeiset komponentit:

  1. 5 elinkaarikoukua - SessionStart, UserPromptSubmit, PostToolUse, Stop, SessionEnd (6 koukku-skriptiä)
  2. Älykäs asennus - Välimuistettu riippuvuuksien tarkistaja (esikoukku-skripti, ei elinkaarikkoukku)
  3. Worker-palvelu - HTTP API portissa 37777 web-katselukäyttöliittymällä ja 10 hakupäätepisteellä, Bun-hallinnoimana
  4. SQLite-tietokanta - Tallentaa istunnot, havainnot, yhteenvedot
  5. mem-search-taito - Luonnollisen kielen kyselyt asteittaisella paljastamisella
  6. Chroma-vektoritietokanta - Hybridi semanttinen + avainsanahaku älykkääseen kontekstin hakuun

Katso Arkkitehtuurin yleiskatsaus yksityiskohdista.


mem-search-taito

Claude-Mem tarjoaa älykkään haun mem-search-taidon kautta, joka käynnistyy automaattisesti kun kysyt aiemmasta työstä:

Miten se toimii:

  • Kysy vain luonnollisesti: "Mitä teimme viime istunnossa?" tai "Korjasimmeko tämän bugin aiemmin?"
  • Claude käynnistää automaattisesti mem-search-taidon löytääkseen relevantin kontekstin

Saatavilla olevat hakutoiminnot:

  1. Hae havaintoja - Koko tekstin haku havainnoissa
  2. Hae istuntoja - Koko tekstin haku istuntojen yhteenvedoissa
  3. Hae prompteja - Hae raakoista käyttäjäpyynnöistä
  4. Konseptin mukaan - Hae konseptitageilla (discovery, problem-solution, pattern, jne.)
  5. Tiedoston mukaan - Hae tiettyihin tiedostoihin viittaavia havaintoja
  6. Tyypin mukaan - Hae tyypillä (decision, bugfix, feature, refactor, discovery, change)
  7. Viimeaikainen konteksti - Hae projektin viimeaikainen istuntokonteksti
  8. Aikajana - Hae yhtenäinen aikajana kontekstista tietyn ajankohdan ympärillä
  9. Aikajana kyselyn mukaan - Hae havaintoja ja saa aikalinjakonteksti parhaan osuman ympärillä
  10. API-ohje - Hae haku-API:n dokumentaatio

Esimerkkejä luonnollisen kielen kyselyistä:

"Mitkä bugit korjasimme viime istunnossa?"
"Miten toteutimme autentikoinnin?"
"Mitä muutoksia tehtiin worker-service.ts:ään?"
"Näytä viimeaikainen työ tässä projektissa"
"Mitä tapahtui kun lisäsimme katselukäyttöliittymän?"

Katso Hakutyökalujen opas yksityiskohtaisia esimerkkejä varten.


Beta-ominaisuudet

Claude-Mem tarjoaa beta-kanavan kokeellisilla ominaisuuksilla kuten Endless Mode (biomimeettinen muistiarkkitehtuuri pidennetyille istunnoille). Vaihda vakaan ja beta-version välillä web-katselukäyttöliittymästä osoitteessa http://localhost:37777 → Settings.

Katso Beta-ominaisuuksien dokumentaatio yksityiskohdista Endless Moden ja sen kokeilemisen osalta.


Järjestelmävaatimukset

  • Node.js: 18.0.0 tai uudempi
  • Claude Code: Uusin versio plugin-tuella
  • Bun: JavaScript-ajoympäristö ja prosessinhallinta (asennetaan automaattisesti jos puuttuu)
  • uv: Python-paketinhallinta vektorihakuun (asennetaan automaattisesti jos puuttuu)
  • SQLite 3: Pysyvälle tallennukselle (sisältyy)

Asetukset

Asetuksia hallitaan tiedostossa ~/.claude-mem/settings.json (luodaan automaattisesti oletusarvoilla ensimmäisellä suorituskerralla). Määritä AI-malli, worker-portti, datahakemisto, lokitaso ja kontekstin injektointiasetukset.

Katso Asetusopas kaikista saatavilla olevista asetuksista ja esimerkeistä.


Kehitys

Katso Kehitysopas rakennusohjeista, testauksesta ja osallistumisen työnkulusta.


Vianmääritys

Jos kohtaat ongelmia, kuvaile ongelma Claudelle ja troubleshoot-taito diagnosoi automaattisesti ja tarjoaa korjauksia.

Katso Vianmääritysopas yleisistä ongelmista ja ratkaisuista.


Bugiraportit

Luo kattavia bugiraportteja automaattisella generaattorilla:

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

Osallistuminen

Osallistuminen on tervetullutta! Ole hyvä:

  1. Haarukoi repositorio
  2. Luo ominaisuushaara
  3. Tee muutoksesi testeineen
  4. Päivitä dokumentaatio
  5. Lähetä Pull Request

Katso Kehitysopas osallistumisen työnkulusta.


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.


Tuki


Rakennettu Claude Agent SDK:lla | Claude Coden voimalla | Tehty TypeScriptillä