[PR #1354] [MERGED] fix(relationship-tracker, memory-nag): read Roleplay whispers the way Engine agents do #1414

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/1354
Author: @SpicyMarinara
Created: 10/13/2026
Status: ✅ Merged
Merged: 10/13/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/1309-whisper-agent-content


📝 Commits (3)

  • 6022059 fix(relationship-tracker, memory-nag): read Roleplay whispers the way Engine agents do
  • 4bf364a fix(relationship-tracker): keep scene presence on public messages
  • 186fd06 Merge branch 'staging' into fix/1309-whisper-agent-content

📊 Changes

19 files changed (+235 additions, -57 deletions)

View changed files

📝 .github/workflows/pull-request-checks.yml (+3 -0)
➕ artifacts/memory-nag-1.2.0.zip (+0 -0)
➕ artifacts/relationship-tracker-0.7.0.zip (+0 -0)
📝 catalog/catalog.json (+14 -14)
📝 catalog/notes.json (+12 -0)
📝 catalog/v2/catalog.json (+14 -14)
📝 catalog/v2/notes.json (+12 -0)
📝 catalog/v3/catalog.json (+14 -14)
📝 catalog/v3/notes.json (+12 -0)
📝 packages/memory-nag/CHANGELOG.md (+4 -0)
📝 packages/memory-nag/manifest.json (+3 -3)
📝 packages/memory-nag/server.mjs (+1 -1)
📝 packages/memory-nag/src/engine/packages/server/src/services/memory-nag/scanner.ts (+6 -2)
📝 packages/relationship-tracker/CHANGELOG.md (+5 -0)
📝 packages/relationship-tracker/history.mjs (+3 -3)
📝 packages/relationship-tracker/manifest.json (+5 -5)
📝 packages/relationship-tracker/state.mjs (+7 -0)
📝 scripts/build-feature-packages.mjs (+1 -1)
➕ tests/roleplay-whispers.regression.ts (+119 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.

Linked issue

Closes #1309

Why this change

  • Relationship Tracker (Update from History) and Memory Nag (vault scans) built their Roleplay history from public message.content, so they never saw whispers. Every agent the Engine runs reads them since Pasta-Devs/Marinara-Engine#7437, and the maintainer decided the packages that write lasting knowledge should read them too.
  • Pasta-Devs/Marinara-Engine#7488 (capability API 1.71, merged) adds an optional agentContent to persistence.listMessages records: the message as Engine agents read it, with each whisper marked [Private whisper to <name>: …], a whisper-only message as its whispers, documents as Document: <title> text, and no leftover private notes. It is present in Roleplay outside hosted multiplayer rooms and absent elsewhere and on older Engines.

What changed

  • Both packages read agentContent ?? content. This is feature detection with no version gate, so older Engines and other modes read public content exactly as before. Where agentContent is present it wins, even when it is shorter than content, because it leaves private notes out.
  • Neither package drops a message because its content is empty, so a whisper-only message is now read as its whispers.
  • Relationship Tracker 0.6.4 → 0.7.0: one agentMessageText helper in state.mjs is used by the Update from History transcript and the evidence text that checks its pairs. Automatic tracking already reads the Engine's agent context, so it is unchanged.
  • Scene presence stays on public content on purpose. It decides which relationship lines go into the main prompt for character responders, and those never get whisper text. Reading whispers there would let a whisper naming two characters add their relationship to a non-recipient's prompt.
  • Memory Nag 1.1.3 → 1.2.0: the scan transcript reads the agent view. The vendored shared types are frozen, so the field is a package-owned type (AgentReadableMessage) in scanner.ts. Recall already reads the Engine's agent context.
  • tests/roleplay-whispers.regression.ts covers both packages for a whispered message, a whisper-only message, an older-Engine record without the field, and agentContent winning over content. It also pins that a name in a whisper does not add that character to the scene. It fails on unchanged staging for each package independently and runs in PR checks.
  • Both versions are above every version the staging catalog has published (memory-nag max 1.1.3, relationship-tracker max 0.6.4). Each has a CHANGELOG entry.
  • Generated: packages/memory-nag/{manifest.json,server.mjs}, packages/relationship-tracker/manifest.json, artifacts/memory-nag-1.2.0.zip, artifacts/relationship-tracker-0.7.0.zip, catalog/{,v2/,v3/}{catalog,notes}.json.

Package and security impact

  • Affected package IDs: relationship-tracker, memory-nag
  • Engine compatibility impact: none. The Engine range and the declared capability API (1.14) are unchanged. On Engines before capability API 1.71, both packages behave as before.
  • New or changed permissions/entrypoints: none. Both packages already hold chat-read.
  • Restart, storage, update, or uninstall impact: none. Whisper text can now become a Memory Nag memory or inform a Relationship Tracker History update in Roleplay, as the issue intends.
  • Build provenance: Memory Nag's build is non-hermetic, so it was built with MARINARA_ENGINE_ROOT at Engine f492413b7 (staging, 2026-10-01). There, an unchanged rebuild of 1.1.3 is byte-identical to the published artifact. The rebuilt client.js is unchanged, and server.mjs differs only in the transcript line. The Relationship Tracker builder only re-hashes committed payloads, and an unchanged rebuild of 0.6.4 is also byte-identical.

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

The agent ran these locally (the boxes above are left for a human):

  • npm run check: passed
  • node scripts/test-catalog-lanes.mjs, node scripts/validate-package-locales.mjs, node scripts/validate-catalog.mjs, node scripts/tests/catalog-release-notes.regression.mjs, git diff --check: passed
  • npx tsx tests/roleplay-whispers.regression.ts (new), tests/memory-nag-range.regression.ts, tests/memory-nag-selection.regression.ts, node tests/memory-nag-settings-ui.regression.mjs: passed
  • node scripts/typecheck-packages.mjs memory-nag: passed

Still to verify by hand on an Engine staging checkout that includes Marinara-Engine#7488:

  • Update both packages through Agents → Download Agents and restart.
  • In a Roleplay chat, send a message with a whisper to a character and another message that is only a whisper. Run Memory Nag's scan and turn on agent debug logging. Check that the scan prompt shows both whispers as [Private whisper to <name>: …] and that the whisper-only message is not blank.
  • Run Relationship Tracker Update from History over the same messages. Check in the debug prompt that the transcript shows the whispers.
  • With Relationship Tracker set to inject relationships for the scene only, whisper to a character who is not mentioned publicly. Check that the next reply's prompt does not gain that character's relationships.
  • In a Conversation chat, and on an Engine without #7488, check that both packages still read public text only and run without errors.
  • Check that uninstalling and reinstalling each package still works.

Documentation impact

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

No README describes which message text is read, so no documentation changes were made. The package CHANGELOGs describe the change.

Summary by CodeRabbit

  • New Features
    • Memory Nag scans and Relationship Tracker’s Update from History now read Roleplay whispers as private messages with recipient information. Whisper-only messages are processed instead of being treated as empty.
    • These features require a Marinara Engine that shares whispers with Agents; older Engine versions continue to read public messages only.
  • Release Updates
    • Memory Nag is now version 1.2.0, and Relationship Tracker is now version 0.7.0.

🔄 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/1354 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/13/2026 **Status:** ✅ Merged **Merged:** 10/13/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/1309-whisper-agent-content` --- ### 📝 Commits (3) - [`6022059`](https://github.com/Pasta-Devs/Marinara-Agents/commit/6022059e7f4c7d073082e3370dff73c97802773d) fix(relationship-tracker, memory-nag): read Roleplay whispers the way Engine agents do - [`4bf364a`](https://github.com/Pasta-Devs/Marinara-Agents/commit/4bf364a5a6681a852982552c5dbc92586f306e3e) fix(relationship-tracker): keep scene presence on public messages - [`186fd06`](https://github.com/Pasta-Devs/Marinara-Agents/commit/186fd06647ba931ccf8f54fd898c40b8dc8090b5) Merge branch 'staging' into fix/1309-whisper-agent-content ### 📊 Changes **19 files changed** (+235 additions, -57 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/pull-request-checks.yml` (+3 -0) ➕ `artifacts/memory-nag-1.2.0.zip` (+0 -0) ➕ `artifacts/relationship-tracker-0.7.0.zip` (+0 -0) 📝 `catalog/catalog.json` (+14 -14) 📝 `catalog/notes.json` (+12 -0) 📝 `catalog/v2/catalog.json` (+14 -14) 📝 `catalog/v2/notes.json` (+12 -0) 📝 `catalog/v3/catalog.json` (+14 -14) 📝 `catalog/v3/notes.json` (+12 -0) 📝 `packages/memory-nag/CHANGELOG.md` (+4 -0) 📝 `packages/memory-nag/manifest.json` (+3 -3) 📝 `packages/memory-nag/server.mjs` (+1 -1) 📝 `packages/memory-nag/src/engine/packages/server/src/services/memory-nag/scanner.ts` (+6 -2) 📝 `packages/relationship-tracker/CHANGELOG.md` (+5 -0) 📝 `packages/relationship-tracker/history.mjs` (+3 -3) 📝 `packages/relationship-tracker/manifest.json` (+5 -5) 📝 `packages/relationship-tracker/state.mjs` (+7 -0) 📝 `scripts/build-feature-packages.mjs` (+1 -1) ➕ `tests/roleplay-whispers.regression.ts` (+119 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. ## Linked issue Closes #1309 ## Why this change - Relationship Tracker (Update from History) and Memory Nag (vault scans) built their Roleplay history from public `message.content`, so they never saw whispers. Every agent the Engine runs reads them since Pasta-Devs/Marinara-Engine#7437, and the maintainer decided the packages that write lasting knowledge should read them too. - Pasta-Devs/Marinara-Engine#7488 (capability API 1.71, merged) adds an optional `agentContent` to `persistence.listMessages` records: the message as Engine agents read it, with each whisper marked `[Private whisper to <name>: …]`, a whisper-only message as its whispers, documents as `Document: <title>` text, and no leftover private notes. It is present in Roleplay outside hosted multiplayer rooms and absent elsewhere and on older Engines. ## What changed - Both packages read `agentContent ?? content`. This is feature detection with no version gate, so older Engines and other modes read public content exactly as before. Where `agentContent` is present it wins, even when it is shorter than `content`, because it leaves private notes out. - Neither package drops a message because its `content` is empty, so a whisper-only message is now read as its whispers. - **Relationship Tracker 0.6.4 → 0.7.0**: one `agentMessageText` helper in `state.mjs` is used by the Update from History transcript and the evidence text that checks its pairs. Automatic tracking already reads the Engine's agent context, so it is unchanged. - Scene presence stays on public `content` on purpose. It decides which relationship lines go into the main prompt for character responders, and those never get whisper text. Reading whispers there would let a whisper naming two characters add their relationship to a non-recipient's prompt. - **Memory Nag 1.1.3 → 1.2.0**: the scan transcript reads the agent view. The vendored shared types are frozen, so the field is a package-owned type (`AgentReadableMessage`) in `scanner.ts`. Recall already reads the Engine's agent context. - `tests/roleplay-whispers.regression.ts` covers both packages for a whispered message, a whisper-only message, an older-Engine record without the field, and `agentContent` winning over `content`. It also pins that a name in a whisper does not add that character to the scene. It fails on unchanged staging for each package independently and runs in PR checks. - Both versions are above every version the staging catalog has published (memory-nag max 1.1.3, relationship-tracker max 0.6.4). Each has a CHANGELOG entry. - Generated: `packages/memory-nag/{manifest.json,server.mjs}`, `packages/relationship-tracker/manifest.json`, `artifacts/memory-nag-1.2.0.zip`, `artifacts/relationship-tracker-0.7.0.zip`, `catalog/{,v2/,v3/}{catalog,notes}.json`. ## Package and security impact - Affected package IDs: `relationship-tracker`, `memory-nag` - Engine compatibility impact: none. The Engine range and the declared capability API (1.14) are unchanged. On Engines before capability API 1.71, both packages behave as before. - New or changed permissions/entrypoints: none. Both packages already hold `chat-read`. - Restart, storage, update, or uninstall impact: none. Whisper text can now become a Memory Nag memory or inform a Relationship Tracker History update in Roleplay, as the issue intends. - Build provenance: Memory Nag's build is non-hermetic, so it was built with `MARINARA_ENGINE_ROOT` at Engine **`f492413b7`** (staging, 2026-10-01). There, an unchanged rebuild of 1.1.3 is byte-identical to the published artifact. The rebuilt `client.js` is unchanged, and `server.mjs` differs only in the transcript line. The Relationship Tracker builder only re-hashes committed payloads, and an unchanged rebuild of 0.6.4 is also byte-identical. ## 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 The agent ran these locally (the boxes above are left for a human): - `npm run check`: passed - `node scripts/test-catalog-lanes.mjs`, `node scripts/validate-package-locales.mjs`, `node scripts/validate-catalog.mjs`, `node scripts/tests/catalog-release-notes.regression.mjs`, `git diff --check`: passed - `npx tsx tests/roleplay-whispers.regression.ts` (new), `tests/memory-nag-range.regression.ts`, `tests/memory-nag-selection.regression.ts`, `node tests/memory-nag-settings-ui.regression.mjs`: passed - `node scripts/typecheck-packages.mjs memory-nag`: passed Still to verify by hand on an Engine staging checkout that includes Marinara-Engine#7488: - Update both packages through **Agents → Download Agents** and restart. - In a Roleplay chat, send a message with a whisper to a character and another message that is only a whisper. Run Memory Nag's scan and turn on agent debug logging. Check that the scan prompt shows both whispers as `[Private whisper to <name>: …]` and that the whisper-only message is not blank. - Run Relationship Tracker **Update from History** over the same messages. Check in the debug prompt that the transcript shows the whispers. - With Relationship Tracker set to inject relationships for the scene only, whisper to a character who is not mentioned publicly. Check that the next reply's prompt does not gain that character's relationships. - In a Conversation chat, and on an Engine without #7488, check that both packages still read public text only and run without errors. - Check that uninstalling and reinstalling each package still works. ## Documentation impact - [ ] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation No README describes which message text is read, so no documentation changes were made. The package CHANGELOGs describe the change. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Memory Nag scans and Relationship Tracker’s Update from History now read Roleplay whispers as private messages with recipient information. Whisper-only messages are processed instead of being treated as empty. * These features require a Marinara Engine that shares whispers with Agents; older Engine versions continue to read public messages only. * **Release Updates** * Memory Nag is now version 1.2.0, and Relationship Tracker is now version 0.7.0. <!-- 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:11:05 +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#1414
No description provided.