mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6572] [MERGED] feat(agents): prompt decision statements, Smart order by Decision model, Open-Jev 9B #7230
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#7230
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/6572
Author: @kolacheee
Created: 9/23/2026
Status: ✅ Merged
Merged: 9/23/2026
Merged by: @kolacheee
Base:
staging← Head:feat/decision-open-jev-9b📝 Commits (10+)
5e5e42dfeat(agents): let the decision model pick who speaks in Smart order5927fd3fix(agents): resume a decision model install instead of starting over6a4f9e8test(agents): cover Smart order with the switch on and no decision model1a29e98docs(agents): say which Decision model to pick, including on Android5e41348feat(agents): offer Open-Jev 9B as a measured decision modelbc2c271feat(prompts): let prompt conditionals ask the Decision model4a41775docs: add a Decision Models guide and decision statement docs4e48ae1docs: say post-processing decisions are asked once per reply, name real re-run controls90840d2docs: say where a decision block keeps or loses the prompt cache18d69eafix(prompts): ask decisions only for agents that run, and never fail a turn on them📊 Changes
48 files changed (+3281 additions, -116 deletions)
View changed files
📝
CHANGELOG.md(+10 -0)📝
docs/agents/custom-agents.md(+28 -56)📝
docs/chats/group-chats.md(+2 -0)➕
docs/connections/decision-models.md(+141 -0)📝
docs/connections/local-model.md(+2 -0)📝
docs/development/optional-agent-packages.md(+16 -0)📝
docs/prompts/conditional-prompts.md(+120 -0)📝
docs/prompts/macros.md(+2 -0)📝
e2e/agent-activation-questions.e2e.ts(+9 -0)📝
packages/client/src/components/chat/PeekPromptModal.tsx(+23 -0)📝
packages/client/src/components/chat/chat-area.types.ts(+2 -0)📝
packages/client/src/components/connections/DecisionDefaultControl.tsx(+77 -1)📝
packages/client/src/components/modals/ImportCharacterModal.tsx(+13 -4)📝
packages/client/src/components/modals/ImportLorebookModal.tsx(+5 -0)📝
packages/client/src/components/modals/ImportPersonaModal.tsx(+12 -4)📝
packages/client/src/components/modals/ImportPresetModal.tsx(+8 -0)➕
packages/client/src/components/ui/DecisionStatementNote.tsx(+32 -0)📝
packages/client/src/components/ui/MacroTextarea.tsx(+2 -0)📝
packages/client/src/hooks/use-chats.ts(+1 -0)📝
packages/client/src/hooks/use-decision-model.ts(+37 -1)...and 28 more files
📄 Description
Linked issue
Closes #6569
Closes #6559 (Smart order; group card relevance is left out on purpose, reasons in a comment on the issue)
Follow-up to #6555 (the Open-Jev 9B entry and install resume left over from #6556)
Why this change
{{#if decision:"..."}}and{{#if decision_choice:"..." == "option"}}let them send an instruction only on the turns where it applies, using whatever Decision model the user picked (their own local model, a hosted connection, or Open-Jev).What changed
decision:anddecision_choice:operands in the macro engine. The engine is synchronous, so each turn's statements are found in the raw sources first (preset sections, groups and choice blocks, character and persona fields, chat summary, group scenario, active lorebook entries, agent prompt templates), asked in one batch, cached for the turn, and handed to every place a condition is evaluated. A group block asks once per character. Unanswered reads as no, so a user with no Decision model gets the{{else}}branch.choicequestion with a "none of these" option; a local chat model answers it as one yes/no per option..charxand.marinarafiles, which the server reports because only it reads them.perQuestionMsper statement and per Choice option, capped at 20 s). Measured on 9B: one yes/no takes about 0.5 s, and each Choice option adds about as much as another statement (a 10-option Choice took 3.3 s).docs/connections/decision-models.mdcovering what a decision model is, the three ways to get one, which to pick (including Termux), thresholds, time limits, cost and troubleshooting. Setup moved there fromcustom-agents.md, which now covers decision statements in an agent's prompt.conditional-prompts.mdgains the syntax, design rules, measured wording advice and "as designed" troubleshooting for prompt makers.optional-agent-packages.mdgains notes for package and Game Mode Experience authors. The Local Model and group chat guides link to the new page.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Run by the agent:
pnpm check,pnpm localization:checkandpnpm regression:node(361 of 361 regressions pass) on the branch rebased onto staging43f99a59e.scripts/regressions/decision-conditionals.regression.ts, driven through the real generate, Peek Prompt, dry-run, retry-agents, import and decision routes against a fake System One server. It covers yes/no, Choice with its options on the wire, the per-turn cache on regenerate, a failing model, the limit setting, no model, pre-reply and post-processing agent templates, agents the chat does not run never being asked, a regenerated swipe being asked again, re-running agents reusing answers, Conversation mode's system prompt, Peek Prompt's report in Conversation mode, and the import flag for card and.marinarafiles. Each wiring point was mutation-checked: reverting it makes the regression fail.choicequestions) and Gemma 4 E4B as a local model (one yes/no per option) each chose correctly on 10 of 10 turns (mood: angry, sad or neither; scene: combat, travel or conversation).decision-sidecar-runtime.regression.ts.Please verify manually:
{{#if decision:"The latest message moves the scene to a new place"}}MOVED{{/if}}with Decision model set to None, and confirm the warning appears under the field.MOVEDwas sent. Regenerate and confirm the same branch is sent.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Changed user docs for the batched
[docs-i18n]follow-up:docs/connections/decision-models.md(new),docs/agents/custom-agents.md(setup moved out),docs/prompts/conditional-prompts.md,docs/prompts/macros.md,docs/chats/group-chats.md,docs/connections/local-model.md.UI evidence (if applicable)
Not captured by the agent. The UI changes are one checkbox, one number field, a warning line under macro fields, an import toast and a notice in Peek Prompt.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.