mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7657] [MERGED] feat(director): make the Secret Plot prompt editable #7860
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#7860
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/7657
Author: @stonebystone
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/16/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/secret-plot-prompt📝 Commits (5)
cd8325cfeat(director): make the Secret Plot prompt editablec6a6e30fix(director): label the Secret Plot prompt field and name the required arc fieldseec46b0test(director): cover the Secret Plot reroll route with a custom prompt5a0c70aMerge branch 'staging' into feat/secret-plot-prompt5fb4ffffix(backup): exempt only the known Secret Plot settings from redaction📊 Changes
8 files changed (+160 additions, -13 deletions)
View changed files
📝
docs/roleplay/narrative-director.md(+16 -0)📝
packages/client/src/components/agents/AgentEditor.tsx(+69 -0)📝
packages/client/src/localization/locales/en.json(+2 -0)📝
packages/server/src/routes/backup.routes.ts(+4 -1)📝
packages/server/src/routes/generate/retry-agents-route.ts(+2 -9)📝
packages/server/src/services/generation/director-secret-plot-runtime.ts(+7 -1)📝
scripts/regressions/agent-retry-batching.regression.ts(+37 -2)📝
scripts/regressions/prompt.regression.ts(+23 -0)📄 Description
Linked issue
Closes #7655
cc @SpicyMarinara (I can't assign PRs from this account)
Why this change
What changed
settings.secretPlotPromptTemplate. It isn't saved when blank or when it's an unedited copy of the built-in prompt, so future changes to the default still reach those users. The field shows whether the agent-level Secret Plot toggle is on or off, because chats can switch Secret Plot on themselves.resolveDirectorSecretPlotPromptTemplateuses the agent's custom prompt and falls back toNARRATIVE_DIRECTOR_SECRET_PLOT_PROMPT.buildDirectorSecretPlotAgentuses it. The secret-plot reroll path inretry-agents-route.tsnow callsbuildDirectorSecretPlotAgentinstead of an inline copy of the same object. Behavior is unchanged apart from the prompt lookup.redactAgentSecretsnulled every agent setting whose key contains "secret". That already wipedsecretPlotEnabledandsecretPlotRunIntervalfrom exported profiles, and it would have wiped the new prompt too. The three Secret Plot settings (secretPlotEnabled,secretPlotRunInterval,secretPlotPromptTemplate) are now exempted by name; every other matching key, including any othersecretPlot*key, is still redacted.docs/roleplay/narrative-director.mdgets a "Secret Plot prompt" subsection.prompt.regression.tschecks the built-in fallback (missing and blank) and the custom prompt, and that the result type stayssecret_plot.secretPlotPrompt,secretPlotPromptHelp); the existing "Copy default to edit" and "Reset to default" keys are reused.Validation
pnpm checkpasses locallyCONTRIBUTING.mdCommands run by the agent in a clean worktree off
origin/staging(07b0a11e7):pnpm check: passed. The one lint warning is pre-existing, inHomeProfessorMariChat.tsx:378.pnpm localization:check: passed.pnpm regression:prompt: passed (prompt, prompt-attachments and context-fit).buildDirectorSecretPlotAgent, and that agent settings reach it unstripped.Manual verification notes
The agent ran these checks on a local test instance of this branch (commit
cd8325c24), started on port 7871 against a copy of a real profile:/generate/retry-agents,secretPlotRerollMode: "full") also sent the custom prompt.secretPlotPromptTemplatefrom the stored settings.secretPlotPromptTemplate,secretPlotEnabledandsecretPlotRunInterval, while a testtestApiKeysetting was still blanked.Light mode was checked by hand and looks fine.
Not verified:
pnpm checkand the regressions were.Screenshots of checks 1, 2 and 8 are attached under UI evidence.
Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Docs:
docs/roleplay/narrative-director.mdwas updated. Translations are tracked in the follow-up issue #7658.UI evidence (if applicable)
🤖 Generated with Claude Code
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.