[GH-ISSUE #1842] [Feature]: Noodle: let timeline posts use Long-Term Memory's recall, off by default, with a choice of whole memories or relevant parts #1782

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

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

Originally assigned to: @Promansis on GitHub.

What problem does this solve?

Noodle writes timeline posts for characters but knows nothing about what happened in their chats beyond the opted-in chat context and older Noodle posts. Long-Term Memory keeps exactly that, ongoing threads, past events, relationships, and shares it with other Agents through long-term-memory:recall (since LTM 1.4.84). Noodle has no way to use it.

Tracker: SN-2.

Proposed package or change

An off-by-default "Use memories from Long-Term Memory" setting with a first-time confirmation and a status line. When on, each timeline refresh asks recall for the selected characters' memories and adds them to the prompt as their own block. noodle only, minor bump with a CHANGELOG entry. Nothing changes in the Engine or Long-Term Memory (whole mode is issues/ltm-recall-whole-memories.md; without it LTM answers ranked).

Wording approved by the maintainer (joint note, question 1, 2026-10-29).

Minimal fix

N = packages/noodle/src/engine/packages, SRV = N/server/src/services/noodle, CLI = N/client/src/components/noodle.

+SRV/noodle-ltm-recall.ts
+  recallNoodleMemories({ settings, characterIds, personaId?, queryText, signal? })
+    settings.useLtmMemories off -> []
+    service = getCapabilityService("long-term-memory:recall")      (Engine registry, as Slurp imports it)
+    no service -> status "missing"; null -> "off"; throw -> "error"; each -> []
+    recall({ caller: "noodle", queryText, characterIds (≤20), personaId, mode: "roleplay",
+             maxTokens: 1200, whole: settings.ltmMemoryRecall !== "relevant", signal })
+    -> lines "title: text", status "ok"
 SRV/noodle-public-prompt.service.ts  buildRefreshPrompt
   …"# Opted-In Chat Context", …
+  "# What Long-Term Memory remembers" + lines        # only when there are lines; before "# Recent Noodle Timeline"
   "# Recent Noodle Timeline", "# Randomly Recalled Older Noodle Activity"   # unchanged
  • Recall helper. New SRV/noodle-ltm-recall.ts, called once per refresh in buildRefreshPrompt (~290). characterIds = selectedCharacterIds (first 20); personaId = personaAccount.entityId when the persona account takes part. queryText = the recent timeline post texts the prompt already gathers, joined and cut to 8,000 characters, or the selected characters' names when the timeline is empty. The older-post sample (sampleNoodlePastMemoriesWeighted) stays as it is: it recalls Noodle posts, not chat memories.
  • Status. The helper keeps the last outcome per server run. New GET /api/noodle/memory-status in N/server/src/routes/noodle.routes.ts returns it.
  • Settings. useLtmMemories: false, ltmMemoriesConfirmed: false and ltmMemoryRecall: "whole" in DEFAULT_SETTINGS (N/server/src/services/storage/noodle.storage.ts:32), which also lists them in PUBLIC_SETTING_KEYS; coerce both booleans with bool() in updateSettings and keep ltmMemoryRecall to the two values. Add all three to PackageNoodleSettings (the package-side type beside NoodleSettings) and to CLI/noodle-settings-defaults.ts. No Engine schema change.
  • UI (CLI/NoodleHome.tsx, Advanced section ~4198-4235, with the existing ToggleSetting):
    • Label: Use memories from Long-Term Memory. Detail: Posts can draw on what Long-Term Memory remembers about each account's character: ongoing threads, past events, relationships. Memories you limited to one chat, and anything from game chats, are never used. Noodle only reads memories and never changes them.
    • First-time confirmation with showConfirmDialog when it is turned on and has never been confirmed (remember it in the setting ltmMemoriesConfirmed); Not now leaves it off. Title Let posts use your memories? Body Noodle will read what Long-Term Memory remembers about the character behind each account. Memories limited to one chat or group stay out. When your own persona's account posts, things Long-Term Memory knows about your persona can appear in its posts too. You can turn this off here, or in Long-Term Memory → Memory Settings → Sharing. Buttons Use memories / Not now.
    • While on: a choice "Whole memories" / "Only the parts that fit the posts", and a status line only when something is wrong: Long-Term Memory isn't installed. / Long-Term Memory isn't sharing memories. Turn on "Other Agents can read memories" in its Memory Settings. / Long-Term Memory couldn't be read. Posts are written without memories for now.
    • Strings through Noodle's locale files, per node scripts/validate-package-locales.mjs.
  • CHANGELOG (packages/noodle/CHANGELOG.md, new minor version): the setting, off by default, with its confirmation; whole memories by default or only the parts that fit; the status line.
  • Deferred. ${memories} and per-type Prompt Override variables on the Noodle Timeline Prompt: they need a declaration line in the Engine's prompt-overrides/registry/noodle.ts. The block goes in the built prompt, not the editable base prompt, for now.

Regression proof

New tests/noodle-ltm-recall.regression.ts, with a fake recall service in the capability registry:

  • setting off: no call and no block;
  • setting on: one call per refresh with caller: "noodle", the selected character ids, the persona id only when the persona account takes part, whole: true by default and false with "relevant"; the sections appear under "# What Long-Term Memory remembers" before "# Recent Noodle Timeline";
  • no service, null and a throw give statuses missing, off and error, no block, and the refresh still builds;
  • updateSettings keeps the three new keys, coerces the booleans and rejects a third recall value.

Extend tests/noodle-settings-structure.regression.* for the new keys if it lists settings. Mutations that must fail: the block rendered with the setting off, and personaId sent without the persona account.

Why should this be optional?

Memories come from the user's private chats, so Noodle reads them only after the user turns the setting on and confirms. It does nothing without Long-Term Memory, and Long-Term Memory's "Other Agents can read memories" switch and Sharing table give the user the stop and the record on the other side.

Alternatives considered

  • Replace the older-post sample with recall: that sample recalls Noodle's own posts, which memories don't cover.
  • Prompt Override variables in this change: needs an Engine line; deferred so this ships Agents-only.
  • Ranked only: the maintainer wants whole memories first and a user choice (the maintainer confirmed the same choice for Noodle).

Additional context

Follows #1567 and #1805. Pairs with issues/ltm-recall-whole-memories.md and issues/slurp-ltm-recall.md; no file overlap.

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 8c1a195ec (Noodle 1.5.10). Prompt headings at noodle-public-prompt.service.ts 505-536; server-entry.ts activate gets no service lookup, hence the registry import. capability-service-registry is not in the noodle list of scripts/server-engine-modules-baseline.json; the Noodle build runs the server host gates, which confirm it is host-provided for Noodle too.
  • Maintainer confirmed (2026-10-29) the whole/relevant choice in Noodle, default whole. Assumptions to confirm: maxTokens 1200 for a refresh across several characters; the status is empty until the first refresh after a restart.
Originally created by @Promansis on GitHub (Oct 28, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/1842 Originally assigned to: @Promansis on GitHub. ## What problem does this solve? Noodle writes timeline posts for characters but knows nothing about what happened in their chats beyond the opted-in chat context and older Noodle posts. Long-Term Memory keeps exactly that, ongoing threads, past events, relationships, and shares it with other Agents through `long-term-memory:recall` (since LTM 1.4.84). Noodle has no way to use it. Tracker: SN-2. ## Proposed package or change An off-by-default "Use memories from Long-Term Memory" setting with a first-time confirmation and a status line. When on, each timeline refresh asks recall for the selected characters' memories and adds them to the prompt as their own block. `noodle` only, minor bump with a CHANGELOG entry. Nothing changes in the Engine or Long-Term Memory (whole mode is `issues/ltm-recall-whole-memories.md`; without it LTM answers ranked). Wording approved by the maintainer (joint note, question 1, 2026-10-29). ### Minimal fix N = `packages/noodle/src/engine/packages`, SRV = `N/server/src/services/noodle`, CLI = `N/client/src/components/noodle`. ```diff +SRV/noodle-ltm-recall.ts + recallNoodleMemories({ settings, characterIds, personaId?, queryText, signal? }) + settings.useLtmMemories off -> [] + service = getCapabilityService("long-term-memory:recall") (Engine registry, as Slurp imports it) + no service -> status "missing"; null -> "off"; throw -> "error"; each -> [] + recall({ caller: "noodle", queryText, characterIds (≤20), personaId, mode: "roleplay", + maxTokens: 1200, whole: settings.ltmMemoryRecall !== "relevant", signal }) + -> lines "title: text", status "ok" SRV/noodle-public-prompt.service.ts buildRefreshPrompt …"# Opted-In Chat Context", … + "# What Long-Term Memory remembers" + lines # only when there are lines; before "# Recent Noodle Timeline" "# Recent Noodle Timeline", "# Randomly Recalled Older Noodle Activity" # unchanged ``` - **Recall helper.** New `SRV/noodle-ltm-recall.ts`, called once per refresh in `buildRefreshPrompt` (~290). `characterIds` = `selectedCharacterIds` (first 20); `personaId` = `personaAccount.entityId` when the persona account takes part. `queryText` = the recent timeline post texts the prompt already gathers, joined and cut to 8,000 characters, or the selected characters' names when the timeline is empty. The older-post sample (`sampleNoodlePastMemoriesWeighted`) stays as it is: it recalls Noodle posts, not chat memories. - **Status.** The helper keeps the last outcome per server run. New `GET /api/noodle/memory-status` in `N/server/src/routes/noodle.routes.ts` returns it. - **Settings.** `useLtmMemories: false`, `ltmMemoriesConfirmed: false` and `ltmMemoryRecall: "whole"` in `DEFAULT_SETTINGS` (`N/server/src/services/storage/noodle.storage.ts:32`), which also lists them in `PUBLIC_SETTING_KEYS`; coerce both booleans with `bool()` in `updateSettings` and keep `ltmMemoryRecall` to the two values. Add all three to `PackageNoodleSettings` (the package-side type beside `NoodleSettings`) and to `CLI/noodle-settings-defaults.ts`. No Engine schema change. - **UI** (`CLI/NoodleHome.tsx`, Advanced section ~4198-4235, with the existing `ToggleSetting`): - Label: **Use memories from Long-Term Memory**. Detail: *Posts can draw on what Long-Term Memory remembers about each account's character: ongoing threads, past events, relationships. Memories you limited to one chat, and anything from game chats, are never used. Noodle only reads memories and never changes them.* - First-time confirmation with `showConfirmDialog` when it is turned on and has never been confirmed (remember it in the setting `ltmMemoriesConfirmed`); Not now leaves it off. Title **Let posts use your memories?** Body *Noodle will read what Long-Term Memory remembers about the character behind each account. Memories limited to one chat or group stay out. When your own persona's account posts, things Long-Term Memory knows about your persona can appear in its posts too. You can turn this off here, or in Long-Term Memory → Memory Settings → Sharing.* Buttons **Use memories** / **Not now**. - While on: a choice "Whole memories" / "Only the parts that fit the posts", and a status line only when something is wrong: *Long-Term Memory isn't installed.* / *Long-Term Memory isn't sharing memories. Turn on "Other Agents can read memories" in its Memory Settings.* / *Long-Term Memory couldn't be read. Posts are written without memories for now.* - Strings through Noodle's locale files, per `node scripts/validate-package-locales.mjs`. - **CHANGELOG** (`packages/noodle/CHANGELOG.md`, new minor version): the setting, off by default, with its confirmation; whole memories by default or only the parts that fit; the status line. - **Deferred.** `${memories}` and per-type Prompt Override variables on the Noodle Timeline Prompt: they need a declaration line in the Engine's `prompt-overrides/registry/noodle.ts`. The block goes in the built prompt, not the editable base prompt, for now. ### Regression proof New `tests/noodle-ltm-recall.regression.ts`, with a fake recall service in the capability registry: - setting off: no call and no block; - setting on: one call per refresh with `caller: "noodle"`, the selected character ids, the persona id only when the persona account takes part, `whole: true` by default and `false` with `"relevant"`; the sections appear under "# What Long-Term Memory remembers" before "# Recent Noodle Timeline"; - no service, `null` and a throw give statuses `missing`, `off` and `error`, no block, and the refresh still builds; - `updateSettings` keeps the three new keys, coerces the booleans and rejects a third recall value. Extend `tests/noodle-settings-structure.regression.*` for the new keys if it lists settings. Mutations that must fail: the block rendered with the setting off, and `personaId` sent without the persona account. ## Why should this be optional? Memories come from the user's private chats, so Noodle reads them only after the user turns the setting on and confirms. It does nothing without Long-Term Memory, and Long-Term Memory's "Other Agents can read memories" switch and Sharing table give the user the stop and the record on the other side. ## Alternatives considered - Replace the older-post sample with recall: that sample recalls Noodle's own posts, which memories don't cover. - Prompt Override variables in this change: needs an Engine line; deferred so this ships Agents-only. - Ranked only: the maintainer wants whole memories first and a user choice (the maintainer confirmed the same choice for Noodle). ## Additional context Follows #1567 and #1805. Pairs with `issues/ltm-recall-whole-memories.md` and `issues/slurp-ltm-recall.md`; no file overlap. ## 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 8c1a195ec (Noodle 1.5.10). Prompt headings at `noodle-public-prompt.service.ts` 505-536; `server-entry.ts` `activate` gets no service lookup, hence the registry import. `capability-service-registry` is not in the noodle list of `scripts/server-engine-modules-baseline.json`; the Noodle build runs the server host gates, which confirm it is host-provided for Noodle too. - Maintainer confirmed (2026-10-29) the whole/relevant choice in Noodle, default whole. Assumptions to confirm: `maxTokens` 1200 for a refresh across several characters; the status is empty until the first refresh after a restart.
bsakaguchi 2026-11-07 16:36:38 +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#1782
No description provided.