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,74 @@
|
|
|
1
|
+
import type { BrowserLock } from "./browser-lock.js";
|
|
2
|
+
export interface ChromeWatchdogOptions {
|
|
3
|
+
/** How often to check Chrome runtime (ms). */
|
|
4
|
+
checkIntervalMs: number;
|
|
5
|
+
/** Restart Chrome once uptime exceeds this (ms). */
|
|
6
|
+
maxRuntimeMs: number;
|
|
7
|
+
/** Skip restart if a scheduled task is due within this much time (ms). */
|
|
8
|
+
minLeadMs: number;
|
|
9
|
+
/**
|
|
10
|
+
* Close Chrome (keeping workspace lock) once it has been idle this long.
|
|
11
|
+
* The next browser action lazily re-launches in-place. Disabled when
|
|
12
|
+
* null/undefined.
|
|
13
|
+
*/
|
|
14
|
+
idleCloseMs?: number | null;
|
|
15
|
+
/** Skip idle-close if a scheduled task is due within this much time. */
|
|
16
|
+
idleCloseMinLeadMs?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Separate, typically faster cadence for idle-close polling. If unset,
|
|
19
|
+
* the watchdog uses checkIntervalMs for both checks. Idle-close benefits
|
|
20
|
+
* from a tighter loop (e.g. 60s) so it doesn't drag past the configured
|
|
21
|
+
* threshold by a full check interval.
|
|
22
|
+
*/
|
|
23
|
+
idleCheckIntervalMs?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface ChromeWatchdogDeps {
|
|
26
|
+
lock: BrowserLock;
|
|
27
|
+
/** Current Chrome uptime in ms, or null if not launched. */
|
|
28
|
+
getUptimeMs: () => number | null;
|
|
29
|
+
/** Ms since last browser-touching operation, or null if not launched. */
|
|
30
|
+
getIdleMs: () => number | null;
|
|
31
|
+
/** Next scheduled task time, or null if none. */
|
|
32
|
+
getNextRun: () => Date | null;
|
|
33
|
+
/** Restart Chrome with the given reason. Caller holds the browser lock. */
|
|
34
|
+
restartBrowser: (reason: string) => Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* Close Chrome but keep workspace ownership for in-place relaunch.
|
|
37
|
+
* Caller holds the browser lock. Used by idle-close.
|
|
38
|
+
*/
|
|
39
|
+
closeBrowser: (reason: string) => Promise<void>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Periodically supervise Chrome:
|
|
43
|
+
* - Idle-close: if Chrome has been idle past idleCloseMs and nothing else
|
|
44
|
+
* is using or about to use it, close it (keeping the workspace lock).
|
|
45
|
+
* The next chat / scheduled task triggers a lazy in-place relaunch.
|
|
46
|
+
* - Aged-restart: if Chrome uptime exceeds maxRuntimeMs, do a full
|
|
47
|
+
* restart while idle — long-running renderers accumulate heap /
|
|
48
|
+
* decoded images / DOM that aren't released until tabs close, so this
|
|
49
|
+
* bounds memory growth over multi-day sessions.
|
|
50
|
+
*
|
|
51
|
+
* Both checks bail when the browser lock is busy or a scheduled task is
|
|
52
|
+
* within its configured lead time, and both re-check inside the lock to
|
|
53
|
+
* avoid acting on data that changed while queued.
|
|
54
|
+
*/
|
|
55
|
+
export declare class ChromeWatchdog {
|
|
56
|
+
private readonly options;
|
|
57
|
+
private readonly deps;
|
|
58
|
+
private agedTimer;
|
|
59
|
+
private idleTimer;
|
|
60
|
+
constructor(options: ChromeWatchdogOptions, deps: ChromeWatchdogDeps);
|
|
61
|
+
start(): void;
|
|
62
|
+
stop(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Aged-restart iteration. Exposed for testing / manual triggering;
|
|
65
|
+
* normally driven by the interval timer.
|
|
66
|
+
*/
|
|
67
|
+
tickAgedRestart(): Promise<void>;
|
|
68
|
+
/**
|
|
69
|
+
* Idle-close iteration. Only runs when idleCloseMs is configured.
|
|
70
|
+
* Exposed for testing / manual triggering.
|
|
71
|
+
*/
|
|
72
|
+
tickIdleClose(): Promise<void>;
|
|
73
|
+
private hasScheduledTaskSoon;
|
|
74
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { formatDuration } from "./duration.js";
|
|
2
|
+
/**
|
|
3
|
+
* Periodically supervise Chrome:
|
|
4
|
+
* - Idle-close: if Chrome has been idle past idleCloseMs and nothing else
|
|
5
|
+
* is using or about to use it, close it (keeping the workspace lock).
|
|
6
|
+
* The next chat / scheduled task triggers a lazy in-place relaunch.
|
|
7
|
+
* - Aged-restart: if Chrome uptime exceeds maxRuntimeMs, do a full
|
|
8
|
+
* restart while idle — long-running renderers accumulate heap /
|
|
9
|
+
* decoded images / DOM that aren't released until tabs close, so this
|
|
10
|
+
* bounds memory growth over multi-day sessions.
|
|
11
|
+
*
|
|
12
|
+
* Both checks bail when the browser lock is busy or a scheduled task is
|
|
13
|
+
* within its configured lead time, and both re-check inside the lock to
|
|
14
|
+
* avoid acting on data that changed while queued.
|
|
15
|
+
*/
|
|
16
|
+
export class ChromeWatchdog {
|
|
17
|
+
options;
|
|
18
|
+
deps;
|
|
19
|
+
agedTimer = null;
|
|
20
|
+
idleTimer = null;
|
|
21
|
+
constructor(options, deps) {
|
|
22
|
+
this.options = options;
|
|
23
|
+
this.deps = deps;
|
|
24
|
+
}
|
|
25
|
+
start() {
|
|
26
|
+
if (this.agedTimer || this.idleTimer)
|
|
27
|
+
return;
|
|
28
|
+
this.agedTimer = setInterval(() => {
|
|
29
|
+
this.tickAgedRestart().catch((err) => {
|
|
30
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
31
|
+
console.error(` Chrome runtime watchdog failed: ${msg}`);
|
|
32
|
+
});
|
|
33
|
+
}, this.options.checkIntervalMs);
|
|
34
|
+
this.agedTimer.unref?.();
|
|
35
|
+
if (this.options.idleCloseMs != null) {
|
|
36
|
+
const interval = this.options.idleCheckIntervalMs ?? this.options.checkIntervalMs;
|
|
37
|
+
this.idleTimer = setInterval(() => {
|
|
38
|
+
this.tickIdleClose().catch((err) => {
|
|
39
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
40
|
+
console.error(` Chrome idle-close watchdog failed: ${msg}`);
|
|
41
|
+
});
|
|
42
|
+
}, interval);
|
|
43
|
+
this.idleTimer.unref?.();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
stop() {
|
|
47
|
+
if (this.agedTimer) {
|
|
48
|
+
clearInterval(this.agedTimer);
|
|
49
|
+
this.agedTimer = null;
|
|
50
|
+
}
|
|
51
|
+
if (this.idleTimer) {
|
|
52
|
+
clearInterval(this.idleTimer);
|
|
53
|
+
this.idleTimer = null;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Aged-restart iteration. Exposed for testing / manual triggering;
|
|
58
|
+
* normally driven by the interval timer.
|
|
59
|
+
*/
|
|
60
|
+
async tickAgedRestart() {
|
|
61
|
+
const { maxRuntimeMs } = this.options;
|
|
62
|
+
const uptimeMs = this.deps.getUptimeMs();
|
|
63
|
+
if (uptimeMs == null || uptimeMs < maxRuntimeMs)
|
|
64
|
+
return;
|
|
65
|
+
if (!this.deps.lock.isIdle()) {
|
|
66
|
+
console.log(` Chrome runtime ${formatDuration(uptimeMs)} exceeds ${formatDuration(maxRuntimeMs)}; restart deferred because browser is busy.`);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (this.hasScheduledTaskSoon(this.options.minLeadMs)) {
|
|
70
|
+
console.log(` Chrome runtime ${formatDuration(uptimeMs)} exceeds ${formatDuration(maxRuntimeMs)}; restart deferred because a scheduled task is close.`);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const handle = this.deps.lock.tryAcquire();
|
|
74
|
+
if (!handle)
|
|
75
|
+
return;
|
|
76
|
+
await handle.promise;
|
|
77
|
+
try {
|
|
78
|
+
// Re-check inside the lock — uptime / scheduled-soon may have changed
|
|
79
|
+
// while we queued, and a restart-on-stale data is the kind of bug
|
|
80
|
+
// that only shows up once a quarter.
|
|
81
|
+
const currentUptimeMs = this.deps.getUptimeMs();
|
|
82
|
+
if (currentUptimeMs == null || currentUptimeMs < maxRuntimeMs)
|
|
83
|
+
return;
|
|
84
|
+
if (this.hasScheduledTaskSoon(this.options.minLeadMs))
|
|
85
|
+
return;
|
|
86
|
+
await this.deps.restartBrowser(`Chrome runtime ${formatDuration(currentUptimeMs)} exceeded ${formatDuration(maxRuntimeMs)}`);
|
|
87
|
+
}
|
|
88
|
+
finally {
|
|
89
|
+
handle.release();
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Idle-close iteration. Only runs when idleCloseMs is configured.
|
|
94
|
+
* Exposed for testing / manual triggering.
|
|
95
|
+
*/
|
|
96
|
+
async tickIdleClose() {
|
|
97
|
+
const idleCloseMs = this.options.idleCloseMs;
|
|
98
|
+
if (idleCloseMs == null)
|
|
99
|
+
return;
|
|
100
|
+
const idleMs = this.deps.getIdleMs();
|
|
101
|
+
if (idleMs == null || idleMs < idleCloseMs)
|
|
102
|
+
return;
|
|
103
|
+
if (!this.deps.lock.isIdle())
|
|
104
|
+
return;
|
|
105
|
+
const leadMs = this.options.idleCloseMinLeadMs ?? 0;
|
|
106
|
+
if (this.hasScheduledTaskSoon(leadMs)) {
|
|
107
|
+
console.log(` Chrome idle for ${formatDuration(idleMs)}; close deferred because a scheduled task is close.`);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const handle = this.deps.lock.tryAcquire();
|
|
111
|
+
if (!handle)
|
|
112
|
+
return;
|
|
113
|
+
await handle.promise;
|
|
114
|
+
try {
|
|
115
|
+
const currentIdleMs = this.deps.getIdleMs();
|
|
116
|
+
if (currentIdleMs == null || currentIdleMs < idleCloseMs)
|
|
117
|
+
return;
|
|
118
|
+
if (this.hasScheduledTaskSoon(leadMs))
|
|
119
|
+
return;
|
|
120
|
+
await this.deps.closeBrowser(`Chrome idle for ${formatDuration(currentIdleMs)}`);
|
|
121
|
+
}
|
|
122
|
+
finally {
|
|
123
|
+
handle.release();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
hasScheduledTaskSoon(leadMs) {
|
|
127
|
+
if (leadMs <= 0)
|
|
128
|
+
return false;
|
|
129
|
+
const nextRun = this.deps.getNextRun();
|
|
130
|
+
if (!nextRun)
|
|
131
|
+
return false;
|
|
132
|
+
const untilNextRunMs = nextRun.getTime() - Date.now();
|
|
133
|
+
return untilNextRunMs >= 0 && untilNextRunMs < leadMs;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=chrome-watchdog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chrome-watchdog.js","sourceRoot":"","sources":["../../src/agent/chrome-watchdog.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import type { ChatMessage, LlmClient } from "../llm/types.js";
|
|
2
|
+
import { type OptimizeOptions } from "../llm/message-optimizer.js";
|
|
3
|
+
export interface ContextState {
|
|
4
|
+
goals: string[];
|
|
5
|
+
constraints: string[];
|
|
6
|
+
facts: string[];
|
|
7
|
+
decisions: string[];
|
|
8
|
+
visitedUrls: string[];
|
|
9
|
+
completedActions: string[];
|
|
10
|
+
errors: string[];
|
|
11
|
+
pending: string[];
|
|
12
|
+
currentPage?: {
|
|
13
|
+
title?: string;
|
|
14
|
+
url?: string;
|
|
15
|
+
note?: string;
|
|
16
|
+
};
|
|
17
|
+
rawRefs: string[];
|
|
18
|
+
}
|
|
19
|
+
export interface ContextManifest {
|
|
20
|
+
cacheablePrefixHash: string;
|
|
21
|
+
stateHash: string;
|
|
22
|
+
transcriptFile?: string;
|
|
23
|
+
messageCount: number;
|
|
24
|
+
charCount: number;
|
|
25
|
+
systemPromptChars: number;
|
|
26
|
+
systemPromptStaticChars: number;
|
|
27
|
+
systemPromptDynamicChars: number;
|
|
28
|
+
stateChars: number;
|
|
29
|
+
totalChars: number;
|
|
30
|
+
rawRefCount: number;
|
|
31
|
+
optimized: {
|
|
32
|
+
inputMessageCount: number;
|
|
33
|
+
outputMessageCount: number;
|
|
34
|
+
inputChars: number;
|
|
35
|
+
outputChars: number;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export interface BuiltLlmContext {
|
|
39
|
+
messages: ChatMessage[];
|
|
40
|
+
/**
|
|
41
|
+
* Concatenated form (`systemPromptStatic + systemPromptDynamic`) — kept for
|
|
42
|
+
* backwards-compatible callers that only need a single string.
|
|
43
|
+
*/
|
|
44
|
+
systemPrompt: string;
|
|
45
|
+
/**
|
|
46
|
+
* Cacheable prefix: only the caller-supplied `baseSystemPrompt`. Designed to
|
|
47
|
+
* be byte-identical across consecutive LLM requests within the same user
|
|
48
|
+
* turn so that providers can hit their prompt-cache layer.
|
|
49
|
+
*/
|
|
50
|
+
systemPromptStatic: string;
|
|
51
|
+
/**
|
|
52
|
+
* Per-turn appended section (currently the structured ContextState).
|
|
53
|
+
* Empty string when there is no earlier-state to surface.
|
|
54
|
+
*/
|
|
55
|
+
systemPromptDynamic: string;
|
|
56
|
+
manifest: ContextManifest;
|
|
57
|
+
}
|
|
58
|
+
export interface CompactResult {
|
|
59
|
+
messages: ChatMessage[];
|
|
60
|
+
state: ContextState;
|
|
61
|
+
changed: boolean;
|
|
62
|
+
summarizedCount: number;
|
|
63
|
+
retainedCount: number;
|
|
64
|
+
reason?: string;
|
|
65
|
+
}
|
|
66
|
+
export declare const CONTEXT_BUDGETS: {
|
|
67
|
+
readonly chat: {
|
|
68
|
+
readonly softLimitChars: 60000;
|
|
69
|
+
readonly hardLimitChars: 100000;
|
|
70
|
+
readonly targetChars: 40000;
|
|
71
|
+
readonly keepRatio: 0.6;
|
|
72
|
+
readonly memoryIndexMaxEntries: 30;
|
|
73
|
+
readonly memoryIndexMaxBytes: number;
|
|
74
|
+
readonly installedSkillsMaxChars: number;
|
|
75
|
+
};
|
|
76
|
+
readonly task: {
|
|
77
|
+
readonly compactionCharBudget: 80000;
|
|
78
|
+
readonly keepRatio: 0.55;
|
|
79
|
+
readonly memoryIndexMaxEntries: 20;
|
|
80
|
+
readonly memoryIndexMaxBytes: number;
|
|
81
|
+
readonly installedSkillsMaxChars: number;
|
|
82
|
+
readonly relevantMemoryMaxFiles: 5;
|
|
83
|
+
readonly relevantMemoryMaxTotalBytes: number;
|
|
84
|
+
readonly relevantMemoryPerFileBytes: number;
|
|
85
|
+
};
|
|
86
|
+
readonly summaryInput: {
|
|
87
|
+
readonly assistantContentPreviewChars: 800;
|
|
88
|
+
readonly toolCallArgsPreviewChars: 300;
|
|
89
|
+
readonly toolResultPreviewChars: 800;
|
|
90
|
+
readonly messagePreviewChars: 1000;
|
|
91
|
+
readonly snapshotPreviewChars: 1600;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export declare function createEmptyContextState(): ContextState;
|
|
95
|
+
export declare function estimateMessagesChars(messages: ChatMessage[]): number;
|
|
96
|
+
export declare function truncateContextSection(text: string, maxChars: number, note: string): string;
|
|
97
|
+
export declare function limitContextState(state: ContextState): ContextState;
|
|
98
|
+
export declare function normalizeContextState(raw: unknown): ContextState | null;
|
|
99
|
+
/**
|
|
100
|
+
* Merge two ContextState snapshots. Two distinct policies coexist here:
|
|
101
|
+
*
|
|
102
|
+
* Accumulative fields (goals, constraints, facts, decisions, visitedUrls,
|
|
103
|
+
* completedActions, errors, rawRefs) — UNION with previous. These are
|
|
104
|
+
* "things we have learned / done so far", so the safety-net behaviour of
|
|
105
|
+
* keeping previous items even when the LLM forgot to repeat them is the
|
|
106
|
+
* one we want.
|
|
107
|
+
*
|
|
108
|
+
* Mutable workflow fields (pending) — REPLACE with next. The summarizer
|
|
109
|
+
* prompt asks the LLM for the COMPLETE updated state; a unioning merge
|
|
110
|
+
* re-introduces items that the LLM legitimately removed (e.g. "log in"
|
|
111
|
+
* after the agent has actually logged in). That keeps stale TODOs alive
|
|
112
|
+
* in the system prompt across compactions and misleads later turns.
|
|
113
|
+
*
|
|
114
|
+
* currentPage — field-level merge: each field (title/url/note) is taken
|
|
115
|
+
* from next if present, else from previous. See mergeCurrentPage.
|
|
116
|
+
*/
|
|
117
|
+
export declare function mergeContextState(previous: ContextState, next: ContextState): ContextState;
|
|
118
|
+
export declare function isContextStateEmpty(state: ContextState): boolean;
|
|
119
|
+
export declare function formatContextState(state: ContextState): string;
|
|
120
|
+
export declare function parseContextStateFromText(text: string): ContextState | null;
|
|
121
|
+
export declare class ContextTranscript {
|
|
122
|
+
private seq;
|
|
123
|
+
private filePath?;
|
|
124
|
+
private refs;
|
|
125
|
+
constructor(workspace: string, scope: string);
|
|
126
|
+
append(message: ChatMessage, meta?: Record<string, unknown>): string;
|
|
127
|
+
getRef(message: ChatMessage): string | undefined;
|
|
128
|
+
getFilePath(): string | undefined;
|
|
129
|
+
}
|
|
130
|
+
export declare function compactMessagesWithState(opts: {
|
|
131
|
+
messages: ChatMessage[];
|
|
132
|
+
state: ContextState;
|
|
133
|
+
llmClient: LlmClient;
|
|
134
|
+
charBudget: number;
|
|
135
|
+
keepRatio?: number;
|
|
136
|
+
preserveFirst?: boolean;
|
|
137
|
+
transcript?: ContextTranscript;
|
|
138
|
+
/** Routed through to llmClient so summarization sticks to the same upstream account as the rest of the session. */
|
|
139
|
+
sessionId?: string;
|
|
140
|
+
}): Promise<CompactResult>;
|
|
141
|
+
export declare function buildLlmContext(opts: {
|
|
142
|
+
baseSystemPrompt: string;
|
|
143
|
+
state: ContextState;
|
|
144
|
+
messages: ChatMessage[];
|
|
145
|
+
optimizeOptions?: OptimizeOptions;
|
|
146
|
+
contextTitle: string;
|
|
147
|
+
transcript?: ContextTranscript;
|
|
148
|
+
}): BuiltLlmContext;
|