[PR #626] [MERGED] feat(long-term-memory): separate source and destination scopes #1057

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

📋 Pull Request Information

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

Base: staging ← Head: feature(long-term-memory)/source-destination-scope


📝 Commits (10+)

  • 22daf3a feat(long-term-memory): separate source and destination scopes
  • 59eef13 fix(long-term-memory): preserve destination scope boundaries
  • 05209c5 fix(long-term-memory): preserve legacy import behavior
  • 39ac231 build(long-term-memory): publish scoped import changes
  • 6ca75e2 Merge branch 'staging' into feature(long-term-memory)/source-destination-scope
  • 5ba9bc2 fix(long-term-memory): harden scoped imports
  • c26376e Merge remote-tracking branch 'upstream/staging' into feature(long-term-memory)/source-destination-scope
  • d62da7e fix(long-term-memory): publish import retry repairs
  • d988050 Merge remote-tracking branch 'origin/feature(long-term-memory)/source-destination-scope' into feature(long-term-memory)/source-destination-scope
  • 2590f6a Merge branch 'staging' into feature(long-term-memory)/source-destination-scope

📊 Changes

20 files changed (+919 additions, -355 deletions)

View changed files

📝 artifacts/long-term-memory-1.2.16.zip (+0 -0)
📝 catalog/catalog.json (+6 -6)
📝 catalog/v2/catalog.json (+6 -6)
📝 catalog/v3/catalog.json (+6 -6)
📝 packages/long-term-memory/client.js (+22 -33)
📝 packages/long-term-memory/manifest.json (+4 -4)
📝 packages/long-term-memory/server.mjs (+47 -47)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/SourcesWorkspace.tsx (+279 -191)
📝 packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json (+11 -1)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/interop.ts (+90 -19)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts (+1 -1)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-extraction.ts (+4 -4)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-hash.ts (+1 -1)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-processing.ts (+2 -2)
📝 packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/storage.ts (+8 -0)
📝 packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts (+36 -3)
📝 packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/scope.ts (+4 -10)
📝 tests/long-term-memory-conversation-summary-import.regression.ts (+15 -2)
📝 tests/long-term-memory-lifecycle.regression.ts (+41 -12)
📝 tests/long-term-memory-routes.regression.ts (+336 -7)

📄 Description

Linked issue

Closes #623

Why this change

Long-Term Memory Sources previously overloaded one scope concept. That made it impossible to clearly find source material in one chat while making extracted memories available in another scope, and the UI did not make resulting availability explicit.

What changed

  • Added separate sourceScope and destinationScope handling for Long-Term Memory previews and imports.
  • Added chat, all-branches, character, and persona destination handling in the Sources UI.
  • Preserved source provenance and availability for new cross-scope imports.
  • Added destination-aware extraction, retries, refreshes, fingerprints, conflict handling, and legacy scope compatibility.
  • Rebuilt the long-term-memory package, artifact, manifest hashes, and catalog entries.

Package and security impact

  • Affected package IDs: long-term-memory
  • Engine compatibility impact: none; package remains compatible with the existing Engine lane
  • New or changed permissions/entrypoints: none
  • Restart, storage, update, or uninstall impact: package storage and lifecycle behavior remain covered by the existing lifecycle regression

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 route, conversation-summary, storage, extraction, runtime, debug-log, and lifecycle regressions passed.
  • Lifecycle was also run against a disposable rebuilt package artifact.
  • npm run check passed with 68 existing lint warnings and zero errors.
  • Catalog lanes, package locales, catalog validation, and git diff --check passed.

Documentation impact

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

UI evidence (if applicable)

The lifecycle browser regression covers the source and destination picker behavior, including mobile activation and scoped preview requests. No screenshots were added.

Summary by CodeRabbit

  • New Features

    • Import sources from chats, groups, characters, personas, or all available sources.
    • Choose separate source and destination scopes for imports and previews.
    • View selected source and destination details in import results.
    • Retry eligible cancelled imports while preserving destination information.
    • Support importing character content into persona destinations.
  • Bug Fixes

    • Improved scope handling for extraction, previews, and saved memory notes.
    • Added validation for missing or conflicting destinations.
    • Preserved compatibility with existing import settings.

🔄 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/626 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 8/27/2026 **Status:** ✅ Merged **Merged:** 8/28/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `staging` ← **Head:** `feature(long-term-memory)/source-destination-scope` --- ### 📝 Commits (10+) - [`22daf3a`](https://github.com/Pasta-Devs/Marinara-Agents/commit/22daf3ab8851a7c4f2b11fbe9e0b1f845f7cf23d) feat(long-term-memory): separate source and destination scopes - [`59eef13`](https://github.com/Pasta-Devs/Marinara-Agents/commit/59eef13f1a4b7f46edbf5768a852343994eddd18) fix(long-term-memory): preserve destination scope boundaries - [`05209c5`](https://github.com/Pasta-Devs/Marinara-Agents/commit/05209c53b5cb8057fd1f1974dce9491fb5499087) fix(long-term-memory): preserve legacy import behavior - [`39ac231`](https://github.com/Pasta-Devs/Marinara-Agents/commit/39ac2313e6f975314a4cb2eedb6744334100b8ff) build(long-term-memory): publish scoped import changes - [`6ca75e2`](https://github.com/Pasta-Devs/Marinara-Agents/commit/6ca75e23e0120938ddfa01093a3c5a5a48b88884) Merge branch 'staging' into feature(long-term-memory)/source-destination-scope - [`5ba9bc2`](https://github.com/Pasta-Devs/Marinara-Agents/commit/5ba9bc278750532e7dd5e00be571471c04c1622a) fix(long-term-memory): harden scoped imports - [`c26376e`](https://github.com/Pasta-Devs/Marinara-Agents/commit/c26376e20ac44d79ee3e1f242c86d53efc262579) Merge remote-tracking branch 'upstream/staging' into feature(long-term-memory)/source-destination-scope - [`d62da7e`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d62da7e810eff13a802af5d164e039f509164cea) fix(long-term-memory): publish import retry repairs - [`d988050`](https://github.com/Pasta-Devs/Marinara-Agents/commit/d988050e616f640bd78af7b94ae3da88559c996d) Merge remote-tracking branch 'origin/feature(long-term-memory)/source-destination-scope' into feature(long-term-memory)/source-destination-scope - [`2590f6a`](https://github.com/Pasta-Devs/Marinara-Agents/commit/2590f6ab21ddf43a55f3719ac7105a29b8f03e17) Merge branch 'staging' into feature(long-term-memory)/source-destination-scope ### 📊 Changes **20 files changed** (+919 additions, -355 deletions) <details> <summary>View changed files</summary> 📝 `artifacts/long-term-memory-1.2.16.zip` (+0 -0) 📝 `catalog/catalog.json` (+6 -6) 📝 `catalog/v2/catalog.json` (+6 -6) 📝 `catalog/v3/catalog.json` (+6 -6) 📝 `packages/long-term-memory/client.js` (+22 -33) 📝 `packages/long-term-memory/manifest.json` (+4 -4) 📝 `packages/long-term-memory/server.mjs` (+47 -47) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/SourcesWorkspace.tsx` (+279 -191) 📝 `packages/long-term-memory/src/engine/packages/client/src/features/long-term-memory/locales/en.json` (+11 -1) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/interop.ts` (+90 -19) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/routes.ts` (+1 -1) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-extraction.ts` (+4 -4) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-hash.ts` (+1 -1) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/source-processing.ts` (+2 -2) 📝 `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/storage.ts` (+8 -0) 📝 `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/schema.ts` (+36 -3) 📝 `packages/long-term-memory/src/engine/packages/shared/src/features/agents/long-term-memory/scope.ts` (+4 -10) 📝 `tests/long-term-memory-conversation-summary-import.regression.ts` (+15 -2) 📝 `tests/long-term-memory-lifecycle.regression.ts` (+41 -12) 📝 `tests/long-term-memory-routes.regression.ts` (+336 -7) </details> ### 📄 Description ## Linked issue Closes #623 ## Why this change Long-Term Memory Sources previously overloaded one scope concept. That made it impossible to clearly find source material in one chat while making extracted memories available in another scope, and the UI did not make resulting availability explicit. ## What changed - Added separate `sourceScope` and `destinationScope` handling for Long-Term Memory previews and imports. - Added chat, all-branches, character, and persona destination handling in the Sources UI. - Preserved source provenance and availability for new cross-scope imports. - Added destination-aware extraction, retries, refreshes, fingerprints, conflict handling, and legacy `scope` compatibility. - Rebuilt the `long-term-memory` package, artifact, manifest hashes, and catalog entries. ## Package and security impact - Affected package IDs: `long-term-memory` - Engine compatibility impact: none; package remains compatible with the existing Engine lane - New or changed permissions/entrypoints: none - Restart, storage, update, or uninstall impact: package storage and lifecycle behavior remain covered by the existing lifecycle regression ## Validation - [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 route, conversation-summary, storage, extraction, runtime, debug-log, and lifecycle regressions passed. - Lifecycle was also run against a disposable rebuilt package artifact. - `npm run check` passed with 68 existing lint warnings and zero errors. - Catalog lanes, package locales, catalog validation, and `git diff --check` passed. ## Documentation impact - [x] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) The lifecycle browser regression covers the source and destination picker behavior, including mobile activation and scoped preview requests. No screenshots were added. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Import sources from chats, groups, characters, personas, or all available sources. - Choose separate source and destination scopes for imports and previews. - View selected source and destination details in import results. - Retry eligible cancelled imports while preserving destination information. - Support importing character content into persona destinations. - **Bug Fixes** - Improved scope handling for extraction, previews, and saved memory notes. - Added validation for missing or conflicting destinations. - Preserved compatibility with existing import settings. <!-- 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:01:46 +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#1057
No description provided.