@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
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { Agent } from ".";
|
|
2
|
-
import { BrowserConnector } from "@/connectors/browserConnector";
|
|
3
|
-
import { buildDefaultBrowserAgentOptions } from "@/ai/util";
|
|
4
|
-
import { narrateBrowserAgent } from "./narrator";
|
|
5
|
-
import { partitionHtml, serializeToMarkdown } from 'magnitude-extract';
|
|
6
|
-
import EventEmitter from "eventemitter3";
|
|
7
|
-
import { retry } from "@/common/retry";
|
|
8
|
-
import { checkOperation } from '@/common/operation';
|
|
9
|
-
// export interface StartAgentWithWebOptions {
|
|
10
|
-
// agentBaseOptions?: Partial<AgentOptions>;
|
|
11
|
-
// webConnectorOptions?: BrowserConnectorOptions;
|
|
12
|
-
// }
|
|
13
|
-
const DEFAULT_BROWSER_AGENT_TEMP = 0.2;
|
|
14
|
-
// Helper function to start a web agent
|
|
15
|
-
export async function startBrowserAgent(options //StartAgentWithWebOptions = {}
|
|
16
|
-
) {
|
|
17
|
-
//console.log("sba options:", options);
|
|
18
|
-
const { agentOptions, browserOptions } = buildDefaultBrowserAgentOptions({ agentOptions: options ?? {}, browserOptions: options ?? {} });
|
|
19
|
-
const agent = new BrowserAgent({
|
|
20
|
-
agentOptions: agentOptions,
|
|
21
|
-
browserOptions: browserOptions,
|
|
22
|
-
});
|
|
23
|
-
if (options?.narrate || process.env.MAGNITUDE_NARRATE) {
|
|
24
|
-
narrateBrowserAgent(agent);
|
|
25
|
-
//agent.events.on('actionStarted', (action: any) => { console.log(action) })
|
|
26
|
-
}
|
|
27
|
-
//console.log('starting agent')
|
|
28
|
-
await agent.start();
|
|
29
|
-
//console.log('agent started');
|
|
30
|
-
return agent;
|
|
31
|
-
}
|
|
32
|
-
async function getFullPageContent(page) {
|
|
33
|
-
checkOperation();
|
|
34
|
-
// 1. Get all iframe element handles
|
|
35
|
-
const iframeHandles = await page.locator('iframe').elementHandles();
|
|
36
|
-
// 2. Iterate through each iframe handle
|
|
37
|
-
for (const iframeHandle of iframeHandles) {
|
|
38
|
-
checkOperation();
|
|
39
|
-
// 3. Get the Frame object for the iframe
|
|
40
|
-
const frame = await iframeHandle.contentFrame();
|
|
41
|
-
checkOperation();
|
|
42
|
-
if (frame) {
|
|
43
|
-
// 4. Get the HTML content of the iframe
|
|
44
|
-
const iframeContent = await frame.content();
|
|
45
|
-
checkOperation();
|
|
46
|
-
// 5. Use evaluate to replace the iframe element with its content.
|
|
47
|
-
// We pass the content as an argument to avoid issues with string escaping.
|
|
48
|
-
await iframeHandle.evaluate((iframeNode, { content }) => {
|
|
49
|
-
// Create a new div element to hold the iframe's content
|
|
50
|
-
const div = document.createElement('div');
|
|
51
|
-
// Use DOMParser to handle Trusted Types restrictions
|
|
52
|
-
const parser = new DOMParser();
|
|
53
|
-
const doc = parser.parseFromString(content, 'text/html');
|
|
54
|
-
// Move all body children to the div
|
|
55
|
-
while (doc.body.firstChild) {
|
|
56
|
-
div.appendChild(doc.body.firstChild);
|
|
57
|
-
}
|
|
58
|
-
// Also preserve any head elements that might be important (styles, etc)
|
|
59
|
-
const headElements = doc.head.querySelectorAll('style, link[rel="stylesheet"]');
|
|
60
|
-
headElements.forEach(el => div.appendChild(el.cloneNode(true)));
|
|
61
|
-
// Add a data-attribute to mark that this was an expanded iframe
|
|
62
|
-
div.dataset.expandedFromIframe = 'true';
|
|
63
|
-
div.dataset.iframeSrc = iframeNode.getAttribute('src') || '';
|
|
64
|
-
// Replace the iframeNode with the new div
|
|
65
|
-
iframeNode.parentNode?.replaceChild(div, iframeNode);
|
|
66
|
-
}, { content: iframeContent });
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
// 6. Return the final, modified page content
|
|
70
|
-
checkOperation();
|
|
71
|
-
return page.content();
|
|
72
|
-
}
|
|
73
|
-
export class BrowserAgent extends Agent {
|
|
74
|
-
browserAgentEvents = new EventEmitter();
|
|
75
|
-
constructor({ agentOptions, browserOptions }) {
|
|
76
|
-
//console.log("agent options:", agent);
|
|
77
|
-
//console.log("browser options:", browserOptions);
|
|
78
|
-
super({
|
|
79
|
-
...agentOptions,
|
|
80
|
-
connectors: [new BrowserConnector(browserOptions || {}), ...(agentOptions?.connectors ?? [])]
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
get page() {
|
|
84
|
-
return this.require(BrowserConnector).getHarness().page;
|
|
85
|
-
}
|
|
86
|
-
get context() {
|
|
87
|
-
return this.require(BrowserConnector).getHarness().context;
|
|
88
|
-
}
|
|
89
|
-
async nav(url, options = {}) {
|
|
90
|
-
return this.runOperation(options, async () => {
|
|
91
|
-
this.browserAgentEvents.emit('nav', url);
|
|
92
|
-
checkOperation();
|
|
93
|
-
await this.require(BrowserConnector).getHarness().navigate(url);
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
async extract(instructions, schema, options = {}) {
|
|
97
|
-
return this.runOperation(options, () => this._extract(instructions, schema));
|
|
98
|
-
}
|
|
99
|
-
async _extract(instructions, schema) {
|
|
100
|
-
this.browserAgentEvents.emit('extractStarted', instructions, schema);
|
|
101
|
-
//const htmlContent = await this.page.content();
|
|
102
|
-
const htmlContent = await retry(async () => await getFullPageContent(this.page), { retries: 5, delay: 200, exponential: true });
|
|
103
|
-
// const accessibilityTree = await this.page.accessibility.snapshot({ interestingOnly: true });
|
|
104
|
-
// const pageRepr = renderMinimalAccessibilityTree(accessibilityTree);
|
|
105
|
-
const partitionOptions = {
|
|
106
|
-
extractImages: true,
|
|
107
|
-
extractForms: true,
|
|
108
|
-
extractLinks: true,
|
|
109
|
-
skipNavigation: false, // NAVIGATION SKIPPING IS BROKEN
|
|
110
|
-
minTextLength: 3,
|
|
111
|
-
includeOriginalHtml: false,
|
|
112
|
-
includeMetadata: true
|
|
113
|
-
};
|
|
114
|
-
// Process HTML
|
|
115
|
-
const result = partitionHtml(htmlContent, partitionOptions);
|
|
116
|
-
// Configure markdown serializer options
|
|
117
|
-
const markdownOptions = {
|
|
118
|
-
includeMetadata: false,
|
|
119
|
-
includePageNumbers: true,
|
|
120
|
-
includeElementIds: false,
|
|
121
|
-
includeCoordinates: false,
|
|
122
|
-
preserveHierarchy: true,
|
|
123
|
-
escapeSpecialChars: true,
|
|
124
|
-
includeFormFields: true,
|
|
125
|
-
includeImageMetadata: true
|
|
126
|
-
};
|
|
127
|
-
// Convert to markdown
|
|
128
|
-
const markdown = serializeToMarkdown(result, markdownOptions);
|
|
129
|
-
const screenshot = await this.require(BrowserConnector).getHarness().screenshot();
|
|
130
|
-
checkOperation();
|
|
131
|
-
const data = await this.models.extract(instructions, schema, screenshot, markdown);
|
|
132
|
-
checkOperation();
|
|
133
|
-
this.browserAgentEvents.emit('extractDone', instructions, data);
|
|
134
|
-
return data;
|
|
135
|
-
}
|
|
136
|
-
}
|
package/dist/agent/errors.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export interface AgentErrorOptions {
|
|
2
|
-
variant?: string;
|
|
3
|
-
adaptable?: boolean;
|
|
4
|
-
}
|
|
5
|
-
export declare class AgentError extends Error {
|
|
6
|
-
readonly options: Required<AgentErrorOptions>;
|
|
7
|
-
constructor(message: string, options?: AgentErrorOptions);
|
|
8
|
-
}
|
|
9
|
-
export declare class ActionLimitError extends AgentError {
|
|
10
|
-
readonly limit: number;
|
|
11
|
-
constructor(limit: number);
|
|
12
|
-
}
|
|
13
|
-
export declare class OperationCancelledError extends AgentError {
|
|
14
|
-
constructor(reason?: unknown);
|
|
15
|
-
}
|
|
16
|
-
export declare class OperationDeadlineError extends AgentError {
|
|
17
|
-
readonly deadline: number;
|
|
18
|
-
constructor(deadline: number);
|
|
19
|
-
}
|
|
20
|
-
export declare class AgentBusyError extends AgentError {
|
|
21
|
-
constructor();
|
|
22
|
-
}
|
package/dist/agent/errors.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
// export class AgentError extends Error {
|
|
2
|
-
// public readonly failure: FailureDescriptor;
|
|
3
|
-
// public readonly options: Required<AgentErrorOptions>;
|
|
4
|
-
// constructor(failure: FailureDescriptor, options: AgentErrorOptions = {}) {
|
|
5
|
-
// super(`${failure.variant}: ${JSON.stringify(failure.variant, null, 4)}`);
|
|
6
|
-
// this.options = {
|
|
7
|
-
// adaptable: options.adaptable ?? false
|
|
8
|
-
// };
|
|
9
|
-
// this.failure = failure;
|
|
10
|
-
// }
|
|
11
|
-
// }
|
|
12
|
-
export class AgentError extends Error {
|
|
13
|
-
//public readonly failure: FailureDescriptor;
|
|
14
|
-
options;
|
|
15
|
-
constructor(message, options = {}) {
|
|
16
|
-
// super(`${failure.variant}: ${JSON.stringify(failure.variant, null, 4)}`);
|
|
17
|
-
super(message);
|
|
18
|
-
this.options = {
|
|
19
|
-
variant: options.variant ?? 'unknown',
|
|
20
|
-
adaptable: options.adaptable ?? false,
|
|
21
|
-
};
|
|
22
|
-
// if (options.variant !== 'unknown') {
|
|
23
|
-
// super(`${failure.variant}: ${JSON.stringify(failure.variant, null, 4)}`);
|
|
24
|
-
// }
|
|
25
|
-
//this.options = options;
|
|
26
|
-
//this.failure = failure;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
export class ActionLimitError extends AgentError {
|
|
30
|
-
limit;
|
|
31
|
-
constructor(limit) {
|
|
32
|
-
super(`Task did not finish within ${limit} actions`, { variant: 'action_limit' });
|
|
33
|
-
this.limit = limit;
|
|
34
|
-
this.name = 'ActionLimitError';
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
export class OperationCancelledError extends AgentError {
|
|
38
|
-
constructor(reason) {
|
|
39
|
-
super('Operation cancelled', { variant: 'cancelled' });
|
|
40
|
-
this.name = 'OperationCancelledError';
|
|
41
|
-
this.cause = reason;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
export class OperationDeadlineError extends AgentError {
|
|
45
|
-
deadline;
|
|
46
|
-
constructor(deadline) {
|
|
47
|
-
super('Operation deadline exceeded', { variant: 'deadline' });
|
|
48
|
-
this.deadline = deadline;
|
|
49
|
-
this.name = 'OperationDeadlineError';
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
export class AgentBusyError extends AgentError {
|
|
53
|
-
constructor() {
|
|
54
|
-
super('Agent has an active operation; await whenIdle() before reusing it', { variant: 'busy' });
|
|
55
|
-
this.name = 'AgentBusyError';
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
// // Agent will only throw these types of errors
|
|
59
|
-
// import { ActionIngredient } from "./recipe/types";
|
|
60
|
-
// import { WebAction } from "./web/types";
|
|
61
|
-
// export class TestCaseError extends Error {};
|
|
62
|
-
// // Base class for wrapping errors
|
|
63
|
-
// class WrapperError extends TestCaseError {
|
|
64
|
-
// public readonly originalError: Error;
|
|
65
|
-
// constructor(message: string, originalError: Error) {
|
|
66
|
-
// super(`${message} - ${originalError.message}`);
|
|
67
|
-
// this.name = this.constructor.name;
|
|
68
|
-
// this.originalError = originalError;
|
|
69
|
-
// // Preserve the stack trace
|
|
70
|
-
// if (Error.captureStackTrace) {
|
|
71
|
-
// Error.captureStackTrace(this, this.constructor);
|
|
72
|
-
// }
|
|
73
|
-
// }
|
|
74
|
-
// }
|
|
75
|
-
// export class NavigationError extends WrapperError {
|
|
76
|
-
// public readonly url: string;
|
|
77
|
-
// constructor(url: string, originalError: Error) {
|
|
78
|
-
// super(`Failed to navigate to URL: ${url}`, originalError);
|
|
79
|
-
// this.url = url;
|
|
80
|
-
// }
|
|
81
|
-
// }
|
|
82
|
-
// export class ActionExecutionError extends WrapperError {
|
|
83
|
-
// public readonly action: WebAction;
|
|
84
|
-
// public readonly statusCode?: number;
|
|
85
|
-
// constructor(action: WebAction, originalError: Error) {
|
|
86
|
-
// super(`Browser encountered error while executing action: ${action}`, originalError);
|
|
87
|
-
// this.action = action;
|
|
88
|
-
// }
|
|
89
|
-
// }
|
|
90
|
-
// export class ActionConversionError extends WrapperError {
|
|
91
|
-
// public readonly action: ActionIngredient;
|
|
92
|
-
// public readonly statusCode?: number;
|
|
93
|
-
// constructor(action: ActionIngredient, originalError: Error) {
|
|
94
|
-
// super(`Micro failed to convert action (does the target line up with the screenshot?): ${action}`, originalError);
|
|
95
|
-
// this.action = action;
|
|
96
|
-
// }
|
|
97
|
-
// }
|
package/dist/agent/index.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import EventEmitter from "eventemitter3";
|
|
2
|
-
import z from "zod";
|
|
3
|
-
import { Action } from "@/actions/types";
|
|
4
|
-
import { AgentEvents } from "@/common/events";
|
|
5
|
-
import { AgentConnector } from '@/connectors';
|
|
6
|
-
import { RenderableContent } from '@/memory/observation';
|
|
7
|
-
import { LLMClient } from "@/ai/types";
|
|
8
|
-
import { type OperationOptions } from '@/common/operation';
|
|
9
|
-
import { AgentMemory, MemoryRenderOptions } from "@/memory";
|
|
10
|
-
import { ActionDefinition } from "@/actions";
|
|
11
|
-
import { MultiModelHarness } from '@/ai/multiModelHarness';
|
|
12
|
-
export interface AgentOptions {
|
|
13
|
-
llm?: LLMClient | LLMClient[];
|
|
14
|
-
connectors?: AgentConnector[];
|
|
15
|
-
actions?: ActionDefinition<any>[];
|
|
16
|
-
prompt?: string | null;
|
|
17
|
-
telemetry?: boolean;
|
|
18
|
-
maxActions?: number;
|
|
19
|
-
}
|
|
20
|
-
export interface ActOptions extends OperationOptions {
|
|
21
|
-
prompt?: string;
|
|
22
|
-
data?: RenderableContent;
|
|
23
|
-
memory?: AgentMemory;
|
|
24
|
-
}
|
|
25
|
-
export declare class Agent {
|
|
26
|
-
private options;
|
|
27
|
-
private connectors;
|
|
28
|
-
private actions;
|
|
29
|
-
private memoryOptions;
|
|
30
|
-
readonly models: MultiModelHarness;
|
|
31
|
-
readonly events: EventEmitter<AgentEvents>;
|
|
32
|
-
private doneActing;
|
|
33
|
-
private _paused;
|
|
34
|
-
private _pauseResolve;
|
|
35
|
-
private activeOperation?;
|
|
36
|
-
private idle;
|
|
37
|
-
private stopped;
|
|
38
|
-
protected latestTaskMemory: AgentMemory;
|
|
39
|
-
constructor(baseConfig?: Partial<AgentOptions>);
|
|
40
|
-
getConnector<C extends AgentConnector>(connectorClass: new (...args: any[]) => C): C | undefined;
|
|
41
|
-
require<C extends AgentConnector>(connectorClass: new (...args: any[]) => C): C;
|
|
42
|
-
start(): Promise<void>;
|
|
43
|
-
identifyAction(action: Action): ActionDefinition<any>;
|
|
44
|
-
/** True until underlying work settles, including after a cancelled caller returns. */
|
|
45
|
-
get busy(): boolean;
|
|
46
|
-
whenIdle(): Promise<void>;
|
|
47
|
-
protected runOperation<T>(options: OperationOptions, fn: () => Promise<T>): Promise<T>;
|
|
48
|
-
exec(action: Action, memory?: AgentMemory, options?: OperationOptions): Promise<unknown>;
|
|
49
|
-
private _exec;
|
|
50
|
-
protected _recordConnectorObservations(memory: AgentMemory): Promise<void>;
|
|
51
|
-
get memory(): AgentMemory;
|
|
52
|
-
act(taskOrSteps: string | string[], options?: ActOptions): Promise<void>;
|
|
53
|
-
private _runAct;
|
|
54
|
-
private _traceAct;
|
|
55
|
-
private _buildContext;
|
|
56
|
-
private _act;
|
|
57
|
-
query<T extends z.Schema>(query: string, schema: T, options?: MemoryRenderOptions & OperationOptions): Promise<z.infer<T>>;
|
|
58
|
-
queueDone(): Promise<void>;
|
|
59
|
-
private _waitIfPaused;
|
|
60
|
-
pause(): void;
|
|
61
|
-
resume(): void;
|
|
62
|
-
get paused(): boolean;
|
|
63
|
-
stop(): Promise<void>;
|
|
64
|
-
}
|