chore(core): merge PR 2520 with review follow-ups#2554
Conversation
Add assertPlannedActionInActionSpace and use it in llm-planning and buildYamlFlowFromPlans so invalid action types throw during planning instead of after extra LLM rounds or at TaskBuilder execution.
…s placeholder Keep warn-and-skip when apps/report/dist is missing (core builds before report in the monorepo graph). Throw only if index.html is present yet dist still contains REPLACE_ME_WITH_REPORT_HTML after injection.
Listen on localhost unless MIDSCENE_PLAYGROUND_ALLOW_REMOTE=1 or MIDSCENE_PLAYGROUND_HOST is set, reducing accidental LAN exposure of unauthenticated /execute APIs.
Replace rm -rf clean with scripts/clean.mjs for Windows. Add .env.example (unignored via !.env.example) with MIDSCENE_MODEL_* and playground env hints.
…HOST override Per review: keep default listen behavior unchanged. Users can set MIDSCENE_PLAYGROUND_HOST=127.0.0.1 for local-only access. Co-authored-by: Cursor <cursoragent@cursor.com>
Per review: replace scripts/clean.mjs with rimraf, aligned with other packages in the monorepo. Co-authored-by: Cursor <cursoragent@cursor.com>
Deploying midscene with
|
| Latest commit: |
9902586
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9626d509.midscene.pages.dev |
| Branch Preview URL: | https://codex-pr-2520-main-followup.midscene.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ba2bae4f7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| const url = `http://127.0.0.1:${port}`; | ||
| const host = resolvePlaygroundBrowserHost(); | ||
| const url = `http://${host}:${port}`; |
There was a problem hiding this comment.
Bracket IPv6 playground hosts before building URLs
When MIDSCENE_PLAYGROUND_HOST is set to an IPv6 literal such as ::1, the server can listen on that host, but this interpolation produces http://::1:<port>, which is not a valid HTTP URL. Since the new env var accepts listen hosts and this helper already handles the IPv6 wildcard ::, format IPv6 browser hosts with brackets (for example http://[::1]:5800) before passing the URL to openInBrowser.
Useful? React with 👍 / 👎.
This reverts commit 65b0829.
# Conflicts: # packages/core/tests/ai/llm-planning/input.test.ts
Summary
main.MIDSCENE_PLAYGROUND_HOSTand keeps launcher host/browser URL behavior aligned with that env var..env.examplefile and keeps dotenv examples in docs instead.rimraf --globand aligns direct workspacerimrafdev dependencies on~5.0.10becauserimraf@6requires Node 20 or >=22 while this repo supports Node >=18.19.0.Validation
pnpm run lintpnpm run check-dependency-versionpnpm exec nx test @midscene/core -- tests/unit-test/llm-planning.test.tspnpm exec nx test @midscene/playground -- tests/unit/launcher.test.ts