[GH-ISSUE #2895] [Issue]: Lorebook “Compatible JSON” export does not conform to CharacterBook spec #1476

Closed
opened 2026-10-21 05:36:17 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @SpicyMarinara on GitHub (Jun 28, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2895

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Exporting a lorebook as “Compatible JSON” produces a mangled Character Book/Tavern Card V2-style output. The entries field is exported as a mapping instead of an array, so the result does not match the CharacterBook spec.

Expected behavior

Exporting a lorebook as Compatible JSON should produce valid CharacterBook-spec JSON, including entries as an array. If compatibility requires a different structure for ST lorebook handling, there should be a separate clean export option that conforms to the spec.

Actual behavior

The Compatible JSON export returns a mangled version of Character Book/Tavern Card V2 data, with entries exported as a mapping rather than an array.

Steps to reproduce

  1. Create or open a lorebook in Marinara Engine.
  2. Export the lorebook using the “Compatible JSON” option.
  3. Inspect the exported JSON and note that entries is not an array.

Environment

  • Marinara Engine version: v2.0.5
  • Install type: docker
  • OS + version: Not provided in the Discord thread.
  • Browser or app shell: Not provided in the Discord thread.

Logs, screenshots, or video

Not provided in the Discord thread.

Additional context

Reporter asked that if the current format is intentional for SillyTavern lorebook handling, Marinara should add another clean export option for lorebooks.

Discord thread: Lorebook export as "Compatible JSON" doesn't actually conform to CharacterBook spec
Thread link: https://discord.com/channels/1417099416812392641/1519434693462851656
Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653)

Discord thread transcript (2 messages)
[2026-06-24T20:11:00.653Z] HappySpanker: Hello,

I've been trying out Marinara Engine and found out that when I export a lorebook as a "Compatible JSON", it gives me a mangled version of the Character Book type as part of the Tavern Card V2 spec.

Notably, the `entries` field should be an array of entries, not a mapping.

If this is by design to handle ST's lorebook handling, please add another, clean, option for exporting lorebooks.

Version used: v2.0.5, docker compose install
[Discord message: https://discord.com/channels/1417099416812392641/1519434693462851656/1519434693462851656]

[2026-06-28T09:24:32.972Z] Marinara: On it.
[Discord message: https://discord.com/channels/1417099416812392641/1519434693462851656/1520721557599813635]

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 @SpicyMarinara on GitHub (Jun 28, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2895 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Exporting a lorebook as “Compatible JSON” produces a mangled Character Book/Tavern Card V2-style output. The `entries` field is exported as a mapping instead of an array, so the result does not match the CharacterBook spec. ## Expected behavior Exporting a lorebook as Compatible JSON should produce valid CharacterBook-spec JSON, including `entries` as an array. If compatibility requires a different structure for ST lorebook handling, there should be a separate clean export option that conforms to the spec. ## Actual behavior The Compatible JSON export returns a mangled version of Character Book/Tavern Card V2 data, with `entries` exported as a mapping rather than an array. ## Steps to reproduce 1. Create or open a lorebook in Marinara Engine. 2. Export the lorebook using the “Compatible JSON” option. 3. Inspect the exported JSON and note that `entries` is not an array. ## Environment - Marinara Engine version: v2.0.5 - Install type: docker - OS + version: Not provided in the Discord thread. - Browser or app shell: Not provided in the Discord thread. ## Logs, screenshots, or video Not provided in the Discord thread. ## Additional context Reporter asked that if the current format is intentional for SillyTavern lorebook handling, Marinara should add another clean export option for lorebooks. Discord thread: Lorebook export as "Compatible JSON" doesn't actually conform to CharacterBook spec Thread link: https://discord.com/channels/1417099416812392641/1519434693462851656 Requested by: Marinara (marinara_spaghetti, Discord ID 169561011928432653) <details> <summary>Discord thread transcript (2 messages)</summary> ```text [2026-06-24T20:11:00.653Z] HappySpanker: Hello, I've been trying out Marinara Engine and found out that when I export a lorebook as a "Compatible JSON", it gives me a mangled version of the Character Book type as part of the Tavern Card V2 spec. Notably, the `entries` field should be an array of entries, not a mapping. If this is by design to handle ST's lorebook handling, please add another, clean, option for exporting lorebooks. Version used: v2.0.5, docker compose install [Discord message: https://discord.com/channels/1417099416812392641/1519434693462851656/1519434693462851656] [2026-06-28T09:24:32.972Z] Marinara: On it. [Discord message: https://discord.com/channels/1417099416812392641/1519434693462851656/1520721557599813635] ``` </details> ## 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.
bsakaguchi 2026-10-21 05:36:17 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@SpicyMarinara commented on GitHub (Jun 28, 2026):

Addressed in draft PR #2916 (commit 51dcf81e) as part of the June 28 issue sweep. Validation passed locally with pnpm check. Closing per maintainer request; please reopen or comment on the PR if anything still reproduces.

<!-- gh-comment-id:4826061505 --> @SpicyMarinara commented on GitHub (Jun 28, 2026): Addressed in draft PR #2916 (commit 51dcf81e) as part of the June 28 issue sweep. Validation passed locally with `pnpm check`. Closing per maintainer request; please reopen or comment on the PR if anything still reproduces.
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#1476
No description provided.