feat(cli): validate browser scenarios offline (#7343)

Add validate-browser-scenario for offline schema and semantic checks of inline JSON, local files and stdin. Return compact validity/action/secret counts without reading secret values or discovering, launching, attaching to or navigating a browser.

Execution and validation share CLI input admission and the canonical domain schema. Preserve existing capture lifecycle, diagnostics, cancellation and caller-relative executable paths.

Integrates #7149 with attribution. Fixes #5488. Validation includes 24 focused tests, static/build/docs checks, and the preserved real PocketBase scenario with its backend stopped and secret variables unset. Verification and resource/token measurements are recorded in docs/verification/browser-scenario-validation-2026-10-27.md.

Co-authored-by: Ace <1160684883@qq.com>
This commit is contained in:
gensokyo-devandAce authored and GitHub committed 2026-10-27 08:47:36 +08:00
1 parent 06642a48fb
commit d109a39105
5 files changed
+562 -20

No files matched your search

+1
View File
@@ -158,6 +158,7 @@ export const CLI_COMMANDS = Object.freeze({
captureWebScreenshot: "capture-web-screenshot",
compareWebScreenshots: "compare-web-screenshots",
captureBrowserScenario: "capture-browser-scenario",
validateBrowserScenario: "validate-browser-scenario",
listElectronTargets: "list-electron-targets",
inspectElectronPage: "inspect-electron-page",
inspectElectronFuses: "inspect-electron-fuses",