[PR #1747] [MERGED] feat(long-term-memory): learn from chat messages (1.5.0) #1949

Closed
opened 2026-11-07 16:38:15 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1747
Author: @Promansis
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @Promansis

Base: staging ← Head: feature(long-term-memory)/learn-from-chat-messages


📝 Commits (4)

  • 8ca14e2 feat(long-term-memory): learn from chat messages (#1744)
  • 20ff4ef Merge upstream/staging into feature(long-term-memory)/learn-from-chat-messages; release long-term-memory 1.5.0
  • 958f439 fix(long-term-memory): keep imported message pieces when earlier messages change (#1744)
  • 60b5daf Merge upstream/staging into feature(long-term-memory)/learn-from-chat-messages

📊 Changes

39 files changed (+803 additions, -270 deletions)

View changed files

📝 .github/workflows/ltm-browser.yml (+1 -1)
📝 README.md (+1 -1)
➕ artifacts/long-term-memory-1.5.0.zip (+0 -0)
📝 catalog/catalog.json (+15 -16)
📝 catalog/notes.json (+6 -6)
📝 catalog/v2/catalog.json (+15 -16)
📝 catalog/v2/notes.json (+6 -6)
📝 catalog/v3/catalog.json (+15 -16)
📝 catalog/v3/notes.json (+6 -6)
📝 packages/long-term-memory/CHANGELOG.md (+9 -0)
📝 packages/long-term-memory/agents.json (+1 -1)
📝 packages/long-term-memory/client.js (+24 -24)
📝 packages/long-term-memory/docs/ARCHITECTURE.md (+2 -2)
📝 packages/long-term-memory/docs/UI.md (+3 -0)
📝 packages/long-term-memory/engine-boundary.json (+3 -3)
📝 packages/long-term-memory/locales/en.json (+2 -2)
📝 packages/long-term-memory/locales/ko.json (+2 -2)
📝 packages/long-term-memory/manifest.json (+12 -13)
📝 packages/long-term-memory/server.mjs (+54 -52)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/PRODUCT.md (+1 -1)

...and 19 more files

📄 Description

Pull request

Linked issue

Closes #1744

Why this change

Marinara Engine now skips its built-in memory recall in chats where Long-Term Memory is on (Engine #8359). A chat with Long-Term Memory on but no summaries then has nothing to recall. Letting Long-Term Memory learn from a chat's own messages closes that gap.

What changed

Sources
├── Chats (summaries)     unchanged
├── Chat Messages         NEW: a chat's messages -> source notes
├── Characters            unchanged
└── Lorebooks             unchanged
  • Messages are cut into pieces of at most 24,000 characters. A piece is named by its first message id, and an oversized message is split into :part:N pieces. Appending messages keeps earlier pieces current; the last piece becomes source_updated when new messages fit in it, otherwise they start a new new piece.
  • The first message of every imported piece starts its piece again, so an edit or deletion before it can't pull it into an earlier piece and orphan its note. A now-hidden first message still names the piece its next visible message starts. Deleting that first message itself still orphans the note, as deleted summary and lorebook entries do today (follow-up).
  • Notes carry provenance chat_transcript, tag imported_chat_messages, the chat's mode and scope {chatIds:[chatId]}. Professor Mari chats are excluded and branch copies dedupe by chat group.
  • Whispers, and messages hidden from the AI or from some characters, are left out. Recipient-only whisper memories need a private-note rule in recall, so they are a follow-up.
  • Removes the legacy chat-metadata adoption and with it the chat-write permission. persistence.listMessages needs only chat-read.
  • Release: long-term-memory 1.4.95 -> 1.5.0 (reland.mjs --minor), rebuilt client.js, server.mjs, artifacts/long-term-memory-1.5.0.zip and the catalog lanes.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: capability API 1.387, engine.min 2.5.1, built against Engine 2.5.1 (345cd747c). The v2.5.1 release (capability API 1.341) refuses 1.5.0, so Engine staging can install it now; users on older Engines keep 1.4.x.
  • New or changed permissions/entrypoints: removes chat-write; no new permission or entrypoint. Chats that relied on the old automatic switch-on need Long-Term Memory enabled in Chat Settings → Agents (stated in the CHANGELOG).
  • Restart, storage, update, or uninstall impact: new chat_transcript provenance kind; old notes still parse. Downgrading to 1.4.95 cannot parse chat_transcript notes, as with every new provenance kind.

Merge danger

  • Door: two-way for the repository (revert the merge); one-way in practice once users on a 2.5.1+ staging Engine install 1.5.0 and import chat-message notes.
  • Blast radius: Long-Term Memory users on a capability API 1.387 Engine. Do not promote to main until an Engine release contains 2a1bbbee2 (SpicyMarinara only).

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

Local runs on head 958f43989 (after the Dottore repair, rebuilt server.mjs, manifest, zip and catalog lanes) against Engine 345cd747c (not ticked above; for reviewers to confirm):

  • Engine-backed LTM suites: storage, branch-recall, engine-fields, routes, routes-imports, routes-scope-identity, routes-backup, installation, host-styles, all exit 0.
  • Engine-free suites (new chat-transcript-import included in ltm-browser.yml): candidate-reconciliation, chat-transcript-import, conversation-summary-import, debug-log, delta-review, extraction-graph, extraction-reliability, local-characters, rebuild-job, runtime, all exit 0.
  • Repository: test-catalog-lanes, validate-package-locales, validate-catalog, catalog-release-notes, typecheck-packages (long-term-memory), npm run check, npm run test:security, git diff --check, all exit 0.
  • chat-transcript-import fails without the repair (a pending r6 piece shows new and the imported r5 note is orphaned) and passes with it.
  • conversation-summary-import fails through test-ltm.sh because Engine zod 4 words one error differently from the suite's regex. CI runs it Engine-free, where it passes.
  • Known Low, not fixed: two identical pieces in one chat collapse into one preview row (rare; needs equal text).
  • The package was not installed through a running Engine.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

The package's docs/UI.md describes the new tab and CHANGELOG.md has the release note.

UI evidence (if applicable)

None attached.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Agents/pull/1747 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `feature(long-term-memory)/learn-from-chat-messages` --- ### 📝 Commits (4) - [`8ca14e2`](https://github.com/Pasta-Devs/Marinara-Agents/commit/8ca14e270e4a25d552bf027fc8dd99d66458adc5) feat(long-term-memory): learn from chat messages (#1744) - [`20ff4ef`](https://github.com/Pasta-Devs/Marinara-Agents/commit/20ff4ef2d625ce12bffbc8efc5dee16388c552fa) Merge upstream/staging into feature(long-term-memory)/learn-from-chat-messages; release long-term-memory 1.5.0 - [`958f439`](https://github.com/Pasta-Devs/Marinara-Agents/commit/958f439894b73ce150cbe23e42f15755b43e5de7) fix(long-term-memory): keep imported message pieces when earlier messages change (#1744) - [`60b5daf`](https://github.com/Pasta-Devs/Marinara-Agents/commit/60b5daf87216ddf019e374197ddc346a239a1e52) Merge upstream/staging into feature(long-term-memory)/learn-from-chat-messages ### 📊 Changes **39 files changed** (+803 additions, -270 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ltm-browser.yml` (+1 -1) 📝 `README.md` (+1 -1) ➕ `artifacts/long-term-memory-1.5.0.zip` (+0 -0) 📝 `catalog/catalog.json` (+15 -16) 📝 `catalog/notes.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+15 -16) 📝 `catalog/v2/notes.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+15 -16) 📝 `catalog/v3/notes.json` (+6 -6) 📝 `packages/long-term-memory/CHANGELOG.md` (+9 -0) 📝 `packages/long-term-memory/agents.json` (+1 -1) 📝 `packages/long-term-memory/client.js` (+24 -24) 📝 `packages/long-term-memory/docs/ARCHITECTURE.md` (+2 -2) 📝 `packages/long-term-memory/docs/UI.md` (+3 -0) 📝 `packages/long-term-memory/engine-boundary.json` (+3 -3) 📝 `packages/long-term-memory/locales/en.json` (+2 -2) 📝 `packages/long-term-memory/locales/ko.json` (+2 -2) 📝 `packages/long-term-memory/manifest.json` (+12 -13) 📝 `packages/long-term-memory/server.mjs` (+54 -52) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/PRODUCT.md` (+1 -1) _...and 19 more files_ </details> ### 📄 Description # Pull request ## Linked issue Closes #1744 ## Why this change Marinara Engine now skips its built-in memory recall in chats where Long-Term Memory is on (Engine #8359). A chat with Long-Term Memory on but no summaries then has nothing to recall. Letting Long-Term Memory learn from a chat's own messages closes that gap. ## What changed ```text Sources ├── Chats (summaries) unchanged ├── Chat Messages NEW: a chat's messages -> source notes ├── Characters unchanged └── Lorebooks unchanged ``` - Messages are cut into pieces of at most 24,000 characters. A piece is named by its first message id, and an oversized message is split into `:part:N` pieces. Appending messages keeps earlier pieces `current`; the last piece becomes `source_updated` when new messages fit in it, otherwise they start a new `new` piece. - The first message of every imported piece starts its piece again, so an edit or deletion before it can't pull it into an earlier piece and orphan its note. A now-hidden first message still names the piece its next visible message starts. Deleting that first message itself still orphans the note, as deleted summary and lorebook entries do today (follow-up). - Notes carry provenance `chat_transcript`, tag `imported_chat_messages`, the chat's mode and scope `{chatIds:[chatId]}`. Professor Mari chats are excluded and branch copies dedupe by chat group. - Whispers, and messages hidden from the AI or from some characters, are left out. Recipient-only whisper memories need a private-note rule in recall, so they are a follow-up. - Removes the legacy chat-metadata adoption and with it the `chat-write` permission. `persistence.listMessages` needs only `chat-read`. - Release: long-term-memory 1.4.95 -> 1.5.0 (`reland.mjs --minor`), rebuilt `client.js`, `server.mjs`, `artifacts/long-term-memory-1.5.0.zip` and the catalog lanes. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: capability API 1.387, `engine.min` 2.5.1, built against Engine 2.5.1 (345cd747c). The v2.5.1 release (capability API 1.341) refuses 1.5.0, so Engine staging can install it now; users on older Engines keep 1.4.x. - New or changed permissions/entrypoints: removes `chat-write`; no new permission or entrypoint. Chats that relied on the old automatic switch-on need Long-Term Memory enabled in Chat Settings → Agents (stated in the CHANGELOG). - Restart, storage, update, or uninstall impact: new `chat_transcript` provenance kind; old notes still parse. Downgrading to 1.4.95 cannot parse `chat_transcript` notes, as with every new provenance kind. ## Merge danger - **Door:** two-way for the repository (revert the merge); one-way in practice once users on a 2.5.1+ staging Engine install 1.5.0 and import chat-message notes. - **Blast radius:** Long-Term Memory users on a capability API 1.387 Engine. Do not promote to `main` until an Engine release contains 2a1bbbee2 (`SpicyMarinara` only). ## Validation - [ ] `node scripts/validate-catalog.mjs` passes locally - [ ] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry - [ ] Installed or updated the affected package through Marinara Engine - [ ] Checked supported modes, restart behavior, and uninstall cleanup - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Local runs on head `958f43989` (after the Dottore repair, rebuilt server.mjs, manifest, zip and catalog lanes) against Engine 345cd747c (not ticked above; for reviewers to confirm): - Engine-backed LTM suites: storage, branch-recall, engine-fields, routes, routes-imports, routes-scope-identity, routes-backup, installation, host-styles, all exit 0. - Engine-free suites (new `chat-transcript-import` included in `ltm-browser.yml`): candidate-reconciliation, chat-transcript-import, conversation-summary-import, debug-log, delta-review, extraction-graph, extraction-reliability, local-characters, rebuild-job, runtime, all exit 0. - Repository: test-catalog-lanes, validate-package-locales, validate-catalog, catalog-release-notes, `typecheck-packages` (long-term-memory), `npm run check`, `npm run test:security`, `git diff --check`, all exit 0. - `chat-transcript-import` fails without the repair (a pending `r6` piece shows `new` and the imported `r5` note is orphaned) and passes with it. - `conversation-summary-import` fails through `test-ltm.sh` because Engine zod 4 words one error differently from the suite's regex. CI runs it Engine-free, where it passes. - Known Low, not fixed: two identical pieces in one chat collapse into one preview row (rare; needs equal text). - The package was not installed through a running Engine. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation The package's `docs/UI.md` describes the new tab and `CHANGELOG.md` has the release note. ## UI evidence (if applicable) None attached. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:38:15 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Agents#1949
No description provided.