mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7488] [MERGED] feat(capability): give packages the agent view of a message, with whispers #7758
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7758
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7488
Author: @SpicyMarinara
Created: 10/12/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/7443-capability-agent-content📝 Commits (4)
8c4be39feat(capability): give packages the agent view of a message, with whispersfed59c8Merge staging into the agent-content branch; agentContent is capability API 1.7170f6a31fix(capability): build agentContent as the generate route's agents read it55a24a6fix(capability): keep listMessages working when whisper names cannot be read📊 Changes
6 files changed (+204 additions, -8 deletions)
View changed files
📝
docs/development/optional-agent-packages.md(+24 -0)📝
packages/server/src/services/capability-packages/capability-persistence.service.ts(+47 -2)📝
packages/shared/src/schemas/capability-package.schema.ts(+4 -1)📝
packages/shared/src/types/capability-runtime.ts(+7 -0)📝
scripts/regressions/agents-see-whispers.regression.ts(+118 -1)📝
scripts/regressions/capability-package-lifecycle.regression.ts(+4 -4)📄 Description
Linked issue
Closes #7443
Package side (not in this PR): Pasta-Devs/Marinara-Agents#1309.
Translation follow-up: #7487.
Why this change
Since #7437, every agent the Engine runs reads Roleplay whispers. Packages that read the chat themselves, today Relationship Tracker and Memory Nag, still only get a message's public
content, because whispers live inextra. They need the same text Engine agents get, without parsingextrathemselves.What changed
Nothing that worked before stops working: the new field is optional, and
contentis unchanged.persistence.listMessages(chatId)now carryagentContentin Roleplay chats: the message as Engine agents read it. Each live whisper sits at its saved place as[Private whisper to <name>: …], and a whisper-only message reads as its whispers. A document a character hands over, such as a letter, follows the reply, and leftover private tags such as[notes: …]in a user turn are left out. It is built with the same helpers (parseRoleplayUserCommands,conversationPromptHistoryContent,roleplayAgentText) and the same recipient names (chat characters plus the chat's persona) as the generate route's agents.agentContentis left out outside Roleplay and in hosted multiplayer rooms, using the same gate as Engine agents (roleplayAgentsSeeWhispers).agentContent ?? content, so they don't need to declare 1.71.docs/development/optional-agent-packages.md: "Capability API 1.71: read messages as agents read them". It also says thatextrais unchanged and still holds every whisper in every mode, so packages must not show text built from it to anyone a whisper was not for.Validation
pnpm checkpasses locallyCONTRIBUTING.mdCommands run by the agent, with results (local CodeRabbit review
coderabbit review --agent --committed --base-commit 30e46104bon head70f6a3180: 0 findings across all 6 changed files):pnpm check: passed (exit 0: impeccable, localization, format, lint, e2e and token-estimation types, full build) on head70f6a3180node ./scripts/run-regressions.mjs --filter scripts/regressions/agents-see-whispers.regression.ts: passed. It now also provesagentContentfor a message with a whisper, a whisper-only message, a reply with a persona whisper, a message with no whisper, a user turn with a leftover[notes: …]tag (left out), a reply with a whisper and a letter (letter follows), a Conversation chat (field absent), an active hosted room (field absent) and the same room once ended (field present). With the oldroleplayAgentText(row.content, …)call it fails on the leftover note.node ./scripts/run-regressions.mjs --filter capability: 19 of 19 passed on head70f6a3180node ./scripts/run-regressions.mjs --filterforchat-branch-lineage,experience-state-imported-anchorsandspatial-location-reference(otherlistMessagesreaders): passed on head70f6a3180.Manual verification notes
Manual verification needed:
[whisper: character="<name>" text="test secret"]in a message, then callapi.runtime.persistence.listMessages(chatId)from a package (or a package's debug log). Check that the message'sagentContentshows[Private whisper to <name>: test secret]at the whisper's place and thatcontentdoes not.contentis empty and itsagentContentis the whisper.[document: …]. Check that the reply'sagentContentends withDocument: <title>and the letter's text, as the Engine's own post-generation agents read it.agentContentis missing on every message.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Notes:
docs/development/optional-agent-packages.md. Translation follow-up: #7487.docs/roleplay/getting-started.mdstill says Relationship Tracker and Memory Nag don't see whispers yet. That stays true until the package side (Pasta-Devs/Marinara-Agents#1309) ships, so it is not changed here.CHANGELOG.mdentry, per the current release-notes policy. Release notes come from "What changed".UI evidence (if applicable)
No UI changes.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.