@ddwang/magnitude-core 0.3.1-ddwang.2 → 0.3.1-ddwang.21
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/dist/cli.cjs +2 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.cts +2 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.mjs +1 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/index.cjs +2704 -1522
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +188 -50
- package/dist/index.d.ts +1147 -23
- package/dist/index.mjs +2527 -1362
- package/dist/index.mjs.map +1 -0
- package/node_modules/patchright-core/README.md +3 -0
- package/node_modules/patchright-core/ThirdPartyNotices.txt +13 -0
- package/node_modules/patchright-core/bin/install_media_pack.ps1 +5 -0
- package/node_modules/patchright-core/bin/install_webkit_wsl.ps1 +33 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/node_modules/patchright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/node_modules/patchright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/node_modules/patchright-core/browsers.json +52 -0
- package/node_modules/patchright-core/cli.js +22 -0
- package/node_modules/patchright-core/index.d.ts +17 -0
- package/node_modules/patchright-core/index.js +17 -0
- package/node_modules/patchright-core/index.mjs +28 -0
- package/node_modules/patchright-core/lib/bootstrap.js +149 -0
- package/node_modules/patchright-core/lib/coreBundle.js +80653 -0
- package/node_modules/patchright-core/lib/entry/cliDaemon.js +5 -0
- package/node_modules/patchright-core/lib/entry/dashboardApp.js +3 -0
- package/node_modules/patchright-core/lib/entry/mcp.js +10 -0
- package/node_modules/patchright-core/lib/entry/oopBrowserDownload.js +3 -0
- package/node_modules/patchright-core/lib/package.js +50 -0
- package/node_modules/patchright-core/lib/server/chromium/appIcon.png +0 -0
- package/node_modules/patchright-core/lib/server/electron/loader.js +112 -0
- package/node_modules/patchright-core/lib/serverRegistry.js +1939 -0
- package/node_modules/patchright-core/lib/serverRegistry.js.LICENSE +65 -0
- package/node_modules/patchright-core/lib/tools/cli-client/channelSessions.js +141 -0
- package/node_modules/patchright-core/lib/tools/cli-client/cli.js +7 -0
- package/node_modules/patchright-core/lib/tools/cli-client/help.json +808 -0
- package/node_modules/patchright-core/lib/tools/cli-client/minimist.js +128 -0
- package/node_modules/patchright-core/lib/tools/cli-client/output.js +352 -0
- package/node_modules/patchright-core/lib/tools/cli-client/program.js +422 -0
- package/node_modules/patchright-core/lib/tools/cli-client/registry.js +180 -0
- package/node_modules/patchright-core/lib/tools/cli-client/session.js +261 -0
- package/node_modules/patchright-core/lib/tools/dashboard/appIcon.png +0 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/SKILL.md +493 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/pr-attachments.md +60 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/running-code.md +245 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/session-management.md +227 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-cli/references/video-recording.md +216 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
- package/node_modules/patchright-core/lib/tools/skills/playwright-trace/SKILL.md +174 -0
- package/node_modules/patchright-core/lib/tools/utils/extension.js +112 -0
- package/node_modules/patchright-core/lib/tools/utils/socketConnection.js +108 -0
- package/node_modules/patchright-core/lib/utilsBundle.js +86225 -0
- package/node_modules/patchright-core/lib/utilsBundle.js.LICENSE +1890 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
- package/node_modules/patchright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
- package/node_modules/patchright-core/lib/vite/dashboard/index.html +29 -0
- package/node_modules/patchright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
- package/node_modules/patchright-core/lib/vite/htmlReport/index.html +16 -0
- package/node_modules/patchright-core/lib/vite/htmlReport/report.css +2 -0
- package/node_modules/patchright-core/lib/vite/htmlReport/report.js +32 -0
- package/node_modules/patchright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/patchright-core/lib/vite/recorder/assets/codeMirrorModule-GBnsXk4c.js +32 -0
- package/node_modules/patchright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/patchright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
- package/node_modules/patchright-core/lib/vite/recorder/assets/index-CVDOfo-j.js +129 -0
- package/node_modules/patchright-core/lib/vite/recorder/index.html +29 -0
- package/node_modules/patchright-core/lib/vite/recorder/playwright-logo.svg +9 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/assets/codeMirrorModule-G79327TW.js +32 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/assets/defaultSettingsView-D9EV0iaS.js +184 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/assets/xtermModule-Al_u-Nk5.js +7 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/defaultSettingsView.C8BeHuxd.css +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/index.CMB2-c8e.js +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/index.html +44 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/snapshot.html +10 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/uiMode.C3yLoy2G.js +5 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/uiMode.html +18 -0
- package/node_modules/patchright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
- package/node_modules/patchright-core/lib/webp_codec.LICENSE +173 -0
- package/node_modules/patchright-core/lib/webp_codec.wasm +0 -0
- package/node_modules/patchright-core/lib/xdg-open +1267 -0
- package/node_modules/patchright-core/package.json +34 -0
- package/node_modules/patchright-core/types/protocol.d.ts +24776 -0
- package/node_modules/patchright-core/types/structs.d.ts +52 -0
- package/node_modules/patchright-core/types/types.d.ts +27167 -0
- package/node_modules/playwright/.bun-tag-91d746a6045e143f +0 -0
- package/node_modules/playwright/README.md +300 -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/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 +217 -0
- package/node_modules/playwright/lib/common/index.js +2937 -0
- package/node_modules/playwright/lib/common/index.js.txt +33 -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 +827 -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 +13496 -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 +242 -0
- package/node_modules/playwright/lib/runner/index.js +8721 -0
- package/node_modules/playwright/lib/runner/index.js.txt +62 -0
- package/node_modules/playwright/lib/transform/babelBundle.js +72490 -0
- package/node_modules/playwright/lib/transform/babelBundle.js.LICENSE +2384 -0
- package/node_modules/playwright/lib/transform/babelBundle.js.txt +328 -0
- package/node_modules/playwright/lib/transform/esmLoader.js +8213 -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 +1860 -0
- package/node_modules/playwright/lib/worker/workerProcessEntry.js.txt +19 -0
- package/node_modules/playwright/package.json +50 -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 +11191 -0
- package/node_modules/playwright/types/testReporter.d.ts +950 -0
- package/package.json +21 -12
- package/dist/actions/desktopActions.d.ts +0 -58
- package/dist/actions/desktopActions.js +0 -155
- package/dist/actions/index.d.ts +0 -27
- package/dist/actions/index.js +0 -11
- package/dist/actions/memoryActions.d.ts +0 -9
- package/dist/actions/memoryActions.js +0 -34
- package/dist/actions/taskActions.d.ts +0 -8
- package/dist/actions/taskActions.js +0 -27
- package/dist/actions/types.d.ts +0 -35
- package/dist/actions/types.js +0 -5
- package/dist/actions/util.d.ts +0 -21
- package/dist/actions/util.js +0 -280
- package/dist/actions/webActions.d.ts +0 -87
- package/dist/actions/webActions.js +0 -214
- package/dist/actions/webActions.test.d.ts +0 -1
- package/dist/actions/webActions.test.js +0 -43
- package/dist/agent/browserAgent.d.ts +0 -31
- package/dist/agent/browserAgent.js +0 -136
- package/dist/agent/errors.d.ts +0 -22
- package/dist/agent/errors.js +0 -97
- package/dist/agent/index.d.ts +0 -64
- package/dist/agent/index.js +0 -505
- package/dist/agent/narrator.d.ts +0 -4
- package/dist/agent/narrator.js +0 -63
- package/dist/agent/pause.test.d.ts +0 -1
- package/dist/agent/pause.test.js +0 -194
- package/dist/ai/baml_client/async_client.d.ts +0 -64
- package/dist/ai/baml_client/async_client.js +0 -284
- package/dist/ai/baml_client/async_request.d.ts +0 -39
- package/dist/ai/baml_client/async_request.js +0 -134
- package/dist/ai/baml_client/config.d.ts +0 -11
- package/dist/ai/baml_client/config.js +0 -20
- package/dist/ai/baml_client/globals.d.ts +0 -16
- package/dist/ai/baml_client/globals.js +0 -37
- package/dist/ai/baml_client/index.d.ts +0 -17
- package/dist/ai/baml_client/index.js +0 -42
- package/dist/ai/baml_client/inlinedbaml.d.ts +0 -19
- package/dist/ai/baml_client/inlinedbaml.js +0 -31
- package/dist/ai/baml_client/parser.d.ts +0 -53
- package/dist/ai/baml_client/parser.js +0 -86
- package/dist/ai/baml_client/partial_types.d.ts +0 -61
- package/dist/ai/baml_client/partial_types.js +0 -10
- package/dist/ai/baml_client/sync_client.d.ts +0 -57
- package/dist/ai/baml_client/sync_client.js +0 -142
- package/dist/ai/baml_client/sync_request.d.ts +0 -37
- package/dist/ai/baml_client/sync_request.js +0 -134
- package/dist/ai/baml_client/tracing.d.ts +0 -16
- package/dist/ai/baml_client/tracing.js +0 -18
- package/dist/ai/baml_client/type_builder.d.ts +0 -40
- package/dist/ai/baml_client/type_builder.js +0 -120
- package/dist/ai/baml_client/types.d.ts +0 -69
- package/dist/ai/baml_client/types.js +0 -15
- package/dist/ai/baml_client/watchers.d.ts +0 -32
- package/dist/ai/baml_client/watchers.js +0 -50
- package/dist/ai/baseten.d.ts +0 -4
- package/dist/ai/baseten.js +0 -10
- package/dist/ai/claudeCode.d.ts +0 -1
- package/dist/ai/claudeCode.js +0 -186
- package/dist/ai/modelHarness.d.ts +0 -39
- package/dist/ai/modelHarness.js +0 -324
- package/dist/ai/modelResponseError.d.ts +0 -4
- package/dist/ai/modelResponseError.js +0 -8
- package/dist/ai/multiModelHarness.d.ts +0 -24
- package/dist/ai/multiModelHarness.js +0 -52
- package/dist/ai/plannerResponse.d.ts +0 -34
- package/dist/ai/plannerResponse.js +0 -96
- package/dist/ai/plannerResponse.test.d.ts +0 -1
- package/dist/ai/plannerResponse.test.js +0 -112
- package/dist/ai/structuredOutput.d.ts +0 -11
- package/dist/ai/structuredOutput.js +0 -94
- package/dist/ai/structuredOutput.test.d.ts +0 -1
- package/dist/ai/structuredOutput.test.js +0 -91
- package/dist/ai/types.d.ts +0 -119
- package/dist/ai/types.js +0 -5
- package/dist/ai/util.d.ts +0 -13
- package/dist/ai/util.js +0 -200
- package/dist/ai/util.test.d.ts +0 -1
- package/dist/ai/util.test.js +0 -95
- package/dist/cli.js +0 -3
- package/dist/common/actions.js +0 -14
- package/dist/common/events.d.ts +0 -17
- package/dist/common/events.js +0 -3
- package/dist/common/failure.d.ts +0 -68
- package/dist/common/failure.js +0 -1
- package/dist/common/index.d.ts +0 -3
- package/dist/common/index.js +0 -3
- package/dist/common/operation.d.ts +0 -31
- package/dist/common/operation.js +0 -102
- package/dist/common/operation.test.d.ts +0 -1
- package/dist/common/operation.test.js +0 -53
- package/dist/common/retry.d.ts +0 -16
- package/dist/common/retry.js +0 -35
- package/dist/common/util.d.ts +0 -23
- package/dist/common/util.js +0 -139
- package/dist/connectors/browserConnector.d.ts +0 -53
- package/dist/connectors/browserConnector.js +0 -290
- package/dist/connectors/desktopConnector.d.ts +0 -58
- package/dist/connectors/desktopConnector.js +0 -68
- package/dist/connectors/index.d.ts +0 -14
- package/dist/connectors/index.js +0 -2
- package/dist/index.js +0 -28
- package/dist/logger.d.ts +0 -3
- package/dist/logger.js +0 -15
- package/dist/memory/agentMemory.d.ts +0 -47
- package/dist/memory/agentMemory.js +0 -167
- package/dist/memory/agentMemory.test.d.ts +0 -1
- package/dist/memory/agentMemory.test.js +0 -150
- package/dist/memory/image.d.ts +0 -28
- package/dist/memory/image.js +0 -95
- package/dist/memory/image.test.d.ts +0 -1
- package/dist/memory/image.test.js +0 -46
- package/dist/memory/index.d.ts +0 -3
- package/dist/memory/index.js +0 -3
- package/dist/memory/masking.d.ts +0 -7
- package/dist/memory/masking.js +0 -141
- package/dist/memory/masking.test.d.ts +0 -1
- package/dist/memory/masking.test.js +0 -117
- package/dist/memory/notebook.d.ts +0 -58
- package/dist/memory/notebook.js +0 -75
- package/dist/memory/notebook.test.d.ts +0 -1
- package/dist/memory/notebook.test.js +0 -99
- package/dist/memory/observation.d.ts +0 -38
- package/dist/memory/observation.js +0 -79
- package/dist/memory/rendering/index.d.ts +0 -10
- package/dist/memory/rendering/index.js +0 -13
- package/dist/memory/rendering/renderJsonParts.d.ts +0 -3
- package/dist/memory/rendering/renderJsonParts.js +0 -115
- package/dist/memory/rendering/renderJsonParts.test.d.ts +0 -1
- package/dist/memory/rendering/renderJsonParts.test.js +0 -217
- package/dist/memory/rendering/renderXmlParts.d.ts +0 -7
- package/dist/memory/rendering/renderXmlParts.js +0 -127
- package/dist/memory/serde.d.ts +0 -20
- package/dist/memory/serde.js +0 -67
- package/dist/memory/serde.test.d.ts +0 -1
- package/dist/memory/serde.test.js +0 -64
- package/dist/memory/util.d.ts +0 -2
- package/dist/memory/util.js +0 -17
- package/dist/telemetry/events.d.ts +0 -9
- package/dist/telemetry/events.js +0 -80
- package/dist/telemetry/index.d.ts +0 -6
- package/dist/telemetry/index.js +0 -91
- package/dist/types.d.ts +0 -30
- package/dist/types.js +0 -1
- package/dist/util.d.ts +0 -1
- package/dist/util.js +0 -12
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -3
- package/dist/web/browserProvider.d.ts +0 -24
- package/dist/web/browserProvider.js +0 -164
- package/dist/web/browserProvider.test.d.ts +0 -1
- package/dist/web/browserProvider.test.js +0 -44
- package/dist/web/harness.d.ts +0 -109
- package/dist/web/harness.js +0 -401
- package/dist/web/recovery.d.ts +0 -46
- package/dist/web/recovery.js +0 -137
- package/dist/web/recovery.test.d.ts +0 -1
- package/dist/web/recovery.test.js +0 -182
- package/dist/web/stability.d.ts +0 -57
- package/dist/web/stability.js +0 -323
- package/dist/web/tabs.d.ts +0 -58
- package/dist/web/tabs.js +0 -293
- package/dist/web/transformer.d.ts +0 -7
- package/dist/web/transformer.js +0 -41
- package/dist/web/types.d.ts +0 -37
- package/dist/web/types.js +0 -2
- package/dist/web/util.d.ts +0 -3
- package/dist/web/util.js +0 -81
- package/dist/web/visualizer/cursor.d.ts +0 -16
- package/dist/web/visualizer/cursor.js +0 -153
- package/dist/web/visualizer/index.d.ts +0 -22
- package/dist/web/visualizer/index.js +0 -47
- package/dist/web/visualizer/mouseEffects.d.ts +0 -18
- package/dist/web/visualizer/mouseEffects.js +0 -287
- package/dist/web/visualizer/typeEffects.d.ts +0 -10
- package/dist/web/visualizer/typeEffects.js +0 -190
- package/dist/web/zodReexport.test.d.ts +0 -1
- package/dist/web/zodReexport.test.js +0 -14
- /package/{dist/common/actions.d.ts → node_modules/patchright-core/.bun-tag-19f23bd68c84ec1f} +0 -0
|
File without changes
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
<h1 align="center">
|
|
2
|
+
🎭 Patchright
|
|
3
|
+
</h1>
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
<p align="center">
|
|
7
|
+
<a href="https://github.com/Kaliiiiiiiiii-Vinyzu/patchright/blob/main/LICENSE">
|
|
8
|
+
<img src="https://img.shields.io/badge/License-Apache%202.0-green">
|
|
9
|
+
</a>
|
|
10
|
+
<a>
|
|
11
|
+
<img src="https://img.shields.io/badge/Based%20on-Playwright-goldenrod">
|
|
12
|
+
</a>
|
|
13
|
+
<a>
|
|
14
|
+
<img src="https://img.shields.io/badge/Driver-Patched-blue">
|
|
15
|
+
</a>
|
|
16
|
+
<a href="https://github.com/Kaliiiiiiiiii-Vinyzu/patchright/releases/latest">
|
|
17
|
+
<img alt="Patchright Version" src="https://img.shields.io/github/v/release/Kaliiiiiiiiii-Vinyzu/patchright?display_name=release&label=Version">
|
|
18
|
+
</a>
|
|
19
|
+
<br/>
|
|
20
|
+
<a href="https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python">
|
|
21
|
+
<img src="https://img.shields.io/badge/Package-Python-seagreen">
|
|
22
|
+
</a>
|
|
23
|
+
<a href="https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python/releases">
|
|
24
|
+
<img alt="Python Downloads" src="https://img.shields.io/pepy/dt/patchright?color=red&label=Python%20Downloads">
|
|
25
|
+
</a>
|
|
26
|
+
<a href="https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-nodejs">
|
|
27
|
+
<img src="https://img.shields.io/badge/Package-NodeJS-seagreen">
|
|
28
|
+
</a>
|
|
29
|
+
<a href="https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-nodejs/releases">
|
|
30
|
+
<img alt="NodeJS Downloads" src="https://img.shields.io/npm/d18m/patchright?color=red&label=NodeJS%20Downloads">
|
|
31
|
+
</a>
|
|
32
|
+
<a href="https://github.com/DevEnterpriseSoftware/patchright-dotnet">
|
|
33
|
+
<img src="https://img.shields.io/badge/Package-.Net-seagreen">
|
|
34
|
+
</a>
|
|
35
|
+
<a href="https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-nodejs/releases">
|
|
36
|
+
<img alt=".Net Downloads" src="https://img.shields.io/nuget/dt/Patchright?label=.Net%20Downloads">
|
|
37
|
+
</a>
|
|
38
|
+
<br/>
|
|
39
|
+
<img src="https://img.shields.io/github/actions/workflow/status/Kaliiiiiiiiii-Vinyzu/patchright/patchright_tests.yml?label=Patchright%20Driver%20Tests">
|
|
40
|
+
<img src="https://img.shields.io/github/actions/workflow/status/Kaliiiiiiiiii-Vinyzu/patchright-python/patchright_tests.yml?label=Patchright%20Python%20Tests">
|
|
41
|
+
<img src="https://img.shields.io/github/actions/workflow/status/DevEnterpriseSoftware/patchright-dotnet/patchright_test.yml?label=Patchright%20.Net%20Tests">
|
|
42
|
+
</p>
|
|
43
|
+
|
|
44
|
+
#### Patchright is a patched and undetected version of the Playwright Testing and Automation Framework. </br> It can be used as a drop-in replacement for Playwright.
|
|
45
|
+
|
|
46
|
+
> [!NOTE]
|
|
47
|
+
> This repository serves the Patchright Driver. To use Patchright, check out the [Python Package](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python), the [NodeJS Package](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-nodejs) or the _community-driven_ [.Net Package](https://github.com/DevEnterpriseSoftware/patchright-dotnet/)
|
|
48
|
+
|
|
49
|
+
> [!IMPORTANT]
|
|
50
|
+
> Patchright only patches CHROMIUM based browsers. Firefox and Webkit are not supported.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
<details open id="sponsors">
|
|
55
|
+
<summary><h3>Sponsors</h1></summary>
|
|
56
|
+
|
|
57
|
+
<sup>Want to Sponsor this Project? Contact [@vinyzu](https://discordapp.com/users/935224495126487150) on Discord!</sup>
|
|
58
|
+
|
|
59
|
+
[<img width="60%" alt="NodeMaven Banner" src="https://github.com/user-attachments/assets/feecc63e-f564-40f6-b157-aa6b7542d223" />](https://go.nodemaven.com/Vinyzuoctober)
|
|
60
|
+
</br>
|
|
61
|
+
#### [NodeMaven](https://go.nodemaven.com/Vinyzuoctober): Your efficient proxy provider for Web Scraping and Automation with High Quality IPs.
|
|
62
|
+
|
|
63
|
+
Why [NodeMaven](https://go.nodemaven.com/Vinyzuoctober)?
|
|
64
|
+
|
|
65
|
+
🎯 ZIP targeting
|
|
66
|
+
</br>
|
|
67
|
+
✅ 99.9% Uptime
|
|
68
|
+
</br>
|
|
69
|
+
🔍 IP Filtering: Proxies are guaranteed to have fraud score <97%
|
|
70
|
+
</br>
|
|
71
|
+
🔰 No KYC required
|
|
72
|
+
</br>
|
|
73
|
+
🎉 Unique free tools: Proxy Bandwidth Checker, Meta Tag Checker, IP Lookup and others!
|
|
74
|
+
|
|
75
|
+
**Special codes** for Patchright users:
|
|
76
|
+
</br>
|
|
77
|
+
🔥 **PATCHRIGHT35** - **35% off** to Mobile and Residential Proxies
|
|
78
|
+
</br>
|
|
79
|
+
🔥 **PATCHRIGHT40** - **40% off** to ISP (Static) Proxies
|
|
80
|
+
|
|
81
|
+
<sup>Choose quality and stability with [NodeMaven](https://go.nodemaven.com/Vinyzuoctober).</sup>
|
|
82
|
+
</br>
|
|
83
|
+
<sup>Check Nodemaven's new GitHub for more web scraping and automation solutions - https://github.com/nodemaven</sup>
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
[<img height="100" alt="swiftproxy banner" src="https://github.com/user-attachments/assets/123ac558-f99f-4c59-b826-b86822f2c92a" />](https://www.swiftproxy.net/?ref=Vinyzu)
|
|
88
|
+
|
|
89
|
+
#### [Swiftproxy](https://www.swiftproxy.net/?ref=Vinyzu): High-Performance Residential Proxies for Scalable Data Collection
|
|
90
|
+
|
|
91
|
+
Built for developers who need **reliable**, anti-detection proxy infrastructure. [Swiftproxy](https://www.swiftproxy.net/?ref=Vinyzu) delivers **stable connections**, **high success rates**, and flexible control for **large-scale scraping and automation**.
|
|
92
|
+
|
|
93
|
+
- 🌍 195+ locations with ethically sourced residential IPs
|
|
94
|
+
- 🔄 **Rotating** & **sticky sessions** with precise geo-targeting
|
|
95
|
+
- ⚡ Optimized for **anti-ban** & **high success rate**
|
|
96
|
+
- 🔌 HTTP / HTTPS / SOCKS5 support
|
|
97
|
+
- 🧪 **Free 500MB trial** for testing
|
|
98
|
+
- 💸 **Special discount** code for Patchright users: **PROXY90 - 10%**
|
|
99
|
+
|
|
100
|
+
<sup> Best for: Web scraping, automation, multi-accounting, and large-scale data extraction </sup>
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
[<img height="90" alt="rapidproxy banner" src="https://github.com/user-attachments/assets/bb771788-5c99-4e22-be40-c99cca95db22" />](https://www.rapidproxy.io/?ref=Vinyzu)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
#### [RapidProxy](https://www.rapidproxy.io/?ref=Vinyzu) provides a stable and high-performance proxy network built for large-scale data operations.
|
|
108
|
+
|
|
109
|
+
[RapidProxy](https://www.rapidproxy.io/?ref=Vinyzu) delivers:
|
|
110
|
+
- 🌍 90M+ Residential IPs (200+ locations)
|
|
111
|
+
- 🔄 **Rotating Residential Proxies** — from **$0.65/GB** (non-expiring traffic)
|
|
112
|
+
- 🧩 **Static Residential IPs** — **$5/IP** (30 days, unlimited traffic)
|
|
113
|
+
- 🎯 Precise geo-targeting
|
|
114
|
+
- ⚡ **Free Trial Available** — test proxy performance risk-free
|
|
115
|
+
- Built for scraping, automation, and high-performance data workflows.
|
|
116
|
+
- 🔥 Special Offer: Use code **RAPID10** to get **10% off**
|
|
117
|
+
|
|
118
|
+
<sup> Start fast. Scale globally. Stay stable with [RapidProxy](https://www.rapidproxy.io/?ref=Vinyzu). </sup>
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
<div align="center">
|
|
123
|
+
|
|
124
|
+
<img src="https://scrappey.com/logo.png" width="56" alt="Scrappey">
|
|
125
|
+
|
|
126
|
+
### Sponsored by [Scrappey](https://scrappey.com?utm_source=patchright&utm_medium=github&utm_campaign=repo_readme)
|
|
127
|
+
|
|
128
|
+
</div>
|
|
129
|
+
|
|
130
|
+
Getting the browser past detection is one problem. Keeping proxies rotating, fingerprints
|
|
131
|
+
current and sessions alive across a few million requests is a different one. **Scrappey**
|
|
132
|
+
takes the second problem: one endpoint, solved pages back.
|
|
133
|
+
|
|
134
|
+
- **Clearcote** — our own patched Chromium, maintained in-house, not a stock build
|
|
135
|
+
- **Several engines behind one endpoint** — blocked on one stack, routed to another
|
|
136
|
+
- **Click, type, wait and scroll** over the API — a real session, not a fetch proxy
|
|
137
|
+
- **Residential and datacenter proxies** included, or bring your own
|
|
138
|
+
- **Per request**, no monthly minimum
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
curl -X POST "https://publisher.scrappey.com/api/v1?key=YOUR_KEY" \
|
|
142
|
+
-H "Content-Type: application/json" \
|
|
143
|
+
-d '{"cmd": "request.get", "url": "https://example.com"}'
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Get 10% off with code `PATCHRIGHT`
|
|
147
|
+
|
|
148
|
+
[Documentation](https://scrappey.com/docs?utm_source=patchright&utm_medium=github&utm_campaign=repo_readme) · [Discord](https://scrappey.com/discord?utm_source=patchright&utm_medium=github&utm_campaign=repo_readme) · [Get an API key](https://scrappey.com?utm_source=patchright&utm_medium=github&utm_campaign=repo_readme)
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
[<img height="120" alt="ProxyLane Banner" src="https://github.com/user-attachments/assets/bd71e54a-9a5d-4047-bacf-d2f154f61dc4" />](https://proxylane.dev/?utm_source=patchright&utm_medium=partnership&utm_campaign=patchright_sponsor_202610&utm_content=readme)
|
|
153
|
+
</br>
|
|
154
|
+
|
|
155
|
+
#### [ProxyLane](https://proxylane.dev/?utm_source=patchright&utm_medium=partnership&utm_campaign=patchright_sponsor_202610&utm_content=readme): Residential Proxies that keep each Patchright profile consistent.
|
|
156
|
+
|
|
157
|
+
To match the reported timezone to your proxy, give each profile its own sticky IP pinned to a city and set the same timezone:
|
|
158
|
+
|
|
159
|
+
```py
|
|
160
|
+
context = playwright.chromium.launch_persistent_context(
|
|
161
|
+
user_data_dir="...", channel="chrome", headless=False, no_viewport=True,
|
|
162
|
+
proxy={"server": "http://us.gw.proxylane.dev:10000",
|
|
163
|
+
"username": "USER_c_US_city_Chicago_s_profile1", # one sticky IP per profile
|
|
164
|
+
"password": "PASS"},
|
|
165
|
+
timezone_id="America/Chicago", locale="en-US", # match the proxy city
|
|
166
|
+
)
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
<sup>Tip: set `--webrtc-ip-handling-policy=disable_non_proxied_udp`, otherwise [WebRTC exposes your real IP](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python/issues/47).</sup>
|
|
170
|
+
|
|
171
|
+
:earth_africa: 28M residential IPs in 195 countries, city, ZIP and ASN targeting
|
|
172
|
+
</br>
|
|
173
|
+
:stopwatch: Sticky sessions up to 72h, HTTP and SOCKS5
|
|
174
|
+
</br>
|
|
175
|
+
:money_with_wings: From $2/GB, traffic never expires
|
|
176
|
+
|
|
177
|
+
:fire: **PATCHLANE35** - **35% off** for Patchright users
|
|
178
|
+
|
|
179
|
+
<sup>Paste the snippet, add your credentials and run your next Patchright session on a real residential IP with [ProxyLane](https://proxylane.dev/?utm_source=patchright&utm_medium=partnership&utm_campaign=patchright_sponsor_202610&utm_content=readme_caption).</sup>
|
|
180
|
+
|
|
181
|
+
</details>
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Patches
|
|
186
|
+
|
|
187
|
+
### [Runtime.enable](https://vanilla.aslushnikov.com/?Runtime.enable) Leak
|
|
188
|
+
This is the biggest Patch Patchright uses. To avoid detection by this leak, patchright avoids using [Runtime.enable](https://vanilla.aslushnikov.com/?Runtime.enable) by executing Javascript in (isolated) ExecutionContexts.
|
|
189
|
+
|
|
190
|
+
### [Console.enable](https://vanilla.aslushnikov.com/?Console.enable) Leak
|
|
191
|
+
Patchright patches this leak by disabling the Console API all together. This means, console functionality will not work in Patchright. If you really need the console, you might be better off using Javascript loggers, although they also can be easily detected.
|
|
192
|
+
|
|
193
|
+
### Command Flags Leaks
|
|
194
|
+
Patchright tweaks the Playwright Default Args to avoid detection by Command Flag Leaks. This (most importantly) affects:
|
|
195
|
+
- `--disable-blink-features=AutomationControlled` (added) to avoid navigator.webdriver detection.
|
|
196
|
+
- `--enable-automation` (removed) to avoid navigator.webdriver detection.
|
|
197
|
+
- `--disable-popup-blocking` (removed) to avoid popup crashing.
|
|
198
|
+
- `--disable-component-update` (removed) to avoid detection as a Stealth Driver.
|
|
199
|
+
- `--disable-default-apps` (removed) to enable default apps.
|
|
200
|
+
- `--disable-extensions` (removed) to enable extensions
|
|
201
|
+
|
|
202
|
+
### General Leaks
|
|
203
|
+
Patchright patches some general leaks in the Playwright codebase. This mainly includes poor setups and obvious detection points.
|
|
204
|
+
|
|
205
|
+
### Closed Shadow Roots
|
|
206
|
+
Patchright is able to interact with elements in Closed Shadow Roots. Just use normal locators and Patchright will do the rest.
|
|
207
|
+
<br/>
|
|
208
|
+
Patchright is now also able to use XPaths in Closed Shadow Roots.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Stealth
|
|
213
|
+
|
|
214
|
+
With the right setup, Patchright currently is considered undetectable.
|
|
215
|
+
Patchright passes:
|
|
216
|
+
- [Brotector](https://kaliiiiiiiiii.github.io/brotector/) ✅ (with [CDP-Patches](https://github.com/Kaliiiiiiiiii-Vinyzu/CDP-Patches/))
|
|
217
|
+
- [Cloudflare](https://cloudflare.com/) ✅
|
|
218
|
+
- [Kasada](https://www.kasada.io/) ✅
|
|
219
|
+
- [Akamai](https://www.akamai.com/products/bot-manager/) ✅
|
|
220
|
+
- [Shape/F5](https://www.f5.com/) ✅
|
|
221
|
+
- [Bet365](https://bet365.com/) ✅
|
|
222
|
+
- [Datadome](https://datadome.co/products/bot-protection/) ✅
|
|
223
|
+
- [Fingerprint.com](https://fingerprint.com/products/bot-detection/) ✅
|
|
224
|
+
- [CreepJS](https://abrahamjuliot.github.io/creepjs/) ✅
|
|
225
|
+
- [Sannysoft](https://bot.sannysoft.com/) ✅
|
|
226
|
+
- [Incolumitas](https://bot.incolumitas.com/) ✅
|
|
227
|
+
- [IPHey](https://iphey.com/) ✅
|
|
228
|
+
- [Browserscan](https://browserscan.net/) ✅
|
|
229
|
+
- [Pixelscan](https://pixelscan.net/) ✅
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Bugs
|
|
234
|
+
#### Even though we have spent a lot of time to make Patchright as stable as possible, bugs may still occur. If you encounter any bugs, please report them in the [Issues](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright/issues).
|
|
235
|
+
#### Patchright is now tested against the Playwright Tests after every release. See [here](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python/actions/workflows/patchright_tests.yml)
|
|
236
|
+
|
|
237
|
+
> [!WARNING]
|
|
238
|
+
> Patchright passes most, but not all the Playwright tests. Some bugs are considered impossible to solve, some are just not relevant. See the list of bugs and their explanation [here](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright/issues/30).
|
|
239
|
+
|
|
240
|
+
#### Based on the Playwright Tests, we concluded that its highly unlikely that you will be affected by these bugs in regular usecases.
|
|
241
|
+
|
|
242
|
+
<details>
|
|
243
|
+
<summary><b>Init Script Shenanigans</b></summary>
|
|
244
|
+
|
|
245
|
+
### Explanation
|
|
246
|
+
To be able to use InitScripts without [Runtime.enable](https://vanilla.aslushnikov.com/?Runtime.enable), Patchright uses Playwright Routes to inject JavaScript into HTML requests.
|
|
247
|
+
|
|
248
|
+
### Bugs
|
|
249
|
+
Playwright Routes may cause some bugs in other parts of your code. Patchright InitScripts won't cause any bugs that wouldn't be caused by normal Playwright Routes. </br> If you want any of these bugs fixed, you'll have to contact the Playwright team.
|
|
250
|
+
|
|
251
|
+
### Leaks
|
|
252
|
+
Patchright InitScripts can be detected by Timing Attacks. However, no antibot currently checks for this kind of Timing Attack and they probably won't for a good amount of time. </br> We consider them not to be a big risk of detection.
|
|
253
|
+
|
|
254
|
+
</details>
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
### TODO
|
|
259
|
+
- [x] Implement Option to choose Execution Context (Main/Isolated).
|
|
260
|
+
- [x] Fix Fixable Bugs.
|
|
261
|
+
- [x] Implement .patch Updater to easily show Patchright's patches.
|
|
262
|
+
- [x] Setup Automated Testing on new Release.
|
|
263
|
+
- [x] Implement Patchright on .NET.
|
|
264
|
+
- [ ] Implement Patchright on Java.
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## Development
|
|
269
|
+
|
|
270
|
+
Deployment of new Patchright versions are automatic, but bugs due to Playwright codebase changes may occur. Fixes for these bugs might take a few days to be released.
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Support our work
|
|
275
|
+
|
|
276
|
+
If you choose to support our work, please contact [@vinyzu](https://discord.com/users/935224495126487150) or [@steve_abcdef](https://discord.com/users/936292409426477066) on Discord.
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Copyright and License
|
|
281
|
+
© [Vinyzu](https://github.com/Vinyzu/)
|
|
282
|
+
|
|
283
|
+
Patchright is licensed [Apache 2.0](https://choosealicense.com/licenses/apache-2.0/)
|
|
284
|
+
|
|
285
|
+
[Some Parts](https://github.com/Kaliiiiiiiiii-Vinyzu/patchright/blob/10c5a090e9a1dcd2107c253d65b3d8b27d0670a9/driver_patches/framesPatch.ts#L156-L171) of the Codebase are inspired by [Driverless](https://github.com/kaliiiiiiiiii/Selenium-Driverless).
|
|
286
|
+
Thanks to [Nick Webson](https://github.com/rebrowser/rebrowser-patches) for the idea of .patch-File Documentation.
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Disclaimer
|
|
291
|
+
|
|
292
|
+
This repository is provided for **educational purposes only**. \
|
|
293
|
+
No warranties are provided regarding accuracy, completeness, or suitability for any purpose. **Use at your own risk**—the authors and maintainers assume **no liability** for **any damages**, **legal issues**, or **warranty breaches** resulting from use, modification, or distribution of this code.\
|
|
294
|
+
**Any misuse or legal violations are the sole responsibility of the user**.
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## Authors
|
|
299
|
+
|
|
300
|
+
#### Active Maintainer: [Vinyzu](https://github.com/Vinyzu/) </br> Co-Maintainer: [Kaliiiiiiiiii](https://github.com/kaliiiiiiiiii/)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
microsoft/playwright
|
|
2
|
+
|
|
3
|
+
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
|
|
4
|
+
|
|
5
|
+
This package bundles third-party software inside individual files under
|
|
6
|
+
`lib/`. Each bundled output has a sidecar `<bundle>.js.LICENSE` file next
|
|
7
|
+
to it listing every npm package whose source was inlined into that
|
|
8
|
+
bundle, together with the full license text for each.
|
|
9
|
+
|
|
10
|
+
For example:
|
|
11
|
+
- lib/common/index.js.LICENSE
|
|
12
|
+
- lib/matchers/expect.js.LICENSE
|
|
13
|
+
|
|
14
|
+
This project incorporates components from the projects listed below. The original copyright notices and the licenses under which Microsoft received such components are set forth below. Microsoft reserves all rights not expressly granted herein, whether by implication, estoppel or otherwise.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) Microsoft Corporation.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const { program } = require('./lib/program');
|
|
19
|
+
program.parse(process.argv);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export * from 'patchright-core';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
module.exports = require('patchright-core');
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export * from 'patchright-core';
|
|
17
|
+
import playwright from 'patchright-core';
|
|
18
|
+
export default playwright;
|
|
@@ -0,0 +1,89 @@
|
|
|
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 agentParser_exports = {};
|
|
30
|
+
__export(agentParser_exports, {
|
|
31
|
+
parseAgentSpec: () => parseAgentSpec
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(agentParser_exports);
|
|
34
|
+
var import_fs = __toESM(require("fs"));
|
|
35
|
+
const yaml = require("patchright-core/lib/utilsBundle").yaml;
|
|
36
|
+
async function parseAgentSpec(filePath) {
|
|
37
|
+
const source = await import_fs.default.promises.readFile(filePath, "utf-8");
|
|
38
|
+
const { header, content } = extractYamlAndContent(source);
|
|
39
|
+
const { instructions, examples } = extractInstructionsAndExamples(content);
|
|
40
|
+
return {
|
|
41
|
+
...header,
|
|
42
|
+
instructions,
|
|
43
|
+
examples
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function extractYamlAndContent(markdown) {
|
|
47
|
+
const lines = markdown.split("\n");
|
|
48
|
+
if (lines[0] !== "---")
|
|
49
|
+
throw new Error("Markdown file must start with YAML front matter (---)");
|
|
50
|
+
let yamlEndIndex = -1;
|
|
51
|
+
for (let i = 1; i < lines.length; i++) {
|
|
52
|
+
if (lines[i] === "---") {
|
|
53
|
+
yamlEndIndex = i;
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
if (yamlEndIndex === -1)
|
|
58
|
+
throw new Error("YAML front matter must be closed with ---");
|
|
59
|
+
const yamlLines = lines.slice(1, yamlEndIndex);
|
|
60
|
+
const yamlRaw = yamlLines.join("\n");
|
|
61
|
+
const contentLines = lines.slice(yamlEndIndex + 1);
|
|
62
|
+
const content = contentLines.join("\n");
|
|
63
|
+
let header;
|
|
64
|
+
try {
|
|
65
|
+
header = yaml.parse(yamlRaw);
|
|
66
|
+
} catch (error) {
|
|
67
|
+
throw new Error(`Failed to parse YAML header: ${error.message}`);
|
|
68
|
+
}
|
|
69
|
+
if (!header.name)
|
|
70
|
+
throw new Error('YAML header must contain a "name" field');
|
|
71
|
+
if (!header.description)
|
|
72
|
+
throw new Error('YAML header must contain a "description" field');
|
|
73
|
+
return { header, content };
|
|
74
|
+
}
|
|
75
|
+
function extractInstructionsAndExamples(content) {
|
|
76
|
+
const examples = [];
|
|
77
|
+
const instructions = content.split("<example>")[0].trim();
|
|
78
|
+
const exampleRegex = /<example>([\s\S]*?)<\/example>/g;
|
|
79
|
+
let match;
|
|
80
|
+
while ((match = exampleRegex.exec(content)) !== null) {
|
|
81
|
+
const example = match[1].trim();
|
|
82
|
+
examples.push(example.replace(/[\n]/g, " ").replace(/ +/g, " "));
|
|
83
|
+
}
|
|
84
|
+
return { instructions, examples };
|
|
85
|
+
}
|
|
86
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
87
|
+
0 && (module.exports = {
|
|
88
|
+
parseAgentSpec
|
|
89
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: "Copilot Setup Steps"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
paths:
|
|
7
|
+
- .github/workflows/copilot-setup-steps.yml
|
|
8
|
+
pull_request:
|
|
9
|
+
paths:
|
|
10
|
+
- .github/workflows/copilot-setup-steps.yml
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
copilot-setup-steps:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v6
|
|
21
|
+
|
|
22
|
+
- uses: actions/setup-node@v6
|
|
23
|
+
with:
|
|
24
|
+
node-version: lts/*
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: npm ci
|
|
28
|
+
|
|
29
|
+
- name: Install Playwright Browsers
|
|
30
|
+
run: npx playwright install --with-deps
|
|
31
|
+
|
|
32
|
+
# Customize this step as needed
|
|
33
|
+
- name: Build application
|
|
34
|
+
run: npx run build
|