[Blueprints] Add native Blueprint v2 CLI flow - #3915
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds native Blueprint v2 execution support to Playground CLI, routing v2 declarations and --mode runs through the TypeScript v2 compiler and v2 worker boot flow while preserving v1 handling.
Changes:
- Routes Blueprint v2 declarations and explicit
--modeinvocations to a newBlueprintsV2Handler(native TS v2 compiler + runtime). - Reworks
worker-thread-v2.tsto boot viabootRequestHandler()/bootWordPress()and aligns CLI option precedence with “explicit user intent” tracking. - Expands CLI test coverage for v2 routing/modes and start-command behaviors (including browser open default).
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/playground/cli/src/run-cli.ts | Adds v2 handler selection, CLI-provided option tracking, and improved error describing/log handling. |
| packages/playground/cli/src/blueprints-v2/blueprints-v2-handler.ts | Implements native v2 compilation, runtime option resolution, WordPress download + boot, and step execution. |
| packages/playground/cli/src/blueprints-v2/worker-thread-v2.ts | Reworks v2 worker around bootRequestHandler/bootWordPress and post-install mount signaling. |
| packages/playground/blueprints/src/index.ts | Exports compileBlueprintV2() (+ types) for CLI use. |
| packages/playground/blueprints/src/lib/v2/compile.ts | Extends v2 compile options to pass progress tracking through compilation. |
| packages/playground/cli/src/mounts.ts | Avoids auto-mount overriding an explicit mode. |
| packages/playground/cli/src/resolve-blueprint.ts | Fixes .zip ArrayBuffer slicing to avoid incorrect buffer views. |
| packages/playground/cli/src/cli-output.ts | Minor formatting adjustment for version display. |
| packages/playground/cli/tests/run-cli.spec.ts | Adds v2 routing/mode/start tests; replaces external unzip with in-process extraction; stubs browser-open exec. |
| packages/playground/cli/tests/mounts.spec.ts | Adds regression test ensuring explicit mode isn’t overridden by auto-mount expansion. |
| packages/playground/cli/tests/blueprints-v2-handler.spec.ts | Adds focused unit tests for v2 handler overrides, mode mapping, and boot/runtime option behavior. |
| packages/playground/cli/README.md | Documents v2 routing + --mode and updates blueprint example fields. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
adamziel
force-pushed
the
add/native-blueprint-v2-cli-flow
branch
9 times, most recently
from
July 7, 2026 11:28
149ff44 to
f8c60c2
Compare
adamziel
force-pushed
the
add/native-blueprint-v2-cli-flow
branch
from
July 7, 2026 11:29
f8c60c2 to
b392e7b
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.
What it does
Adds the native Blueprint v2 execution flow to Playground CLI.
The CLI now routes Blueprint v2 declarations and explicit
--moderuns through the TypeScript v2 compiler and v2 worker path. Existing v1 declarations stay on the v1 handler.Rationale
The web/client v2 declaration path landed first. This follows with the matching CLI slice: enough to boot WordPress, apply v2 runtime options, and run the compiled v2 steps without pulling in website, remote, or package-manager changes.
Implementation
compileBlueprintV2()from@wp-playground/blueprintsand passes progress tracking through v2 compilation.BlueprintsV2Handlersupport for resolving v2 runtime configuration, downloading WordPress, preparing SQLite, booting the v2 worker, and running compiled v2 steps.worker-thread-v2.tsaroundbootRequestHandler()andbootWordPress()instead of delegating the whole flow to the old PHP-side v2 runner.--experimental-blueprints-v2-runner, and explicit--modeinvocations to the v2 handler while preserving v1 handling for v1 declarations.phpVersion,wordpressVersion, and login settings declared by the Blueprint.Testing instructions
Part of #2592.