fix: enforce the Vike-only constraint on --compose-extensions#203
Merged
Conversation
runFramework applied the vike-* composer personas regardless of the detected preset, so --compose-extensions on a Next project framed the agent with nextPageBuilder plus composers telling it to install vike-auth/vike-crud, an incoherent prompt. Gate compose on the Vike preset; on any other preset fall back to the hand-rolled + Prisma path and emit a log explaining why. Closes #202
40a74c4 to
0c5cf6e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--compose-extensionsis documented as Vike-only, butrunFrameworkappliedvikeExtensionPersonasregardless of the detected preset. On a Next project it framed the agent withnextPageBuilder+ the five vike-* composers telling it to install vike-auth/vike-crud/etc.: an incoherent prompt. Latent (compose defaults off; an empty dir falls back to the flagship Vike preset), but the stated contract was unenforced.Fix
Gate compose on
preset.name === 'vike'. On any other preset, fall back to the hand-rolled + Prisma path and emit a log explaining why. Kept inrun.tsat the two-line wiring level (not pushed into the preset registry, which would be speculative generality for a single extension set).Test
Added a case: a Next-detected project with
composeExtensions: truegets no vike-auth framing and emits a--compose-extensions ignoredlog. Framework tests 58 pass (was 57); typecheck clean.Found during the compose-personas quality sweep (pass 1). Patch changeset since it changes behavior on the non-Vike + compose path.
Note: touches the same
run.tscomment block as #199, so whichever merges second may need a trivial rebase.Closes #202