mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #8592] [MERGED] feat(advanced-memory): store a Long-Term Memory block with scene summaries #8693
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#8693
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8592
Author: @Promansis
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @Promansis
Base:
staging← Head:feature(advanced-memory)/ltm-memory-block📝 Commits (3)
1e626fbfeat(advanced-memory): store a Long-Term Memory block with scene summaries (#8589)bd8fe2efix(advanced-memory): write the scene block with the recap and project the summary listing (#8589)a1395f7docs(advanced-memory): say the scene block is not audience-scoped (#8589)📊 Changes
11 files changed (+436 additions, -21 deletions)
View changed files
📝
docs/development/optional-agent-packages.md(+31 -0)📝
packages/server/src/db/schema/advanced-memory.ts(+2 -0)📝
packages/server/src/services/advanced-memory.ts(+62 -10)📝
packages/server/src/services/capability-packages/capability-persistence.service.ts(+67 -2)📝
packages/server/src/services/generation/long-term-memory-runtime.ts(+19 -0)📝
packages/shared/src/schemas/capability-package.schema.ts(+3 -1)📝
packages/shared/src/types/capability-runtime.ts(+25 -0)📝
scripts/regressions/advanced-memory-recovery.regression.ts(+7 -1)📝
scripts/regressions/advanced-memory-summary.regression.ts(+145 -1)📝
scripts/regressions/capability-package-lifecycle.regression.ts(+6 -5)📝
scripts/regressions/capability-persistence-permissions.regression.ts(+69 -1)📄 Description
Linked issue
Closes #8589
Why this change
What changed
persistence.listChatSummaries(chatId)now also returnsadvancedMemory: the chat's enabled, completed scene summaries in the order they were written (id,sceneId,kind,title,content,timeline,startMessageId,endMessageId,audienceCharacterIds,sourceFingerprint,updatedAt,memory). It uses the samechat-readpermission. Constant, temporary, excerpt and recollection records are not listed.long-term-memory:runtimecan add an optionalsummaryMemoryInstruction(). When the chat lists Long-Term Memory as an active agent, the Engine adds that paragraph (capped at 4,000 characters) to each first-pass scene summary request and asks for a"memory"string in the same JSON reply. The Engine stores the string as returned and never parses it. A scene split into parts gets each part's block, joined by a blank line. The combine requests never see the blocks, and the stored recap (content) is unchanged.null. Records written before this change also read asnull.structured_memorycolumn is internal (likesummary_work): it isn't on the public record and isn't exported in transfers.docs/development/optional-agent-packages.md.Validation
pnpm checkpasses locallyCONTRIBUTING.mdAgent-run local checks on
1e626fb48(merged withupstream/staging307d91bed):pnpm check(Impeccable guard, localization, Prettier, lint/types, e2e and token-estimation types, production build): exit 0node scripts/run-regressions.mjs --filter advanced-memory: 23/23 passednode scripts/run-regressions.mjs --filter capability: 27/27 passednode scripts/run-regressions.mjs --filter long-term-memory: 1/1 passedpnpm smoke:ui(no UI change), container buildManual verification notes
Still to verify by hand:
"memory"instruction (debug prompt log) and the recap looks as before.summaryMemoryInstruction()listed in the chat, run a scene summary and confirm the request carries the paragraph, andlistChatSummaries(chatId).advancedMemory[n].memoryreturns the block.memorycomes back asnull.structured_memory.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Docs note: this edits
docs/development/optional-agent-packages.md, which has translated copies ondocs-i18n(for examplees/development/optional-agent-packages.md). The translations are not updated in this PR; follow-up issue #8593 tracks them.UI evidence (if applicable)
No UI changes.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.