[PR #710] [MERGED] feat(long-term-memory): add scoped Roleplay local characters #1102

Closed
opened 2026-10-21 05:02:44 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/710
Author: @Promansis
Created: 9/4/2026
Status: ✅ Merged
Merged: 9/4/2026
Merged by: @Promansis

Base: staging ← Head: feature(long-term-memory)/roleplay-local-characters-v2


📝 Commits (7)

  • df5369d feat(long-term-memory): scope roleplay local characters (#707)
  • 51f81e8 fix(long-term-memory): enforce local character scope boundaries (#707)
  • 5c46d9a fix(long-term-memory): close local identity mode gaps (#707)
  • bb84060 fix(long-term-memory): isolate local character transfers and prompts (#707)
  • dae8446 chore(long-term-memory): set release version to 1.2.20 (#707)
  • 92e2321 chore(long-term-memory): remove unreleased 1.3.0 artifact (#707)
  • 7986ab1 fix(long-term-memory): preflight derived transfer scopes (#707)

📊 Changes

29 files changed (+1005 additions, -172 deletions)

View changed files

➕ artifacts/long-term-memory-1.2.20.zip (+0 -0)
📝 catalog/catalog.json (+8 -8)
📝 catalog/notes.json (+6 -0)
📝 catalog/v2/catalog.json (+8 -8)
📝 catalog/v2/notes.json (+6 -0)
📝 catalog/v3/catalog.json (+8 -8)
📝 catalog/v3/notes.json (+6 -0)
📝 packages/long-term-memory/CHANGELOG.md (+5 -0)
📝 packages/long-term-memory/client.js (+18 -18)
📝 packages/long-term-memory/manifest.json (+5 -5)
📝 packages/long-term-memory/server.mjs (+59 -59)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/MemoryVault.tsx (+30 -10)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/TargetPicker.tsx (+1 -1)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/display-labels.ts (+2 -2)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json (+3 -1)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/scope-targets.ts (+7 -0)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/chat-scope.ts (+77 -3)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-compiler.ts (+11 -2)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-extraction.ts (+17 -3)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/note-transfer.ts (+9 -1)

...and 9 more files

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #707

Why this change

Long-Term Memory previously used unscoped npc: fallbacks for source-visible Roleplay names, allowing same-name identities to merge across conversations and risking confusion with Game Mode NPC metadata.

What changed

  • Added conversation-family-scoped local_character subjects for Roleplay.
  • Added trusted source-name resolution, ambiguity handling, first-use review risk, and family isolation.
  • Excluded Engine characters/personas and chat.metadata.gameNpcs.
  • Added Memory Vault and scope-target picker support.
  • Enforced Roleplay-only subjects across note schemas and mutation paths, including bulk and transfer operations.
  • Filtered Game extraction prompts, identity context, retrieval inputs, and scope targets.
  • Rebuilt long-term-memory package 1.2.20, manifest, payloads, artifact, and catalog entries.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: No new Engine capability; minimum compatibility remains 2.4.1.
  • New or changed permissions/entrypoints: None.
  • Restart, storage, update, or uninstall impact: Package-local persisted identity keys are now family-scoped; no new permissions or host storage paths.

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

Automated focused regressions, npm run check, catalog validation, release-note validation, package rebuild, and ZIP integrity checks passed. Engine installation, live provider, browser, restart, and uninstall verification were not performed.

Documentation impact

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

UI evidence (if applicable)

No screenshots or recordings were captured.

Summary by CodeRabbit

  • New Features

    • Added conversation-family-scoped memories for local Roleplay characters.
    • Added local-character selection and clearer labels in the memory interface.
    • First-use local-character memory changes now receive additional review.
  • Bug Fixes

    • Prevented Game Mode dynamic NPC metadata from being included in Long-Term Memory subjects, targets, and identity context.
    • Added safeguards to prevent local-character memories from being created, transferred, or combined across incompatible conversation families.
    • Improved error handling for invalid memory operations.

🔄 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/710 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 9/4/2026 **Status:** ✅ Merged **Merged:** 9/4/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `feature(long-term-memory)/roleplay-local-characters-v2` --- ### 📝 Commits (7) - [`df5369d`](https://github.com/Pasta-Devs/Marinara-Agents/commit/df5369d8ba8ad2409e192f401fe873bfaadfbd56) feat(long-term-memory): scope roleplay local characters (#707) - [`51f81e8`](https://github.com/Pasta-Devs/Marinara-Agents/commit/51f81e84b33e274f9f65836ba97f3848da4373c8) fix(long-term-memory): enforce local character scope boundaries (#707) - [`5c46d9a`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5c46d9a79624419b883ccf047b162fc4db64626a) fix(long-term-memory): close local identity mode gaps (#707) - [`bb84060`](https://github.com/Pasta-Devs/Marinara-Agents/commit/bb8406093410aa49959e1b4a7a48c6b7af518507) fix(long-term-memory): isolate local character transfers and prompts (#707) - [`dae8446`](https://github.com/Pasta-Devs/Marinara-Agents/commit/dae844677823b1bab473e4a078cf936e6a94cebd) chore(long-term-memory): set release version to 1.2.20 (#707) - [`92e2321`](https://github.com/Pasta-Devs/Marinara-Agents/commit/92e2321f5754e98bd905540d964e631f0d93bede) chore(long-term-memory): remove unreleased 1.3.0 artifact (#707) - [`7986ab1`](https://github.com/Pasta-Devs/Marinara-Agents/commit/7986ab163b3772ffcda98ad2275147d5988f101c) fix(long-term-memory): preflight derived transfer scopes (#707) ### 📊 Changes **29 files changed** (+1005 additions, -172 deletions) <details> <summary>View changed files</summary> ➕ `artifacts/long-term-memory-1.2.20.zip` (+0 -0) 📝 `catalog/catalog.json` (+8 -8) 📝 `catalog/notes.json` (+6 -0) 📝 `catalog/v2/catalog.json` (+8 -8) 📝 `catalog/v2/notes.json` (+6 -0) 📝 `catalog/v3/catalog.json` (+8 -8) 📝 `catalog/v3/notes.json` (+6 -0) 📝 `packages/long-term-memory/CHANGELOG.md` (+5 -0) 📝 `packages/long-term-memory/client.js` (+18 -18) 📝 `packages/long-term-memory/manifest.json` (+5 -5) 📝 `packages/long-term-memory/server.mjs` (+59 -59) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/MemoryVault.tsx` (+30 -10) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/TargetPicker.tsx` (+1 -1) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/display-labels.ts` (+2 -2) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json` (+3 -1) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/scope-targets.ts` (+7 -0) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/chat-scope.ts` (+77 -3) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-compiler.ts` (+11 -2) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/evidence-unit-extraction.ts` (+17 -3) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/note-transfer.ts` (+9 -1) _...and 9 more files_ </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. ## Linked issue Closes #707 ## Why this change Long-Term Memory previously used unscoped `npc:` fallbacks for source-visible Roleplay names, allowing same-name identities to merge across conversations and risking confusion with Game Mode NPC metadata. ## What changed - Added conversation-family-scoped `local_character` subjects for Roleplay. - Added trusted source-name resolution, ambiguity handling, first-use review risk, and family isolation. - Excluded Engine characters/personas and `chat.metadata.gameNpcs`. - Added Memory Vault and scope-target picker support. - Enforced Roleplay-only subjects across note schemas and mutation paths, including bulk and transfer operations. - Filtered Game extraction prompts, identity context, retrieval inputs, and scope targets. - Rebuilt `long-term-memory` package `1.2.20`, manifest, payloads, artifact, and catalog entries. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: No new Engine capability; minimum compatibility remains `2.4.1`. - New or changed permissions/entrypoints: None. - Restart, storage, update, or uninstall impact: Package-local persisted identity keys are now family-scoped; no new permissions or host storage paths. ## Validation <!-- Human verification checkboxes intentionally remain unchecked. --> - [x] `node scripts/validate-catalog.mjs` passes locally - [x] `git diff --check` passes locally - [x] Rebuilt every affected manifest, payload, artifact, and catalog entry - [x] Installed or updated the affected package through Marinara Engine - [x] Checked supported modes, restart behavior, and uninstall cleanup - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes Automated focused regressions, `npm run check`, catalog validation, release-note validation, package rebuild, and ZIP integrity checks passed. Engine installation, live provider, browser, restart, and uninstall verification were not performed. ## Documentation impact - [x] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) No screenshots or recordings were captured. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added conversation-family-scoped memories for local Roleplay characters. - Added local-character selection and clearer labels in the memory interface. - First-use local-character memory changes now receive additional review. - **Bug Fixes** - Prevented Game Mode dynamic NPC metadata from being included in Long-Term Memory subjects, targets, and identity context. - Added safeguards to prevent local-character memories from being created, transferred, or combined across incompatible conversation families. - Improved error handling for invalid memory operations. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-21 05:02:44 +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#1102
No description provided.