@guanlin4924/devflow-pi 0.1.93 → 0.1.95
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/node_modules/@playwright/test/LICENSE +202 -0
- package/node_modules/@playwright/test/NOTICE +5 -0
- package/node_modules/@playwright/test/README.md +318 -0
- package/node_modules/@playwright/test/cli.js +19 -0
- package/node_modules/@playwright/test/index.d.ts +18 -0
- package/node_modules/@playwright/test/index.js +17 -0
- package/node_modules/@playwright/test/index.mjs +18 -0
- package/node_modules/@playwright/test/package.json +35 -0
- package/node_modules/@playwright/test/reporter.d.ts +17 -0
- package/node_modules/@playwright/test/reporter.js +17 -0
- package/node_modules/@playwright/test/reporter.mjs +17 -0
- package/node_modules/playwright/LICENSE +202 -0
- package/node_modules/playwright/NOTICE +5 -0
- package/node_modules/playwright/README.md +318 -0
- package/node_modules/playwright/ThirdPartyNotices.txt +14 -0
- package/node_modules/playwright/cli.js +19 -0
- package/node_modules/playwright/index.d.ts +17 -0
- package/node_modules/playwright/index.js +17 -0
- package/node_modules/playwright/index.mjs +18 -0
- package/node_modules/playwright/jsx-runtime.js +42 -0
- package/node_modules/playwright/jsx-runtime.mjs +21 -0
- package/node_modules/playwright/lib/agents/agentParser.js +89 -0
- package/node_modules/playwright/lib/agents/copilot-setup-steps.yml +34 -0
- package/node_modules/playwright/lib/agents/generateAgents.js +395 -0
- package/node_modules/playwright/lib/agents/playwright-test-coverage.prompt.md +31 -0
- package/node_modules/playwright/lib/agents/playwright-test-generate.prompt.md +8 -0
- package/node_modules/playwright/lib/agents/playwright-test-generator.agent.md +88 -0
- package/node_modules/playwright/lib/agents/playwright-test-heal.prompt.md +6 -0
- package/node_modules/playwright/lib/agents/playwright-test-healer.agent.md +56 -0
- package/node_modules/playwright/lib/agents/playwright-test-plan.prompt.md +9 -0
- package/node_modules/playwright/lib/agents/playwright-test-planner.agent.md +74 -0
- package/node_modules/playwright/lib/cli/reportActions.js +78 -0
- package/node_modules/playwright/lib/cli/testActions.js +214 -0
- package/node_modules/playwright/lib/common/index.js +2923 -0
- package/node_modules/playwright/lib/common/index.js.txt +34 -0
- package/node_modules/playwright/lib/errorContext.js +129 -0
- package/node_modules/playwright/lib/globals.js +58 -0
- package/node_modules/playwright/lib/index.js +815 -0
- package/node_modules/playwright/lib/isomorphic.js +260 -0
- package/node_modules/playwright/lib/isomorphic.js.txt +9 -0
- package/node_modules/playwright/lib/loader/loaderProcessEntry.js +34 -0
- package/node_modules/playwright/lib/loader/loaderProcessEntry.js.txt +9 -0
- package/node_modules/playwright/lib/matchers/expect.js +13490 -0
- package/node_modules/playwright/lib/matchers/expect.js.LICENSE +640 -0
- package/node_modules/playwright/lib/matchers/expect.js.txt +67 -0
- package/node_modules/playwright/lib/mcp/test/browserBackend.js +135 -0
- package/node_modules/playwright/lib/mcp/test/generatorTools.js +122 -0
- package/node_modules/playwright/lib/mcp/test/plannerTools.js +150 -0
- package/node_modules/playwright/lib/mcp/test/seed.js +82 -0
- package/node_modules/playwright/lib/mcp/test/streams.js +44 -0
- package/node_modules/playwright/lib/mcp/test/testBackend.js +99 -0
- package/node_modules/playwright/lib/mcp/test/testContext.js +306 -0
- package/node_modules/playwright/lib/mcp/test/testTool.js +30 -0
- package/node_modules/playwright/lib/mcp/test/testTools.js +98 -0
- package/node_modules/playwright/lib/package.js +47 -0
- package/node_modules/playwright/lib/program.js +241 -0
- package/node_modules/playwright/lib/runner/index.js +8527 -0
- package/node_modules/playwright/lib/runner/index.js.txt +61 -0
- package/node_modules/playwright/lib/transform/babelBundle.js +72274 -0
- package/node_modules/playwright/lib/transform/babelBundle.js.LICENSE +2384 -0
- package/node_modules/playwright/lib/transform/babelBundle.js.txt +325 -0
- package/node_modules/playwright/lib/transform/esmLoader.js +8054 -0
- package/node_modules/playwright/lib/transform/esmLoader.js.LICENSE +355 -0
- package/node_modules/playwright/lib/transform/esmLoader.js.txt +60 -0
- package/node_modules/playwright/lib/util.js +373 -0
- package/node_modules/playwright/lib/worker/workerProcessEntry.js +1861 -0
- package/node_modules/playwright/lib/worker/workerProcessEntry.js.txt +19 -0
- package/node_modules/playwright/package.json +55 -0
- package/node_modules/playwright/test.d.ts +18 -0
- package/node_modules/playwright/test.js +24 -0
- package/node_modules/playwright/test.mjs +35 -0
- package/node_modules/playwright/types/test.d.ts +11074 -0
- package/node_modules/playwright/types/testReporter.d.ts +950 -0
- package/node_modules/playwright-core/LICENSE +202 -0
- package/node_modules/playwright-core/NOTICE +5 -0
- package/node_modules/playwright-core/README.md +3 -0
- package/node_modules/playwright-core/ThirdPartyNotices.txt +13 -0
- package/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
- package/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/node_modules/playwright-core/browsers.json +52 -0
- package/node_modules/playwright-core/cli.js +21 -0
- package/node_modules/playwright-core/index.d.ts +17 -0
- package/node_modules/playwright-core/index.js +17 -0
- package/node_modules/playwright-core/index.mjs +28 -0
- package/node_modules/playwright-core/lib/bootstrap.js +88 -0
- package/node_modules/playwright-core/lib/coreBundle.js +75813 -0
- package/node_modules/playwright-core/lib/entry/cliDaemon.js +5 -0
- package/node_modules/playwright-core/lib/entry/dashboardApp.js +3 -0
- package/node_modules/playwright-core/lib/entry/mcp.js +10 -0
- package/node_modules/playwright-core/lib/entry/oopBrowserDownload.js +3 -0
- package/node_modules/playwright-core/lib/package.js +50 -0
- package/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
- package/node_modules/playwright-core/lib/server/electron/loader.js +116 -0
- package/node_modules/playwright-core/lib/serverRegistry.js +1939 -0
- package/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +65 -0
- package/node_modules/playwright-core/lib/tools/cli-client/channelSessions.js +141 -0
- package/node_modules/playwright-core/lib/tools/cli-client/cli.js +6 -0
- package/node_modules/playwright-core/lib/tools/cli-client/help.json +721 -0
- package/node_modules/playwright-core/lib/tools/cli-client/minimist.js +128 -0
- package/node_modules/playwright-core/lib/tools/cli-client/output.js +351 -0
- package/node_modules/playwright-core/lib/tools/cli-client/program.js +418 -0
- package/node_modules/playwright-core/lib/tools/cli-client/registry.js +180 -0
- package/node_modules/playwright-core/lib/tools/cli-client/session.js +259 -0
- package/node_modules/playwright-core/lib/tools/dashboard/appIcon.png +0 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/SKILL.md +425 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/running-code.md +241 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/session-management.md +225 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/video-recording.md +143 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-trace/SKILL.md +174 -0
- package/node_modules/playwright-core/lib/tools/utils/extension.js +112 -0
- package/node_modules/playwright-core/lib/tools/utils/socketConnection.js +108 -0
- package/node_modules/playwright-core/lib/utilsBundle.js +85357 -0
- package/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +1890 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/index.html +29 -0
- package/node_modules/playwright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
- package/node_modules/playwright-core/lib/vite/htmlReport/index.html +16 -0
- package/node_modules/playwright-core/lib/vite/htmlReport/report.css +2 -0
- package/node_modules/playwright-core/lib/vite/htmlReport/report.js +32 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-CVQWJZAA.js +32 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-hrlLqLtq.js +129 -0
- package/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
- package/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BbkfBe3n.js +32 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-Ds6CBOo0.js +182 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-DywYcAf8.js +7 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.Bqk9acqE.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.B4cLoZK3.js +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.html +44 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +10 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CU5KtEkS.js +5 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +18 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
- package/node_modules/playwright-core/lib/webp_codec.LICENSE +173 -0
- package/node_modules/playwright-core/lib/webp_codec.wasm +0 -0
- package/node_modules/playwright-core/lib/xdg-open +1267 -0
- package/node_modules/playwright-core/package.json +34 -0
- package/node_modules/playwright-core/types/protocol.d.ts +24645 -0
- package/node_modules/playwright-core/types/structs.d.ts +52 -0
- package/node_modules/playwright-core/types/types.d.ts +26632 -0
- package/package.json +12 -2
- package/plugins/devflow-core/extensions/devflow-core.ts +518 -40
- package/plugins/devflow-core/runtime/hooks/context_sync_gate.py +3 -3
- package/plugins/devflow-core/runtime/hooks/hook_common.py +334 -11
- package/plugins/devflow-core/runtime/hooks/index_gate.py +29 -16
- package/plugins/devflow-core/runtime/hooks/start.py +13 -13
- package/plugins/devflow-core/skills/wireframe-proposal/SKILL.md +2 -2
- package/plugins/devflow-core/skills/wireframe-validate/SKILL.md +4 -4
- package/plugins/devflow-core/skills/workflow-orchestrator/SKILL.md +19 -19
- package/plugins/devflow-core/skills/workflow-orchestrator/agents/openai.yaml +2 -2
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/acceptance_test_runner.py +412 -76
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/advance_state.rb +60 -9
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/api_test_matrix.py +2 -2
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/approval_pins.py +433 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/approval_store.py +137 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/architecture_assessment.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/architecture_brief.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/architecture_feasibility.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_invalidation.rb +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_model_commit.rb +4 -4
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_model_validate.py +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/business_source_resolver.rb +4 -4
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/checker_adapter.rb +7 -7
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/control_io.rb +51 -7
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/cross_track_consistency_check.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/dsl_coverage.py +87 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/dsl_v1.py +318 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/environment_profile.py +134 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/execution_contract.rb +7 -6
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/execution_surface.py +138 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/gate_runtime.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_state.rb +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/init_workflow.rb +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/inspect_state.rb +13 -13
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/machine_evidence.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/manage_lessons.rb +7 -7
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/parallel_recover.rb +2 -2
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/parallel_run.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/phase_ownership.rb +6 -6
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/playwright_adapter.py +515 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/repair_control_plane.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/requirement_coverage.rb +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/requirement_graph.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/review_preflight.py +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/review_run.py +18 -18
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/runtime_context_collector.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/session_rollover.rb +4 -4
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/static_runtime_context_collector.rb +2 -2
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/sync_artifacts.rb +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/tc_hash.py +132 -0
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/tdd_evidence.py +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/test_command_policy.py +104 -10
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/test_task_binding_check.py +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/update_triage_route.rb +3 -3
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/validate_state.rb +19 -6
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/wireframe_commit.rb +5 -5
- package/plugins/devflow-core/skills/workflow-orchestrator/scripts/wireframe_validate.py +1 -1
- package/plugins/devflow-core/skills/workflow-orchestrator/templates/acceptance-remediation.yaml +12 -12
- package/plugins/devflow-core/skills/workflow-orchestrator/templates/feature-development.yaml +201 -222
- package/plugins/devflow-core/skills/workflow-pipeline/SKILL.md +6 -4
- package/plugins/devflow-core/skills/workflow-pipeline/references/pipeline-flow.md +68 -140
- package/plugins/devflow-core/skills/workflow-project-context/SKILL.md +14 -14
- package/plugins/devflow-core/skills/workflow-project-context/assets/agents-md-template.md +7 -7
- package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-backend-spec-template.md +4 -4
- package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-frontend-spec-template.md +4 -4
- package/plugins/devflow-core/skills/workflow-project-context/assets/codebase-navigation-template.md +1 -1
- package/plugins/devflow-core/skills/workflow-project-context/assets/context-domain-index-template.md +4 -4
- package/plugins/devflow-core/skills/workflow-project-context/assets/context-spec-index-template.md +10 -10
- package/plugins/devflow-core/skills/workflow-project-context/assets/execution-contract-template.md +2 -2
- package/plugins/devflow-core/skills/workflow-project-context/assets/navigation-index-template.md +18 -18
- package/plugins/devflow-core/skills/workflow-project-context/assets/project-initialization-template.md +32 -32
- package/plugins/devflow-core/skills/workflow-project-context/assets/rules-index-template.md +30 -30
- package/plugins/devflow-core/skills/workflow-project-context/assets/state-template.md +7 -7
- package/plugins/devflow-core/skills/workflow-project-context/references/navigation-guide.md +37 -37
- package/plugins/devflow-core/skills/workflow-project-context/scripts/validate_initialization.py +16 -16
- package/plugins/devflow-core/skills/workflow-project-context/scripts/validate_initialization_database.py +1 -1
- package/plugins/devflow-design/skills/workflow-api-call-guide/SKILL.md +4 -4
- package/plugins/devflow-design/skills/workflow-api-contract/SKILL.md +8 -8
- package/plugins/devflow-design/skills/workflow-api-supplement/SKILL.md +5 -5
- package/plugins/devflow-design/skills/workflow-architecture-feasibility/SKILL.md +1 -1
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/SKILL.md +39 -39
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/assets/backend-spec-template.md +10 -10
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/affected-module-exploration.md +2 -2
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/code-explore-guide.md +1 -1
- package/plugins/devflow-design/skills/workflow-backend-tech-spec/references/project-rule-contract.md +20 -20
- package/plugins/devflow-design/skills/workflow-design-rule-pack/SKILL.md +8 -8
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/index.md +3 -3
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/accessibility.md +2 -2
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/component-library.md +2 -2
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/design-systems.md +1 -1
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/responsive-grid.md +2 -2
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/stack-guidelines.md +6 -6
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/recommendations/ux-patterns.md +2 -2
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tokens/project-tokens.md +1 -1
- package/plugins/devflow-design/skills/workflow-design-rule-pack/assets/design/tools/ui-ux-pro-max/SKILL.md +12 -12
- package/plugins/devflow-design/skills/workflow-design-rule-pack/scripts/install.py +2 -2
- package/plugins/devflow-design/skills/workflow-feature-breakdown/SKILL.md +30 -30
- package/plugins/devflow-design/skills/workflow-feature-breakdown/assets/output-template.md +2 -2
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/SKILL.md +41 -41
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/assets/frontend-spec-template.md +15 -15
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/affected-module-exploration.md +2 -2
- package/plugins/devflow-design/skills/workflow-frontend-tech-spec/references/project-rule-contract.md +25 -25
- package/plugins/devflow-design/skills/workflow-integration-verify/SKILL.md +13 -13
- package/plugins/devflow-design/skills/workflow-ui-spec/SKILL.md +23 -23
- package/plugins/devflow-design/skills/workflow-ui-spec/assets/ui-spec-template.md +3 -3
- package/plugins/devflow-implementation/agents/implementation-worker.md +2 -2
- package/plugins/devflow-implementation/skills/workflow-bug-fix/SKILL.md +9 -9
- package/plugins/devflow-implementation/skills/workflow-bug-fix/references/lesson-format.md +2 -2
- package/plugins/devflow-implementation/skills/workflow-bug-fix/references/root-cause-ladder.md +1 -1
- package/plugins/devflow-implementation/skills/workflow-change-plan/SKILL.md +17 -17
- package/plugins/devflow-implementation/skills/workflow-change-plan/references/code-conventions.md +1 -1
- package/plugins/devflow-implementation/skills/workflow-change-plan/references/output-template.md +3 -3
- package/plugins/devflow-implementation/skills/workflow-change-plan/references/project-rule-contract.md +16 -16
- package/plugins/devflow-implementation/skills/workflow-execute-phase/SKILL.md +38 -38
- package/plugins/devflow-implementation/skills/workflow-execute-phase/references/execute-phase.md +4 -2
- package/plugins/devflow-intel/agents/project-scout.md +1 -1
- package/plugins/devflow-intel/extensions/devflow-intel.ts +20 -19
- package/plugins/devflow-intel/skills/code-index-query/SKILL.md +6 -6
- package/plugins/devflow-intel/skills/workflow-code-index/SKILL.md +12 -12
- package/plugins/devflow-intel/skills/workflow-code-index/references/discovery.md +2 -2
- package/plugins/devflow-intel/skills/workflow-code-index/references/query-guide.md +1 -1
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/code_index.py +31 -12
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/discovery.py +2 -2
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/core/scanner.py +4 -1
- package/plugins/devflow-intel/skills/workflow-code-index/scripts/validators/project_binding_check.py +4 -4
- package/plugins/devflow-intel/skills/workflow-context-sync/SKILL.md +14 -14
- package/plugins/devflow-intel/skills/workflow-context-sync/scripts/context_sync_cursor.py +2 -2
- package/plugins/devflow-intel/skills/workflow-update-navigation/SKILL.md +26 -26
- package/plugins/devflow-intel/skills/workflow-update-navigation/references/incremental-update-guide.md +2 -2
- package/plugins/devflow-quality/runtime/playwright/devflow-test-dsl-v1.schema.json +872 -0
- package/plugins/devflow-quality/runtime/playwright/playwright.config.mjs +46 -0
- package/plugins/devflow-quality/runtime/playwright/reporter.mjs +311 -0
- package/plugins/devflow-quality/runtime/playwright/runner.spec.mjs +1308 -0
- package/plugins/devflow-quality/runtime/playwright/runtime-manifest.json +11 -0
- package/plugins/devflow-quality/skills/code-review/SKILL.md +12 -12
- package/plugins/devflow-quality/skills/code-review/references/spec-checklist.md +1 -1
- package/plugins/devflow-quality/skills/workflow-acceptance-test-design/SKILL.md +11 -8
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/SKILL.md +6 -6
- package/plugins/devflow-quality/skills/workflow-gen-test-guide/legacy/SKILL.md +14 -14
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/SKILL.md +82 -69
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/api-mainflow-rules.md +20 -15
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/codebase-discovery.md +12 -10
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/intermediate-format.md +115 -192
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/mainflow-selection.md +27 -23
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/project-dsl-contract.md +78 -153
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/references/ui-mainflow-rules.md +36 -83
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/compile_dsl.py +497 -556
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/discover_codebases.py +2 -2
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/export_legacy_testagent.py +647 -0
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/normalize_case_payloads.py +10 -3
- package/plugins/devflow-quality/skills/workflow-generate-mainflow-cases/scripts/validate_case_payloads.py +165 -275
- package/plugins/devflow-quality/skills/workflow-human-acceptance/SKILL.md +61 -0
- package/plugins/devflow-quality/skills/workflow-release-closeout/SKILL.md +18 -18
- package/plugins/devflow-quality/skills/workflow-run-acceptance-tests/SKILL.md +20 -14
- package/plugins/devflow-requirements/skills/requirement-feasibility-review/SKILL.md +1 -1
- package/plugins/devflow-requirements/skills/workflow-demand-clarify/SKILL.md +10 -10
- package/plugins/devflow-requirements/skills/workflow-domain-modeling/SKILL.md +25 -25
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/SKILL.md +49 -49
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/assets/baseline-template.md +22 -22
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/antipatterns.md +3 -3
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/challenge-review-guide.md +3 -3
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/project-context-guide.md +11 -11
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/questioning.md +1 -1
- package/plugins/devflow-requirements/skills/workflow-requirement-baseline/references/requirement-review-checklist.md +4 -4
- package/plugins/devflow-requirements/skills/workflow-requirement-triage/SKILL.md +16 -16
- package/plugins/devflow-requirements/skills/workflow-wayfinder/SKILL.md +6 -6
- package/src/approval-store.ts +340 -0
- package/src/cli.ts +15 -0
- package/src/constants.ts +1 -1
- package/src/doctor.ts +259 -2
- package/src/initialization-store.ts +51 -3
- package/src/paths.ts +12 -1
- package/src/project-context.ts +60 -15
- package/src/project-documents.ts +61 -61
- package/src/project-initializer.ts +9 -8
- package/src/project-layout.ts +217 -0
- package/src/runtime.ts +3 -3
- package/templates/commands/start.md +4 -4
- package/templates/omp/AGENTS.md +1 -1
- package/templates/omp/hook-config.json +13 -7
- package/templates/omp/index-policy.json +8 -8
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var program_exports = {};
|
|
30
|
+
__export(program_exports, {
|
|
31
|
+
calculateSha1: () => calculateSha1,
|
|
32
|
+
program: () => program
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(program_exports);
|
|
35
|
+
var import_child_process = require("child_process");
|
|
36
|
+
var import_crypto = __toESM(require("crypto"));
|
|
37
|
+
var import_os = __toESM(require("os"));
|
|
38
|
+
var import_path = __toESM(require("path"));
|
|
39
|
+
var import_channelSessions = require("./channelSessions");
|
|
40
|
+
var import_output = require("./output");
|
|
41
|
+
var import_registry = require("./registry");
|
|
42
|
+
var import_session = require("./session");
|
|
43
|
+
var import_package = require("../../package");
|
|
44
|
+
var import_serverRegistry = require("../../serverRegistry");
|
|
45
|
+
var import_minimist = require("./minimist");
|
|
46
|
+
const globalOptions = [
|
|
47
|
+
"json",
|
|
48
|
+
"raw",
|
|
49
|
+
"session"
|
|
50
|
+
];
|
|
51
|
+
const booleanOptions = [
|
|
52
|
+
"all",
|
|
53
|
+
"g",
|
|
54
|
+
"help",
|
|
55
|
+
"json",
|
|
56
|
+
"raw",
|
|
57
|
+
"version"
|
|
58
|
+
];
|
|
59
|
+
async function program(options) {
|
|
60
|
+
const clientInfo = (0, import_registry.createClientInfo)();
|
|
61
|
+
const help = require((0, import_package.libPath)("tools", "cli-client", "help.json"));
|
|
62
|
+
const argv = process.argv.slice(2);
|
|
63
|
+
const boolean = [...help.booleanOptions, ...booleanOptions];
|
|
64
|
+
const args = (0, import_minimist.minimist)(argv, { boolean, string: ["_"] });
|
|
65
|
+
if (args.s) {
|
|
66
|
+
args.session = args.s;
|
|
67
|
+
delete args.s;
|
|
68
|
+
}
|
|
69
|
+
if (args.g) {
|
|
70
|
+
args.global = true;
|
|
71
|
+
delete args.g;
|
|
72
|
+
}
|
|
73
|
+
const output = args.json ? new import_output.JsonOutput() : new import_output.TextOutput();
|
|
74
|
+
const commandName = args._?.[0];
|
|
75
|
+
if (args.version || args.v) {
|
|
76
|
+
output.version(options?.embedderVersion ?? clientInfo.version);
|
|
77
|
+
process.exit(0);
|
|
78
|
+
}
|
|
79
|
+
const command = commandName && help.commands[commandName];
|
|
80
|
+
if (args.help || args.h || !commandName) {
|
|
81
|
+
if (command) {
|
|
82
|
+
output.help(command.help);
|
|
83
|
+
} else {
|
|
84
|
+
const lines = ["playwright-cli - run playwright mcp commands from terminal"];
|
|
85
|
+
if (process.env.CLAUDECODE || process.env.COPILOT_CLI)
|
|
86
|
+
lines.push(`Agent skill: ${import_path.default.relative(process.cwd(), (0, import_package.libPath)("tools", "skills", "playwright-cli", "SKILL.md"))}`);
|
|
87
|
+
lines.push(help.global);
|
|
88
|
+
output.help(lines.join("\n\n"));
|
|
89
|
+
}
|
|
90
|
+
process.exit(0);
|
|
91
|
+
}
|
|
92
|
+
if (!command)
|
|
93
|
+
output.errorUnknownCommand(commandName, help.global);
|
|
94
|
+
validateFlags(args, command, output);
|
|
95
|
+
validateArgs(args, command, output);
|
|
96
|
+
const registry = await import_registry.Registry.load();
|
|
97
|
+
const sessionName = (0, import_registry.resolveSessionName)(args.session);
|
|
98
|
+
switch (commandName) {
|
|
99
|
+
case "list": {
|
|
100
|
+
const data = await collectList(registry, clientInfo, !!args.all);
|
|
101
|
+
output.list(data);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
case "close-all": {
|
|
105
|
+
const entries = registry.entries(clientInfo);
|
|
106
|
+
const closed = [];
|
|
107
|
+
for (const entry of entries) {
|
|
108
|
+
await new import_session.Session(entry).stop();
|
|
109
|
+
closed.push(entry.config.name);
|
|
110
|
+
}
|
|
111
|
+
output.closeAll(closed);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
case "delete-data": {
|
|
115
|
+
const entry = registry.entry(clientInfo, sessionName);
|
|
116
|
+
if (!entry) {
|
|
117
|
+
output.deleteData(sessionName, { existed: false, deletedUserDataDir: false });
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const result = await new import_session.Session(entry).deleteData();
|
|
121
|
+
output.deleteData(sessionName, result);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
case "kill-all": {
|
|
125
|
+
const pids = await killAllDaemons();
|
|
126
|
+
output.killAll(pids);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
case "open": {
|
|
130
|
+
const { pid } = await startSession(sessionName, registry, clientInfo, args, "open");
|
|
131
|
+
const newEntry = await registry.loadEntry(clientInfo, sessionName);
|
|
132
|
+
const params = args._.slice(1);
|
|
133
|
+
const toolText = await runInSessionOrStop(newEntry, clientInfo, { _: ["goto", ...params.length ? params : ["about:blank"]] }, output);
|
|
134
|
+
output.open(sessionName, pid, toolText);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
case "attach": {
|
|
138
|
+
const attachTarget = args._[1];
|
|
139
|
+
const targetCount = (attachTarget ? 1 : 0) + (args.cdp ? 1 : 0) + (args.endpoint ? 1 : 0) + (args.extension ? 1 : 0);
|
|
140
|
+
if (targetCount > 1)
|
|
141
|
+
output.errorAttachConflict();
|
|
142
|
+
if (attachTarget)
|
|
143
|
+
args.endpoint = attachTarget;
|
|
144
|
+
const extensionChannel = typeof args.extension === "string" ? args.extension : void 0;
|
|
145
|
+
if (extensionChannel) {
|
|
146
|
+
args.browser = extensionChannel;
|
|
147
|
+
args.extension = true;
|
|
148
|
+
}
|
|
149
|
+
const cdpChannel = typeof args.cdp === "string" && (0, import_channelSessions.isKnownChannel)(args.cdp) ? args.cdp : void 0;
|
|
150
|
+
const targetName = attachTarget ?? cdpChannel ?? extensionChannel ?? args.endpoint ?? args.cdp;
|
|
151
|
+
if (!targetName)
|
|
152
|
+
output.errorAttachNoTarget();
|
|
153
|
+
const attachSessionName = (0, import_registry.explicitSessionName)(args.session) ?? attachTarget ?? cdpChannel ?? extensionChannel ?? sessionName;
|
|
154
|
+
args.session = attachSessionName;
|
|
155
|
+
const { pid } = await startSession(attachSessionName, registry, clientInfo, args, "attach");
|
|
156
|
+
const newEntry = await registry.loadEntry(clientInfo, attachSessionName);
|
|
157
|
+
const toolText = await runInSessionOrStop(newEntry, clientInfo, { _: ["snapshot"], filename: "<auto>" }, output);
|
|
158
|
+
output.attach(attachSessionName, pid, targetName, toolText);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
case "close": {
|
|
162
|
+
const closeEntry = registry.entry(clientInfo, sessionName);
|
|
163
|
+
const { wasOpen } = closeEntry ? await new import_session.Session(closeEntry).stop() : { wasOpen: false };
|
|
164
|
+
output.close(sessionName, wasOpen);
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
case "detach": {
|
|
168
|
+
const detachEntry = registry.entry(clientInfo, sessionName);
|
|
169
|
+
if (detachEntry && !detachEntry.config.attached)
|
|
170
|
+
output.errorDetachNotAttached(sessionName);
|
|
171
|
+
const { wasOpen } = detachEntry ? await new import_session.Session(detachEntry).stop() : { wasOpen: false };
|
|
172
|
+
output.detach(sessionName, wasOpen);
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
case "install":
|
|
176
|
+
if (args.global && !args.skills)
|
|
177
|
+
output.errorInstallGlobalRequiresSkills();
|
|
178
|
+
await runInitWorkspace(args, output);
|
|
179
|
+
output.installed();
|
|
180
|
+
return;
|
|
181
|
+
case "install-browser":
|
|
182
|
+
await installBrowser();
|
|
183
|
+
output.installed();
|
|
184
|
+
return;
|
|
185
|
+
case "show": {
|
|
186
|
+
const daemonScript = (0, import_package.libPath)("entry", "dashboardApp.js");
|
|
187
|
+
const daemonArgs = [
|
|
188
|
+
daemonScript,
|
|
189
|
+
`--workspaceDir=${clientInfo.workspaceDir ?? ""}`
|
|
190
|
+
];
|
|
191
|
+
const explicit = (0, import_registry.explicitSessionName)(args.session);
|
|
192
|
+
if (explicit)
|
|
193
|
+
daemonArgs.push(`--sessionName=${explicit}`);
|
|
194
|
+
if (args.port !== void 0)
|
|
195
|
+
daemonArgs.push(`--port=${args.port}`);
|
|
196
|
+
if (args.host !== void 0)
|
|
197
|
+
daemonArgs.push(`--host=${args.host}`);
|
|
198
|
+
if (args.kill) {
|
|
199
|
+
daemonArgs.push(`--kill`);
|
|
200
|
+
const child2 = (0, import_child_process.spawn)(process.execPath, daemonArgs, { stdio: "ignore" });
|
|
201
|
+
await new Promise((resolve) => child2.on("exit", () => resolve()));
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (args.annotate) {
|
|
205
|
+
const entry = registry.entry(clientInfo, sessionName);
|
|
206
|
+
if (!entry)
|
|
207
|
+
output.errorBrowserNotOpenForTool(sessionName);
|
|
208
|
+
args.raw = true;
|
|
209
|
+
const text = await runInSession(entry, clientInfo, args, output);
|
|
210
|
+
output.toolResult(text);
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
const foreground = args.port !== void 0;
|
|
214
|
+
const child = (0, import_child_process.spawn)(process.execPath, daemonArgs, {
|
|
215
|
+
detached: !foreground,
|
|
216
|
+
stdio: foreground ? "inherit" : ["pipe", "pipe", "ignore"],
|
|
217
|
+
windowsHide: true
|
|
218
|
+
});
|
|
219
|
+
if (foreground) {
|
|
220
|
+
await new Promise((resolve) => child.on("exit", () => resolve()));
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
const timer = setTimeout(() => child.stdin.destroy(), 6e4);
|
|
224
|
+
child.unref();
|
|
225
|
+
let daemonPid;
|
|
226
|
+
try {
|
|
227
|
+
await new Promise((resolve, reject) => {
|
|
228
|
+
let outLog = "";
|
|
229
|
+
child.stdout.on("data", (data) => {
|
|
230
|
+
outLog += data.toString();
|
|
231
|
+
const match = outLog.match(/Dashboard is running pid=(\d+)/);
|
|
232
|
+
if (match) {
|
|
233
|
+
daemonPid = Number(match[1]);
|
|
234
|
+
resolve();
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
child.once("exit", (code, signal) => reject(new Error(`Dashboard daemon exited (code=${code}, signal=${signal}) before signaling READY${outLog ? "\n" + outLog : ""}`)));
|
|
238
|
+
});
|
|
239
|
+
} finally {
|
|
240
|
+
clearTimeout(timer);
|
|
241
|
+
child.removeAllListeners("exit");
|
|
242
|
+
child.stdin.destroy();
|
|
243
|
+
child.stdout.destroy();
|
|
244
|
+
}
|
|
245
|
+
output.show(sessionName, daemonPid);
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
default: {
|
|
249
|
+
const entry = registry.entry(clientInfo, sessionName);
|
|
250
|
+
if (!entry)
|
|
251
|
+
output.errorBrowserNotOpenForTool(sessionName);
|
|
252
|
+
if (command.raw)
|
|
253
|
+
args.raw = true;
|
|
254
|
+
const text = await runInSession(entry, clientInfo, args, output);
|
|
255
|
+
output.toolResult(text);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
async function startSession(sessionName, registry, clientInfo, args, mode) {
|
|
260
|
+
const entry = registry.entry(clientInfo, sessionName);
|
|
261
|
+
if (entry)
|
|
262
|
+
await new import_session.Session(entry).stop();
|
|
263
|
+
return await import_session.Session.startDaemon(clientInfo, args, mode);
|
|
264
|
+
}
|
|
265
|
+
async function runInSession(entry, clientInfo, args, output) {
|
|
266
|
+
const raw = !!args.raw;
|
|
267
|
+
for (const globalOption of globalOptions)
|
|
268
|
+
delete args[globalOption];
|
|
269
|
+
const session = new import_session.Session(entry);
|
|
270
|
+
const result = await session.run(clientInfo, args, { raw, json: output.json });
|
|
271
|
+
if (result.isError)
|
|
272
|
+
process.exitCode = 1;
|
|
273
|
+
return result.text;
|
|
274
|
+
}
|
|
275
|
+
async function runInSessionOrStop(entry, clientInfo, args, output) {
|
|
276
|
+
try {
|
|
277
|
+
return await runInSession(entry, clientInfo, args, output);
|
|
278
|
+
} catch (e) {
|
|
279
|
+
await new import_session.Session(entry).stop().catch(() => {
|
|
280
|
+
});
|
|
281
|
+
throw e;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
async function runInitWorkspace(args, output) {
|
|
285
|
+
const cliPath = (0, import_package.libPath)("entry", "cliDaemon.js");
|
|
286
|
+
const daemonArgs = [
|
|
287
|
+
cliPath,
|
|
288
|
+
"--init-workspace",
|
|
289
|
+
...args.skills ? [args.global ? "--init-skills-global" : "--init-skills", String(args.skills)] : []
|
|
290
|
+
];
|
|
291
|
+
await new Promise((resolve, reject) => {
|
|
292
|
+
const child = (0, import_child_process.spawn)(process.execPath, daemonArgs, {
|
|
293
|
+
stdio: output.installStdio(),
|
|
294
|
+
cwd: process.cwd()
|
|
295
|
+
});
|
|
296
|
+
child.on("close", (code) => {
|
|
297
|
+
if (code === 0)
|
|
298
|
+
resolve();
|
|
299
|
+
else
|
|
300
|
+
reject(new Error(`Workspace initialization failed with exit code ${code}`));
|
|
301
|
+
});
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
async function installBrowser() {
|
|
305
|
+
const argv = process.argv.map((arg) => arg === "install-browser" ? "install" : arg);
|
|
306
|
+
const { libCli } = require("../../coreBundle.js");
|
|
307
|
+
const { program: program2 } = require("../../utilsBundle.js");
|
|
308
|
+
if (!program2.version())
|
|
309
|
+
libCli.decorateProgram(program2);
|
|
310
|
+
program2.parse(argv);
|
|
311
|
+
}
|
|
312
|
+
const daemonProcessPatterns = ["run-mcp-server", "run-cli-server", "cli-daemon", "cliDaemon.js", "dashboardApp.js"];
|
|
313
|
+
async function killAllDaemons() {
|
|
314
|
+
const platform = import_os.default.platform();
|
|
315
|
+
const pidFilterEnv = process.env.PWTEST_KILL_ALL_PID_FILTER_FOR_TEST;
|
|
316
|
+
const pidFilter = pidFilterEnv ? new Set(pidFilterEnv.split(",").map((p) => parseInt(p, 10)).filter((n) => !isNaN(n))) : void 0;
|
|
317
|
+
const killed = [];
|
|
318
|
+
try {
|
|
319
|
+
if (platform === "win32") {
|
|
320
|
+
const clauses = [`(${daemonProcessPatterns.map((p) => `$_.CommandLine -like '*${p}*'`).join(" -or ")})`];
|
|
321
|
+
if (pidFilter)
|
|
322
|
+
clauses.push(`(${[...pidFilter].map((p) => `$_.ProcessId -eq ${p}`).join(" -or ")})`);
|
|
323
|
+
const whereClause = clauses.join(" -and ");
|
|
324
|
+
const result = (0, import_child_process.execSync)(
|
|
325
|
+
`powershell -NoProfile -NonInteractive -Command "Get-CimInstance Win32_Process | Where-Object { ${whereClause} } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue; $_.ProcessId }"`,
|
|
326
|
+
{ encoding: "utf-8" }
|
|
327
|
+
);
|
|
328
|
+
const pids = result.split("\n").map((line) => line.trim()).filter((line) => /^\d+$/.test(line));
|
|
329
|
+
for (const pid of pids)
|
|
330
|
+
killed.push(parseInt(pid, 10));
|
|
331
|
+
} else {
|
|
332
|
+
const result = (0, import_child_process.execSync)("ps auxww", { encoding: "utf-8" });
|
|
333
|
+
const lines = result.split("\n");
|
|
334
|
+
for (const line of lines) {
|
|
335
|
+
if (daemonProcessPatterns.some((p) => line.includes(p))) {
|
|
336
|
+
const parts = line.trim().split(/\s+/);
|
|
337
|
+
const pid = parts[1];
|
|
338
|
+
if (pid && /^\d+$/.test(pid)) {
|
|
339
|
+
const numericPid = parseInt(pid, 10);
|
|
340
|
+
if (pidFilter && !pidFilter.has(numericPid))
|
|
341
|
+
continue;
|
|
342
|
+
try {
|
|
343
|
+
process.kill(numericPid, "SIGKILL");
|
|
344
|
+
killed.push(numericPid);
|
|
345
|
+
} catch {
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
} catch (e) {
|
|
352
|
+
}
|
|
353
|
+
return killed;
|
|
354
|
+
}
|
|
355
|
+
async function collectList(registry, clientInfo, all) {
|
|
356
|
+
const browsers = [];
|
|
357
|
+
const entries = registry.entryMap();
|
|
358
|
+
const serverEntries = await import_serverRegistry.serverRegistry.list();
|
|
359
|
+
const key = (0, import_registry.clientKey)(clientInfo);
|
|
360
|
+
for (const [workspaceKey, list] of entries) {
|
|
361
|
+
if (!all && workspaceKey !== key)
|
|
362
|
+
continue;
|
|
363
|
+
for (const entry of list) {
|
|
364
|
+
const session = new import_session.Session(entry);
|
|
365
|
+
const canConnect = await session.canConnect();
|
|
366
|
+
if (!canConnect) {
|
|
367
|
+
await session.deleteSessionConfig();
|
|
368
|
+
continue;
|
|
369
|
+
}
|
|
370
|
+
const config = session.config;
|
|
371
|
+
const channel = config.browser?.launchOptions.channel ?? config.browser?.browserName;
|
|
372
|
+
browsers.push({
|
|
373
|
+
name: session.name,
|
|
374
|
+
workspace: workspaceKey,
|
|
375
|
+
status: canConnect ? "open" : "closed",
|
|
376
|
+
browserType: channel,
|
|
377
|
+
userDataDir: config.browser?.userDataDir ?? null,
|
|
378
|
+
headed: config.browser ? !config.browser.launchOptions.headless : void 0,
|
|
379
|
+
persistent: !!config.cli.persistent,
|
|
380
|
+
attached: !!config.attached,
|
|
381
|
+
compatible: session.isCompatible(clientInfo),
|
|
382
|
+
version: config.version
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
if (!all)
|
|
387
|
+
return { all, browsers };
|
|
388
|
+
const servers = [...serverEntries.values()].flat();
|
|
389
|
+
return { all, browsers, servers, channelSessions: await (0, import_channelSessions.listChannelSessions)() };
|
|
390
|
+
}
|
|
391
|
+
function validateFlags(args, command, output) {
|
|
392
|
+
const unknownFlags = [];
|
|
393
|
+
for (const key of Object.keys(args)) {
|
|
394
|
+
if (key === "_")
|
|
395
|
+
continue;
|
|
396
|
+
if (globalOptions.includes(key))
|
|
397
|
+
continue;
|
|
398
|
+
if (!(key in command.flags))
|
|
399
|
+
unknownFlags.push(key);
|
|
400
|
+
}
|
|
401
|
+
if (unknownFlags.length)
|
|
402
|
+
output.errorUnknownOption(unknownFlags, command.help);
|
|
403
|
+
}
|
|
404
|
+
function validateArgs(args, command, output) {
|
|
405
|
+
const positional = args._.slice(1);
|
|
406
|
+
if (positional.length > command.args.length && !command.variadicArg)
|
|
407
|
+
output.errorTooManyArguments(command.args.length, positional.length, command.help);
|
|
408
|
+
}
|
|
409
|
+
function calculateSha1(buffer) {
|
|
410
|
+
const hash = import_crypto.default.createHash("sha1");
|
|
411
|
+
hash.update(buffer);
|
|
412
|
+
return hash.digest("hex");
|
|
413
|
+
}
|
|
414
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
415
|
+
0 && (module.exports = {
|
|
416
|
+
calculateSha1,
|
|
417
|
+
program
|
|
418
|
+
});
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var registry_exports = {};
|
|
30
|
+
__export(registry_exports, {
|
|
31
|
+
Registry: () => Registry,
|
|
32
|
+
baseDaemonDir: () => baseDaemonDir,
|
|
33
|
+
clientKey: () => clientKey,
|
|
34
|
+
createClientInfo: () => createClientInfo,
|
|
35
|
+
explicitSessionName: () => explicitSessionName,
|
|
36
|
+
resolveSessionName: () => resolveSessionName
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(registry_exports);
|
|
39
|
+
var import_crypto = __toESM(require("crypto"));
|
|
40
|
+
var import_fs = __toESM(require("fs"));
|
|
41
|
+
var import_os = __toESM(require("os"));
|
|
42
|
+
var import_path = __toESM(require("path"));
|
|
43
|
+
var import_package = require("../../package");
|
|
44
|
+
function clientKey(clientInfo) {
|
|
45
|
+
return clientInfo.workspaceDir || clientInfo.workspaceDirHash;
|
|
46
|
+
}
|
|
47
|
+
class Registry {
|
|
48
|
+
constructor(files) {
|
|
49
|
+
this._files = files;
|
|
50
|
+
}
|
|
51
|
+
entry(clientInfo, sessionName) {
|
|
52
|
+
const key = clientKey(clientInfo);
|
|
53
|
+
const entries = this._files.get(key) || [];
|
|
54
|
+
return entries.find((entry) => entry.config.name === sessionName);
|
|
55
|
+
}
|
|
56
|
+
entries(clientInfo) {
|
|
57
|
+
return this._files.get(clientKey(clientInfo)) || [];
|
|
58
|
+
}
|
|
59
|
+
entryMap() {
|
|
60
|
+
return this._files;
|
|
61
|
+
}
|
|
62
|
+
async loadEntry(clientInfo, sessionName) {
|
|
63
|
+
const entry = await Registry._loadSessionEntry(clientInfo.daemonProfilesDir, sessionName + ".session");
|
|
64
|
+
if (!entry)
|
|
65
|
+
throw new Error(`Could not start the session "${sessionName}"`);
|
|
66
|
+
const key = clientKey(clientInfo);
|
|
67
|
+
let list = this._files.get(key);
|
|
68
|
+
if (!list) {
|
|
69
|
+
list = [];
|
|
70
|
+
this._files.set(key, list);
|
|
71
|
+
}
|
|
72
|
+
const oldIndex = list.findIndex((e) => e.config.name === sessionName);
|
|
73
|
+
if (oldIndex !== -1)
|
|
74
|
+
list.splice(oldIndex, 1);
|
|
75
|
+
list.push(entry);
|
|
76
|
+
return entry;
|
|
77
|
+
}
|
|
78
|
+
static async _loadSessionEntry(daemonDir, file) {
|
|
79
|
+
try {
|
|
80
|
+
const fileName = import_path.default.join(daemonDir, file);
|
|
81
|
+
const data = await import_fs.default.promises.readFile(fileName, "utf-8");
|
|
82
|
+
const config = JSON.parse(data);
|
|
83
|
+
if (!config.name)
|
|
84
|
+
config.name = import_path.default.basename(file, ".session");
|
|
85
|
+
if (!config.timestamp)
|
|
86
|
+
config.timestamp = 0;
|
|
87
|
+
return { file: fileName, config, daemonDir };
|
|
88
|
+
} catch {
|
|
89
|
+
return void 0;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
static async load() {
|
|
93
|
+
const sessions = /* @__PURE__ */ new Map();
|
|
94
|
+
const hashDirs = await import_fs.default.promises.readdir(baseDaemonDir()).catch(() => []);
|
|
95
|
+
for (const workspaceDirHash of hashDirs) {
|
|
96
|
+
const daemonDir = import_path.default.join(baseDaemonDir(), workspaceDirHash);
|
|
97
|
+
const stat = await import_fs.default.promises.stat(daemonDir);
|
|
98
|
+
if (!stat.isDirectory())
|
|
99
|
+
continue;
|
|
100
|
+
const files = await import_fs.default.promises.readdir(daemonDir).catch(() => []);
|
|
101
|
+
for (const file of files) {
|
|
102
|
+
if (!file.endsWith(".session"))
|
|
103
|
+
continue;
|
|
104
|
+
const entry = await Registry._loadSessionEntry(daemonDir, file);
|
|
105
|
+
if (!entry)
|
|
106
|
+
continue;
|
|
107
|
+
const key = entry.config.workspaceDir || workspaceDirHash;
|
|
108
|
+
let list = sessions.get(key);
|
|
109
|
+
if (!list) {
|
|
110
|
+
list = [];
|
|
111
|
+
sessions.set(key, list);
|
|
112
|
+
}
|
|
113
|
+
list.push(entry);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return new Registry(sessions);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function computeBaseDaemonDir() {
|
|
120
|
+
if (process.env.PWTEST_DAEMON_SESSION_DIR)
|
|
121
|
+
return process.env.PWTEST_DAEMON_SESSION_DIR;
|
|
122
|
+
let localCacheDir;
|
|
123
|
+
if (process.platform === "linux")
|
|
124
|
+
localCacheDir = process.env.XDG_CACHE_HOME || import_path.default.join(import_os.default.homedir(), ".cache");
|
|
125
|
+
if (process.platform === "darwin")
|
|
126
|
+
localCacheDir = import_path.default.join(import_os.default.homedir(), "Library", "Caches");
|
|
127
|
+
if (process.platform === "win32")
|
|
128
|
+
localCacheDir = process.env.LOCALAPPDATA || import_path.default.join(import_os.default.homedir(), "AppData", "Local");
|
|
129
|
+
if (!localCacheDir)
|
|
130
|
+
throw new Error("Unsupported platform: " + process.platform);
|
|
131
|
+
return import_path.default.join(localCacheDir, "ms-playwright", "daemon");
|
|
132
|
+
}
|
|
133
|
+
let _baseDaemonDir;
|
|
134
|
+
function baseDaemonDir() {
|
|
135
|
+
return _baseDaemonDir ??= computeBaseDaemonDir();
|
|
136
|
+
}
|
|
137
|
+
function createClientInfo() {
|
|
138
|
+
const workspaceDir = findWorkspaceDir(process.cwd());
|
|
139
|
+
const version = process.env.PLAYWRIGHT_CLI_VERSION_FOR_TEST || import_package.packageJSON.version;
|
|
140
|
+
const hash = import_crypto.default.createHash("sha1");
|
|
141
|
+
hash.update(workspaceDir || import_package.packageRoot);
|
|
142
|
+
const workspaceDirHash = hash.digest("hex").substring(0, 16);
|
|
143
|
+
return {
|
|
144
|
+
version,
|
|
145
|
+
workspaceDir,
|
|
146
|
+
workspaceDirHash,
|
|
147
|
+
daemonProfilesDir: daemonProfilesDir(workspaceDirHash),
|
|
148
|
+
homeDir: import_os.default.homedir()
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
function findWorkspaceDir(startDir) {
|
|
152
|
+
let dir = startDir;
|
|
153
|
+
for (let i = 0; i < 10; i++) {
|
|
154
|
+
if (import_fs.default.existsSync(import_path.default.join(dir, ".playwright")))
|
|
155
|
+
return dir;
|
|
156
|
+
const parentDir = import_path.default.dirname(dir);
|
|
157
|
+
if (parentDir === dir)
|
|
158
|
+
break;
|
|
159
|
+
dir = parentDir;
|
|
160
|
+
}
|
|
161
|
+
return void 0;
|
|
162
|
+
}
|
|
163
|
+
const daemonProfilesDir = (workspaceDirHash) => {
|
|
164
|
+
return import_path.default.join(baseDaemonDir(), workspaceDirHash);
|
|
165
|
+
};
|
|
166
|
+
function explicitSessionName(sessionName) {
|
|
167
|
+
return sessionName || process.env.PLAYWRIGHT_CLI_SESSION;
|
|
168
|
+
}
|
|
169
|
+
function resolveSessionName(sessionName) {
|
|
170
|
+
return explicitSessionName(sessionName) || "default";
|
|
171
|
+
}
|
|
172
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
173
|
+
0 && (module.exports = {
|
|
174
|
+
Registry,
|
|
175
|
+
baseDaemonDir,
|
|
176
|
+
clientKey,
|
|
177
|
+
createClientInfo,
|
|
178
|
+
explicitSessionName,
|
|
179
|
+
resolveSessionName
|
|
180
|
+
});
|