[GH-ISSUE #1853] [Feature]: Slurp: offer to turn on Long-Term Memory sharing when "What your other Agents know" is turned on #1786

Closed
opened 2026-11-07 16:36:40 +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/1853

Originally assigned to: @Promansis on GitHub.

What problem does this solve?

Creator memory recall (#1841, Slurp 0.4.9) needs two switches on: Slurp's "What your other Agents know"
(flavourFromAgents) and Long-Term Memory's "Other Agents can read memories" (longTermMemoryShareWithPackages).
Both default to on, but a player who turned LTM's off and now turns Slurp's on gets nothing. All they see is the quiet
memoryStatusOff line under the switch, and they have to find the right switch in another package's settings.

Proposed package or change

When the player turns on "What your other Agents know" in Backstage → Engine link, Slurp checks LTM's sharing
switch. If LTM is installed and its switch is off, Slurp asks (wording approved by the maintainer on 2026-10-29):

Turn on sharing in Long-Term Memory?
Creators can only use your memories if Long-Term Memory shares them, and its "Other Agents can read memories" switch
is off. Turn it on for you?
[Not now] [Turn it on]

  • "Turn it on" saves { longTermMemoryShareWithPackages: true } to LTM, then refreshes Slurp's memory status.
  • "Not now" leaves LTM alone. Slurp's own switch stays on either way.
  • No popup when LTM is not installed or the read fails (the existing memoryStatusMissing line covers this). There is
    also no popup when LTM's switch is already on, or when Slurp's switch is turned off.
  • The help text ui.slurp.settings.prompts.flavourFromAgentsDetail ends "Slurp only reads it and never changes those
    Agents." That is no longer true, so it becomes "Slurp only reads it and only changes those Agents when you say so."

Minimal fix

  1. New packages/slurp2/src/engine/packages/client/src/slp/features/settings/slp-ltm-sharing-offer.ts: export
    offerLtmSharing({ read, confirm, save }) with injected dependencies so it can be tested without a DOM.
    • Call read() first. If it throws, return "skipped". If the result has
      longTermMemoryShareWithPackages !== false, also return "skipped".
    • Otherwise call confirm(). If it returns false, return "declined".
    • Otherwise call await save() and return "enabled".
    • A failed save throws to the caller.
  2. SlpEngineLinkPanel.tsx:96 (flavourFromAgents onChange): keep update("flavourFromAgents", value). When value
    is true, also call offerLtmSharing with:
    • read: api.get("/long-term-memory/settings") (the Engine api client from ../../../lib/api-client.js, as in
      slp-settings-hooks.ts).
    • confirm: showConfirmDialog from ../../../lib/app-dialogs (as SlpPlatformEventsPanel.tsx:124), with title,
      message, confirmLabel and cancelLabel from the new locale keys.
    • save: api.put("/long-term-memory/settings", { longTermMemoryShareWithPackages: true }). LTM's PUT merges a
      partial body (updateLtmGlobalSettings, LTM settings.ts:184-196).
    • After "enabled", invalidate the useSlurpMemoryStatus query (slp-settings-hooks.ts:31-38).
    • When save fails, show the error the way the panel's other failed writes do; if there is none, use showAlertDialog.
  3. client/src/slp/locales/en.json: add ui.slurp.settings.prompts.ltmSharingOfferTitle, …OfferMessage,
    …OfferConfirm ("Turn it on") and …OfferCancel ("Not now"), and change flavourFromAgentsDetail as above.
    Update the same sentence in de.json, ko.json and pl.json, and add the new keys there if
    node scripts/validate-package-locales.mjs requires them.
  4. packages/slurp2/CHANGELOG.md: one line under ## Unreleased. No version bump; reland.mjs sets it at land
    (patch).

No server change, no new route, no settings schema change. Slurp writes LTM's setting only on the player's "Turn it on".

Proof

Extend tests/slurp2-ltm-recall.regression.ts:

  • Import offerLtmSharing and cover these cases: LTM's switch off and confirmed → save called once and the result is
    "enabled"; declined → no save, "declined"; switch already on → no confirm, "skipped"; read throws (LTM
    missing) → no confirm, "skipped".
  • Add a source pin that SlpEngineLinkPanel.tsx calls offerLtmSharing only on the value true branch, using
    cancelLabel.

Run that test plus tests/slurp2-life-moments.regression.ts (it pins the update("flavourFromAgents", value) call),
test-fast.sh, npm run check and the locale validator.

Why should this be optional?

It is a one-time question inside an existing package setting and changes no behavior until the player says yes. Nothing is added to the Engine core.

Alternatives considered

Non-goals:

  • Turning LTM sharing off when Slurp's switch goes off. LTM's switch is shared by every package reader.
  • Any Engine change, and any new LTM route or capability-service method. LTM's existing PUT /settings is enough.
  • A popup from Slurp's other readers (Character Tracker, World State, Persona Stats). They have no share switch.

Additional context

Pair: #1854 (the same popup from the Long-Term Memory side). The two ship as separate PRs and share no files.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Oct 29, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1853 Originally assigned to: @Promansis on GitHub. ## What problem does this solve? Creator memory recall (#1841, Slurp 0.4.9) needs two switches on: Slurp's "What your other Agents know" (`flavourFromAgents`) and Long-Term Memory's "Other Agents can read memories" (`longTermMemoryShareWithPackages`). Both default to on, but a player who turned LTM's off and now turns Slurp's on gets nothing. All they see is the quiet `memoryStatusOff` line under the switch, and they have to find the right switch in another package's settings. ## Proposed package or change When the player turns **on** "What your other Agents know" in Backstage → Engine link, Slurp checks LTM's sharing switch. If LTM is installed and its switch is off, Slurp asks (wording approved by the maintainer on 2026-10-29): > **Turn on sharing in Long-Term Memory?** > Creators can only use your memories if Long-Term Memory shares them, and its "Other Agents can read memories" switch > is off. Turn it on for you? > [Not now] [Turn it on] - "Turn it on" saves `{ longTermMemoryShareWithPackages: true }` to LTM, then refreshes Slurp's memory status. - "Not now" leaves LTM alone. Slurp's own switch stays on either way. - No popup when LTM is not installed or the read fails (the existing `memoryStatusMissing` line covers this). There is also no popup when LTM's switch is already on, or when Slurp's switch is turned **off**. - The help text `ui.slurp.settings.prompts.flavourFromAgentsDetail` ends "Slurp only reads it and never changes those Agents." That is no longer true, so it becomes "Slurp only reads it and only changes those Agents when you say so." ### Minimal fix 1. New `packages/slurp2/src/engine/packages/client/src/slp/features/settings/slp-ltm-sharing-offer.ts`: export `offerLtmSharing({ read, confirm, save })` with injected dependencies so it can be tested without a DOM. - Call `read()` first. If it throws, return `"skipped"`. If the result has `longTermMemoryShareWithPackages !== false`, also return `"skipped"`. - Otherwise call `confirm()`. If it returns false, return `"declined"`. - Otherwise call `await save()` and return `"enabled"`. - A failed `save` throws to the caller. 2. `SlpEngineLinkPanel.tsx:96` (`flavourFromAgents` onChange): keep `update("flavourFromAgents", value)`. When `value` is true, also call `offerLtmSharing` with: - `read`: `api.get("/long-term-memory/settings")` (the Engine `api` client from `../../../lib/api-client.js`, as in `slp-settings-hooks.ts`). - `confirm`: `showConfirmDialog` from `../../../lib/app-dialogs` (as `SlpPlatformEventsPanel.tsx:124`), with title, message, `confirmLabel` and `cancelLabel` from the new locale keys. - `save`: `api.put("/long-term-memory/settings", { longTermMemoryShareWithPackages: true })`. LTM's PUT merges a partial body (`updateLtmGlobalSettings`, LTM `settings.ts:184-196`). - After `"enabled"`, invalidate the `useSlurpMemoryStatus` query (`slp-settings-hooks.ts:31-38`). - When `save` fails, show the error the way the panel's other failed writes do; if there is none, use `showAlertDialog`. 3. `client/src/slp/locales/en.json`: add `ui.slurp.settings.prompts.ltmSharingOfferTitle`, `…OfferMessage`, `…OfferConfirm` ("Turn it on") and `…OfferCancel` ("Not now"), and change `flavourFromAgentsDetail` as above. Update the same sentence in `de.json`, `ko.json` and `pl.json`, and add the new keys there if `node scripts/validate-package-locales.mjs` requires them. 4. `packages/slurp2/CHANGELOG.md`: one line under `## Unreleased`. No version bump; `reland.mjs` sets it at land (patch). No server change, no new route, no settings schema change. Slurp writes LTM's setting only on the player's "Turn it on". ### Proof Extend `tests/slurp2-ltm-recall.regression.ts`: - Import `offerLtmSharing` and cover these cases: LTM's switch off and confirmed → `save` called once and the result is `"enabled"`; declined → no `save`, `"declined"`; switch already on → no `confirm`, `"skipped"`; `read` throws (LTM missing) → no `confirm`, `"skipped"`. - Add a source pin that `SlpEngineLinkPanel.tsx` calls `offerLtmSharing` only on the `value` true branch, using `cancelLabel`. Run that test plus `tests/slurp2-life-moments.regression.ts` (it pins the `update("flavourFromAgents", value)` call), `test-fast.sh`, `npm run check` and the locale validator. ## Why should this be optional? It is a one-time question inside an existing package setting and changes no behavior until the player says yes. Nothing is added to the Engine core. ## Alternatives considered Non-goals: - Turning LTM sharing **off** when Slurp's switch goes off. LTM's switch is shared by every package reader. - Any Engine change, and any new LTM route or capability-service method. LTM's existing `PUT /settings` is enough. - A popup from Slurp's other readers (Character Tracker, World State, Persona Stats). They have no share switch. ## Additional context Pair: #1854 (the same popup from the Long-Term Memory side). The two ship as separate PRs and share no files. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-11-07 16:36:40 +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#1786
No description provided.