[PR #171] [MERGED] Expand Professor Mari safe text-field editing #4492

Closed
opened 2026-10-22 04:08:06 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/171
Author: @MagicGoddess
Created: 4/21/2026
Status: ✅ Merged
Merged: 4/23/2026
Merged by: @SpicyMarinara

Base: main ← Head: mari-safe-text-field-updates


📝 Commits (2)

  • 5ff9e63 Expand Professor Mari safe text-field editing
  • 828c0b6 Address PR review on Mari update parsing

📊 Changes

4 files changed (+156 additions, -13 deletions)

View changed files

📝 packages/server/src/db/seed-mari.ts (+4 -4)
📝 packages/server/src/routes/generate.routes.ts (+27 -2)
📝 packages/server/src/services/conversation/character-commands.ts (+33 -7)
➕ packages/server/test/character-commands.test.ts (+92 -0)

📄 Description

Why this change

Professor Mari could read more character and persona fields than she was able to update through her assistant commands. That made her behavior inconsistent with both her documented capabilities and the existing character/persona editors.

This change closes that gap for safe text-only fields without broadening Mari into array edits, structured nested edits, renames, or asset management.

What changed

  • Expanded update_character to support additional safe text fields:
    • backstory
    • appearance
    • mes_example
    • creator_notes
    • system_prompt
    • post_history_instructions
  • Expanded update_persona to support:
    • scenario
    • backstory
  • Updated the command executor so the new fields are persisted correctly:
    • character top-level fields are merged into card data
    • character backstory and appearance are merged into extensions
    • persona scenario and backstory are merged into persona storage
  • Expanded Mari’s fetch context so she can see the current values she may need before editing:
    • character post_history_instructions
    • persona scenario
  • Updated Mari’s built-in command documentation so the documented command formats match the implemented behavior
  • Added parser-level test coverage for the expanded update commands

Validation

  • pnpm check
  • Manual verification completed (describe below)

Manual verification notes

  • Verified in-app that Professor Mari can fetch and update a character's backstory
  • Verified in-app that Professor Mari can fetch and update a character's appearance
  • Verified in-app that Professor Mari can fetch and update a character's system_prompt
  • Verified in-app that Professor Mari can fetch and update a persona's backstory
  • Verified in-app that Professor Mari can fetch and update a persona's scenario
  • Verified that omitted fields remain unchanged when only specific fields are updated
  • Added parser-level coverage for:
    • expanded update_character fields
    • expanded update_persona fields
    • mixed legacy + new fields
    • command stripping while preserving visible assistant text

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Not applicable. This PR changes assistant command parsing/execution and in-app editable behavior, but does not change the UI.

Notes

  • This change was developed with AI assistance and manually reviewed and verified before submission.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/171 **Author:** [@MagicGoddess](https://github.com/MagicGoddess) **Created:** 4/21/2026 **Status:** ✅ Merged **Merged:** 4/23/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `main` ← **Head:** `mari-safe-text-field-updates` --- ### 📝 Commits (2) - [`5ff9e63`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5ff9e636df99cf393df326d03d57327b826c2735) Expand Professor Mari safe text-field editing - [`828c0b6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/828c0b616e6fdd90123795172ad4b2b0c505fa83) Address PR review on Mari update parsing ### 📊 Changes **4 files changed** (+156 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `packages/server/src/db/seed-mari.ts` (+4 -4) 📝 `packages/server/src/routes/generate.routes.ts` (+27 -2) 📝 `packages/server/src/services/conversation/character-commands.ts` (+33 -7) ➕ `packages/server/test/character-commands.test.ts` (+92 -0) </details> ### 📄 Description ## Why this change Professor Mari could read more character and persona fields than she was able to update through her assistant commands. That made her behavior inconsistent with both her documented capabilities and the existing character/persona editors. This change closes that gap for safe text-only fields without broadening Mari into array edits, structured nested edits, renames, or asset management. ## What changed - Expanded `update_character` to support additional safe text fields: - `backstory` - `appearance` - `mes_example` - `creator_notes` - `system_prompt` - `post_history_instructions` - Expanded `update_persona` to support: - `scenario` - `backstory` - Updated the command executor so the new fields are persisted correctly: - character top-level fields are merged into card data - character `backstory` and `appearance` are merged into `extensions` - persona `scenario` and `backstory` are merged into persona storage - Expanded Mari’s fetch context so she can see the current values she may need before editing: - character `post_history_instructions` - persona `scenario` - Updated Mari’s built-in command documentation so the documented command formats match the implemented behavior - Added parser-level test coverage for the expanded update commands ## Validation <!-- Required: include commands run and/or manual checks performed --> - [x] `pnpm check` - [x] Manual verification completed (describe below) ### Manual verification notes - Verified in-app that Professor Mari can fetch and update a character's `backstory` - Verified in-app that Professor Mari can fetch and update a character's `appearance` - Verified in-app that Professor Mari can fetch and update a character's `system_prompt` - Verified in-app that Professor Mari can fetch and update a persona's `backstory` - Verified in-app that Professor Mari can fetch and update a persona's `scenario` - Verified that omitted fields remain unchanged when only specific fields are updated - Added parser-level coverage for: - expanded `update_character` fields - expanded `update_persona` fields - mixed legacy + new fields - command stripping while preserving visible assistant text ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) Not applicable. This PR changes assistant command parsing/execution and in-app editable behavior, but does not change the UI. ## Notes - This change was developed with AI assistance and manually reviewed and verified before submission. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:08:06 +07:00
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#4492
No description provided.