dp-worker 0.1.0
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/builtin-skills/sourcepool.md +228 -0
- package/builtin-skills/x.md +263 -0
- package/config.example.json +37 -0
- package/dist/agent/agent-types.d.ts +44 -0
- package/dist/agent/agent-types.js +23 -0
- package/dist/agent/agent-types.js.map +1 -0
- package/dist/agent/agent.d.ts +162 -0
- package/dist/agent/agent.js +670 -0
- package/dist/agent/agent.js.map +1 -0
- package/dist/agent/browser-lock.d.ts +36 -0
- package/dist/agent/browser-lock.js +46 -0
- package/dist/agent/browser-lock.js.map +1 -0
- package/dist/agent/chat-engine.d.ts +87 -0
- package/dist/agent/chat-engine.js +588 -0
- package/dist/agent/chat-engine.js.map +1 -0
- package/dist/agent/chrome-watchdog.d.ts +74 -0
- package/dist/agent/chrome-watchdog.js +136 -0
- package/dist/agent/chrome-watchdog.js.map +1 -0
- package/dist/agent/context.d.ts +148 -0
- package/dist/agent/context.js +521 -0
- package/dist/agent/context.js.map +1 -0
- package/dist/agent/duration.d.ts +2 -0
- package/dist/agent/duration.js +15 -0
- package/dist/agent/duration.js.map +1 -0
- package/dist/agent/executors/attachment-executor.d.ts +19 -0
- package/dist/agent/executors/attachment-executor.js +136 -0
- package/dist/agent/executors/attachment-executor.js.map +1 -0
- package/dist/agent/executors/memory-executor.d.ts +2 -0
- package/dist/agent/executors/memory-executor.js +13 -0
- package/dist/agent/executors/memory-executor.js.map +1 -0
- package/dist/agent/executors/org-executor.d.ts +8 -0
- package/dist/agent/executors/org-executor.js +47 -0
- package/dist/agent/executors/org-executor.js.map +1 -0
- package/dist/agent/executors/scheduler-executor.d.ts +21 -0
- package/dist/agent/executors/scheduler-executor.js +75 -0
- package/dist/agent/executors/scheduler-executor.js.map +1 -0
- package/dist/agent/executors/skill-executor.d.ts +10 -0
- package/dist/agent/executors/skill-executor.js +178 -0
- package/dist/agent/executors/skill-executor.js.map +1 -0
- package/dist/agent/executors/store-executor.d.ts +2 -0
- package/dist/agent/executors/store-executor.js +42 -0
- package/dist/agent/executors/store-executor.js.map +1 -0
- package/dist/agent/executors/web-fetch-executor.d.ts +17 -0
- package/dist/agent/executors/web-fetch-executor.js +164 -0
- package/dist/agent/executors/web-fetch-executor.js.map +1 -0
- package/dist/agent/frontend-multiplexer.d.ts +38 -0
- package/dist/agent/frontend-multiplexer.js +67 -0
- package/dist/agent/frontend-multiplexer.js.map +1 -0
- package/dist/agent/image-generator.d.ts +35 -0
- package/dist/agent/image-generator.js +266 -0
- package/dist/agent/image-generator.js.map +1 -0
- package/dist/agent/image-postprocess.d.ts +25 -0
- package/dist/agent/image-postprocess.js +82 -0
- package/dist/agent/image-postprocess.js.map +1 -0
- package/dist/agent/memory.d.ts +55 -0
- package/dist/agent/memory.js +401 -0
- package/dist/agent/memory.js.map +1 -0
- package/dist/agent/org-manager.d.ts +70 -0
- package/dist/agent/org-manager.js +280 -0
- package/dist/agent/org-manager.js.map +1 -0
- package/dist/agent/scheduler.d.ts +51 -0
- package/dist/agent/scheduler.js +302 -0
- package/dist/agent/scheduler.js.map +1 -0
- package/dist/agent/skill-generator.d.ts +116 -0
- package/dist/agent/skill-generator.js +704 -0
- package/dist/agent/skill-generator.js.map +1 -0
- package/dist/agent/storage-policy.d.ts +55 -0
- package/dist/agent/storage-policy.js +406 -0
- package/dist/agent/storage-policy.js.map +1 -0
- package/dist/agent/store.d.ts +58 -0
- package/dist/agent/store.js +309 -0
- package/dist/agent/store.js.map +1 -0
- package/dist/agent/task-runner.d.ts +34 -0
- package/dist/agent/task-runner.js +705 -0
- package/dist/agent/task-runner.js.map +1 -0
- package/dist/agent/tool-loop-detection.d.ts +60 -0
- package/dist/agent/tool-loop-detection.js +233 -0
- package/dist/agent/tool-loop-detection.js.map +1 -0
- package/dist/agent/tool-runner.d.ts +37 -0
- package/dist/agent/tool-runner.js +72 -0
- package/dist/agent/tool-runner.js.map +1 -0
- package/dist/browser/actions.d.ts +217 -0
- package/dist/browser/actions.js +3097 -0
- package/dist/browser/actions.js.map +1 -0
- package/dist/browser/builtin-page-cleanups.d.ts +19 -0
- package/dist/browser/builtin-page-cleanups.js +111 -0
- package/dist/browser/builtin-page-cleanups.js.map +1 -0
- package/dist/browser/chrome-process.d.ts +55 -0
- package/dist/browser/chrome-process.js +288 -0
- package/dist/browser/chrome-process.js.map +1 -0
- package/dist/browser/dispatch.d.ts +32 -0
- package/dist/browser/dispatch.js +582 -0
- package/dist/browser/dispatch.js.map +1 -0
- package/dist/browser/dom-helpers.d.ts +68 -0
- package/dist/browser/dom-helpers.js +477 -0
- package/dist/browser/dom-helpers.js.map +1 -0
- package/dist/browser/expect.d.ts +66 -0
- package/dist/browser/expect.js +314 -0
- package/dist/browser/expect.js.map +1 -0
- package/dist/browser/humanize.d.ts +56 -0
- package/dist/browser/humanize.js +216 -0
- package/dist/browser/humanize.js.map +1 -0
- package/dist/browser/locator-resolver.d.ts +88 -0
- package/dist/browser/locator-resolver.js +302 -0
- package/dist/browser/locator-resolver.js.map +1 -0
- package/dist/browser/manager.d.ts +95 -0
- package/dist/browser/manager.js +389 -0
- package/dist/browser/manager.js.map +1 -0
- package/dist/browser/script-runner.d.ts +117 -0
- package/dist/browser/script-runner.js +305 -0
- package/dist/browser/script-runner.js.map +1 -0
- package/dist/browser/selectors.d.ts +41 -0
- package/dist/browser/selectors.js +165 -0
- package/dist/browser/selectors.js.map +1 -0
- package/dist/browser/snapshot.d.ts +129 -0
- package/dist/browser/snapshot.js +504 -0
- package/dist/browser/snapshot.js.map +1 -0
- package/dist/browser/workspace-lock.d.ts +37 -0
- package/dist/browser/workspace-lock.js +286 -0
- package/dist/browser/workspace-lock.js.map +1 -0
- package/dist/center/center-client.d.ts +124 -0
- package/dist/center/center-client.js +316 -0
- package/dist/center/center-client.js.map +1 -0
- package/dist/center/center-frontend.d.ts +92 -0
- package/dist/center/center-frontend.js +459 -0
- package/dist/center/center-frontend.js.map +1 -0
- package/dist/center/session-sync.d.ts +85 -0
- package/dist/center/session-sync.js +345 -0
- package/dist/center/session-sync.js.map +1 -0
- package/dist/config/center-config.d.ts +60 -0
- package/dist/config/center-config.js +92 -0
- package/dist/config/center-config.js.map +1 -0
- package/dist/config/types.d.ts +93 -0
- package/dist/config/types.js +136 -0
- package/dist/config/types.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +395 -0
- package/dist/index.js.map +1 -0
- package/dist/llm/client.d.ts +24 -0
- package/dist/llm/client.js +696 -0
- package/dist/llm/client.js.map +1 -0
- package/dist/llm/message-optimizer.d.ts +50 -0
- package/dist/llm/message-optimizer.js +337 -0
- package/dist/llm/message-optimizer.js.map +1 -0
- package/dist/llm/tools.d.ts +37 -0
- package/dist/llm/tools.js +895 -0
- package/dist/llm/tools.js.map +1 -0
- package/dist/llm/types.d.ts +96 -0
- package/dist/llm/types.js +2 -0
- package/dist/llm/types.js.map +1 -0
- package/dist/logging/logger.d.ts +17 -0
- package/dist/logging/logger.js +54 -0
- package/dist/logging/logger.js.map +1 -0
- package/dist/scripts/migrate-history-to-store.d.ts +2 -0
- package/dist/scripts/migrate-history-to-store.js +250 -0
- package/dist/scripts/migrate-history-to-store.js.map +1 -0
- package/dist/telegram/bot.d.ts +28 -0
- package/dist/telegram/bot.js +546 -0
- package/dist/telegram/bot.js.map +1 -0
- package/dist/tui/tui.d.ts +12 -0
- package/dist/tui/tui.js +177 -0
- package/dist/tui/tui.js.map +1 -0
- package/dist/utils/safe-slice.d.ts +25 -0
- package/dist/utils/safe-slice.js +43 -0
- package/dist/utils/safe-slice.js.map +1 -0
- package/node_modules/dp-shared/dist/admin-broadcast.d.ts +26 -0
- package/node_modules/dp-shared/dist/admin-broadcast.d.ts.map +1 -0
- package/node_modules/dp-shared/dist/admin-broadcast.js +7 -0
- package/node_modules/dp-shared/dist/admin-broadcast.js.map +1 -0
- package/node_modules/dp-shared/dist/audit-contracts.d.ts +41 -0
- package/node_modules/dp-shared/dist/audit-contracts.d.ts.map +1 -0
- package/node_modules/dp-shared/dist/audit-contracts.js +30 -0
- package/node_modules/dp-shared/dist/audit-contracts.js.map +1 -0
- package/node_modules/dp-shared/dist/configs-contracts.d.ts +187 -0
- package/node_modules/dp-shared/dist/configs-contracts.d.ts.map +1 -0
- package/node_modules/dp-shared/dist/configs-contracts.js +165 -0
- package/node_modules/dp-shared/dist/configs-contracts.js.map +1 -0
- package/node_modules/dp-shared/dist/db-rows.d.ts +293 -0
- package/node_modules/dp-shared/dist/db-rows.d.ts.map +1 -0
- package/node_modules/dp-shared/dist/db-rows.js +222 -0
- package/node_modules/dp-shared/dist/db-rows.js.map +1 -0
- package/node_modules/dp-shared/dist/deploy-contracts.d.ts +34 -0
- package/node_modules/dp-shared/dist/deploy-contracts.d.ts.map +1 -0
- package/node_modules/dp-shared/dist/deploy-contracts.js +32 -0
- package/node_modules/dp-shared/dist/deploy-contracts.js.map +1 -0
- package/node_modules/dp-shared/dist/domain.d.ts +144 -0
- package/node_modules/dp-shared/dist/domain.d.ts.map +1 -0
- package/node_modules/dp-shared/dist/domain.js +81 -0
- package/node_modules/dp-shared/dist/domain.js.map +1 -0
- package/node_modules/dp-shared/dist/identities.d.ts +35 -0
- package/node_modules/dp-shared/dist/identities.d.ts.map +1 -0
- package/node_modules/dp-shared/dist/identities.js +27 -0
- package/node_modules/dp-shared/dist/identities.js.map +1 -0
- package/node_modules/dp-shared/dist/index.d.ts +24 -0
- package/node_modules/dp-shared/dist/index.d.ts.map +1 -0
- package/node_modules/dp-shared/dist/index.js +24 -0
- package/node_modules/dp-shared/dist/index.js.map +1 -0
- package/node_modules/dp-shared/dist/rest-contracts.d.ts +459 -0
- package/node_modules/dp-shared/dist/rest-contracts.d.ts.map +1 -0
- package/node_modules/dp-shared/dist/rest-contracts.js +318 -0
- package/node_modules/dp-shared/dist/rest-contracts.js.map +1 -0
- package/node_modules/dp-shared/dist/task-history-contracts.d.ts +210 -0
- package/node_modules/dp-shared/dist/task-history-contracts.d.ts.map +1 -0
- package/node_modules/dp-shared/dist/task-history-contracts.js +99 -0
- package/node_modules/dp-shared/dist/task-history-contracts.js.map +1 -0
- package/node_modules/dp-shared/dist/worker-detail-contracts.d.ts +212 -0
- package/node_modules/dp-shared/dist/worker-detail-contracts.d.ts.map +1 -0
- package/node_modules/dp-shared/dist/worker-detail-contracts.js +193 -0
- package/node_modules/dp-shared/dist/worker-detail-contracts.js.map +1 -0
- package/node_modules/dp-shared/dist/ws-protocol.d.ts +839 -0
- package/node_modules/dp-shared/dist/ws-protocol.d.ts.map +1 -0
- package/node_modules/dp-shared/dist/ws-protocol.js +264 -0
- package/node_modules/dp-shared/dist/ws-protocol.js.map +1 -0
- package/node_modules/dp-shared/package.json +31 -0
- package/node_modules/zod/LICENSE +21 -0
- package/node_modules/zod/README.md +191 -0
- package/node_modules/zod/index.cjs +33 -0
- package/node_modules/zod/index.d.cts +4 -0
- package/node_modules/zod/index.d.ts +4 -0
- package/node_modules/zod/index.js +4 -0
- package/node_modules/zod/locales/index.cjs +17 -0
- package/node_modules/zod/locales/index.d.cts +1 -0
- package/node_modules/zod/locales/index.d.ts +1 -0
- package/node_modules/zod/locales/index.js +1 -0
- package/node_modules/zod/locales/package.json +7 -0
- package/node_modules/zod/mini/index.cjs +32 -0
- package/node_modules/zod/mini/index.d.cts +3 -0
- package/node_modules/zod/mini/index.d.ts +3 -0
- package/node_modules/zod/mini/index.js +3 -0
- package/node_modules/zod/mini/package.json +7 -0
- package/node_modules/zod/package.json +135 -0
- package/node_modules/zod/src/index.ts +4 -0
- package/node_modules/zod/src/locales/index.ts +1 -0
- package/node_modules/zod/src/mini/index.ts +3 -0
- package/node_modules/zod/src/v3/ZodError.ts +330 -0
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/node_modules/zod/src/v3/errors.ts +13 -0
- package/node_modules/zod/src/v3/external.ts +6 -0
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/node_modules/zod/src/v3/index.ts +4 -0
- package/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
- package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/node_modules/zod/src/v3/tests/function.test.ts +261 -0
- package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
- package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
- package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
- package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
- package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/node_modules/zod/src/v3/types.ts +5138 -0
- package/node_modules/zod/src/v4/classic/checks.ts +32 -0
- package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/node_modules/zod/src/v4/classic/compat.ts +70 -0
- package/node_modules/zod/src/v4/classic/errors.ts +82 -0
- package/node_modules/zod/src/v4/classic/external.ts +52 -0
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +659 -0
- package/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/node_modules/zod/src/v4/classic/iso.ts +90 -0
- package/node_modules/zod/src/v4/classic/parse.ts +82 -0
- package/node_modules/zod/src/v4/classic/schemas.ts +2672 -0
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +59 -0
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +216 -0
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +326 -0
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +573 -0
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +703 -0
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +62 -0
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +302 -0
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +409 -0
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +197 -0
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +694 -0
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +807 -0
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +895 -0
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +360 -0
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +39 -0
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +68 -0
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +939 -0
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +60 -0
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +198 -0
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +46 -0
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +117 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +330 -0
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +325 -0
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +717 -0
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +333 -0
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +450 -0
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +74 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +26 -0
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +717 -0
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +631 -0
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +633 -0
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +181 -0
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +134 -0
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +1224 -0
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +106 -0
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +771 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +3125 -0
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +496 -0
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +273 -0
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/node_modules/zod/src/v4/core/api.ts +1823 -0
- package/node_modules/zod/src/v4/core/checks.ts +1293 -0
- package/node_modules/zod/src/v4/core/config.ts +15 -0
- package/node_modules/zod/src/v4/core/core.ts +153 -0
- package/node_modules/zod/src/v4/core/doc.ts +44 -0
- package/node_modules/zod/src/v4/core/errors.ts +455 -0
- package/node_modules/zod/src/v4/core/index.ts +16 -0
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +126 -0
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +666 -0
- package/node_modules/zod/src/v4/core/json-schema.ts +147 -0
- package/node_modules/zod/src/v4/core/parse.ts +195 -0
- package/node_modules/zod/src/v4/core/regexes.ts +190 -0
- package/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/node_modules/zod/src/v4/core/schemas.ts +4730 -0
- package/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +215 -0
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +181 -0
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/node_modules/zod/src/v4/core/to-json-schema.ts +622 -0
- package/node_modules/zod/src/v4/core/util.ts +983 -0
- package/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/node_modules/zod/src/v4/index.ts +4 -0
- package/node_modules/zod/src/v4/locales/ar.ts +115 -0
- package/node_modules/zod/src/v4/locales/az.ts +111 -0
- package/node_modules/zod/src/v4/locales/be.ts +176 -0
- package/node_modules/zod/src/v4/locales/bg.ts +128 -0
- package/node_modules/zod/src/v4/locales/ca.ts +116 -0
- package/node_modules/zod/src/v4/locales/cs.ts +118 -0
- package/node_modules/zod/src/v4/locales/da.ts +123 -0
- package/node_modules/zod/src/v4/locales/de.ts +116 -0
- package/node_modules/zod/src/v4/locales/el.ts +121 -0
- package/node_modules/zod/src/v4/locales/en.ts +123 -0
- package/node_modules/zod/src/v4/locales/eo.ts +118 -0
- package/node_modules/zod/src/v4/locales/es.ts +141 -0
- package/node_modules/zod/src/v4/locales/fa.ts +126 -0
- package/node_modules/zod/src/v4/locales/fi.ts +121 -0
- package/node_modules/zod/src/v4/locales/fr-CA.ts +116 -0
- package/node_modules/zod/src/v4/locales/fr.ts +132 -0
- package/node_modules/zod/src/v4/locales/he.ts +246 -0
- package/node_modules/zod/src/v4/locales/hr.ts +131 -0
- package/node_modules/zod/src/v4/locales/hu.ts +117 -0
- package/node_modules/zod/src/v4/locales/hy.ts +164 -0
- package/node_modules/zod/src/v4/locales/id.ts +115 -0
- package/node_modules/zod/src/v4/locales/index.ts +52 -0
- package/node_modules/zod/src/v4/locales/is.ts +119 -0
- package/node_modules/zod/src/v4/locales/it.ts +116 -0
- package/node_modules/zod/src/v4/locales/ja.ts +114 -0
- package/node_modules/zod/src/v4/locales/ka.ts +123 -0
- package/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/node_modules/zod/src/v4/locales/km.ts +119 -0
- package/node_modules/zod/src/v4/locales/ko.ts +121 -0
- package/node_modules/zod/src/v4/locales/lt.ts +239 -0
- package/node_modules/zod/src/v4/locales/mk.ts +118 -0
- package/node_modules/zod/src/v4/locales/ms.ts +115 -0
- package/node_modules/zod/src/v4/locales/nl.ts +121 -0
- package/node_modules/zod/src/v4/locales/no.ts +116 -0
- package/node_modules/zod/src/v4/locales/ota.ts +117 -0
- package/node_modules/zod/src/v4/locales/pl.ts +118 -0
- package/node_modules/zod/src/v4/locales/ps.ts +126 -0
- package/node_modules/zod/src/v4/locales/pt.ts +116 -0
- package/node_modules/zod/src/v4/locales/ro.ts +129 -0
- package/node_modules/zod/src/v4/locales/ru.ts +176 -0
- package/node_modules/zod/src/v4/locales/sl.ts +118 -0
- package/node_modules/zod/src/v4/locales/sv.ts +119 -0
- package/node_modules/zod/src/v4/locales/ta.ts +118 -0
- package/node_modules/zod/src/v4/locales/th.ts +119 -0
- package/node_modules/zod/src/v4/locales/tr.ts +111 -0
- package/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/node_modules/zod/src/v4/locales/uk.ts +117 -0
- package/node_modules/zod/src/v4/locales/ur.ts +119 -0
- package/node_modules/zod/src/v4/locales/uz.ts +117 -0
- package/node_modules/zod/src/v4/locales/vi.ts +117 -0
- package/node_modules/zod/src/v4/locales/yo.ts +124 -0
- package/node_modules/zod/src/v4/locales/zh-CN.ts +116 -0
- package/node_modules/zod/src/v4/locales/zh-TW.ts +115 -0
- package/node_modules/zod/src/v4/mini/checks.ts +32 -0
- package/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/node_modules/zod/src/v4/mini/external.ts +41 -0
- package/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/node_modules/zod/src/v4/mini/parse.ts +14 -0
- package/node_modules/zod/src/v4/mini/schemas.ts +1947 -0
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +24 -0
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +548 -0
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +5 -0
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +993 -0
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +227 -0
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +325 -0
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +352 -0
- package/node_modules/zod/src/v4-mini/index.ts +3 -0
- package/node_modules/zod/v3/ZodError.cjs +138 -0
- package/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/node_modules/zod/v3/ZodError.js +133 -0
- package/node_modules/zod/v3/errors.cjs +17 -0
- package/node_modules/zod/v3/errors.d.cts +5 -0
- package/node_modules/zod/v3/errors.d.ts +5 -0
- package/node_modules/zod/v3/errors.js +9 -0
- package/node_modules/zod/v3/external.cjs +22 -0
- package/node_modules/zod/v3/external.d.cts +6 -0
- package/node_modules/zod/v3/external.d.ts +6 -0
- package/node_modules/zod/v3/external.js +6 -0
- package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/node_modules/zod/v3/helpers/util.cjs +137 -0
- package/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/node_modules/zod/v3/helpers/util.js +133 -0
- package/node_modules/zod/v3/index.cjs +33 -0
- package/node_modules/zod/v3/index.d.cts +4 -0
- package/node_modules/zod/v3/index.d.ts +4 -0
- package/node_modules/zod/v3/index.js +4 -0
- package/node_modules/zod/v3/locales/en.cjs +112 -0
- package/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/node_modules/zod/v3/locales/en.js +109 -0
- package/node_modules/zod/v3/package.json +7 -0
- package/node_modules/zod/v3/standard-schema.cjs +2 -0
- package/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/node_modules/zod/v3/standard-schema.js +1 -0
- package/node_modules/zod/v3/types.cjs +3777 -0
- package/node_modules/zod/v3/types.d.cts +1034 -0
- package/node_modules/zod/v3/types.d.ts +1034 -0
- package/node_modules/zod/v3/types.js +3695 -0
- package/node_modules/zod/v4/classic/checks.cjs +33 -0
- package/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/node_modules/zod/v4/classic/checks.js +1 -0
- package/node_modules/zod/v4/classic/coerce.cjs +47 -0
- package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/node_modules/zod/v4/classic/coerce.js +17 -0
- package/node_modules/zod/v4/classic/compat.cjs +61 -0
- package/node_modules/zod/v4/classic/compat.d.cts +50 -0
- package/node_modules/zod/v4/classic/compat.d.ts +50 -0
- package/node_modules/zod/v4/classic/compat.js +31 -0
- package/node_modules/zod/v4/classic/errors.cjs +74 -0
- package/node_modules/zod/v4/classic/errors.d.cts +30 -0
- package/node_modules/zod/v4/classic/errors.d.ts +30 -0
- package/node_modules/zod/v4/classic/errors.js +48 -0
- package/node_modules/zod/v4/classic/external.cjs +73 -0
- package/node_modules/zod/v4/classic/external.d.cts +16 -0
- package/node_modules/zod/v4/classic/external.d.ts +16 -0
- package/node_modules/zod/v4/classic/external.js +20 -0
- package/node_modules/zod/v4/classic/from-json-schema.cjs +625 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/node_modules/zod/v4/classic/from-json-schema.js +599 -0
- package/node_modules/zod/v4/classic/index.cjs +33 -0
- package/node_modules/zod/v4/classic/index.d.cts +4 -0
- package/node_modules/zod/v4/classic/index.d.ts +4 -0
- package/node_modules/zod/v4/classic/index.js +4 -0
- package/node_modules/zod/v4/classic/iso.cjs +60 -0
- package/node_modules/zod/v4/classic/iso.d.cts +22 -0
- package/node_modules/zod/v4/classic/iso.d.ts +22 -0
- package/node_modules/zod/v4/classic/iso.js +30 -0
- package/node_modules/zod/v4/classic/package.json +7 -0
- package/node_modules/zod/v4/classic/parse.cjs +41 -0
- package/node_modules/zod/v4/classic/parse.d.cts +31 -0
- package/node_modules/zod/v4/classic/parse.d.ts +31 -0
- package/node_modules/zod/v4/classic/parse.js +15 -0
- package/node_modules/zod/v4/classic/schemas.cjs +1511 -0
- package/node_modules/zod/v4/classic/schemas.d.cts +767 -0
- package/node_modules/zod/v4/classic/schemas.d.ts +767 -0
- package/node_modules/zod/v4/classic/schemas.js +1395 -0
- package/node_modules/zod/v4/core/api.cjs +1227 -0
- package/node_modules/zod/v4/core/api.d.cts +325 -0
- package/node_modules/zod/v4/core/api.d.ts +325 -0
- package/node_modules/zod/v4/core/api.js +1087 -0
- package/node_modules/zod/v4/core/checks.cjs +601 -0
- package/node_modules/zod/v4/core/checks.d.cts +278 -0
- package/node_modules/zod/v4/core/checks.d.ts +278 -0
- package/node_modules/zod/v4/core/checks.js +575 -0
- package/node_modules/zod/v4/core/core.cjs +85 -0
- package/node_modules/zod/v4/core/core.d.cts +70 -0
- package/node_modules/zod/v4/core/core.d.ts +70 -0
- package/node_modules/zod/v4/core/core.js +78 -0
- package/node_modules/zod/v4/core/doc.cjs +39 -0
- package/node_modules/zod/v4/core/doc.d.cts +14 -0
- package/node_modules/zod/v4/core/doc.d.ts +14 -0
- package/node_modules/zod/v4/core/doc.js +35 -0
- package/node_modules/zod/v4/core/errors.cjs +216 -0
- package/node_modules/zod/v4/core/errors.d.cts +221 -0
- package/node_modules/zod/v4/core/errors.d.ts +221 -0
- package/node_modules/zod/v4/core/errors.js +185 -0
- package/node_modules/zod/v4/core/index.cjs +47 -0
- package/node_modules/zod/v4/core/index.d.cts +16 -0
- package/node_modules/zod/v4/core/index.d.ts +16 -0
- package/node_modules/zod/v4/core/index.js +16 -0
- package/node_modules/zod/v4/core/json-schema-generator.cjs +99 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/node_modules/zod/v4/core/json-schema-generator.js +95 -0
- package/node_modules/zod/v4/core/json-schema-processors.cjs +644 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +49 -0
- package/node_modules/zod/v4/core/json-schema-processors.js +601 -0
- package/node_modules/zod/v4/core/json-schema.cjs +2 -0
- package/node_modules/zod/v4/core/json-schema.d.cts +88 -0
- package/node_modules/zod/v4/core/json-schema.d.ts +88 -0
- package/node_modules/zod/v4/core/json-schema.js +1 -0
- package/node_modules/zod/v4/core/package.json +7 -0
- package/node_modules/zod/v4/core/parse.cjs +131 -0
- package/node_modules/zod/v4/core/parse.d.cts +49 -0
- package/node_modules/zod/v4/core/parse.d.ts +49 -0
- package/node_modules/zod/v4/core/parse.js +93 -0
- package/node_modules/zod/v4/core/regexes.cjs +172 -0
- package/node_modules/zod/v4/core/regexes.d.cts +85 -0
- package/node_modules/zod/v4/core/regexes.d.ts +85 -0
- package/node_modules/zod/v4/core/regexes.js +139 -0
- package/node_modules/zod/v4/core/registries.cjs +56 -0
- package/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/node_modules/zod/v4/core/registries.js +51 -0
- package/node_modules/zod/v4/core/schemas.cjs +2270 -0
- package/node_modules/zod/v4/core/schemas.d.cts +1184 -0
- package/node_modules/zod/v4/core/schemas.d.ts +1184 -0
- package/node_modules/zod/v4/core/schemas.js +2239 -0
- package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
- package/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/node_modules/zod/v4/core/to-json-schema.cjs +457 -0
- package/node_modules/zod/v4/core/to-json-schema.d.cts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.d.ts +114 -0
- package/node_modules/zod/v4/core/to-json-schema.js +448 -0
- package/node_modules/zod/v4/core/util.cjs +734 -0
- package/node_modules/zod/v4/core/util.d.cts +200 -0
- package/node_modules/zod/v4/core/util.d.ts +200 -0
- package/node_modules/zod/v4/core/util.js +674 -0
- package/node_modules/zod/v4/core/versions.cjs +8 -0
- package/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/node_modules/zod/v4/core/versions.js +5 -0
- package/node_modules/zod/v4/index.cjs +22 -0
- package/node_modules/zod/v4/index.d.cts +3 -0
- package/node_modules/zod/v4/index.d.ts +3 -0
- package/node_modules/zod/v4/index.js +3 -0
- package/node_modules/zod/v4/locales/ar.cjs +133 -0
- package/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/node_modules/zod/v4/locales/ar.js +106 -0
- package/node_modules/zod/v4/locales/az.cjs +132 -0
- package/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/node_modules/zod/v4/locales/az.js +105 -0
- package/node_modules/zod/v4/locales/be.cjs +183 -0
- package/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/node_modules/zod/v4/locales/be.js +156 -0
- package/node_modules/zod/v4/locales/bg.cjs +147 -0
- package/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/node_modules/zod/v4/locales/bg.js +120 -0
- package/node_modules/zod/v4/locales/ca.cjs +134 -0
- package/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/node_modules/zod/v4/locales/ca.js +107 -0
- package/node_modules/zod/v4/locales/cs.cjs +138 -0
- package/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/node_modules/zod/v4/locales/cs.js +111 -0
- package/node_modules/zod/v4/locales/da.cjs +142 -0
- package/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/node_modules/zod/v4/locales/da.js +115 -0
- package/node_modules/zod/v4/locales/de.cjs +135 -0
- package/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/node_modules/zod/v4/locales/de.js +108 -0
- package/node_modules/zod/v4/locales/el.cjs +136 -0
- package/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/node_modules/zod/v4/locales/el.js +109 -0
- package/node_modules/zod/v4/locales/en.cjs +140 -0
- package/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/node_modules/zod/v4/locales/en.js +113 -0
- package/node_modules/zod/v4/locales/eo.cjs +136 -0
- package/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/node_modules/zod/v4/locales/eo.js +109 -0
- package/node_modules/zod/v4/locales/es.cjs +159 -0
- package/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/node_modules/zod/v4/locales/es.js +132 -0
- package/node_modules/zod/v4/locales/fa.cjs +141 -0
- package/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/node_modules/zod/v4/locales/fa.js +114 -0
- package/node_modules/zod/v4/locales/fi.cjs +139 -0
- package/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/node_modules/zod/v4/locales/fi.js +112 -0
- package/node_modules/zod/v4/locales/fr-CA.cjs +134 -0
- package/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr-CA.js +107 -0
- package/node_modules/zod/v4/locales/fr.cjs +152 -0
- package/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/node_modules/zod/v4/locales/fr.js +125 -0
- package/node_modules/zod/v4/locales/he.cjs +241 -0
- package/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/node_modules/zod/v4/locales/he.js +214 -0
- package/node_modules/zod/v4/locales/hr.cjs +149 -0
- package/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/node_modules/zod/v4/locales/hr.js +122 -0
- package/node_modules/zod/v4/locales/hu.cjs +135 -0
- package/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/node_modules/zod/v4/locales/hu.js +108 -0
- package/node_modules/zod/v4/locales/hy.cjs +174 -0
- package/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/node_modules/zod/v4/locales/hy.js +147 -0
- package/node_modules/zod/v4/locales/id.cjs +133 -0
- package/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/node_modules/zod/v4/locales/id.js +106 -0
- package/node_modules/zod/v4/locales/index.cjs +111 -0
- package/node_modules/zod/v4/locales/index.d.cts +52 -0
- package/node_modules/zod/v4/locales/index.d.ts +52 -0
- package/node_modules/zod/v4/locales/index.js +52 -0
- package/node_modules/zod/v4/locales/is.cjs +136 -0
- package/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/node_modules/zod/v4/locales/is.js +109 -0
- package/node_modules/zod/v4/locales/it.cjs +135 -0
- package/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/node_modules/zod/v4/locales/it.js +108 -0
- package/node_modules/zod/v4/locales/ja.cjs +134 -0
- package/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/node_modules/zod/v4/locales/ja.js +107 -0
- package/node_modules/zod/v4/locales/ka.cjs +139 -0
- package/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/node_modules/zod/v4/locales/ka.js +112 -0
- package/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/node_modules/zod/v4/locales/kh.js +5 -0
- package/node_modules/zod/v4/locales/km.cjs +137 -0
- package/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/node_modules/zod/v4/locales/km.js +110 -0
- package/node_modules/zod/v4/locales/ko.cjs +138 -0
- package/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/node_modules/zod/v4/locales/ko.js +111 -0
- package/node_modules/zod/v4/locales/lt.cjs +230 -0
- package/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/node_modules/zod/v4/locales/lt.js +203 -0
- package/node_modules/zod/v4/locales/mk.cjs +136 -0
- package/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/node_modules/zod/v4/locales/mk.js +109 -0
- package/node_modules/zod/v4/locales/ms.cjs +134 -0
- package/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/node_modules/zod/v4/locales/ms.js +107 -0
- package/node_modules/zod/v4/locales/nl.cjs +137 -0
- package/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/node_modules/zod/v4/locales/nl.js +110 -0
- package/node_modules/zod/v4/locales/no.cjs +135 -0
- package/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/node_modules/zod/v4/locales/no.js +108 -0
- package/node_modules/zod/v4/locales/ota.cjs +136 -0
- package/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/node_modules/zod/v4/locales/ota.js +109 -0
- package/node_modules/zod/v4/locales/package.json +7 -0
- package/node_modules/zod/v4/locales/pl.cjs +136 -0
- package/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/node_modules/zod/v4/locales/pl.js +109 -0
- package/node_modules/zod/v4/locales/ps.cjs +141 -0
- package/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/node_modules/zod/v4/locales/ps.js +114 -0
- package/node_modules/zod/v4/locales/pt.cjs +135 -0
- package/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/node_modules/zod/v4/locales/pt.js +108 -0
- package/node_modules/zod/v4/locales/ro.cjs +146 -0
- package/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/node_modules/zod/v4/locales/ro.js +119 -0
- package/node_modules/zod/v4/locales/ru.cjs +183 -0
- package/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/node_modules/zod/v4/locales/ru.js +156 -0
- package/node_modules/zod/v4/locales/sl.cjs +136 -0
- package/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/node_modules/zod/v4/locales/sl.js +109 -0
- package/node_modules/zod/v4/locales/sv.cjs +137 -0
- package/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/node_modules/zod/v4/locales/sv.js +110 -0
- package/node_modules/zod/v4/locales/ta.cjs +137 -0
- package/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/node_modules/zod/v4/locales/ta.js +110 -0
- package/node_modules/zod/v4/locales/th.cjs +137 -0
- package/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/node_modules/zod/v4/locales/th.js +110 -0
- package/node_modules/zod/v4/locales/tr.cjs +132 -0
- package/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/node_modules/zod/v4/locales/tr.js +105 -0
- package/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/node_modules/zod/v4/locales/ua.js +5 -0
- package/node_modules/zod/v4/locales/uk.cjs +135 -0
- package/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/node_modules/zod/v4/locales/uk.js +108 -0
- package/node_modules/zod/v4/locales/ur.cjs +137 -0
- package/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/node_modules/zod/v4/locales/ur.js +110 -0
- package/node_modules/zod/v4/locales/uz.cjs +137 -0
- package/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/node_modules/zod/v4/locales/uz.js +110 -0
- package/node_modules/zod/v4/locales/vi.cjs +135 -0
- package/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/node_modules/zod/v4/locales/vi.js +108 -0
- package/node_modules/zod/v4/locales/yo.cjs +134 -0
- package/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/node_modules/zod/v4/locales/yo.js +107 -0
- package/node_modules/zod/v4/locales/zh-CN.cjs +136 -0
- package/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-CN.js +109 -0
- package/node_modules/zod/v4/locales/zh-TW.cjs +134 -0
- package/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/node_modules/zod/v4/locales/zh-TW.js +107 -0
- package/node_modules/zod/v4/mini/checks.cjs +34 -0
- package/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/node_modules/zod/v4/mini/checks.js +1 -0
- package/node_modules/zod/v4/mini/coerce.cjs +52 -0
- package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/node_modules/zod/v4/mini/coerce.js +22 -0
- package/node_modules/zod/v4/mini/external.cjs +63 -0
- package/node_modules/zod/v4/mini/external.d.cts +13 -0
- package/node_modules/zod/v4/mini/external.d.ts +13 -0
- package/node_modules/zod/v4/mini/external.js +14 -0
- package/node_modules/zod/v4/mini/index.cjs +32 -0
- package/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/node_modules/zod/v4/mini/index.js +3 -0
- package/node_modules/zod/v4/mini/iso.cjs +64 -0
- package/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/node_modules/zod/v4/mini/iso.js +34 -0
- package/node_modules/zod/v4/mini/package.json +7 -0
- package/node_modules/zod/v4/mini/parse.cjs +16 -0
- package/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/node_modules/zod/v4/mini/parse.js +1 -0
- package/node_modules/zod/v4/mini/schemas.cjs +1083 -0
- package/node_modules/zod/v4/mini/schemas.d.cts +445 -0
- package/node_modules/zod/v4/mini/schemas.d.ts +445 -0
- package/node_modules/zod/v4/mini/schemas.js +961 -0
- package/node_modules/zod/v4/package.json +7 -0
- package/node_modules/zod/v4-mini/index.cjs +32 -0
- package/node_modules/zod/v4-mini/index.d.cts +3 -0
- package/node_modules/zod/v4-mini/index.d.ts +3 -0
- package/node_modules/zod/v4-mini/index.js +3 -0
- package/node_modules/zod/v4-mini/package.json +7 -0
- package/package.json +69 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { normalizeSelector } from "./selectors.js";
|
|
2
|
+
import { getElementRef } from "./snapshot.js";
|
|
3
|
+
const DEFAULT_TIMEOUT_MS = 8_000;
|
|
4
|
+
/**
|
|
5
|
+
* Set of supported `expect` field names. Used to warn about typos so a
|
|
6
|
+
* misspelled key (`selectorVisble`, `urlContain`, etc.) doesn't silently
|
|
7
|
+
* pass as "(no expectations)" — that would be worse than not verifying
|
|
8
|
+
* at all because the LLM moves on assuming success.
|
|
9
|
+
*/
|
|
10
|
+
const KNOWN_EXPECT_FIELDS = new Set([
|
|
11
|
+
"text",
|
|
12
|
+
"textGone",
|
|
13
|
+
"selector",
|
|
14
|
+
"selectorVisible",
|
|
15
|
+
"selectorGone",
|
|
16
|
+
"selectorHidden",
|
|
17
|
+
"urlContains",
|
|
18
|
+
"urlMatches",
|
|
19
|
+
"inputValue",
|
|
20
|
+
"timeoutMs",
|
|
21
|
+
]);
|
|
22
|
+
/**
|
|
23
|
+
* Run all expectation fields against the page. Returns a structured result
|
|
24
|
+
* the caller can stitch into a tool result string. Never throws — every
|
|
25
|
+
* failure mode is captured as a `details` entry.
|
|
26
|
+
*/
|
|
27
|
+
export async function runExpectation(page, expect) {
|
|
28
|
+
// Detect unknown / misspelled fields and fail loudly. Returning ok:true
|
|
29
|
+
// here would let typos masquerade as "verified" which is exactly the
|
|
30
|
+
// failure mode we're trying to avoid.
|
|
31
|
+
const unknown = Object.keys(expect).filter((k) => !KNOWN_EXPECT_FIELDS.has(k));
|
|
32
|
+
if (unknown.length > 0) {
|
|
33
|
+
return {
|
|
34
|
+
ok: false,
|
|
35
|
+
summary: `unknown expect field(s): ${unknown.join(", ")}. Supported: ${[...KNOWN_EXPECT_FIELDS].join(", ")}`,
|
|
36
|
+
details: unknown.map((k) => ({
|
|
37
|
+
field: k,
|
|
38
|
+
ok: false,
|
|
39
|
+
message: "unknown field",
|
|
40
|
+
})),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
const fields = collectFields(expect);
|
|
44
|
+
if (fields.length === 0) {
|
|
45
|
+
return {
|
|
46
|
+
ok: true,
|
|
47
|
+
summary: "(no expectations)",
|
|
48
|
+
details: [],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const timeoutMs = expect.timeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
52
|
+
const deadline = Date.now() + timeoutMs;
|
|
53
|
+
const results = [];
|
|
54
|
+
// Each field gets the *remaining* budget — order is the order the LLM
|
|
55
|
+
// wrote them, which lets it cheaply express "wait for URL change THEN
|
|
56
|
+
// verify text". Earlier fields keep most of the budget; later fields
|
|
57
|
+
// get whatever's left.
|
|
58
|
+
for (const field of fields) {
|
|
59
|
+
const remaining = Math.max(deadline - Date.now(), 250);
|
|
60
|
+
const result = await runOne(page, field, remaining);
|
|
61
|
+
results.push(result);
|
|
62
|
+
if (!result.ok) {
|
|
63
|
+
// Short-circuit: an expectation block is pass-all, fail-any. Reporting
|
|
64
|
+
// every subsequent field's timeout would just be noise.
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const allOk = results.every((r) => r.ok);
|
|
69
|
+
const summary = allOk
|
|
70
|
+
? `All ${results.length} expectation(s) passed`
|
|
71
|
+
: results
|
|
72
|
+
.filter((r) => !r.ok)
|
|
73
|
+
.map((r) => `${r.field}: ${r.message ?? "failed"}`)
|
|
74
|
+
.join("; ");
|
|
75
|
+
return { ok: allOk, summary, details: results };
|
|
76
|
+
}
|
|
77
|
+
function collectFields(expect) {
|
|
78
|
+
const out = [];
|
|
79
|
+
if (expect.text != null) {
|
|
80
|
+
const needle = expect.text;
|
|
81
|
+
out.push({
|
|
82
|
+
name: "text",
|
|
83
|
+
run: async (page, timeoutMs) => {
|
|
84
|
+
try {
|
|
85
|
+
await page
|
|
86
|
+
.getByText(needle)
|
|
87
|
+
.first()
|
|
88
|
+
.waitFor({ state: "visible", timeout: timeoutMs });
|
|
89
|
+
return { ok: true };
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
return { ok: false, message: `text not found: ${JSON.stringify(needle)}` };
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
if (expect.textGone != null) {
|
|
98
|
+
const needle = expect.textGone;
|
|
99
|
+
out.push({
|
|
100
|
+
name: "textGone",
|
|
101
|
+
run: async (page, timeoutMs) => {
|
|
102
|
+
try {
|
|
103
|
+
await page
|
|
104
|
+
.getByText(needle)
|
|
105
|
+
.first()
|
|
106
|
+
.waitFor({ state: "hidden", timeout: timeoutMs });
|
|
107
|
+
return { ok: true };
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
return { ok: false, message: `text still present: ${JSON.stringify(needle)}` };
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
// selector / selectorVisible — both wait for the element to be visible.
|
|
116
|
+
// We accept either field name so prompts and code stay forgiving; if the
|
|
117
|
+
// caller sets both, the one written first in the if-chain wins (selector
|
|
118
|
+
// takes precedence because it's the older name).
|
|
119
|
+
const visibleRaw = expect.selector ?? expect.selectorVisible;
|
|
120
|
+
if (visibleRaw != null) {
|
|
121
|
+
const fieldName = expect.selector != null ? "selector" : "selectorVisible";
|
|
122
|
+
out.push({
|
|
123
|
+
name: fieldName,
|
|
124
|
+
run: async (page, timeoutMs) => {
|
|
125
|
+
const norm = normalizeSelector(visibleRaw);
|
|
126
|
+
if (!norm.ok)
|
|
127
|
+
return { ok: false, message: norm.error };
|
|
128
|
+
try {
|
|
129
|
+
await page
|
|
130
|
+
.locator(norm.selector)
|
|
131
|
+
.first()
|
|
132
|
+
.waitFor({ state: "visible", timeout: timeoutMs });
|
|
133
|
+
return { ok: true };
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
return { ok: false, message: `selector not visible: ${norm.selector}` };
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
// selectorGone / selectorHidden — alias pair, same Playwright "hidden" wait.
|
|
142
|
+
const goneRaw = expect.selectorGone ?? expect.selectorHidden;
|
|
143
|
+
if (goneRaw != null) {
|
|
144
|
+
const fieldName = expect.selectorGone != null ? "selectorGone" : "selectorHidden";
|
|
145
|
+
out.push({
|
|
146
|
+
name: fieldName,
|
|
147
|
+
run: async (page, timeoutMs) => {
|
|
148
|
+
const norm = normalizeSelector(goneRaw);
|
|
149
|
+
if (!norm.ok)
|
|
150
|
+
return { ok: false, message: norm.error };
|
|
151
|
+
try {
|
|
152
|
+
await page
|
|
153
|
+
.locator(norm.selector)
|
|
154
|
+
.first()
|
|
155
|
+
.waitFor({ state: "hidden", timeout: timeoutMs });
|
|
156
|
+
return { ok: true };
|
|
157
|
+
}
|
|
158
|
+
catch {
|
|
159
|
+
return { ok: false, message: `selector still visible: ${norm.selector}` };
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
if (expect.urlContains != null) {
|
|
165
|
+
const sub = expect.urlContains;
|
|
166
|
+
out.push({
|
|
167
|
+
name: "urlContains",
|
|
168
|
+
run: async (page, timeoutMs) => {
|
|
169
|
+
const ok = await pollUntil(timeoutMs, async () => page.url().includes(sub));
|
|
170
|
+
return ok
|
|
171
|
+
? { ok: true }
|
|
172
|
+
: {
|
|
173
|
+
ok: false,
|
|
174
|
+
message: `url=${page.url()} did not contain ${JSON.stringify(sub)}`,
|
|
175
|
+
};
|
|
176
|
+
},
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
if (expect.urlMatches != null) {
|
|
180
|
+
const pat = expect.urlMatches;
|
|
181
|
+
let re;
|
|
182
|
+
try {
|
|
183
|
+
re = new RegExp(pat);
|
|
184
|
+
}
|
|
185
|
+
catch (err) {
|
|
186
|
+
out.push({
|
|
187
|
+
name: "urlMatches",
|
|
188
|
+
run: async () => ({
|
|
189
|
+
ok: false,
|
|
190
|
+
message: `invalid regex: ${err instanceof Error ? err.message : String(err)}`,
|
|
191
|
+
}),
|
|
192
|
+
});
|
|
193
|
+
return out;
|
|
194
|
+
}
|
|
195
|
+
out.push({
|
|
196
|
+
name: "urlMatches",
|
|
197
|
+
run: async (page, timeoutMs) => {
|
|
198
|
+
const ok = await pollUntil(timeoutMs, async () => re.test(page.url()));
|
|
199
|
+
return ok
|
|
200
|
+
? { ok: true }
|
|
201
|
+
: { ok: false, message: `url=${page.url()} did not match ${pat}` };
|
|
202
|
+
},
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
if (expect.inputValue != null) {
|
|
206
|
+
const iv = expect.inputValue;
|
|
207
|
+
out.push({
|
|
208
|
+
name: "inputValue",
|
|
209
|
+
run: async (page, timeoutMs) => verifyInputValue(page, iv, timeoutMs),
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
return out;
|
|
213
|
+
}
|
|
214
|
+
async function runOne(page, field, timeoutMs) {
|
|
215
|
+
try {
|
|
216
|
+
const r = await field.run(page, timeoutMs);
|
|
217
|
+
return { field: field.name, ...r };
|
|
218
|
+
}
|
|
219
|
+
catch (err) {
|
|
220
|
+
return {
|
|
221
|
+
field: field.name,
|
|
222
|
+
ok: false,
|
|
223
|
+
message: err instanceof Error ? err.message : String(err),
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Poll a synchronous predicate (wrapped async for symmetry with the rest
|
|
229
|
+
* of the API) until it returns true or the budget runs out. 100ms cadence
|
|
230
|
+
* — fast enough to feel snappy, slow enough not to hammer the page.
|
|
231
|
+
*/
|
|
232
|
+
async function pollUntil(timeoutMs, pred) {
|
|
233
|
+
const deadline = Date.now() + timeoutMs;
|
|
234
|
+
while (Date.now() < deadline) {
|
|
235
|
+
if (await pred())
|
|
236
|
+
return true;
|
|
237
|
+
await new Promise((r) => setTimeout(r, 100));
|
|
238
|
+
}
|
|
239
|
+
return pred();
|
|
240
|
+
}
|
|
241
|
+
async function verifyInputValue(page, iv, timeoutMs) {
|
|
242
|
+
if (iv.contains == null && iv.equals == null) {
|
|
243
|
+
return { ok: false, message: "inputValue requires `contains` or `equals`" };
|
|
244
|
+
}
|
|
245
|
+
let locator;
|
|
246
|
+
let label;
|
|
247
|
+
if (iv.ref) {
|
|
248
|
+
if (!getElementRef(iv.ref)) {
|
|
249
|
+
return { ok: false, message: `inputValue ref '${iv.ref}' not in current snapshot` };
|
|
250
|
+
}
|
|
251
|
+
locator = page.locator(`aria-ref=${iv.ref}`);
|
|
252
|
+
label = iv.ref;
|
|
253
|
+
}
|
|
254
|
+
else if (iv.selector) {
|
|
255
|
+
const norm = normalizeSelector(iv.selector);
|
|
256
|
+
if (!norm.ok)
|
|
257
|
+
return { ok: false, message: norm.error };
|
|
258
|
+
locator = page.locator(norm.selector).first();
|
|
259
|
+
label = norm.selector;
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
return { ok: false, message: "inputValue requires `ref` or `selector`" };
|
|
263
|
+
}
|
|
264
|
+
const deadline = Date.now() + timeoutMs;
|
|
265
|
+
let lastValue = "";
|
|
266
|
+
while (Date.now() < deadline) {
|
|
267
|
+
try {
|
|
268
|
+
const v = await readEditableValue(locator);
|
|
269
|
+
lastValue = v;
|
|
270
|
+
if (iv.equals != null) {
|
|
271
|
+
// Rich text editors often expose an "empty" contenteditable as "\n"
|
|
272
|
+
// through innerText after submit.
|
|
273
|
+
// Treat whitespace-only readback as empty when the expected value is
|
|
274
|
+
// explicitly "", otherwise a successful post can look like a failed
|
|
275
|
+
// click verification.
|
|
276
|
+
if (v === iv.equals || (iv.equals === "" && v.trim() === "")) {
|
|
277
|
+
return { ok: true };
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
if (iv.contains != null && v.includes(iv.contains))
|
|
281
|
+
return { ok: true };
|
|
282
|
+
}
|
|
283
|
+
catch {
|
|
284
|
+
// node may not be ready yet — keep polling.
|
|
285
|
+
}
|
|
286
|
+
await new Promise((r) => setTimeout(r, 150));
|
|
287
|
+
}
|
|
288
|
+
const expected = iv.equals != null
|
|
289
|
+
? `equals ${JSON.stringify(iv.equals)}`
|
|
290
|
+
: `contains ${JSON.stringify(iv.contains)}`;
|
|
291
|
+
return {
|
|
292
|
+
ok: false,
|
|
293
|
+
message: `${label} value ${JSON.stringify(lastValue)} did not satisfy ${expected}`,
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Read text from the resolved node regardless of its DOM type:
|
|
298
|
+
* - <input>/<textarea>: .value
|
|
299
|
+
* - [contenteditable]/aria-textbox: .innerText
|
|
300
|
+
* - anything else: .textContent (rare, but better than throwing)
|
|
301
|
+
*/
|
|
302
|
+
async function readEditableValue(locator) {
|
|
303
|
+
return locator.first().evaluate((el) => {
|
|
304
|
+
if (el instanceof HTMLInputElement || el instanceof HTMLTextAreaElement) {
|
|
305
|
+
return el.value;
|
|
306
|
+
}
|
|
307
|
+
const he = el;
|
|
308
|
+
if (he.isContentEditable || el.getAttribute("role") === "textbox") {
|
|
309
|
+
return he.innerText ?? "";
|
|
310
|
+
}
|
|
311
|
+
return he.innerText ?? he.textContent ?? "";
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
//# sourceMappingURL=expect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expect.js","sourceRoot":"","sources":["../../src/browser/expect.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AA+D9C,MAAM,kBAAkB,GAAG,KAAK,CAAC;AAEjC;;;;;GAKG;AACH,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,MAAM;IACN,UAAU;IACV,UAAU;IACV,iBAAiB;IACjB,cAAc;IACd,gBAAgB;IAChB,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,WAAW;CACZ,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,IAAU,EACV,MAA0B;IAE1B,wEAAwE;IACxE,qEAAqE;IACrE,sCAAsC;IACtC,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CACxC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC,CACnC,CAAC;IACF,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,OAAO;YACL,EAAE,EAAE,KAAK;YACT,OAAO,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
export declare function humanMove(page: Page, targetX: number, targetY: number): Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* Human-like drag: bezier move to source, mousedown, bezier move to target, pause, mouseup.
|
|
8
|
+
*/
|
|
9
|
+
export declare function humanDrag(page: Page, srcX: number, srcY: number, dstX: number, dstY: number): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Type text into the focused element one character at a time with
|
|
12
|
+
* randomized inter-key delays. Uses real CDP key events (isTrusted=true)
|
|
13
|
+
* so React/Vue/Svelte controlled inputs see the changes through their
|
|
14
|
+
* native input handler — no value-tracker workarounds needed.
|
|
15
|
+
*
|
|
16
|
+
* Constant `delay` on Playwright's `keyboard.type(text, { delay })` is
|
|
17
|
+
* uniformly spaced and easy for behavioral fingerprinting to flag; this
|
|
18
|
+
* helper jitters per stroke. The trailing delay is omitted so we don't
|
|
19
|
+
* pay tail latency on the last character.
|
|
20
|
+
*/
|
|
21
|
+
export declare function humanType(page: Page, text: string): Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* Insert text into the currently focused element using whichever path the
|
|
24
|
+
* element type supports best. Caller is responsible for focusing first.
|
|
25
|
+
*
|
|
26
|
+
* Strategy by host type:
|
|
27
|
+
*
|
|
28
|
+
* - `<input>` / `<textarea>`: bypass any framework value-setter override
|
|
29
|
+
* (React's controlled-component tracker) by writing through the
|
|
30
|
+
* prototype's native setter, then fire `input`+`change` so onChange
|
|
31
|
+
* sees the new value.
|
|
32
|
+
*
|
|
33
|
+
* - contenteditable hosts (Draft.js / Lexical / ProseMirror / Tiptap /
|
|
34
|
+
* Slate / plain CE): send a single CDP `Input.insertText` via
|
|
35
|
+
* `page.keyboard.insertText`. This is a browser-level trusted
|
|
36
|
+
* text-input commit — Draft.js's `beforeinput` handler picks it up and
|
|
37
|
+
* inserts through its EditorState reducer cleanly. The previous
|
|
38
|
+
* `document.execCommand('insertText', ...)` path triggered a React
|
|
39
|
+
* reconciliation crash on Draft.js (NotFoundError: removeChild not a
|
|
40
|
+
* child of this node) which manifested in production as duplicated
|
|
41
|
+
* text (DOM left in inconsistent state mid-render with both old and
|
|
42
|
+
* new content present). Confirmed locally with a Playwright + real
|
|
43
|
+
* Draft.js 0.10.5 + React 16.14 fixture: execCommand left the editor
|
|
44
|
+
* empty with the React error logged; CDP insertText inserted the text
|
|
45
|
+
* exactly once with no errors. Same behavior on plain CE and
|
|
46
|
+
* <input>/<textarea> when tested through the same CDP path.
|
|
47
|
+
*
|
|
48
|
+
* Notes:
|
|
49
|
+
* - Does NOT touch the system clipboard (safe for concurrent dipclaw
|
|
50
|
+
* instances and the user's own clipboard).
|
|
51
|
+
*/
|
|
52
|
+
export declare function pasteText(page: Page, text: string): Promise<void>;
|
|
53
|
+
/**
|
|
54
|
+
* Human-like scrolling: multiple small chunks with random intervals.
|
|
55
|
+
*/
|
|
56
|
+
export declare function humanScroll(page: Page, totalDelta: number): Promise<void>;
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/** Per-page mouse position tracking. Avoids cross-tab state leaking. */
|
|
2
|
+
const mousePositions = new WeakMap();
|
|
3
|
+
function getMousePos(page) {
|
|
4
|
+
return mousePositions.get(page) ?? { x: 0, y: 0 };
|
|
5
|
+
}
|
|
6
|
+
function setMousePos(page, pos) {
|
|
7
|
+
mousePositions.set(page, pos);
|
|
8
|
+
}
|
|
9
|
+
function rand(min, max) {
|
|
10
|
+
return min + Math.random() * (max - min);
|
|
11
|
+
}
|
|
12
|
+
function sleep(ms) {
|
|
13
|
+
return new Promise((r) => setTimeout(r, ms));
|
|
14
|
+
}
|
|
15
|
+
function cubicBezier(t, p0, p1, p2, p3) {
|
|
16
|
+
const mt = 1 - t;
|
|
17
|
+
const mt2 = mt * mt;
|
|
18
|
+
const mt3 = mt2 * mt;
|
|
19
|
+
const t2 = t * t;
|
|
20
|
+
const t3 = t2 * t;
|
|
21
|
+
return {
|
|
22
|
+
x: mt3 * p0.x + 3 * mt2 * t * p1.x + 3 * mt * t2 * p2.x + t3 * p3.x,
|
|
23
|
+
y: mt3 * p0.y + 3 * mt2 * t * p1.y + 3 * mt * t2 * p2.y + t3 * p3.y,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Generate a human-like mouse path using a cubic bezier curve
|
|
28
|
+
* with random control points and sub-pixel jitter.
|
|
29
|
+
*/
|
|
30
|
+
function generatePath(start, end) {
|
|
31
|
+
const dist = Math.hypot(end.x - start.x, end.y - start.y);
|
|
32
|
+
if (dist < 5)
|
|
33
|
+
return [end];
|
|
34
|
+
const steps = Math.max(8, Math.min(40, Math.floor(dist / 15)));
|
|
35
|
+
const spread = Math.min(dist * 0.2, 150);
|
|
36
|
+
const cp1 = {
|
|
37
|
+
x: start.x + (end.x - start.x) * 0.25 + rand(-spread, spread),
|
|
38
|
+
y: start.y + (end.y - start.y) * 0.25 + rand(-spread, spread),
|
|
39
|
+
};
|
|
40
|
+
const cp2 = {
|
|
41
|
+
x: start.x + (end.x - start.x) * 0.75 + rand(-spread, spread),
|
|
42
|
+
y: start.y + (end.y - start.y) * 0.75 + rand(-spread, spread),
|
|
43
|
+
};
|
|
44
|
+
const points = [];
|
|
45
|
+
for (let i = 1; i <= steps; i++) {
|
|
46
|
+
const t = i / steps;
|
|
47
|
+
const p = cubicBezier(t, start, cp1, cp2, end);
|
|
48
|
+
points.push({
|
|
49
|
+
x: Math.round(p.x + rand(-1, 1)),
|
|
50
|
+
y: Math.round(p.y + rand(-1, 1)),
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
// Ensure final point is exact target
|
|
54
|
+
points[points.length - 1] = { x: Math.round(end.x), y: Math.round(end.y) };
|
|
55
|
+
return points;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Move mouse along a bezier curve with slow-fast-slow timing.
|
|
59
|
+
*/
|
|
60
|
+
export async function humanMove(page, targetX, targetY) {
|
|
61
|
+
const path = generatePath(getMousePos(page), { x: targetX, y: targetY });
|
|
62
|
+
for (let i = 0; i < path.length; i++) {
|
|
63
|
+
await page.mouse.move(path[i].x, path[i].y);
|
|
64
|
+
const progress = i / path.length;
|
|
65
|
+
// Bell curve speed: slow at edges, fast in middle
|
|
66
|
+
const speed = 1 - 4 * (progress - 0.5) ** 2;
|
|
67
|
+
const delay = rand(2, 6) + (1 - speed) * rand(4, 12);
|
|
68
|
+
await sleep(delay);
|
|
69
|
+
}
|
|
70
|
+
setMousePos(page, { x: targetX, y: targetY });
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Human-like drag: bezier move to source, mousedown, bezier move to target, pause, mouseup.
|
|
74
|
+
*/
|
|
75
|
+
export async function humanDrag(page, srcX, srcY, dstX, dstY) {
|
|
76
|
+
await humanMove(page, srcX, srcY);
|
|
77
|
+
await page.mouse.down();
|
|
78
|
+
try {
|
|
79
|
+
await sleep(rand(80, 200));
|
|
80
|
+
await humanMove(page, dstX, dstY);
|
|
81
|
+
await sleep(rand(60, 150));
|
|
82
|
+
}
|
|
83
|
+
finally {
|
|
84
|
+
await page.mouse.up().catch(() => { });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Type text into the focused element one character at a time with
|
|
89
|
+
* randomized inter-key delays. Uses real CDP key events (isTrusted=true)
|
|
90
|
+
* so React/Vue/Svelte controlled inputs see the changes through their
|
|
91
|
+
* native input handler — no value-tracker workarounds needed.
|
|
92
|
+
*
|
|
93
|
+
* Constant `delay` on Playwright's `keyboard.type(text, { delay })` is
|
|
94
|
+
* uniformly spaced and easy for behavioral fingerprinting to flag; this
|
|
95
|
+
* helper jitters per stroke. The trailing delay is omitted so we don't
|
|
96
|
+
* pay tail latency on the last character.
|
|
97
|
+
*/
|
|
98
|
+
export async function humanType(page, text) {
|
|
99
|
+
// Array.from handles surrogate pairs / astral characters (emoji etc.)
|
|
100
|
+
const chars = Array.from(text);
|
|
101
|
+
for (let i = 0; i < chars.length; i++) {
|
|
102
|
+
await page.keyboard.type(chars[i]);
|
|
103
|
+
if (i < chars.length - 1) {
|
|
104
|
+
await sleep(rand(40, 120));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Insert text into the currently focused element using whichever path the
|
|
110
|
+
* element type supports best. Caller is responsible for focusing first.
|
|
111
|
+
*
|
|
112
|
+
* Strategy by host type:
|
|
113
|
+
*
|
|
114
|
+
* - `<input>` / `<textarea>`: bypass any framework value-setter override
|
|
115
|
+
* (React's controlled-component tracker) by writing through the
|
|
116
|
+
* prototype's native setter, then fire `input`+`change` so onChange
|
|
117
|
+
* sees the new value.
|
|
118
|
+
*
|
|
119
|
+
* - contenteditable hosts (Draft.js / Lexical / ProseMirror / Tiptap /
|
|
120
|
+
* Slate / plain CE): send a single CDP `Input.insertText` via
|
|
121
|
+
* `page.keyboard.insertText`. This is a browser-level trusted
|
|
122
|
+
* text-input commit — Draft.js's `beforeinput` handler picks it up and
|
|
123
|
+
* inserts through its EditorState reducer cleanly. The previous
|
|
124
|
+
* `document.execCommand('insertText', ...)` path triggered a React
|
|
125
|
+
* reconciliation crash on Draft.js (NotFoundError: removeChild not a
|
|
126
|
+
* child of this node) which manifested in production as duplicated
|
|
127
|
+
* text (DOM left in inconsistent state mid-render with both old and
|
|
128
|
+
* new content present). Confirmed locally with a Playwright + real
|
|
129
|
+
* Draft.js 0.10.5 + React 16.14 fixture: execCommand left the editor
|
|
130
|
+
* empty with the React error logged; CDP insertText inserted the text
|
|
131
|
+
* exactly once with no errors. Same behavior on plain CE and
|
|
132
|
+
* <input>/<textarea> when tested through the same CDP path.
|
|
133
|
+
*
|
|
134
|
+
* Notes:
|
|
135
|
+
* - Does NOT touch the system clipboard (safe for concurrent dipclaw
|
|
136
|
+
* instances and the user's own clipboard).
|
|
137
|
+
*/
|
|
138
|
+
export async function pasteText(page, text) {
|
|
139
|
+
// Probe element type first so we can pick the right insertion path.
|
|
140
|
+
// Throwing from inside page.evaluate would lose the original error
|
|
141
|
+
// context — separate read avoids that.
|
|
142
|
+
const kind = await page.evaluate(() => {
|
|
143
|
+
const el = document.activeElement;
|
|
144
|
+
if (!el)
|
|
145
|
+
return "none";
|
|
146
|
+
const tag = el.tagName;
|
|
147
|
+
if (tag === "INPUT" || tag === "TEXTAREA")
|
|
148
|
+
return "input";
|
|
149
|
+
if (el.isContentEditable || el.getAttribute("role") === "textbox") {
|
|
150
|
+
return "editable";
|
|
151
|
+
}
|
|
152
|
+
return "unsupported:" + tag.toLowerCase();
|
|
153
|
+
});
|
|
154
|
+
if (kind === "none") {
|
|
155
|
+
throw new Error("pasteText: no focused element");
|
|
156
|
+
}
|
|
157
|
+
if (kind.startsWith("unsupported:")) {
|
|
158
|
+
throw new Error(`pasteText: unsupported element <${kind.split(":")[1]}>`);
|
|
159
|
+
}
|
|
160
|
+
if (kind === "input") {
|
|
161
|
+
await page.evaluate((t) => {
|
|
162
|
+
const el = document.activeElement;
|
|
163
|
+
if (!el)
|
|
164
|
+
return;
|
|
165
|
+
const tag = el.tagName;
|
|
166
|
+
const start = el.selectionStart ?? el.value.length;
|
|
167
|
+
const end = el.selectionEnd ?? el.value.length;
|
|
168
|
+
const nextValue = el.value.slice(0, start) + t + el.value.slice(end);
|
|
169
|
+
// React (and other controlled-component frameworks) overrides the
|
|
170
|
+
// `value` property setter on the prototype to maintain an internal
|
|
171
|
+
// value tracker. Assigning `input.value = ...` goes through that
|
|
172
|
+
// wrapper and updates the tracker, so React's onChange interceptor
|
|
173
|
+
// later sees current === tracked and skips the update; the next
|
|
174
|
+
// render then snaps the value back to controlled state.
|
|
175
|
+
// Use the un-overridden native setter so the tracker stays stale and
|
|
176
|
+
// React fires onChange on the dispatched input event below.
|
|
177
|
+
const proto = tag === "INPUT"
|
|
178
|
+
? HTMLInputElement.prototype
|
|
179
|
+
: HTMLTextAreaElement.prototype;
|
|
180
|
+
const nativeSetter = Object.getOwnPropertyDescriptor(proto, "value")?.set;
|
|
181
|
+
if (nativeSetter) {
|
|
182
|
+
nativeSetter.call(el, nextValue);
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
el.value = nextValue;
|
|
186
|
+
}
|
|
187
|
+
const caret = start + t.length;
|
|
188
|
+
el.setSelectionRange(caret, caret);
|
|
189
|
+
el.dispatchEvent(new InputEvent("input", {
|
|
190
|
+
bubbles: true,
|
|
191
|
+
inputType: "insertFromPaste",
|
|
192
|
+
data: t,
|
|
193
|
+
}));
|
|
194
|
+
el.dispatchEvent(new Event("change", { bubbles: true }));
|
|
195
|
+
}, text);
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
// contenteditable / rich editor path. CDP Input.insertText.
|
|
199
|
+
await page.keyboard.insertText(text);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Human-like scrolling: multiple small chunks with random intervals.
|
|
203
|
+
*/
|
|
204
|
+
export async function humanScroll(page, totalDelta) {
|
|
205
|
+
const direction = totalDelta > 0 ? 1 : -1;
|
|
206
|
+
let remaining = Math.abs(totalDelta);
|
|
207
|
+
while (remaining > 0) {
|
|
208
|
+
const chunk = Math.min(remaining, rand(50, 150));
|
|
209
|
+
await page.mouse.wheel(0, chunk * direction);
|
|
210
|
+
remaining -= chunk;
|
|
211
|
+
if (remaining > 0) {
|
|
212
|
+
await sleep(rand(30, 100));
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
//# sourceMappingURL=humanize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"humanize.js","sourceRoot":"","sources":["../../src/browser/humanize.ts"],"names":[],"mappings":"AAOA,wEAAwE;AACxE,MAAM,cAAc,GAAG,IAAI,OAAO,EAAe,CAAC;AAElD,SAAS,WAAW,CAAC,IAAU;IAC7B,OAAO,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACpD,CAAC;AAED,SAAS,WAAW,CAAC,IAAU,EAAE,GAAU;IACzC,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