Skip to content

feat: forward ACP prompt content to Muse - #3

Draft
obviyus wants to merge 2 commits into
bex-co:mainfrom
obviyus:codex/muse-content-blocks
Draft

feat: forward ACP prompt content to Muse#3
obviyus wants to merge 2 commits into
bex-co:mainfrom
obviyus:codex/muse-content-blocks

Conversation

@obviyus

@obviyus obviyus commented Sep 1, 2026

Copy link
Copy Markdown

Problem

The adapter currently keeps only ACP text blocks. Images, resource links, audio, and embedded resources are silently discarded. A prompt can therefore appear to succeed while Muse never receives the user's attachment.

Fix

  • Advertise ACP image support.
  • Forward PNG, JPEG, GIF, and WebP blocks through Muse's repeatable --image flag.
  • Stage image bytes in one private turn directory with 0700 directory and 0600 file permissions.
  • Remove staged files after success, failure, spawn failure, or cancellation.
  • Preserve baseline ACP resource links as deterministic prompt context.
  • Reject audio, embedded resources, unsupported image types, invalid base64, and image-only prompts with actionable ACP errors before spawning Muse.
  • Reserve the session before asynchronous staging so concurrent prompts cannot corrupt one Muse session.

The adapter does not duplicate Muse's image-size policy. Muse 1.0.1 rejects oversized files before model execution with its exact 20 MiB limit.

Live proof

  • Real ACP image request → adapter → native Muse → Meta provider read CAT from the attached PNG.
  • Native Muse read the same CAT image as PNG, JPEG, GIF, and WebP and returned 4.
  • Native Muse rejected a 50,490,138-byte PNG with image file is too large (... > 20971520 bytes).
  • Native Muse rejected an image-only headless request with missing prompt; the adapter now reports the required text before spawn.

Verification

  • npm run check
  • npm run build
  • npm run test:run — 110 passed, 2 live-only skipped
  • Focused real-provider image integration — passed
  • P1 autoreview — clean
  • Fable architecture and implementation reviews — clean

Dependency

This draft includes the test-only commit from #2 so the Muse 1.0 suite is green. Merge #2 first; GitHub will then reduce this PR to the content implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant