# 本地构建控制台实施计划 1. Create a dependency-free console server and static UI shell; add `npm run console`, localhost-only binding, automatic browser launch and environment/readiness endpoint. 2. Extract/reuse small pipeline-facing helpers for area discovery, diagnostics summary, native ZIP inspection and supported tree-style options. Do not import `build-area.js` as a module. 3. Implement history cards and onboarding: config scanning, manifest/status summary, input descriptions, package/preview links and model option selection. 4. Implement safe import and Save As: upload/copy OSM+ZIP into ignored managed storage, inspect ZIP contract/areaId, atomically write a config with collision-safe output overrides, and record ownership. 5. Implement serialized build jobs with child-process log capture, SSE progress, completion/failure states, and links to the existing generated preview. 6. Implement cleanup planning and confirmation. Validate canonical paths, move only allowed targets to macOS Trash, and cover single/batch clear-output versus remove-area paths. 7. Add focused Node HTTP/unit tests, update README with launch/use/troubleshooting guidance, then manually run the actual imported-area build and preview flow. ## Validation commands - `node --check` for each new Node entry/helper. - focused console test command added to `package.json`. - existing `npm run test:native-road-package`, `npm run test:build-stages`, `npm run test:preview-assets`, and `npm run test:package-contract`. - `npm run console`, import a valid OSM/ZIP fixture, run a full build, open preview, and exercise both cleanup scopes. ## Risk controls and rollback - Never bind beyond loopback; do not serve arbitrary paths or allow parallel builds. - Validate cleanup targets after confirmation and immediately before Trash movement; no `rm -rf` implementation. - If the UI path fails, existing CLI remains the supported fallback. Removing console files/script rolls back the feature without changing existing area data or output contracts.