mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #7907] feat(mari): report a character's lorebooks in character.get #4342
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#4342
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?
Originally created by @ylli-selmani on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/7907
Originally assigned to: @ylli-selmani on GitHub.
What problem does this solve?
A character's attached lorebooks are not readable through
app_data. The link lives inlorebook_character_links(lorebookId,characterId) and a card's own book islorebooks.characterId;character.getreturns only the card row, so anything working through thestructured commands has to fall back to a raw
mari db select lorebook_character_links --where …to learn which lore a card brings to a chat.
That gap surfaced while writing Professor Mari's interactive-onboarding handbook (#7827): the
procedure should tell her to skim the lore a card carries before writing persona questions, and
there was no command that answers "which books belong to this card?". The workaround a raw DB read
would teach is exactly the kind of brittle step the structured commands exist to replace.
Proposed solution
character.getreturns one additional read-only field:linked/owned; nothing else.descriptiontruncated (160 chars), same shape as other read summaries.null.Alternatives considered
character.lorebooksaction. A second call for one field, on a read the caller alreadyperforms; and every consumer would have to remember to make it.
mari db select lorebook_character_linksworks, but it makes ahandbook depend on table names and row shapes, and the repo already asks agents to prefer narrow
helpers over raw DB access.
character.list. The field is per-card detail, and the summaries are deliberatelycompact; a list of books per row would bloat a paged read.
Additional context
this field, its regression, and the onboarding step that uses it, so the two land together.
packages/server/src/services/mari-db/mari-db.service.ts(
executeCharacterAction→get, and thecharacterLorebookshelper).scripts/regressions/mari/character-lorebook-links.regression.ts— linked + owned included,another card's book excluded, bare card returns
[], unknown id returnsnull.