[GH-ISSUE #1850] [Feature]: Long-Term Memory: stop offering the old storage read now that Slurp uses recall #1783

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

Originally created by @Promansis on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1850

Originally assigned to: @Promansis on GitHub.

What problem does this solve?

Long-Term Memory still registers long-term-memory:storage, a second way for other packages to read memories (storage.listNotes). It was kept only for Slurp's flavour brief. Slurp 0.4.9 (#1841, PR #1845) now reads through long-term-memory:recall, and no package on staging looks the key up any more. The old service skips recall's subject, mode and persona rules, and like every registered service any installed package can look it up. Keeping it means two read paths to keep private and documented when one is enough.

Tracker: SN-6 (design note Q8).

Proposed package or change

Stop registering long-term-memory:storage and delete its reader. long-term-memory only, patch bump with a CHANGELOG line. Nothing changes in the Engine, Slurp or Noodle.

Minimal fix

S = packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory.

 S/server-entry.ts  activate
-  releaseStorageService = registerService("long-term-memory:storage", createLtmStorageReadService(active.storage))
   registerService("long-term-memory:recall", …)    # unchanged
   registerService("long-term-memory:runtime", …)   # unchanged
-  cleanup: releaseStorageService()
 S/services/storage-read.ts
-  listNotesFilterSchema, createLtmStorageReadService   (and the imports only they used)
   ltmPackageCallerSchema, isLtmNoteShareable, recordLtmPackageRead, listLtmPackageReaders   # unchanged, recall uses them
  • Registration. Remove the long-term-memory:storage registration, its import and its release call in S/server-entry.ts.
  • Reader. Delete createLtmStorageReadService and listNotesFilterSchema from S/services/storage-read.ts, with the imports left unused (LongTermMemoryStorage, getLtmGlobalSettings, ltmNoteTypeSchema if nothing else in the file uses them). The file keeps the shared helpers that S/services/recall.ts and S/routes/settings.ts import.
  • Kept on purpose. "package_list" stays in PACKAGE_READ_ACTIONS and in the Activity view's action labels (ActivityView.tsx ~93), so debug-log lines written by older reads still count in Memory Settings → Sharing and still show a label.
  • Docs. packages/long-term-memory/docs/ARCHITECTURE.md: drop long-term-memory:storage from the registration sentence (~13) and delete its paragraph in § "Services for Other Packages" (~250). PRODUCT.md (S/../../../../client/src/features/long-term-memory/PRODUCT.md:29) lists the registered services: name long-term-memory:recall and long-term-memory:runtime. Slurp's DECISIONS.md mentions the key only as a rejected option, so leave it.
  • CHANGELOG under ## Unreleased: "Long-Term Memory no longer offers the older way other Agents read memories. Slurp 0.4.8 and earlier stop adding memories to Creator posts; update Slurp to keep them."

Regression proof

tests/long-term-memory-runtime.regression.ts:

  • Activation (~305): replace the storage-service shape checks with assert.equal(services.has("long-term-memory:storage"), false, …). Keep the cleanup assertion (~2991): it still holds and guards a later re-add without a release.
  • Delete the sharedRoot / sharedRead block (~318-360). Recall's own fixtures already cover chat-limited, archived, game-only and other characters' memories, but not imported sources: move the source_shared_summary fixture (a type: "source" note for char-a) into the recall fixtures and assert recall never returns it, ranked or whole: true.
  • Reader counts (~481, ~537, ~559): make the noodle reads with recall.recall({ caller: "noodle", queryText, characterIds: ["char-a"] }) and sum the sections it returned. Drop the last storage assertion, since the recall assertions next to it already cover the switch.

Mutations that must fail: registering the storage service again, and dropping note.type !== "source" from isLtmNoteShareable.

Why should this be optional?

It removes a service. Nothing turns it on or off. Reading memories stays optional through recall, behind Long-Term Memory's "Other Agents can read memories" switch and each reading Agent's own setting.

Alternatives considered

  • Keep it as a deprecated alias that answers []: it hides nothing that a missing key doesn't, and it stays one more lookup that any package can make.
  • Wait for the Engine's host-only flag (Engine #8408, SN-7): that flag is for long-term-memory:runtime. This service has no remaining caller, so deleting it is simpler than guarding it.

Additional context

Follows #1840 (whole recall, LTM 1.5.8) and #1841 (Slurp on recall, 0.4.9). Slurp 0.4.8 looks the key up with if (!service?.storage?.listNotes) return [] (slp-agent-memory-source.ts:97-98), so against this change it loses its memory lines and keeps working. Noodle never used the key. No file overlaps with #1842 (Noodle recall).

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.

Local trace

  • Mapped on upstream/staging 6220f9459 (LTM 1.5.8, Slurp 0.4.9). git grep "long-term-memory:storage" outside generated bundles and artifacts: S/server-entry.ts:40, S/services/storage-read.ts:75 (comment), tests/long-term-memory-runtime.regression.ts:305,2991, LTM ARCHITECTURE.md:13,250, PRODUCT.md:29, Slurp DECISIONS.md:355. packages/slurp2/server.mjs has no match.
  • The tracker said three regressions referenced the key. On this baseline only tests/long-term-memory-runtime.regression.ts does.
Originally created by @Promansis on GitHub (Oct 29, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1850 Originally assigned to: @Promansis on GitHub. ## What problem does this solve? Long-Term Memory still registers `long-term-memory:storage`, a second way for other packages to read memories (`storage.listNotes`). It was kept only for Slurp's flavour brief. Slurp 0.4.9 (#1841, PR #1845) now reads through `long-term-memory:recall`, and no package on staging looks the key up any more. The old service skips recall's subject, mode and persona rules, and like every registered service any installed package can look it up. Keeping it means two read paths to keep private and documented when one is enough. Tracker: SN-6 (design note Q8). ## Proposed package or change Stop registering `long-term-memory:storage` and delete its reader. `long-term-memory` only, patch bump with a CHANGELOG line. Nothing changes in the Engine, Slurp or Noodle. ### Minimal fix S = `packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory`. ```diff S/server-entry.ts activate - releaseStorageService = registerService("long-term-memory:storage", createLtmStorageReadService(active.storage)) registerService("long-term-memory:recall", …) # unchanged registerService("long-term-memory:runtime", …) # unchanged - cleanup: releaseStorageService() S/services/storage-read.ts - listNotesFilterSchema, createLtmStorageReadService (and the imports only they used) ltmPackageCallerSchema, isLtmNoteShareable, recordLtmPackageRead, listLtmPackageReaders # unchanged, recall uses them ``` - **Registration.** Remove the `long-term-memory:storage` registration, its import and its release call in `S/server-entry.ts`. - **Reader.** Delete `createLtmStorageReadService` and `listNotesFilterSchema` from `S/services/storage-read.ts`, with the imports left unused (`LongTermMemoryStorage`, `getLtmGlobalSettings`, `ltmNoteTypeSchema` if nothing else in the file uses them). The file keeps the shared helpers that `S/services/recall.ts` and `S/routes/settings.ts` import. - **Kept on purpose.** `"package_list"` stays in `PACKAGE_READ_ACTIONS` and in the Activity view's action labels (`ActivityView.tsx` ~93), so debug-log lines written by older reads still count in Memory Settings → Sharing and still show a label. - **Docs.** `packages/long-term-memory/docs/ARCHITECTURE.md`: drop `long-term-memory:storage` from the registration sentence (~13) and delete its paragraph in § "Services for Other Packages" (~250). `PRODUCT.md` (`S/../../../../client/src/features/long-term-memory/PRODUCT.md:29`) lists the registered services: name `long-term-memory:recall` and `long-term-memory:runtime`. Slurp's `DECISIONS.md` mentions the key only as a rejected option, so leave it. - **CHANGELOG under `## Unreleased`**: "Long-Term Memory no longer offers the older way other Agents read memories. Slurp 0.4.8 and earlier stop adding memories to Creator posts; update Slurp to keep them." ### Regression proof `tests/long-term-memory-runtime.regression.ts`: - Activation (~305): replace the storage-service shape checks with `assert.equal(services.has("long-term-memory:storage"), false, …)`. Keep the cleanup assertion (~2991): it still holds and guards a later re-add without a release. - Delete the `sharedRoot` / `sharedRead` block (~318-360). Recall's own fixtures already cover chat-limited, archived, game-only and other characters' memories, but not imported sources: move the `source_shared_summary` fixture (a `type: "source"` note for `char-a`) into the recall fixtures and assert recall never returns it, ranked or `whole: true`. - Reader counts (~481, ~537, ~559): make the `noodle` reads with `recall.recall({ caller: "noodle", queryText, characterIds: ["char-a"] })` and sum the sections it returned. Drop the last storage assertion, since the recall assertions next to it already cover the switch. Mutations that must fail: registering the storage service again, and dropping `note.type !== "source"` from `isLtmNoteShareable`. ## Why should this be optional? It removes a service. Nothing turns it on or off. Reading memories stays optional through recall, behind Long-Term Memory's "Other Agents can read memories" switch and each reading Agent's own setting. ## Alternatives considered - Keep it as a deprecated alias that answers `[]`: it hides nothing that a missing key doesn't, and it stays one more lookup that any package can make. - Wait for the Engine's host-only flag (Engine #8408, SN-7): that flag is for `long-term-memory:runtime`. This service has no remaining caller, so deleting it is simpler than guarding it. ## Additional context Follows #1840 (`whole` recall, LTM 1.5.8) and #1841 (Slurp on recall, 0.4.9). Slurp 0.4.8 looks the key up with `if (!service?.storage?.listNotes) return []` (`slp-agent-memory-source.ts:97-98`), so against this change it loses its memory lines and keeps working. Noodle never used the key. No file overlaps with #1842 (Noodle recall). ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details. ## Local trace - Mapped on upstream/staging 6220f9459 (LTM 1.5.8, Slurp 0.4.9). `git grep "long-term-memory:storage"` outside generated bundles and artifacts: `S/server-entry.ts:40`, `S/services/storage-read.ts:75` (comment), `tests/long-term-memory-runtime.regression.ts:305,2991`, LTM `ARCHITECTURE.md:13,250`, `PRODUCT.md:29`, Slurp `DECISIONS.md:355`. `packages/slurp2/server.mjs` has no match. - The tracker said three regressions referenced the key. On this baseline only `tests/long-term-memory-runtime.regression.ts` does.
bsakaguchi 2026-11-07 16:36:39 +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#1783
No description provided.