[PR #298] [CLOSED] Rewrite Noodle image prompts before review #898

Closed
opened 2026-10-20 17:32:07 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/298
Author: @snpNEXT
Created: 8/10/2026
Status: ❌ Closed

Base: staging ← Head: feat/noodle-image-prompt-instructions


📝 Commits (1)

  • e93f2c5 Rewrite Noodle image prompts before review

📊 Changes

7 files changed (+393 additions, -233 deletions)

View changed files

📝 packages/noodle/client.js (+1 -1)
📝 packages/noodle/manifest.json (+4 -4)
📝 packages/noodle/server.mjs (+239 -225)
➕ packages/noodle/src/engine/packages/server/src/services/noodle/noodle-image-prompt-rewrite.ts (+102 -0)
📝 packages/noodle/src/engine/packages/server/src/services/noodle/noodle-noodler-images.service.ts (+23 -1)
📝 packages/noodle/src/engine/packages/server/src/services/noodle/noodle-public-images.service.ts (+23 -1)
📝 packages/noodle/src/engine/packages/server/src/services/prompt-overrides/registry/noodle.ts (+1 -1)

📄 Description

Pull request

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

Closes #

Why this change

  • Prevent Noodle image instructions and full character-description templates from being sent directly to image providers. This didn't work at all for any local model I tried.
  • Show a provider-ready rewritten prompt in the image review modal.
  • Ensure confirmed prompts are not rewritten or contaminated with instruction text a second time.

This is an addition that complements the https://github.com/Pasta-Devs/Marinara-Engine/pull/4842 pull request. Yet again, I've been using a change just like this on my local fork for months, as it makes dealing with dumb small prompt understanding local models possible at all.

What changed

  • Affected package ID: noodle
  • Added conditional LLM rewriting for public Noodle and NoodleR image prompts.
  • Used the configured default agent text connection, with the agent fallback connection as backup.
  • Added structured prompt sections for the original prompt, character context, and image instructions.
  • Prevented confirmed review prompts from receiving a second rewrite or appended User image instructions: block.
  • Preserved image-connection prompt defaults during final generation.
  • Rebuilt packages/noodle/server.mjs and packages/noodle/client.js.
  • Updated the Noodle manifest metadata and generated package sources.

Package and security impact

  • Affected package IDs: noodle
  • Engine compatibility impact: Requires the existing Noodle package image-generation and prompt-review APIs; no Engine compatibility change.
  • New or changed permissions/entrypoints: No new permissions or entrypoints.
  • Restart, storage, update, or uninstall impact: Existing package restart behavior is unchanged. No storage migration is required.

Validation

  • node scripts/validate-catalog.mjs passes locally
  • git diff --check passes locally
  • Rebuilt every affected manifest, payload, artifact, and catalog entry (The build scripts are a bit messed up on Windows it seems, so I was unable to regenerate the ZIP artifact, but managed to get things working enough to test my changes, everything except the ZIP artifact was rebuilt.)
  • Installed or updated the affected package through Marinara Engine
  • Checked supported modes, restart behavior, and uninstall cleanup
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Noodle prompt review was manually tested with built-in Professor Mari context.
  • The review modal now shows the rewritten provider-ready prompt instead of the full character-description template.
  • Confirmed prompts no longer include the User image instructions: block.
  • The generated server and client bundles pass node --check.
  • The ZIP artifact was not regenerated because the Windows environment lacks the zip executable; this remains a human follow-up before merge.

Documentation impact

  • No documentation changes needed
  • Updated this README catalog and package guidance
  • Updated linked Marinara Engine documentation

UI evidence (if applicable)

No screenshots were captured.

Summary by CodeRabbit

  • New Features

    • Image generation can now apply configured image instructions and character context to automatically improve prompts.
    • Prompts are normalized and safely bounded before processing.
    • Explicit prompt overrides continue to take precedence.
  • Bug Fixes

    • Invalid inputs, unavailable connections, malformed responses, and runtime failures now fail safely without interrupting image generation.
  • Documentation

    • Updated image prompt guidance to reflect optional prompt rewriting before image generation.

🔄 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-Agents/pull/298 **Author:** [@snpNEXT](https://github.com/snpNEXT) **Created:** 8/10/2026 **Status:** ❌ Closed **Base:** `staging` ← **Head:** `feat/noodle-image-prompt-instructions` --- ### 📝 Commits (1) - [`e93f2c5`](https://github.com/Pasta-Devs/Marinara-Agents/commit/e93f2c531c92cbd21e21a72f309622f759c5dd21) Rewrite Noodle image prompts before review ### 📊 Changes **7 files changed** (+393 additions, -233 deletions) <details> <summary>View changed files</summary> 📝 `packages/noodle/client.js` (+1 -1) 📝 `packages/noodle/manifest.json` (+4 -4) 📝 `packages/noodle/server.mjs` (+239 -225) ➕ `packages/noodle/src/engine/packages/server/src/services/noodle/noodle-image-prompt-rewrite.ts` (+102 -0) 📝 `packages/noodle/src/engine/packages/server/src/services/noodle/noodle-noodler-images.service.ts` (+23 -1) 📝 `packages/noodle/src/engine/packages/server/src/services/noodle/noodle-public-images.service.ts` (+23 -1) 📝 `packages/noodle/src/engine/packages/server/src/services/prompt-overrides/registry/noodle.ts` (+1 -1) </details> ### 📄 Description # Pull request > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- Open as a draft while implementation is in progress. Mark Ready for review only after validation and self-review. --> ## Linked issue <!-- Open a feature request before submitting, then replace this with `Closes #...`. --> Closes # ## Why this change - Prevent Noodle image instructions and full character-description templates from being sent directly to image providers. This didn't work at all for any local model I tried. - Show a provider-ready rewritten prompt in the image review modal. - Ensure confirmed prompts are not rewritten or contaminated with instruction text a second time. This is an addition that complements the https://github.com/Pasta-Devs/Marinara-Engine/pull/4842 pull request. Yet again, I've been using a change just like this on my local fork for months, as it makes dealing with dumb small prompt understanding local models possible at all. ## What changed - Affected package ID: `noodle` - Added conditional LLM rewriting for public Noodle and NoodleR image prompts. - Used the configured default agent text connection, with the agent fallback connection as backup. - Added structured prompt sections for the original prompt, character context, and image instructions. - Prevented confirmed review prompts from receiving a second rewrite or appended `User image instructions:` block. - Preserved image-connection prompt defaults during final generation. - Rebuilt `packages/noodle/server.mjs` and `packages/noodle/client.js`. - Updated the Noodle manifest metadata and generated package sources. ## Package and security impact - Affected package IDs: `noodle` - Engine compatibility impact: Requires the existing Noodle package image-generation and prompt-review APIs; no Engine compatibility change. - New or changed permissions/entrypoints: No new permissions or entrypoints. - Restart, storage, update, or uninstall impact: Existing package restart behavior is unchanged. No storage migration is required. ## Validation - [x] `node scripts/validate-catalog.mjs` passes locally - [x] `git diff --check` passes locally - [ ] Rebuilt every affected manifest, payload, artifact, and catalog entry (The build scripts are a bit messed up on Windows it seems, so I was unable to regenerate the ZIP artifact, but managed to get things working enough to test my changes, everything except the ZIP artifact was rebuilt.) - [x] Installed or updated the affected package through Marinara Engine - [x] Checked supported modes, restart behavior, and uninstall cleanup - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Noodle prompt review was manually tested with built-in Professor Mari context. - The review modal now shows the rewritten provider-ready prompt instead of the full character-description template. - Confirmed prompts no longer include the `User image instructions:` block. - The generated server and client bundles pass `node --check`. - The ZIP artifact was not regenerated because the Windows environment lacks the `zip` executable; this remains a human follow-up before merge. ## Documentation impact - [x] No documentation changes needed - [ ] Updated this README catalog and package guidance - [ ] Updated linked Marinara Engine documentation ## UI evidence (if applicable) No screenshots were captured. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Image generation can now apply configured image instructions and character context to automatically improve prompts. - Prompts are normalized and safely bounded before processing. - Explicit prompt overrides continue to take precedence. - **Bug Fixes** - Invalid inputs, unavailable connections, malformed responses, and runtime failures now fail safely without interrupting image generation. - **Documentation** - Updated image prompt guidance to reflect optional prompt rewriting before image generation. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-20 17:32:07 +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-Agents#898
No description provided.