[GH-ISSUE #4909] [Feature]: Let workspace Professor Mari edit the remaining lorebook entry settings (probability, timing, recursion, filters, folder, lock) #2719

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

Originally created by @kolacheee on GitHub (Aug 11, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4909

Originally assigned to: @kolacheee on GitHub.

What problem does this solve?

Follow-up to #4791 / #4796. After that change, the workspace Professor Mari can author lorebook entries with keys, constant/selective/selectiveLogic, whole-word/case/regex matching, and placement — but she still silently drops most of the remaining per-entry settings when she creates or updates an entry.

A user testing her found this concretely: asked to change an entry's activation chance from 50 to 100, Mari reported that "this workspace helper does not support" it. In fact her entry action handler (assignLorebookEntryActionFields in packages/server/src/services/mari-db/mari-db.service.ts) never read these fields, so both lorebook.addEntry and lorebook.updateEntry discarded them:

  • Activation chance: probability
  • Timing: sticky, cooldown, delay, ephemeral
  • Recursion: preventRecursion, excludeRecursion, delayUntilRecursion
  • Inclusion group weight: groupWeight
  • Per-entry scan depth: scanDepth
  • Lock: locked
  • Folder placement: folderId
  • Matching filters: characterFilterMode/characterFilterIds, characterTagFilterMode/characterTagFilters, generationTriggerFilterMode/generationTriggerFilters, additionalMatchingSources
  • Per-entry vectorization: excludeFromVectorization

These are all part of the user-editable set (bulkUpdateLorebookEntryChangesSchema), so a human can set them in the UI but Mari cannot.

Proposed solution

Let Mari set every user-editable entry field on create and update. Wire the fields above into assignLorebookEntryActionFields (and the addentry/updateentry top-level-key allowlists), reusing the existing coercion helpers, and clamp probability to 0–100.

Keep the vectorization behavior gated on the prompt side, consistent with how #4791 treats embeddingModelConfigured as a signal rather than a hard gate: instruct Mari to only include an entry in vectorization (excludeFromVectorization: false) when an embedding model is configured, since it is a no-op otherwise. Excluding an entry is always allowed.

Alternatives considered

A hard code gate that rejects excludeFromVectorization: false when no embedding model is configured. Rejected: including an un-vectorizable entry is a harmless no-op (it simply participates once an embedding model exists later), and #4791 already established embeddingModelConfigured as a prompt signal, not an enforced gate. A soft prompt gate prevents Mari from promising semantic recall it can't deliver, which is the actual concern.

Additional context

Discovered via user testing of the #4791 authoring improvements. The docs (docs/lorebooks/entries.md) already document all of these settings, so no docs change is required — this was purely a code gap in Mari's action layer.

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.
Originally created by @kolacheee on GitHub (Aug 11, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/4909 Originally assigned to: @kolacheee on GitHub. ## What problem does this solve? Follow-up to #4791 / #4796. After that change, the workspace Professor Mari can author lorebook entries with keys, `constant`/`selective`/`selectiveLogic`, whole-word/case/regex matching, and placement — but she still silently drops most of the remaining per-entry settings when she creates or updates an entry. A user testing her found this concretely: asked to change an entry's activation chance from 50 to 100, Mari reported that "this workspace helper does not support" it. In fact her entry action handler (`assignLorebookEntryActionFields` in `packages/server/src/services/mari-db/mari-db.service.ts`) never read these fields, so both `lorebook.addEntry` and `lorebook.updateEntry` discarded them: - Activation chance: `probability` - Timing: `sticky`, `cooldown`, `delay`, `ephemeral` - Recursion: `preventRecursion`, `excludeRecursion`, `delayUntilRecursion` - Inclusion group weight: `groupWeight` - Per-entry scan depth: `scanDepth` - Lock: `locked` - Folder placement: `folderId` - Matching filters: `characterFilterMode`/`characterFilterIds`, `characterTagFilterMode`/`characterTagFilters`, `generationTriggerFilterMode`/`generationTriggerFilters`, `additionalMatchingSources` - Per-entry vectorization: `excludeFromVectorization` These are all part of the user-editable set (`bulkUpdateLorebookEntryChangesSchema`), so a human can set them in the UI but Mari cannot. ## Proposed solution Let Mari set every user-editable entry field on create and update. Wire the fields above into `assignLorebookEntryActionFields` (and the `addentry`/`updateentry` top-level-key allowlists), reusing the existing coercion helpers, and clamp `probability` to 0–100. Keep the vectorization behavior gated on the prompt side, consistent with how #4791 treats `embeddingModelConfigured` as a signal rather than a hard gate: instruct Mari to only include an entry in vectorization (`excludeFromVectorization: false`) when an embedding model is configured, since it is a no-op otherwise. Excluding an entry is always allowed. ## Alternatives considered A hard code gate that rejects `excludeFromVectorization: false` when no embedding model is configured. Rejected: including an un-vectorizable entry is a harmless no-op (it simply participates once an embedding model exists later), and #4791 already established `embeddingModelConfigured` as a prompt signal, not an enforced gate. A soft prompt gate prevents Mari from *promising* semantic recall it can't deliver, which is the actual concern. ## Additional context Discovered via user testing of the #4791 authoring improvements. The docs (`docs/lorebooks/entries.md`) already document all of these settings, so no docs change is required — this was purely a code gap in Mari's action layer. ## 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.
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-Engine#2719
No description provided.