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,228 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sourcepool
|
|
3
|
+
description: Read materials (news articles, videos, social posts) from the sourcepool aggregated content library. Use when the user asks to fetch, search, browse, or filter items from sourcepool — by source, tag, language, keyword, or time window — or to pull article body text for downstream summarization, drafting, or analysis.
|
|
4
|
+
type: instruction
|
|
5
|
+
builtin: true
|
|
6
|
+
readonly: true
|
|
7
|
+
autoLoad: sourcepool
|
|
8
|
+
allowed-tools:
|
|
9
|
+
- Bash(curl:*)
|
|
10
|
+
- WebFetch
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# sourcepool — 素材库读取
|
|
14
|
+
|
|
15
|
+
> Canonical URL: <https://pool.btcdev.me/skill.md>
|
|
16
|
+
|
|
17
|
+
sourcepool 是一个聚合多源内容(新闻、视频、社交)的素材库,对外暴露 REST JSON API。本 skill 指导 AI Agent 如何**只读地**从素材库取素材:列表、检索、按标签/语言/时间过滤、拉正文。
|
|
18
|
+
|
|
19
|
+
写入路径(`POST /ingest`、`DELETE /items/:id`)需要 `ADMIN_TOKEN`,不在本 skill 范围内 —— Agent 默认不要调用。
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 服务地址
|
|
24
|
+
|
|
25
|
+
Base URL:`https://pool.btcdev.me`
|
|
26
|
+
|
|
27
|
+
读接口**不需要鉴权**,直接 `curl` / `WebFetch` 即可。
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 数据模型速览
|
|
32
|
+
|
|
33
|
+
一个 **item** 表示一条素材,关键字段:
|
|
34
|
+
|
|
35
|
+
| 字段 | 说明 |
|
|
36
|
+
|---|---|
|
|
37
|
+
| `id` | 32 位 hex,`sha256(source_id + ":" + external_id).slice(0,32)`,稳定 |
|
|
38
|
+
| `source_id` / `source_name` / `source_kind` | 来源 key、显示名、类型(`news` / `video` / `social`) |
|
|
39
|
+
| `url` | 原文链接 |
|
|
40
|
+
| `title` / `summary` | 标题、摘要(摘要由 Haiku 生成) |
|
|
41
|
+
| `author` | 作者(可能为 null) |
|
|
42
|
+
| `language` | `en` / `zh` / `ja` / `ko` / `other` |
|
|
43
|
+
| `published_at` | 原始发布时间(可能为 null) |
|
|
44
|
+
| `fetched_at` | 入库时间 —— **所有列表都按它倒序**,且游标基于它 |
|
|
45
|
+
| `tags[]` | `[{ slug, name, kind }]`,`kind ∈ topic/person/org/geo/section/category/event/hashtag` |
|
|
46
|
+
| `tagging_status` | 只暴露 `done` 的;`pending`/`failed` 不会出现在读接口里 |
|
|
47
|
+
|
|
48
|
+
正文(`content_text`)默认**不返回**,需要在 `GET /items/:id` 上加 `?include=content`。
|
|
49
|
+
|
|
50
|
+
> ⚠️ FTS 范围:`?q=` 全文检索**只覆盖 title + summary**,不覆盖正文。需要按正文里的概念过滤时,走 `?tag=` 而不是 `?q=`。
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 端点
|
|
55
|
+
|
|
56
|
+
所有读端点都是 `GET`,返回 JSON。失败一般返回 `{ ok: false, error: "...", ... }`。
|
|
57
|
+
|
|
58
|
+
### `GET /healthz`
|
|
59
|
+
|
|
60
|
+
存活探测。返回 `{ ok: true }`。
|
|
61
|
+
|
|
62
|
+
### `GET /sources`
|
|
63
|
+
|
|
64
|
+
列出所有来源,附 `item_count`(仅统计 `tagging_status='done'` 的)。
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
curl -s "https://pool.btcdev.me/sources" | jq
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
返回:
|
|
71
|
+
```json
|
|
72
|
+
{ "data": [ { "id": "nyt", "name": "NYT", "kind": "news", "enabled": true, "item_count": 1234 } ] }
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### `GET /items` — 列表与检索(主力接口)
|
|
76
|
+
|
|
77
|
+
按 `fetched_at` 倒序分页。所有 query 参数都可选,组合可叠加(AND 语义)。
|
|
78
|
+
|
|
79
|
+
| 参数 | 类型 | 说明 |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| `source` | string,可重复 | 限定来源 id,例如 `?source=nyt&source=bloomberg` |
|
|
82
|
+
| `language` | `en`/`zh`/`ja`/`ko`/`other`,可重复 | 内容语言;不合法会返回 400 |
|
|
83
|
+
| `q` | string | 关键词(**仅 title + summary** FTS,英文 `plainto_tsquery`) |
|
|
84
|
+
| `tag` | slug,可重复 | 标签 slug 过滤 |
|
|
85
|
+
| `tag_mode` | `any`(默认)/ `all` | 多 tag 时取并集 or 交集 |
|
|
86
|
+
| `kind` | tag kind | 限定 `tag` 参数命中的 kind(topic/person/org/...) |
|
|
87
|
+
| `within` | `<n>h` 或 `<n>d` | 相对时间窗,例如 `24h`、`3d`;上限 90 天 |
|
|
88
|
+
| `from` / `to` / `tz` | `YYYY-MM-DD` + IANA tz | 日历时间窗;`to` 是闭区间(自动加 1 天) |
|
|
89
|
+
| `since` / `until` | ISO-8601 或 epoch 秒 | 绝对时间窗 |
|
|
90
|
+
| `cursor` | opaque base64 | 用上一页返回的 `next_cursor` |
|
|
91
|
+
| `limit` | int,1–100 | 默认 20 |
|
|
92
|
+
|
|
93
|
+
时间过滤优先级:`within` > `from`/`to` > `since`/`until`。
|
|
94
|
+
|
|
95
|
+
返回:
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"data": [ { /* item */ } ],
|
|
99
|
+
"next_cursor": "eyJmIjoiMjAyNi0wNS0xOFQwMjowMDowMC4wMDBaIiwiaSI6ImFiYzEyMyJ9"
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`next_cursor` 为 `null` 表示已到末页。
|
|
104
|
+
|
|
105
|
+
**常见用法:**
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# 最新 20 条
|
|
109
|
+
curl -s "https://pool.btcdev.me/items"
|
|
110
|
+
|
|
111
|
+
# 最近 24 小时的英文素材
|
|
112
|
+
curl -s "https://pool.btcdev.me/items?within=24h&language=en&limit=50"
|
|
113
|
+
|
|
114
|
+
# 关键词 + 来源
|
|
115
|
+
curl -s "https://pool.btcdev.me/items?q=openai&source=nyt&source=bloomberg"
|
|
116
|
+
|
|
117
|
+
# 同时命中两个 tag(交集)
|
|
118
|
+
curl -s "https://pool.btcdev.me/items?tag=ai&tag=regulation&tag_mode=all"
|
|
119
|
+
|
|
120
|
+
# 指定日期范围(北京时间整天)
|
|
121
|
+
curl -s "https://pool.btcdev.me/items?from=2026-05-10&to=2026-05-17&tz=Asia/Shanghai"
|
|
122
|
+
|
|
123
|
+
# 翻下一页
|
|
124
|
+
curl -s "https://pool.btcdev.me/items?cursor=$NEXT_CURSOR&limit=50"
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### `GET /items/:id` — 单条详情
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
curl -s "https://pool.btcdev.me/items/<id>" # 不含正文
|
|
131
|
+
curl -s "https://pool.btcdev.me/items/<id>?include=content" # 含 content_text
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
返回 `{ data: { ...item, tags, content_text? } }`。`tagging_status != 'done'` 的会返回 `404 not_found`。
|
|
135
|
+
|
|
136
|
+
### `GET /tags` — 标签云
|
|
137
|
+
|
|
138
|
+
| 参数 | 说明 |
|
|
139
|
+
|---|---|
|
|
140
|
+
| `kind` | 限定 tag kind |
|
|
141
|
+
| `q` | slug 前缀匹配 |
|
|
142
|
+
| `top` | 返回条数,默认 50,上限 200 |
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
curl -s "https://pool.btcdev.me/tags?kind=org&top=30"
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
返回:`{ data: [ { slug, name, kind, count } ] }`,按 `count` 降序。只统计已完成 tagging 的 item。
|
|
149
|
+
|
|
150
|
+
### `GET /tags/:slug/items` — 按标签取素材
|
|
151
|
+
|
|
152
|
+
`GET /items?tag=<slug>` 的语法糖。支持 `language`、`cursor`、`limit`。
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
curl -s "https://pool.btcdev.me/tags/openai/items?limit=20"
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### `GET /hot` — 24 小时热门
|
|
159
|
+
|
|
160
|
+
经过热度排序的英文素材,每小时刷新。
|
|
161
|
+
|
|
162
|
+
| 参数 | 说明 |
|
|
163
|
+
|---|---|
|
|
164
|
+
| `language` | 当前只支持 `en`(默认)。传其它返回 400。**只能传一个**。 |
|
|
165
|
+
| `limit` | 1–100,默认 20 |
|
|
166
|
+
| `cursor` | 翻页 |
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
curl -s "https://pool.btcdev.me/hot?limit=20"
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
返回 `{ data, next_cursor, language }`。
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## 推荐工作流
|
|
177
|
+
|
|
178
|
+
### 1. 给定话题,抓最近一周相关素材并阅读正文
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
# 1) 看看有没有现成的标签
|
|
182
|
+
curl -s "https://pool.btcdev.me/tags?q=ai&top=10"
|
|
183
|
+
|
|
184
|
+
# 2) 用标签 + 时间窗拉列表
|
|
185
|
+
curl -s "https://pool.btcdev.me/items?tag=ai&within=7d&language=en&limit=20"
|
|
186
|
+
|
|
187
|
+
# 3) 对感兴趣的逐条取正文
|
|
188
|
+
for id in $IDS; do
|
|
189
|
+
curl -s "https://pool.btcdev.me/items/$id?include=content"
|
|
190
|
+
done
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### 2. 跟踪某来源近况
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
curl -s "https://pool.btcdev.me/items?source=bloomberg&within=24h&limit=100"
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### 3. 关键词检索(注意只查 title+summary)
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
curl -s "https://pool.btcdev.me/items?q=quantum%20computing&limit=20"
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
若怀疑关键词只出现在正文里,改用 tag 过滤;如果还没有合适 tag,可以先抓宽一些(来源/语言/时间)再在客户端过滤正文。
|
|
206
|
+
|
|
207
|
+
### 4. 分页遍历
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
cursor=""
|
|
211
|
+
while :; do
|
|
212
|
+
resp=$(curl -s "https://pool.btcdev.me/items?within=24h&limit=100${cursor:+&cursor=$cursor}")
|
|
213
|
+
echo "$resp" | jq -c '.data[]'
|
|
214
|
+
cursor=$(echo "$resp" | jq -r '.next_cursor // empty')
|
|
215
|
+
[ -z "$cursor" ] && break
|
|
216
|
+
done
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## 注意事项
|
|
222
|
+
|
|
223
|
+
- **只看到已完成 tagging 的素材**:pending / failed 的 item 不会出现在任何读接口里。这是有意的,免得 Agent 拿到空摘要、空标签的半成品。
|
|
224
|
+
- **列表按 `fetched_at` 倒序**,不是 `published_at`。如果用户问"最新",按 fetched_at 解读;如果用户问"今天发布的",可能要再过滤 `published_at`。
|
|
225
|
+
- **FTS 只查 title+summary**。需要正文级检索时,要么先 tag,要么客户端过滤。
|
|
226
|
+
- **缓存头**:列表响应带 `Cache-Control: public, max-age=60`,详情 `max-age=300`。Agent 一般不用关心,但要意识到 30–300s 内的回查可能拿到 CDN 缓存。
|
|
227
|
+
- **错误格式**:参数错误一般 400 + `{ ok: false, error, ... }`;不存在 404 + `{ error: "not_found" }`。
|
|
228
|
+
- **不要写**:`/ingest`、`DELETE /items/:id`、`/hot/refresh` 需要 `ADMIN_TOKEN`。除非用户明确给出 token 并要求写入,否则只读。
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: x
|
|
3
|
+
description: X.com/Twitter browser automation operating notes.
|
|
4
|
+
type: instruction
|
|
5
|
+
builtin: true
|
|
6
|
+
readonly: true
|
|
7
|
+
autoLoad: x
|
|
8
|
+
autoCleanupHosts: x.com,twitter.com
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# X.com Built-in Skill
|
|
12
|
+
|
|
13
|
+
This skill is packaged with dipclaw and is read-only. Do not save, overwrite,
|
|
14
|
+
delete, install over, or auto-improve it.
|
|
15
|
+
|
|
16
|
+
Use this skill when the task mentions X.com, Twitter, tweets/posts, reposts,
|
|
17
|
+
quote posts, replies, follows, likes, X search, or an X profile/status URL.
|
|
18
|
+
|
|
19
|
+
## Stable Selectors
|
|
20
|
+
|
|
21
|
+
- Search input: `[data-testid="SearchBox_Search_Input"]`.
|
|
22
|
+
- Result/timeline cells: `[data-testid="cellInnerDiv"]`.
|
|
23
|
+
- Tweet/article container: `article[data-testid="tweet"]`.
|
|
24
|
+
- Tweet text: `[data-testid="tweetText"]`.
|
|
25
|
+
- Compose/reply editor: `[data-testid="tweetTextarea_0"]`.
|
|
26
|
+
- Submit buttons: `[data-testid="tweetButton"]` in dialogs,
|
|
27
|
+
`[data-testid="tweetButtonInline"]` inline.
|
|
28
|
+
- Common action buttons inside an article: `[data-testid="like"]`,
|
|
29
|
+
`[data-testid="reply"]`, `[data-testid="retweet"]`,
|
|
30
|
+
`[data-testid="unretweet"]`.
|
|
31
|
+
- Explore link: `[data-testid="AppTabBar_Explore_Link"]`.
|
|
32
|
+
- Latest tab on search pages: `a[role="tab"][href*="f=live"]`.
|
|
33
|
+
|
|
34
|
+
Prefer these selectors over snapshot refs because X React rerenders often make
|
|
35
|
+
refs stale after focus, dialog open/close, tab changes, and hover cards.
|
|
36
|
+
|
|
37
|
+
## Search Flow
|
|
38
|
+
|
|
39
|
+
- Default to the human search flow: open Explore with
|
|
40
|
+
`[data-testid="AppTabBar_Explore_Link"]`, type in
|
|
41
|
+
`[data-testid="SearchBox_Search_Input"]`, submit with Enter, then choose
|
|
42
|
+
Latest when needed. Do not use direct search URLs as the first path.
|
|
43
|
+
- For Explore, search input, and Latest tab, use selectors (not refs) and an
|
|
44
|
+
`expect` block. For normal button/link activation, include
|
|
45
|
+
`fallbackDispatch: "dom"` so the browser tool may perform a guarded DOM
|
|
46
|
+
click only if the mouse path/verification fails.
|
|
47
|
+
- Explore example: click `[data-testid="AppTabBar_Explore_Link"]` with
|
|
48
|
+
`expect: { selectorVisible: "[data-testid=\"SearchBox_Search_Input\"]" }`.
|
|
49
|
+
- Search submit example: type into `[data-testid="SearchBox_Search_Input"]`
|
|
50
|
+
with `clear: true`, `submit: true`, and
|
|
51
|
+
`expect: { urlContains: "/search", selectorVisible: "[data-testid=\"cellInnerDiv\"]" }`.
|
|
52
|
+
- Do not loop on repeated mouse event-miss failures. After one failed mouse
|
|
53
|
+
click on Explore, a tab, or a menu item, rely on tool-level
|
|
54
|
+
`fallbackDispatch: "dom"` or retry once with `dispatch: "dom"` when the
|
|
55
|
+
action is semantically a normal button/link activation and add `expect` for
|
|
56
|
+
the intended state.
|
|
57
|
+
- For search submission, verify both the URL/query state and visible results:
|
|
58
|
+
`expect: { urlContains: "/search", selectorVisible: "[data-testid=\"cellInnerDiv\"]" }`.
|
|
59
|
+
- If X refuses to focus the search input through `type` after the input is
|
|
60
|
+
visible, first close/hide blocking overlays per this skill, then retry
|
|
61
|
+
`type`. Direct search URL navigation is a last resort only when the
|
|
62
|
+
search-box path repeatedly fails and the user task allows a non-human path:
|
|
63
|
+
`https://x.com/search?q=<encoded>&src=typed_query&f=live`.
|
|
64
|
+
|
|
65
|
+
## Blocking UI
|
|
66
|
+
|
|
67
|
+
- X can leave a "Save post?" draft dialog mounted after a failed reply or
|
|
68
|
+
quote attempt. It appears as `[data-testid="confirmationSheetDialog"]` and
|
|
69
|
+
traps both pointer events and keyboard focus before the compose editor can
|
|
70
|
+
be cleared. Discard the stale draft with
|
|
71
|
+
`[data-testid="confirmationSheetConfirm"]`; do not choose Save, because Save
|
|
72
|
+
preserves the draft and the same dialog reappears on the next compose.
|
|
73
|
+
- X can leave Grok drawers or floating overlays mounted. A common symptom is
|
|
74
|
+
repeated `click event did not reach target` with `event landed on <(none)>`
|
|
75
|
+
even though hit testing finds the target.
|
|
76
|
+
- First try to close the overlay with a visible close button. If that is not
|
|
77
|
+
available, one scoped `evaluate` may hide `[data-testid="GrokDrawer"]` by
|
|
78
|
+
setting `display: none`, `visibility: hidden`, and `pointerEvents: none`,
|
|
79
|
+
then retry the intended action.
|
|
80
|
+
|
|
81
|
+
## Automatic Cleanup
|
|
82
|
+
|
|
83
|
+
The runtime executes this read-only built-in recipe before edit actions on
|
|
84
|
+
X/Twitter hosts. It is intentionally narrow: only the stale draft confirmation
|
|
85
|
+
sheet is dismissed, and it clicks Discard rather than Save.
|
|
86
|
+
|
|
87
|
+
```js dipclaw:auto-cleanup:before-edit
|
|
88
|
+
(() => {
|
|
89
|
+
const sheet = document.querySelector('[data-testid="confirmationSheetDialog"]');
|
|
90
|
+
if (!sheet) return { handled: false, reason: "no-x-draft-dialog" };
|
|
91
|
+
|
|
92
|
+
const discard =
|
|
93
|
+
sheet.querySelector('[data-testid="confirmationSheetConfirm"]') ||
|
|
94
|
+
Array.from(sheet.querySelectorAll("button")).find((button) =>
|
|
95
|
+
/discard|don'?t save/i.test(button.textContent || "")
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
if (!discard) {
|
|
99
|
+
return { handled: false, reason: "x-draft-dialog-without-discard" };
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
discard.click();
|
|
103
|
+
return { handled: true, reason: "discarded-x-draft-dialog" };
|
|
104
|
+
})()
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
```js dipclaw:auto-cleanup:after-click-event-miss
|
|
108
|
+
(() => {
|
|
109
|
+
const handled = [];
|
|
110
|
+
|
|
111
|
+
const sheet = document.querySelector('[data-testid="confirmationSheetDialog"]');
|
|
112
|
+
if (sheet) {
|
|
113
|
+
const discard =
|
|
114
|
+
sheet.querySelector('[data-testid="confirmationSheetConfirm"]') ||
|
|
115
|
+
Array.from(sheet.querySelectorAll("button")).find((button) =>
|
|
116
|
+
/discard|don'?t save/i.test(button.textContent || "")
|
|
117
|
+
);
|
|
118
|
+
if (discard) {
|
|
119
|
+
discard.click();
|
|
120
|
+
handled.push("discarded-x-draft-dialog");
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
for (const sel of ['[data-testid="GrokDrawer"]', '[data-testid="chat-drawer-main"]']) {
|
|
125
|
+
for (const drawer of document.querySelectorAll(sel)) {
|
|
126
|
+
const close =
|
|
127
|
+
drawer.querySelector('[aria-label="Close"]') ||
|
|
128
|
+
drawer.querySelector('[data-testid="app-bar-close"]') ||
|
|
129
|
+
Array.from(drawer.querySelectorAll('button,[role="button"]')).find((button) =>
|
|
130
|
+
/close/i.test(button.getAttribute("aria-label") || button.textContent || "")
|
|
131
|
+
);
|
|
132
|
+
if (close) {
|
|
133
|
+
close.click();
|
|
134
|
+
handled.push(`closed-${sel}`);
|
|
135
|
+
} else {
|
|
136
|
+
const el = drawer;
|
|
137
|
+
el.style.display = "none";
|
|
138
|
+
el.style.visibility = "hidden";
|
|
139
|
+
el.style.pointerEvents = "none";
|
|
140
|
+
handled.push(`hid-${sel}`);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return handled.length > 0
|
|
146
|
+
? { handled: true, reason: handled.join(",") }
|
|
147
|
+
: { handled: false, reason: "no-x-click-blocker" };
|
|
148
|
+
})()
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Timeline And Candidate Extraction
|
|
152
|
+
|
|
153
|
+
- Prefer `act` kind `extractTweetCards` on X timelines/search/profile pages
|
|
154
|
+
when available. It returns author, text, timestamp/status URL, and action
|
|
155
|
+
button selectors without writing ad-hoc DOM scraping code.
|
|
156
|
+
- If using `evaluate` for extraction, keep it read-only and return bounded
|
|
157
|
+
arrays. Use an arrow literal like `() => { ... }` or a bare expression; avoid
|
|
158
|
+
unnecessary IIFEs.
|
|
159
|
+
- Skip pinned old posts and pure retweets when the task asks for fresh original
|
|
160
|
+
posts.
|
|
161
|
+
|
|
162
|
+
## Hover Cards And Profiles
|
|
163
|
+
|
|
164
|
+
- For author qualification, hover the avatar or user link, wait briefly, then
|
|
165
|
+
snapshot/evaluate the hover card.
|
|
166
|
+
|
|
167
|
+
- **Selector strategy for hover (critical for stability):** use
|
|
168
|
+
**content-anchored** selectors that include the post's status ID, e.g.
|
|
169
|
+
`[data-testid="cellInnerDiv"]:has(a[href$="/<user>/status/<statusId>"]) a[href="/<user>"]`.
|
|
170
|
+
Never use **positional** selectors like `:nth-of-type(N)`, `:nth-child(N)`,
|
|
171
|
+
or bare `article[data-testid="tweet"]` without a `:has()` qualifier — X.com
|
|
172
|
+
virtualizes its timeline, so positions reshuffle every time the feed reflows
|
|
173
|
+
or you scroll, and a positional ref captured two snapshots ago will silently
|
|
174
|
+
point at the wrong post (or nothing).
|
|
175
|
+
|
|
176
|
+
- **If hover errors with `locator.scrollIntoViewIfNeeded: Timeout 5000ms exceeded`,**
|
|
177
|
+
the target element has been virtualized off-screen or unmounted. Do NOT
|
|
178
|
+
retry the same selector — identical args + identical error message will
|
|
179
|
+
trip the loop detector's `no_progress` pattern (5 consecutive same-sig
|
|
180
|
+
same-result calls → forced stop). Recovery, in order:
|
|
181
|
+
1. `act` kind `evaluate` with `window.scrollBy(0, 500)` to bring more
|
|
182
|
+
tweets into view.
|
|
183
|
+
2. Re-snapshot to get fresh refs from the now-loaded DOM.
|
|
184
|
+
3. If the same target still fails after one re-snapshot, abandon that
|
|
185
|
+
candidate and move on — looping on one author burns iterations and
|
|
186
|
+
trips loop detection. The task usually has more candidates available.
|
|
187
|
+
|
|
188
|
+
- Hover cards may also fail to render even when the hover call itself
|
|
189
|
+
returned ok. If snapshot after a successful hover shows no popup card,
|
|
190
|
+
retry the hover once with a longer wait (e.g., 3-5s). Falling back to
|
|
191
|
+
navigating to the profile URL works only when the task allows non-feed
|
|
192
|
+
navigation; some tasks explicitly forbid entering profile pages — in that
|
|
193
|
+
case skip the candidate instead of looping.
|
|
194
|
+
|
|
195
|
+
## Like, Follow, Reply, Quote
|
|
196
|
+
|
|
197
|
+
- For like/follow/reply/retweet buttons, normal mouse dispatch is preferred.
|
|
198
|
+
If the button is visible but mouse dispatch returns event-miss, retry once
|
|
199
|
+
with `dispatch: "dom"` and verify the final state.
|
|
200
|
+
- For quote flow, click the article retweet button, then choose the `Quote`
|
|
201
|
+
menu item from a fresh snapshot or a stable role ref such as `menuitem|Quote`.
|
|
202
|
+
- Compose/reply editors are rich editors. Use `type` with
|
|
203
|
+
`method: "paste"` and the editor selector.
|
|
204
|
+
- If `type` cannot focus the editor because of X event-miss, clear or hide the
|
|
205
|
+
blocking overlay first and retry. Do not write raw JavaScript insertion
|
|
206
|
+
code; use the browser tool's `type` action so the runtime handles focus,
|
|
207
|
+
insertion, verification, and recovery consistently.
|
|
208
|
+
|
|
209
|
+
## Verification
|
|
210
|
+
|
|
211
|
+
- Every post, reply, quote, like, follow, search, or publish action needs an
|
|
212
|
+
`expect` or a standalone `verify` before reporting success.
|
|
213
|
+
- For submit buttons, useful success signals include: compose/dialog hidden,
|
|
214
|
+
visible new item, changed action state/count, `unretweet` present after
|
|
215
|
+
quote/repost, or a permalink/status URL.
|
|
216
|
+
- X quote/reply dialogs may keep the editor mounted after a successful post.
|
|
217
|
+
In that case a cleared editor is a valid success signal:
|
|
218
|
+
`expect: { inputValue: { selector: "[data-testid=\"tweetTextarea_0\"]", equals: "" } }`.
|
|
219
|
+
- If a button click succeeds but verification fails, do not declare success.
|
|
220
|
+
Take a fresh snapshot or run `verify` with the expected final state.
|
|
221
|
+
|
|
222
|
+
## DOM Dispatch And Evaluate
|
|
223
|
+
|
|
224
|
+
- Do not write free-form `evaluate` scripts that click controls, submit search,
|
|
225
|
+
or insert post text. Use the browser tool's `click` / `type` actions.
|
|
226
|
+
- Tool-level `dispatch: "dom"` and `fallbackDispatch: "dom"` are allowed for
|
|
227
|
+
normal button/link activation when paired with an `expect` block. They are
|
|
228
|
+
guarded runtime primitives with actionability checks, logging, and
|
|
229
|
+
verification; raw `evaluate(() => element.click())` is not.
|
|
230
|
+
- When writing read-only `evaluate` scripts, avoid single-line `//` comments
|
|
231
|
+
inside arrow functions. A `//` comment can accidentally comment out closing
|
|
232
|
+
braces after serialization and produce `Unexpected end of input`.
|
|
233
|
+
|
|
234
|
+
## Dedup checks for quote / reply tasks
|
|
235
|
+
|
|
236
|
+
Use the store tool (see its description for the full API) for any "have I
|
|
237
|
+
already quoted / replied to / interacted with this post?" check. Never use
|
|
238
|
+
memory.read for this.
|
|
239
|
+
|
|
240
|
+
Collection naming on X:
|
|
241
|
+
- "x-quoted" — statusIds you've already quoted
|
|
242
|
+
- "x-replied" — statusIds you've already replied to
|
|
243
|
+
- "x-liked" — statusIds you've already liked
|
|
244
|
+
- "x-followed" — usernames you've already followed
|
|
245
|
+
|
|
246
|
+
Pattern before posting:
|
|
247
|
+
|
|
248
|
+
store.has("x-quoted", "<statusId>")
|
|
249
|
+
|
|
250
|
+
→ "yes": skip this candidate, pick another
|
|
251
|
+
→ "no": proceed with the quote/reply
|
|
252
|
+
|
|
253
|
+
Pattern after a successful action (compose dialog closed AND tweetButton
|
|
254
|
+
disappeared — see "Verifying actions actually worked" rules):
|
|
255
|
+
|
|
256
|
+
store.put("x-quoted", "<statusId>", undefined,
|
|
257
|
+
{ url: "https://x.com/<author>/status/<statusId>",
|
|
258
|
+
author: "@<handle>",
|
|
259
|
+
ts: "<ISO timestamp>",
|
|
260
|
+
source: "DipcoinLabs" | "fallback-trending" | ... })
|
|
261
|
+
|
|
262
|
+
Use the statusId (the digit string in the URL after /status/) as the id, not
|
|
263
|
+
the full URL. statusIds are unique per X post and stable.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "my-agent",
|
|
3
|
+
"workspace": "./workspace",
|
|
4
|
+
"llm": {
|
|
5
|
+
"protocol": "openai",
|
|
6
|
+
"baseUrl": "https://api.openai.com",
|
|
7
|
+
"apiKey": "${OPENAI_API_KEY}",
|
|
8
|
+
"model": "gpt-4o",
|
|
9
|
+
"imageGeneration": {
|
|
10
|
+
"apiKey": "${IMAGE_GEN_API_KEY}",
|
|
11
|
+
"model": "gpt-image-2"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"telegram": {
|
|
15
|
+
"botToken": "${TELEGRAM_BOT_TOKEN}",
|
|
16
|
+
"allowedUsers": [123456789]
|
|
17
|
+
},
|
|
18
|
+
"maxIterations": 90,
|
|
19
|
+
"debug": false,
|
|
20
|
+
"scheduler": {
|
|
21
|
+
"taskTimeoutMs": 1800000,
|
|
22
|
+
"chromeMaxRuntimeMs": 86400000,
|
|
23
|
+
"chromeRestartCheckIntervalMs": 600000,
|
|
24
|
+
"chromeRestartMinLeadMs": 600000
|
|
25
|
+
},
|
|
26
|
+
"browser": {
|
|
27
|
+
"headless": false,
|
|
28
|
+
"proxy": {
|
|
29
|
+
"protocol": "socks5",
|
|
30
|
+
"host": "127.0.0.1",
|
|
31
|
+
"port": 1080,
|
|
32
|
+
"username": "${PROXY_USER}",
|
|
33
|
+
"password": "${PROXY_PASS}"
|
|
34
|
+
},
|
|
35
|
+
"timezone": "America/New_York"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared agent-side types that subsystems (executors, image generator,
|
|
3
|
+
* frontends) need to reference without taking a dependency on Agent
|
|
4
|
+
* itself — avoids circular imports through the Agent class.
|
|
5
|
+
*/
|
|
6
|
+
export interface AttachmentSendPayload {
|
|
7
|
+
path: string;
|
|
8
|
+
caption?: string;
|
|
9
|
+
asImage?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Callback a frontend (e.g. TelegramBot) registers with the Agent so the LLM
|
|
13
|
+
* can deliver files/images back to the current user. Must resolve only after
|
|
14
|
+
* the frontend has accepted the file (or reject with an error the tool can
|
|
15
|
+
* report back to the LLM). Frontends typically use AsyncLocalStorage to pin
|
|
16
|
+
* the delivery to the chat that triggered the tool call.
|
|
17
|
+
*/
|
|
18
|
+
export type AttachmentSender = (payload: AttachmentSendPayload) => Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* Callback a frontend registers so tools can send interim text messages
|
|
21
|
+
* (e.g. "🎨 generating image..." before a long fetch). Optional — tools
|
|
22
|
+
* should no-op silently when not registered.
|
|
23
|
+
*/
|
|
24
|
+
export type ProgressNotifier = (text: string) => Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Opaque identifier for a registered frontend (e.g. "telegram", "center", "tui").
|
|
27
|
+
* Plain string for now — Agent doesn't need the dp-shared FrontendId enum
|
|
28
|
+
* constraint because frontends self-name on register.
|
|
29
|
+
*/
|
|
30
|
+
export type FrontendId = string;
|
|
31
|
+
/**
|
|
32
|
+
* Sentinel error a frontend's sender/notifier throws when its own
|
|
33
|
+
* AsyncLocalStorage scope is empty — i.e. the current call stack didn't
|
|
34
|
+
* originate from this frontend's chat handler, so it has no chat to deliver
|
|
35
|
+
* to. The Agent's multiplexer treats this as "not my turn, try the next
|
|
36
|
+
* frontend"; non-NoChatContext errors propagate.
|
|
37
|
+
*
|
|
38
|
+
* Frontends MUST throw NoChatContext rather than silently broadcasting or
|
|
39
|
+
* returning, otherwise the multiplexer can't tell who should handle the
|
|
40
|
+
* call when multiple frontends are registered.
|
|
41
|
+
*/
|
|
42
|
+
export declare class NoChatContext extends Error {
|
|
43
|
+
constructor(message?: string);
|
|
44
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared agent-side types that subsystems (executors, image generator,
|
|
3
|
+
* frontends) need to reference without taking a dependency on Agent
|
|
4
|
+
* itself — avoids circular imports through the Agent class.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Sentinel error a frontend's sender/notifier throws when its own
|
|
8
|
+
* AsyncLocalStorage scope is empty — i.e. the current call stack didn't
|
|
9
|
+
* originate from this frontend's chat handler, so it has no chat to deliver
|
|
10
|
+
* to. The Agent's multiplexer treats this as "not my turn, try the next
|
|
11
|
+
* frontend"; non-NoChatContext errors propagate.
|
|
12
|
+
*
|
|
13
|
+
* Frontends MUST throw NoChatContext rather than silently broadcasting or
|
|
14
|
+
* returning, otherwise the multiplexer can't tell who should handle the
|
|
15
|
+
* call when multiple frontends are registered.
|
|
16
|
+
*/
|
|
17
|
+
export class NoChatContext extends Error {
|
|
18
|
+
constructor(message = "No active chat context for this frontend") {
|
|
19
|
+
super(message);
|
|
20
|
+
this.name = "NoChatContext";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=agent-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-types.js","sourceRoot":"","sources":["../../src/agent/agent-types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAiCH;;;;;;;;;;GAUG;AACH,MAAM,OAAO,aAAc,SAAQ,KAAK;IACtC,YAAY,OAAO,GAAG,0CAA0C;QAC9D,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;IAC9B,CAAC;CACF"}
|