dp-worker 0.1.10 → 0.1.12
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/reddit.md +29 -0
- package/builtin-skills/x.md +59 -0
- package/builtin-skills/youtube.md +27 -0
- package/dist/agent/agent.d.ts +10 -2
- package/dist/agent/agent.js +37 -2
- package/dist/agent/agent.js.map +1 -1
- package/dist/agent/chat-engine.d.ts +7 -0
- package/dist/agent/chat-engine.js +5 -1
- package/dist/agent/chat-engine.js.map +1 -1
- package/dist/agent/executors/download-executor.d.ts +6 -0
- package/dist/agent/executors/download-executor.js +59 -0
- package/dist/agent/executors/download-executor.js.map +1 -0
- package/dist/agent/persona.d.ts +19 -0
- package/dist/agent/persona.js +43 -0
- package/dist/agent/persona.js.map +1 -0
- package/dist/agent/skill-generator.js +16 -0
- package/dist/agent/skill-generator.js.map +1 -1
- package/dist/agent/task-runner.d.ts +4 -1
- package/dist/agent/task-runner.js +16 -2
- package/dist/agent/task-runner.js.map +1 -1
- package/dist/browser/account-health.d.ts +22 -0
- package/dist/browser/account-health.js +84 -0
- package/dist/browser/account-health.js.map +1 -0
- package/dist/browser/actions.js +34 -0
- package/dist/browser/actions.js.map +1 -1
- package/dist/chrome-extension/omni-flow/manifest.json +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/llm/tools.d.ts +1 -0
- package/dist/llm/tools.js +20 -0
- package/dist/llm/tools.js.map +1 -1
- package/node_modules/dp-shared/dist/admin-broadcast.d.ts +1 -1
- package/node_modules/dp-shared/dist/admin-broadcast.d.ts.map +1 -1
- package/node_modules/dp-shared/dist/db-rows.d.ts +13 -0
- package/node_modules/dp-shared/dist/db-rows.d.ts.map +1 -1
- package/node_modules/dp-shared/dist/db-rows.js +14 -0
- package/node_modules/dp-shared/dist/db-rows.js.map +1 -1
- package/node_modules/dp-shared/dist/index.d.ts +2 -0
- package/node_modules/dp-shared/dist/index.d.ts.map +1 -1
- package/node_modules/dp-shared/dist/index.js +2 -0
- package/node_modules/dp-shared/dist/index.js.map +1 -1
- package/node_modules/dp-shared/dist/omni-flow-cookie.d.ts +112 -0
- package/node_modules/dp-shared/dist/omni-flow-cookie.d.ts.map +1 -0
- package/node_modules/dp-shared/dist/omni-flow-cookie.js +197 -0
- package/node_modules/dp-shared/dist/omni-flow-cookie.js.map +1 -0
- package/node_modules/dp-shared/dist/post-drafts-contracts.d.ts +417 -0
- package/node_modules/dp-shared/dist/post-drafts-contracts.d.ts.map +1 -0
- package/node_modules/dp-shared/dist/post-drafts-contracts.js +337 -0
- package/node_modules/dp-shared/dist/post-drafts-contracts.js.map +1 -0
- package/node_modules/dp-shared/dist/rest-contracts.d.ts +211 -0
- package/node_modules/dp-shared/dist/rest-contracts.d.ts.map +1 -1
- package/node_modules/dp-shared/dist/rest-contracts.js +140 -0
- package/node_modules/dp-shared/dist/rest-contracts.js.map +1 -1
- package/node_modules/dp-shared/dist/task-history-contracts.d.ts +2 -0
- package/node_modules/dp-shared/dist/task-history-contracts.d.ts.map +1 -1
- package/node_modules/dp-shared/dist/task-history-contracts.js +2 -0
- package/node_modules/dp-shared/dist/task-history-contracts.js.map +1 -1
- package/node_modules/dp-shared/src/admin-broadcast.ts +2 -0
- package/node_modules/dp-shared/src/db-rows.ts +15 -0
- package/node_modules/dp-shared/src/index.ts +2 -0
- package/node_modules/dp-shared/src/omni-flow-cookie.ts +272 -0
- package/node_modules/dp-shared/src/post-drafts-contracts.ts +402 -0
- package/node_modules/dp-shared/src/rest-contracts.ts +174 -0
- package/node_modules/dp-shared/src/task-history-contracts.ts +2 -0
- package/package.json +1 -1
- package/dist/render/ffmpeg-compose.d.ts +0 -25
- package/dist/render/ffmpeg-compose.js +0 -141
- package/dist/render/ffmpeg-compose.js.map +0 -1
- package/dist/render/ffmpeg-merge.d.ts +0 -5
- package/dist/render/ffmpeg-merge.js +0 -61
- package/dist/render/ffmpeg-merge.js.map +0 -1
- package/dist/render/font.d.ts +0 -1
- package/dist/render/font.js +0 -61
- package/dist/render/font.js.map +0 -1
- package/dist/render/image-gen.d.ts +0 -11
- package/dist/render/image-gen.js +0 -42
- package/dist/render/image-gen.js.map +0 -1
- package/dist/render/render-frontend.d.ts +0 -46
- package/dist/render/render-frontend.js +0 -156
- package/dist/render/render-frontend.js.map +0 -1
- package/dist/render/render-runner.d.ts +0 -30
- package/dist/render/render-runner.js +0 -115
- package/dist/render/render-runner.js.map +0 -1
- package/dist/render/tts.d.ts +0 -15
- package/dist/render/tts.js +0 -35
- package/dist/render/tts.js.map +0 -1
- package/node_modules/zod/LICENSE +0 -21
- package/node_modules/zod/README.md +0 -191
- package/node_modules/zod/index.cjs +0 -33
- package/node_modules/zod/index.d.cts +0 -4
- package/node_modules/zod/index.d.ts +0 -4
- package/node_modules/zod/index.js +0 -4
- package/node_modules/zod/locales/index.cjs +0 -17
- package/node_modules/zod/locales/index.d.cts +0 -1
- package/node_modules/zod/locales/index.d.ts +0 -1
- package/node_modules/zod/locales/index.js +0 -1
- package/node_modules/zod/locales/package.json +0 -7
- package/node_modules/zod/mini/index.cjs +0 -32
- package/node_modules/zod/mini/index.d.cts +0 -3
- package/node_modules/zod/mini/index.d.ts +0 -3
- package/node_modules/zod/mini/index.js +0 -3
- package/node_modules/zod/mini/package.json +0 -7
- package/node_modules/zod/package.json +0 -135
- package/node_modules/zod/src/index.ts +0 -4
- package/node_modules/zod/src/locales/index.ts +0 -1
- package/node_modules/zod/src/mini/index.ts +0 -3
- package/node_modules/zod/src/v3/ZodError.ts +0 -330
- package/node_modules/zod/src/v3/benchmarks/datetime.ts +0 -58
- package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +0 -80
- package/node_modules/zod/src/v3/benchmarks/index.ts +0 -59
- package/node_modules/zod/src/v3/benchmarks/ipv4.ts +0 -57
- package/node_modules/zod/src/v3/benchmarks/object.ts +0 -69
- package/node_modules/zod/src/v3/benchmarks/primitives.ts +0 -162
- package/node_modules/zod/src/v3/benchmarks/realworld.ts +0 -63
- package/node_modules/zod/src/v3/benchmarks/string.ts +0 -55
- package/node_modules/zod/src/v3/benchmarks/union.ts +0 -80
- package/node_modules/zod/src/v3/errors.ts +0 -13
- package/node_modules/zod/src/v3/external.ts +0 -6
- package/node_modules/zod/src/v3/helpers/enumUtil.ts +0 -17
- package/node_modules/zod/src/v3/helpers/errorUtil.ts +0 -8
- package/node_modules/zod/src/v3/helpers/parseUtil.ts +0 -176
- package/node_modules/zod/src/v3/helpers/partialUtil.ts +0 -34
- package/node_modules/zod/src/v3/helpers/typeAliases.ts +0 -2
- package/node_modules/zod/src/v3/helpers/util.ts +0 -224
- package/node_modules/zod/src/v3/index.ts +0 -4
- package/node_modules/zod/src/v3/locales/en.ts +0 -124
- package/node_modules/zod/src/v3/standard-schema.ts +0 -113
- package/node_modules/zod/src/v3/tests/Mocker.ts +0 -54
- package/node_modules/zod/src/v3/tests/all-errors.test.ts +0 -157
- package/node_modules/zod/src/v3/tests/anyunknown.test.ts +0 -28
- package/node_modules/zod/src/v3/tests/array.test.ts +0 -71
- package/node_modules/zod/src/v3/tests/async-parsing.test.ts +0 -388
- package/node_modules/zod/src/v3/tests/async-refinements.test.ts +0 -46
- package/node_modules/zod/src/v3/tests/base.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/bigint.test.ts +0 -55
- package/node_modules/zod/src/v3/tests/branded.test.ts +0 -53
- package/node_modules/zod/src/v3/tests/catch.test.ts +0 -220
- package/node_modules/zod/src/v3/tests/coerce.test.ts +0 -133
- package/node_modules/zod/src/v3/tests/complex.test.ts +0 -70
- package/node_modules/zod/src/v3/tests/custom.test.ts +0 -31
- package/node_modules/zod/src/v3/tests/date.test.ts +0 -32
- package/node_modules/zod/src/v3/tests/deepmasking.test.ts +0 -186
- package/node_modules/zod/src/v3/tests/default.test.ts +0 -112
- package/node_modules/zod/src/v3/tests/description.test.ts +0 -33
- package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +0 -315
- package/node_modules/zod/src/v3/tests/enum.test.ts +0 -80
- package/node_modules/zod/src/v3/tests/error.test.ts +0 -551
- package/node_modules/zod/src/v3/tests/firstparty.test.ts +0 -87
- package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +0 -21
- package/node_modules/zod/src/v3/tests/function.test.ts +0 -261
- package/node_modules/zod/src/v3/tests/generics.test.ts +0 -48
- package/node_modules/zod/src/v3/tests/instanceof.test.ts +0 -37
- package/node_modules/zod/src/v3/tests/intersection.test.ts +0 -110
- package/node_modules/zod/src/v3/tests/language-server.source.ts +0 -76
- package/node_modules/zod/src/v3/tests/language-server.test.ts +0 -207
- package/node_modules/zod/src/v3/tests/literal.test.ts +0 -36
- package/node_modules/zod/src/v3/tests/map.test.ts +0 -110
- package/node_modules/zod/src/v3/tests/masking.test.ts +0 -4
- package/node_modules/zod/src/v3/tests/mocker.test.ts +0 -19
- package/node_modules/zod/src/v3/tests/nan.test.ts +0 -24
- package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +0 -87
- package/node_modules/zod/src/v3/tests/nullable.test.ts +0 -42
- package/node_modules/zod/src/v3/tests/number.test.ts +0 -176
- package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/object.test.ts +0 -434
- package/node_modules/zod/src/v3/tests/optional.test.ts +0 -42
- package/node_modules/zod/src/v3/tests/parseUtil.test.ts +0 -23
- package/node_modules/zod/src/v3/tests/parser.test.ts +0 -41
- package/node_modules/zod/src/v3/tests/partials.test.ts +0 -243
- package/node_modules/zod/src/v3/tests/pickomit.test.ts +0 -111
- package/node_modules/zod/src/v3/tests/pipeline.test.ts +0 -29
- package/node_modules/zod/src/v3/tests/preprocess.test.ts +0 -186
- package/node_modules/zod/src/v3/tests/primitive.test.ts +0 -440
- package/node_modules/zod/src/v3/tests/promise.test.ts +0 -90
- package/node_modules/zod/src/v3/tests/readonly.test.ts +0 -194
- package/node_modules/zod/src/v3/tests/record.test.ts +0 -171
- package/node_modules/zod/src/v3/tests/recursive.test.ts +0 -197
- package/node_modules/zod/src/v3/tests/refine.test.ts +0 -313
- package/node_modules/zod/src/v3/tests/safeparse.test.ts +0 -27
- package/node_modules/zod/src/v3/tests/set.test.ts +0 -142
- package/node_modules/zod/src/v3/tests/standard-schema.test.ts +0 -83
- package/node_modules/zod/src/v3/tests/string.test.ts +0 -916
- package/node_modules/zod/src/v3/tests/transformer.test.ts +0 -233
- package/node_modules/zod/src/v3/tests/tuple.test.ts +0 -90
- package/node_modules/zod/src/v3/tests/unions.test.ts +0 -57
- package/node_modules/zod/src/v3/tests/validations.test.ts +0 -133
- package/node_modules/zod/src/v3/tests/void.test.ts +0 -15
- package/node_modules/zod/src/v3/types.ts +0 -5138
- package/node_modules/zod/src/v4/classic/checks.ts +0 -32
- package/node_modules/zod/src/v4/classic/coerce.ts +0 -27
- package/node_modules/zod/src/v4/classic/compat.ts +0 -70
- package/node_modules/zod/src/v4/classic/errors.ts +0 -82
- package/node_modules/zod/src/v4/classic/external.ts +0 -52
- package/node_modules/zod/src/v4/classic/from-json-schema.ts +0 -659
- package/node_modules/zod/src/v4/classic/index.ts +0 -5
- package/node_modules/zod/src/v4/classic/iso.ts +0 -90
- package/node_modules/zod/src/v4/classic/parse.ts +0 -82
- package/node_modules/zod/src/v4/classic/schemas.ts +0 -2672
- package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +0 -26
- package/node_modules/zod/src/v4/classic/tests/apply.test.ts +0 -59
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +0 -264
- package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +0 -216
- package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +0 -381
- package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/base.test.ts +0 -7
- package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +0 -54
- package/node_modules/zod/src/v4/classic/tests/brand.test.ts +0 -106
- package/node_modules/zod/src/v4/classic/tests/catch.test.ts +0 -326
- package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +0 -20
- package/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +0 -573
- package/node_modules/zod/src/v4/classic/tests/codec.test.ts +0 -703
- package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +0 -160
- package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +0 -374
- package/node_modules/zod/src/v4/classic/tests/custom.test.ts +0 -40
- package/node_modules/zod/src/v4/classic/tests/date.test.ts +0 -62
- package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +0 -302
- package/node_modules/zod/src/v4/classic/tests/default.test.ts +0 -409
- package/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +0 -27
- package/node_modules/zod/src/v4/classic/tests/description.test.ts +0 -32
- package/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +0 -197
- package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +0 -694
- package/node_modules/zod/src/v4/classic/tests/enum.test.ts +0 -285
- package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +0 -807
- package/node_modules/zod/src/v4/classic/tests/error.test.ts +0 -711
- package/node_modules/zod/src/v4/classic/tests/file.test.ts +0 -96
- package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +0 -179
- package/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +0 -26
- package/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +0 -895
- package/node_modules/zod/src/v4/classic/tests/function.test.ts +0 -360
- package/node_modules/zod/src/v4/classic/tests/generics.test.ts +0 -72
- package/node_modules/zod/src/v4/classic/tests/global-config.test.ts +0 -39
- package/node_modules/zod/src/v4/classic/tests/hash.test.ts +0 -68
- package/node_modules/zod/src/v4/classic/tests/index.test.ts +0 -939
- package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +0 -60
- package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +0 -198
- package/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +0 -46
- package/node_modules/zod/src/v4/classic/tests/json.test.ts +0 -109
- package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +0 -227
- package/node_modules/zod/src/v4/classic/tests/literal.test.ts +0 -117
- package/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +0 -29
- package/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +0 -24
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +0 -330
- package/node_modules/zod/src/v4/classic/tests/nan.test.ts +0 -21
- package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +0 -168
- package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +0 -101
- package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +0 -22
- package/node_modules/zod/src/v4/classic/tests/number.test.ts +0 -325
- package/node_modules/zod/src/v4/classic/tests/object.test.ts +0 -717
- package/node_modules/zod/src/v4/classic/tests/optional.test.ts +0 -333
- package/node_modules/zod/src/v4/classic/tests/partial.test.ts +0 -450
- package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +0 -211
- package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +0 -101
- package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +0 -74
- package/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +0 -26
- package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +0 -351
- package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +0 -175
- package/node_modules/zod/src/v4/classic/tests/promise.test.ts +0 -81
- package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +0 -23
- package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +0 -252
- package/node_modules/zod/src/v4/classic/tests/record.test.ts +0 -717
- package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +0 -631
- package/node_modules/zod/src/v4/classic/tests/refine.test.ts +0 -633
- package/node_modules/zod/src/v4/classic/tests/registries.test.ts +0 -243
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +0 -181
- package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +0 -134
- package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +0 -125
- package/node_modules/zod/src/v4/classic/tests/string.test.ts +0 -1224
- package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +0 -106
- package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +0 -771
- package/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +0 -438
- package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +0 -3125
- package/node_modules/zod/src/v4/classic/tests/transform.test.ts +0 -378
- package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +0 -496
- package/node_modules/zod/src/v4/classic/tests/union.test.ts +0 -273
- package/node_modules/zod/src/v4/classic/tests/url.test.ts +0 -13
- package/node_modules/zod/src/v4/classic/tests/validations.test.ts +0 -283
- package/node_modules/zod/src/v4/classic/tests/void.test.ts +0 -12
- package/node_modules/zod/src/v4/core/api.ts +0 -1823
- package/node_modules/zod/src/v4/core/checks.ts +0 -1293
- package/node_modules/zod/src/v4/core/config.ts +0 -15
- package/node_modules/zod/src/v4/core/core.ts +0 -153
- package/node_modules/zod/src/v4/core/doc.ts +0 -44
- package/node_modules/zod/src/v4/core/errors.ts +0 -455
- package/node_modules/zod/src/v4/core/index.ts +0 -16
- package/node_modules/zod/src/v4/core/json-schema-generator.ts +0 -126
- package/node_modules/zod/src/v4/core/json-schema-processors.ts +0 -666
- package/node_modules/zod/src/v4/core/json-schema.ts +0 -147
- package/node_modules/zod/src/v4/core/parse.ts +0 -195
- package/node_modules/zod/src/v4/core/regexes.ts +0 -190
- package/node_modules/zod/src/v4/core/registries.ts +0 -105
- package/node_modules/zod/src/v4/core/schemas.ts +0 -4730
- package/node_modules/zod/src/v4/core/standard-schema.ts +0 -159
- package/node_modules/zod/src/v4/core/tests/extend.test.ts +0 -59
- package/node_modules/zod/src/v4/core/tests/index.test.ts +0 -46
- package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +0 -124
- package/node_modules/zod/src/v4/core/tests/locales/el.test.ts +0 -215
- package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +0 -22
- package/node_modules/zod/src/v4/core/tests/locales/es.test.ts +0 -181
- package/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +0 -72
- package/node_modules/zod/src/v4/core/tests/locales/he.test.ts +0 -379
- package/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +0 -163
- package/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +0 -46
- package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +0 -128
- package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +0 -69
- package/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +0 -105
- package/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +0 -125
- package/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +0 -45
- package/node_modules/zod/src/v4/core/to-json-schema.ts +0 -622
- package/node_modules/zod/src/v4/core/util.ts +0 -983
- package/node_modules/zod/src/v4/core/versions.ts +0 -5
- package/node_modules/zod/src/v4/core/zsf.ts +0 -323
- package/node_modules/zod/src/v4/index.ts +0 -4
- package/node_modules/zod/src/v4/locales/ar.ts +0 -115
- package/node_modules/zod/src/v4/locales/az.ts +0 -111
- package/node_modules/zod/src/v4/locales/be.ts +0 -176
- package/node_modules/zod/src/v4/locales/bg.ts +0 -128
- package/node_modules/zod/src/v4/locales/ca.ts +0 -116
- package/node_modules/zod/src/v4/locales/cs.ts +0 -118
- package/node_modules/zod/src/v4/locales/da.ts +0 -123
- package/node_modules/zod/src/v4/locales/de.ts +0 -116
- package/node_modules/zod/src/v4/locales/el.ts +0 -121
- package/node_modules/zod/src/v4/locales/en.ts +0 -123
- package/node_modules/zod/src/v4/locales/eo.ts +0 -118
- package/node_modules/zod/src/v4/locales/es.ts +0 -141
- package/node_modules/zod/src/v4/locales/fa.ts +0 -126
- package/node_modules/zod/src/v4/locales/fi.ts +0 -121
- package/node_modules/zod/src/v4/locales/fr-CA.ts +0 -116
- package/node_modules/zod/src/v4/locales/fr.ts +0 -132
- package/node_modules/zod/src/v4/locales/he.ts +0 -246
- package/node_modules/zod/src/v4/locales/hr.ts +0 -131
- package/node_modules/zod/src/v4/locales/hu.ts +0 -117
- package/node_modules/zod/src/v4/locales/hy.ts +0 -164
- package/node_modules/zod/src/v4/locales/id.ts +0 -115
- package/node_modules/zod/src/v4/locales/index.ts +0 -52
- package/node_modules/zod/src/v4/locales/is.ts +0 -119
- package/node_modules/zod/src/v4/locales/it.ts +0 -116
- package/node_modules/zod/src/v4/locales/ja.ts +0 -114
- package/node_modules/zod/src/v4/locales/ka.ts +0 -123
- package/node_modules/zod/src/v4/locales/kh.ts +0 -7
- package/node_modules/zod/src/v4/locales/km.ts +0 -119
- package/node_modules/zod/src/v4/locales/ko.ts +0 -121
- package/node_modules/zod/src/v4/locales/lt.ts +0 -239
- package/node_modules/zod/src/v4/locales/mk.ts +0 -118
- package/node_modules/zod/src/v4/locales/ms.ts +0 -115
- package/node_modules/zod/src/v4/locales/nl.ts +0 -121
- package/node_modules/zod/src/v4/locales/no.ts +0 -116
- package/node_modules/zod/src/v4/locales/ota.ts +0 -117
- package/node_modules/zod/src/v4/locales/pl.ts +0 -118
- package/node_modules/zod/src/v4/locales/ps.ts +0 -126
- package/node_modules/zod/src/v4/locales/pt.ts +0 -116
- package/node_modules/zod/src/v4/locales/ro.ts +0 -129
- package/node_modules/zod/src/v4/locales/ru.ts +0 -176
- package/node_modules/zod/src/v4/locales/sl.ts +0 -118
- package/node_modules/zod/src/v4/locales/sv.ts +0 -119
- package/node_modules/zod/src/v4/locales/ta.ts +0 -118
- package/node_modules/zod/src/v4/locales/th.ts +0 -119
- package/node_modules/zod/src/v4/locales/tr.ts +0 -111
- package/node_modules/zod/src/v4/locales/ua.ts +0 -7
- package/node_modules/zod/src/v4/locales/uk.ts +0 -117
- package/node_modules/zod/src/v4/locales/ur.ts +0 -119
- package/node_modules/zod/src/v4/locales/uz.ts +0 -117
- package/node_modules/zod/src/v4/locales/vi.ts +0 -117
- package/node_modules/zod/src/v4/locales/yo.ts +0 -124
- package/node_modules/zod/src/v4/locales/zh-CN.ts +0 -116
- package/node_modules/zod/src/v4/locales/zh-TW.ts +0 -115
- package/node_modules/zod/src/v4/mini/checks.ts +0 -32
- package/node_modules/zod/src/v4/mini/coerce.ts +0 -27
- package/node_modules/zod/src/v4/mini/external.ts +0 -41
- package/node_modules/zod/src/v4/mini/index.ts +0 -3
- package/node_modules/zod/src/v4/mini/iso.ts +0 -66
- package/node_modules/zod/src/v4/mini/parse.ts +0 -14
- package/node_modules/zod/src/v4/mini/schemas.ts +0 -1947
- package/node_modules/zod/src/v4/mini/tests/apply.test.ts +0 -24
- package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +0 -129
- package/node_modules/zod/src/v4/mini/tests/brand.test.ts +0 -94
- package/node_modules/zod/src/v4/mini/tests/checks.test.ts +0 -144
- package/node_modules/zod/src/v4/mini/tests/codec.test.ts +0 -548
- package/node_modules/zod/src/v4/mini/tests/computed.test.ts +0 -36
- package/node_modules/zod/src/v4/mini/tests/error.test.ts +0 -22
- package/node_modules/zod/src/v4/mini/tests/functions.test.ts +0 -5
- package/node_modules/zod/src/v4/mini/tests/index.test.ts +0 -993
- package/node_modules/zod/src/v4/mini/tests/number.test.ts +0 -95
- package/node_modules/zod/src/v4/mini/tests/object.test.ts +0 -227
- package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +0 -43
- package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +0 -325
- package/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +0 -50
- package/node_modules/zod/src/v4/mini/tests/string.test.ts +0 -352
- package/node_modules/zod/src/v4-mini/index.ts +0 -3
- package/node_modules/zod/v3/ZodError.cjs +0 -138
- package/node_modules/zod/v3/ZodError.d.cts +0 -164
- package/node_modules/zod/v3/ZodError.d.ts +0 -164
- package/node_modules/zod/v3/ZodError.js +0 -133
- package/node_modules/zod/v3/errors.cjs +0 -17
- package/node_modules/zod/v3/errors.d.cts +0 -5
- package/node_modules/zod/v3/errors.d.ts +0 -5
- package/node_modules/zod/v3/errors.js +0 -9
- package/node_modules/zod/v3/external.cjs +0 -22
- package/node_modules/zod/v3/external.d.cts +0 -6
- package/node_modules/zod/v3/external.d.ts +0 -6
- package/node_modules/zod/v3/external.js +0 -6
- package/node_modules/zod/v3/helpers/enumUtil.cjs +0 -2
- package/node_modules/zod/v3/helpers/enumUtil.d.cts +0 -8
- package/node_modules/zod/v3/helpers/enumUtil.d.ts +0 -8
- package/node_modules/zod/v3/helpers/enumUtil.js +0 -1
- package/node_modules/zod/v3/helpers/errorUtil.cjs +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.d.cts +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.d.ts +0 -9
- package/node_modules/zod/v3/helpers/errorUtil.js +0 -6
- package/node_modules/zod/v3/helpers/parseUtil.cjs +0 -124
- package/node_modules/zod/v3/helpers/parseUtil.d.cts +0 -78
- package/node_modules/zod/v3/helpers/parseUtil.d.ts +0 -78
- package/node_modules/zod/v3/helpers/parseUtil.js +0 -109
- package/node_modules/zod/v3/helpers/partialUtil.cjs +0 -2
- package/node_modules/zod/v3/helpers/partialUtil.d.cts +0 -8
- package/node_modules/zod/v3/helpers/partialUtil.d.ts +0 -8
- package/node_modules/zod/v3/helpers/partialUtil.js +0 -1
- package/node_modules/zod/v3/helpers/typeAliases.cjs +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.d.cts +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.d.ts +0 -2
- package/node_modules/zod/v3/helpers/typeAliases.js +0 -1
- package/node_modules/zod/v3/helpers/util.cjs +0 -137
- package/node_modules/zod/v3/helpers/util.d.cts +0 -85
- package/node_modules/zod/v3/helpers/util.d.ts +0 -85
- package/node_modules/zod/v3/helpers/util.js +0 -133
- package/node_modules/zod/v3/index.cjs +0 -33
- package/node_modules/zod/v3/index.d.cts +0 -4
- package/node_modules/zod/v3/index.d.ts +0 -4
- package/node_modules/zod/v3/index.js +0 -4
- package/node_modules/zod/v3/locales/en.cjs +0 -112
- package/node_modules/zod/v3/locales/en.d.cts +0 -3
- package/node_modules/zod/v3/locales/en.d.ts +0 -3
- package/node_modules/zod/v3/locales/en.js +0 -109
- package/node_modules/zod/v3/package.json +0 -7
- package/node_modules/zod/v3/standard-schema.cjs +0 -2
- package/node_modules/zod/v3/standard-schema.d.cts +0 -102
- package/node_modules/zod/v3/standard-schema.d.ts +0 -102
- package/node_modules/zod/v3/standard-schema.js +0 -1
- package/node_modules/zod/v3/types.cjs +0 -3777
- package/node_modules/zod/v3/types.d.cts +0 -1034
- package/node_modules/zod/v3/types.d.ts +0 -1034
- package/node_modules/zod/v3/types.js +0 -3695
- package/node_modules/zod/v4/classic/checks.cjs +0 -33
- package/node_modules/zod/v4/classic/checks.d.cts +0 -1
- package/node_modules/zod/v4/classic/checks.d.ts +0 -1
- package/node_modules/zod/v4/classic/checks.js +0 -1
- package/node_modules/zod/v4/classic/coerce.cjs +0 -47
- package/node_modules/zod/v4/classic/coerce.d.cts +0 -17
- package/node_modules/zod/v4/classic/coerce.d.ts +0 -17
- package/node_modules/zod/v4/classic/coerce.js +0 -17
- package/node_modules/zod/v4/classic/compat.cjs +0 -61
- package/node_modules/zod/v4/classic/compat.d.cts +0 -50
- package/node_modules/zod/v4/classic/compat.d.ts +0 -50
- package/node_modules/zod/v4/classic/compat.js +0 -31
- package/node_modules/zod/v4/classic/errors.cjs +0 -74
- package/node_modules/zod/v4/classic/errors.d.cts +0 -30
- package/node_modules/zod/v4/classic/errors.d.ts +0 -30
- package/node_modules/zod/v4/classic/errors.js +0 -48
- package/node_modules/zod/v4/classic/external.cjs +0 -73
- package/node_modules/zod/v4/classic/external.d.cts +0 -16
- package/node_modules/zod/v4/classic/external.d.ts +0 -16
- package/node_modules/zod/v4/classic/external.js +0 -20
- package/node_modules/zod/v4/classic/from-json-schema.cjs +0 -625
- package/node_modules/zod/v4/classic/from-json-schema.d.cts +0 -12
- package/node_modules/zod/v4/classic/from-json-schema.d.ts +0 -12
- package/node_modules/zod/v4/classic/from-json-schema.js +0 -599
- package/node_modules/zod/v4/classic/index.cjs +0 -33
- package/node_modules/zod/v4/classic/index.d.cts +0 -4
- package/node_modules/zod/v4/classic/index.d.ts +0 -4
- package/node_modules/zod/v4/classic/index.js +0 -4
- package/node_modules/zod/v4/classic/iso.cjs +0 -60
- package/node_modules/zod/v4/classic/iso.d.cts +0 -22
- package/node_modules/zod/v4/classic/iso.d.ts +0 -22
- package/node_modules/zod/v4/classic/iso.js +0 -30
- package/node_modules/zod/v4/classic/package.json +0 -7
- package/node_modules/zod/v4/classic/parse.cjs +0 -41
- package/node_modules/zod/v4/classic/parse.d.cts +0 -31
- package/node_modules/zod/v4/classic/parse.d.ts +0 -31
- package/node_modules/zod/v4/classic/parse.js +0 -15
- package/node_modules/zod/v4/classic/schemas.cjs +0 -1511
- package/node_modules/zod/v4/classic/schemas.d.cts +0 -767
- package/node_modules/zod/v4/classic/schemas.d.ts +0 -767
- package/node_modules/zod/v4/classic/schemas.js +0 -1395
- package/node_modules/zod/v4/core/api.cjs +0 -1227
- package/node_modules/zod/v4/core/api.d.cts +0 -325
- package/node_modules/zod/v4/core/api.d.ts +0 -325
- package/node_modules/zod/v4/core/api.js +0 -1087
- package/node_modules/zod/v4/core/checks.cjs +0 -601
- package/node_modules/zod/v4/core/checks.d.cts +0 -278
- package/node_modules/zod/v4/core/checks.d.ts +0 -278
- package/node_modules/zod/v4/core/checks.js +0 -575
- package/node_modules/zod/v4/core/core.cjs +0 -85
- package/node_modules/zod/v4/core/core.d.cts +0 -70
- package/node_modules/zod/v4/core/core.d.ts +0 -70
- package/node_modules/zod/v4/core/core.js +0 -78
- package/node_modules/zod/v4/core/doc.cjs +0 -39
- package/node_modules/zod/v4/core/doc.d.cts +0 -14
- package/node_modules/zod/v4/core/doc.d.ts +0 -14
- package/node_modules/zod/v4/core/doc.js +0 -35
- package/node_modules/zod/v4/core/errors.cjs +0 -216
- package/node_modules/zod/v4/core/errors.d.cts +0 -221
- package/node_modules/zod/v4/core/errors.d.ts +0 -221
- package/node_modules/zod/v4/core/errors.js +0 -185
- package/node_modules/zod/v4/core/index.cjs +0 -47
- package/node_modules/zod/v4/core/index.d.cts +0 -16
- package/node_modules/zod/v4/core/index.d.ts +0 -16
- package/node_modules/zod/v4/core/index.js +0 -16
- package/node_modules/zod/v4/core/json-schema-generator.cjs +0 -99
- package/node_modules/zod/v4/core/json-schema-generator.d.cts +0 -65
- package/node_modules/zod/v4/core/json-schema-generator.d.ts +0 -65
- package/node_modules/zod/v4/core/json-schema-generator.js +0 -95
- package/node_modules/zod/v4/core/json-schema-processors.cjs +0 -644
- package/node_modules/zod/v4/core/json-schema-processors.d.cts +0 -49
- package/node_modules/zod/v4/core/json-schema-processors.d.ts +0 -49
- package/node_modules/zod/v4/core/json-schema-processors.js +0 -601
- package/node_modules/zod/v4/core/json-schema.cjs +0 -2
- package/node_modules/zod/v4/core/json-schema.d.cts +0 -88
- package/node_modules/zod/v4/core/json-schema.d.ts +0 -88
- package/node_modules/zod/v4/core/json-schema.js +0 -1
- package/node_modules/zod/v4/core/package.json +0 -7
- package/node_modules/zod/v4/core/parse.cjs +0 -131
- package/node_modules/zod/v4/core/parse.d.cts +0 -49
- package/node_modules/zod/v4/core/parse.d.ts +0 -49
- package/node_modules/zod/v4/core/parse.js +0 -93
- package/node_modules/zod/v4/core/regexes.cjs +0 -172
- package/node_modules/zod/v4/core/regexes.d.cts +0 -85
- package/node_modules/zod/v4/core/regexes.d.ts +0 -85
- package/node_modules/zod/v4/core/regexes.js +0 -139
- package/node_modules/zod/v4/core/registries.cjs +0 -56
- package/node_modules/zod/v4/core/registries.d.cts +0 -35
- package/node_modules/zod/v4/core/registries.d.ts +0 -35
- package/node_modules/zod/v4/core/registries.js +0 -51
- package/node_modules/zod/v4/core/schemas.cjs +0 -2270
- package/node_modules/zod/v4/core/schemas.d.cts +0 -1184
- package/node_modules/zod/v4/core/schemas.d.ts +0 -1184
- package/node_modules/zod/v4/core/schemas.js +0 -2239
- package/node_modules/zod/v4/core/standard-schema.cjs +0 -2
- package/node_modules/zod/v4/core/standard-schema.d.cts +0 -126
- package/node_modules/zod/v4/core/standard-schema.d.ts +0 -126
- package/node_modules/zod/v4/core/standard-schema.js +0 -1
- package/node_modules/zod/v4/core/to-json-schema.cjs +0 -457
- package/node_modules/zod/v4/core/to-json-schema.d.cts +0 -114
- package/node_modules/zod/v4/core/to-json-schema.d.ts +0 -114
- package/node_modules/zod/v4/core/to-json-schema.js +0 -448
- package/node_modules/zod/v4/core/util.cjs +0 -734
- package/node_modules/zod/v4/core/util.d.cts +0 -200
- package/node_modules/zod/v4/core/util.d.ts +0 -200
- package/node_modules/zod/v4/core/util.js +0 -674
- package/node_modules/zod/v4/core/versions.cjs +0 -8
- package/node_modules/zod/v4/core/versions.d.cts +0 -5
- package/node_modules/zod/v4/core/versions.d.ts +0 -5
- package/node_modules/zod/v4/core/versions.js +0 -5
- package/node_modules/zod/v4/index.cjs +0 -22
- package/node_modules/zod/v4/index.d.cts +0 -3
- package/node_modules/zod/v4/index.d.ts +0 -3
- package/node_modules/zod/v4/index.js +0 -3
- package/node_modules/zod/v4/locales/ar.cjs +0 -133
- package/node_modules/zod/v4/locales/ar.d.cts +0 -5
- package/node_modules/zod/v4/locales/ar.d.ts +0 -4
- package/node_modules/zod/v4/locales/ar.js +0 -106
- package/node_modules/zod/v4/locales/az.cjs +0 -132
- package/node_modules/zod/v4/locales/az.d.cts +0 -5
- package/node_modules/zod/v4/locales/az.d.ts +0 -4
- package/node_modules/zod/v4/locales/az.js +0 -105
- package/node_modules/zod/v4/locales/be.cjs +0 -183
- package/node_modules/zod/v4/locales/be.d.cts +0 -5
- package/node_modules/zod/v4/locales/be.d.ts +0 -4
- package/node_modules/zod/v4/locales/be.js +0 -156
- package/node_modules/zod/v4/locales/bg.cjs +0 -147
- package/node_modules/zod/v4/locales/bg.d.cts +0 -5
- package/node_modules/zod/v4/locales/bg.d.ts +0 -4
- package/node_modules/zod/v4/locales/bg.js +0 -120
- package/node_modules/zod/v4/locales/ca.cjs +0 -134
- package/node_modules/zod/v4/locales/ca.d.cts +0 -5
- package/node_modules/zod/v4/locales/ca.d.ts +0 -4
- package/node_modules/zod/v4/locales/ca.js +0 -107
- package/node_modules/zod/v4/locales/cs.cjs +0 -138
- package/node_modules/zod/v4/locales/cs.d.cts +0 -5
- package/node_modules/zod/v4/locales/cs.d.ts +0 -4
- package/node_modules/zod/v4/locales/cs.js +0 -111
- package/node_modules/zod/v4/locales/da.cjs +0 -142
- package/node_modules/zod/v4/locales/da.d.cts +0 -5
- package/node_modules/zod/v4/locales/da.d.ts +0 -4
- package/node_modules/zod/v4/locales/da.js +0 -115
- package/node_modules/zod/v4/locales/de.cjs +0 -135
- package/node_modules/zod/v4/locales/de.d.cts +0 -5
- package/node_modules/zod/v4/locales/de.d.ts +0 -4
- package/node_modules/zod/v4/locales/de.js +0 -108
- package/node_modules/zod/v4/locales/el.cjs +0 -136
- package/node_modules/zod/v4/locales/el.d.cts +0 -5
- package/node_modules/zod/v4/locales/el.d.ts +0 -4
- package/node_modules/zod/v4/locales/el.js +0 -109
- package/node_modules/zod/v4/locales/en.cjs +0 -140
- package/node_modules/zod/v4/locales/en.d.cts +0 -5
- package/node_modules/zod/v4/locales/en.d.ts +0 -4
- package/node_modules/zod/v4/locales/en.js +0 -113
- package/node_modules/zod/v4/locales/eo.cjs +0 -136
- package/node_modules/zod/v4/locales/eo.d.cts +0 -5
- package/node_modules/zod/v4/locales/eo.d.ts +0 -4
- package/node_modules/zod/v4/locales/eo.js +0 -109
- package/node_modules/zod/v4/locales/es.cjs +0 -159
- package/node_modules/zod/v4/locales/es.d.cts +0 -5
- package/node_modules/zod/v4/locales/es.d.ts +0 -4
- package/node_modules/zod/v4/locales/es.js +0 -132
- package/node_modules/zod/v4/locales/fa.cjs +0 -141
- package/node_modules/zod/v4/locales/fa.d.cts +0 -5
- package/node_modules/zod/v4/locales/fa.d.ts +0 -4
- package/node_modules/zod/v4/locales/fa.js +0 -114
- package/node_modules/zod/v4/locales/fi.cjs +0 -139
- package/node_modules/zod/v4/locales/fi.d.cts +0 -5
- package/node_modules/zod/v4/locales/fi.d.ts +0 -4
- package/node_modules/zod/v4/locales/fi.js +0 -112
- package/node_modules/zod/v4/locales/fr-CA.cjs +0 -134
- package/node_modules/zod/v4/locales/fr-CA.d.cts +0 -5
- package/node_modules/zod/v4/locales/fr-CA.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr-CA.js +0 -107
- package/node_modules/zod/v4/locales/fr.cjs +0 -152
- package/node_modules/zod/v4/locales/fr.d.cts +0 -5
- package/node_modules/zod/v4/locales/fr.d.ts +0 -4
- package/node_modules/zod/v4/locales/fr.js +0 -125
- package/node_modules/zod/v4/locales/he.cjs +0 -241
- package/node_modules/zod/v4/locales/he.d.cts +0 -5
- package/node_modules/zod/v4/locales/he.d.ts +0 -4
- package/node_modules/zod/v4/locales/he.js +0 -214
- package/node_modules/zod/v4/locales/hr.cjs +0 -149
- package/node_modules/zod/v4/locales/hr.d.cts +0 -5
- package/node_modules/zod/v4/locales/hr.d.ts +0 -4
- package/node_modules/zod/v4/locales/hr.js +0 -122
- package/node_modules/zod/v4/locales/hu.cjs +0 -135
- package/node_modules/zod/v4/locales/hu.d.cts +0 -5
- package/node_modules/zod/v4/locales/hu.d.ts +0 -4
- package/node_modules/zod/v4/locales/hu.js +0 -108
- package/node_modules/zod/v4/locales/hy.cjs +0 -174
- package/node_modules/zod/v4/locales/hy.d.cts +0 -5
- package/node_modules/zod/v4/locales/hy.d.ts +0 -4
- package/node_modules/zod/v4/locales/hy.js +0 -147
- package/node_modules/zod/v4/locales/id.cjs +0 -133
- package/node_modules/zod/v4/locales/id.d.cts +0 -5
- package/node_modules/zod/v4/locales/id.d.ts +0 -4
- package/node_modules/zod/v4/locales/id.js +0 -106
- package/node_modules/zod/v4/locales/index.cjs +0 -111
- package/node_modules/zod/v4/locales/index.d.cts +0 -52
- package/node_modules/zod/v4/locales/index.d.ts +0 -52
- package/node_modules/zod/v4/locales/index.js +0 -52
- package/node_modules/zod/v4/locales/is.cjs +0 -136
- package/node_modules/zod/v4/locales/is.d.cts +0 -5
- package/node_modules/zod/v4/locales/is.d.ts +0 -4
- package/node_modules/zod/v4/locales/is.js +0 -109
- package/node_modules/zod/v4/locales/it.cjs +0 -135
- package/node_modules/zod/v4/locales/it.d.cts +0 -5
- package/node_modules/zod/v4/locales/it.d.ts +0 -4
- package/node_modules/zod/v4/locales/it.js +0 -108
- package/node_modules/zod/v4/locales/ja.cjs +0 -134
- package/node_modules/zod/v4/locales/ja.d.cts +0 -5
- package/node_modules/zod/v4/locales/ja.d.ts +0 -4
- package/node_modules/zod/v4/locales/ja.js +0 -107
- package/node_modules/zod/v4/locales/ka.cjs +0 -139
- package/node_modules/zod/v4/locales/ka.d.cts +0 -5
- package/node_modules/zod/v4/locales/ka.d.ts +0 -4
- package/node_modules/zod/v4/locales/ka.js +0 -112
- package/node_modules/zod/v4/locales/kh.cjs +0 -12
- package/node_modules/zod/v4/locales/kh.d.cts +0 -5
- package/node_modules/zod/v4/locales/kh.d.ts +0 -5
- package/node_modules/zod/v4/locales/kh.js +0 -5
- package/node_modules/zod/v4/locales/km.cjs +0 -137
- package/node_modules/zod/v4/locales/km.d.cts +0 -5
- package/node_modules/zod/v4/locales/km.d.ts +0 -4
- package/node_modules/zod/v4/locales/km.js +0 -110
- package/node_modules/zod/v4/locales/ko.cjs +0 -138
- package/node_modules/zod/v4/locales/ko.d.cts +0 -5
- package/node_modules/zod/v4/locales/ko.d.ts +0 -4
- package/node_modules/zod/v4/locales/ko.js +0 -111
- package/node_modules/zod/v4/locales/lt.cjs +0 -230
- package/node_modules/zod/v4/locales/lt.d.cts +0 -5
- package/node_modules/zod/v4/locales/lt.d.ts +0 -4
- package/node_modules/zod/v4/locales/lt.js +0 -203
- package/node_modules/zod/v4/locales/mk.cjs +0 -136
- package/node_modules/zod/v4/locales/mk.d.cts +0 -5
- package/node_modules/zod/v4/locales/mk.d.ts +0 -4
- package/node_modules/zod/v4/locales/mk.js +0 -109
- package/node_modules/zod/v4/locales/ms.cjs +0 -134
- package/node_modules/zod/v4/locales/ms.d.cts +0 -5
- package/node_modules/zod/v4/locales/ms.d.ts +0 -4
- package/node_modules/zod/v4/locales/ms.js +0 -107
- package/node_modules/zod/v4/locales/nl.cjs +0 -137
- package/node_modules/zod/v4/locales/nl.d.cts +0 -5
- package/node_modules/zod/v4/locales/nl.d.ts +0 -4
- package/node_modules/zod/v4/locales/nl.js +0 -110
- package/node_modules/zod/v4/locales/no.cjs +0 -135
- package/node_modules/zod/v4/locales/no.d.cts +0 -5
- package/node_modules/zod/v4/locales/no.d.ts +0 -4
- package/node_modules/zod/v4/locales/no.js +0 -108
- package/node_modules/zod/v4/locales/ota.cjs +0 -136
- package/node_modules/zod/v4/locales/ota.d.cts +0 -5
- package/node_modules/zod/v4/locales/ota.d.ts +0 -4
- package/node_modules/zod/v4/locales/ota.js +0 -109
- package/node_modules/zod/v4/locales/package.json +0 -7
- package/node_modules/zod/v4/locales/pl.cjs +0 -136
- package/node_modules/zod/v4/locales/pl.d.cts +0 -5
- package/node_modules/zod/v4/locales/pl.d.ts +0 -4
- package/node_modules/zod/v4/locales/pl.js +0 -109
- package/node_modules/zod/v4/locales/ps.cjs +0 -141
- package/node_modules/zod/v4/locales/ps.d.cts +0 -5
- package/node_modules/zod/v4/locales/ps.d.ts +0 -4
- package/node_modules/zod/v4/locales/ps.js +0 -114
- package/node_modules/zod/v4/locales/pt.cjs +0 -135
- package/node_modules/zod/v4/locales/pt.d.cts +0 -5
- package/node_modules/zod/v4/locales/pt.d.ts +0 -4
- package/node_modules/zod/v4/locales/pt.js +0 -108
- package/node_modules/zod/v4/locales/ro.cjs +0 -146
- package/node_modules/zod/v4/locales/ro.d.cts +0 -5
- package/node_modules/zod/v4/locales/ro.d.ts +0 -4
- package/node_modules/zod/v4/locales/ro.js +0 -119
- package/node_modules/zod/v4/locales/ru.cjs +0 -183
- package/node_modules/zod/v4/locales/ru.d.cts +0 -5
- package/node_modules/zod/v4/locales/ru.d.ts +0 -4
- package/node_modules/zod/v4/locales/ru.js +0 -156
- package/node_modules/zod/v4/locales/sl.cjs +0 -136
- package/node_modules/zod/v4/locales/sl.d.cts +0 -5
- package/node_modules/zod/v4/locales/sl.d.ts +0 -4
- package/node_modules/zod/v4/locales/sl.js +0 -109
- package/node_modules/zod/v4/locales/sv.cjs +0 -137
- package/node_modules/zod/v4/locales/sv.d.cts +0 -5
- package/node_modules/zod/v4/locales/sv.d.ts +0 -4
- package/node_modules/zod/v4/locales/sv.js +0 -110
- package/node_modules/zod/v4/locales/ta.cjs +0 -137
- package/node_modules/zod/v4/locales/ta.d.cts +0 -5
- package/node_modules/zod/v4/locales/ta.d.ts +0 -4
- package/node_modules/zod/v4/locales/ta.js +0 -110
- package/node_modules/zod/v4/locales/th.cjs +0 -137
- package/node_modules/zod/v4/locales/th.d.cts +0 -5
- package/node_modules/zod/v4/locales/th.d.ts +0 -4
- package/node_modules/zod/v4/locales/th.js +0 -110
- package/node_modules/zod/v4/locales/tr.cjs +0 -132
- package/node_modules/zod/v4/locales/tr.d.cts +0 -5
- package/node_modules/zod/v4/locales/tr.d.ts +0 -4
- package/node_modules/zod/v4/locales/tr.js +0 -105
- package/node_modules/zod/v4/locales/ua.cjs +0 -12
- package/node_modules/zod/v4/locales/ua.d.cts +0 -5
- package/node_modules/zod/v4/locales/ua.d.ts +0 -5
- package/node_modules/zod/v4/locales/ua.js +0 -5
- package/node_modules/zod/v4/locales/uk.cjs +0 -135
- package/node_modules/zod/v4/locales/uk.d.cts +0 -5
- package/node_modules/zod/v4/locales/uk.d.ts +0 -4
- package/node_modules/zod/v4/locales/uk.js +0 -108
- package/node_modules/zod/v4/locales/ur.cjs +0 -137
- package/node_modules/zod/v4/locales/ur.d.cts +0 -5
- package/node_modules/zod/v4/locales/ur.d.ts +0 -4
- package/node_modules/zod/v4/locales/ur.js +0 -110
- package/node_modules/zod/v4/locales/uz.cjs +0 -137
- package/node_modules/zod/v4/locales/uz.d.cts +0 -5
- package/node_modules/zod/v4/locales/uz.d.ts +0 -4
- package/node_modules/zod/v4/locales/uz.js +0 -110
- package/node_modules/zod/v4/locales/vi.cjs +0 -135
- package/node_modules/zod/v4/locales/vi.d.cts +0 -5
- package/node_modules/zod/v4/locales/vi.d.ts +0 -4
- package/node_modules/zod/v4/locales/vi.js +0 -108
- package/node_modules/zod/v4/locales/yo.cjs +0 -134
- package/node_modules/zod/v4/locales/yo.d.cts +0 -5
- package/node_modules/zod/v4/locales/yo.d.ts +0 -4
- package/node_modules/zod/v4/locales/yo.js +0 -107
- package/node_modules/zod/v4/locales/zh-CN.cjs +0 -136
- package/node_modules/zod/v4/locales/zh-CN.d.cts +0 -5
- package/node_modules/zod/v4/locales/zh-CN.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-CN.js +0 -109
- package/node_modules/zod/v4/locales/zh-TW.cjs +0 -134
- package/node_modules/zod/v4/locales/zh-TW.d.cts +0 -5
- package/node_modules/zod/v4/locales/zh-TW.d.ts +0 -4
- package/node_modules/zod/v4/locales/zh-TW.js +0 -107
- package/node_modules/zod/v4/mini/checks.cjs +0 -34
- package/node_modules/zod/v4/mini/checks.d.cts +0 -1
- package/node_modules/zod/v4/mini/checks.d.ts +0 -1
- package/node_modules/zod/v4/mini/checks.js +0 -1
- package/node_modules/zod/v4/mini/coerce.cjs +0 -52
- package/node_modules/zod/v4/mini/coerce.d.cts +0 -7
- package/node_modules/zod/v4/mini/coerce.d.ts +0 -7
- package/node_modules/zod/v4/mini/coerce.js +0 -22
- package/node_modules/zod/v4/mini/external.cjs +0 -63
- package/node_modules/zod/v4/mini/external.d.cts +0 -13
- package/node_modules/zod/v4/mini/external.d.ts +0 -13
- package/node_modules/zod/v4/mini/external.js +0 -14
- package/node_modules/zod/v4/mini/index.cjs +0 -32
- package/node_modules/zod/v4/mini/index.d.cts +0 -3
- package/node_modules/zod/v4/mini/index.d.ts +0 -3
- package/node_modules/zod/v4/mini/index.js +0 -3
- package/node_modules/zod/v4/mini/iso.cjs +0 -64
- package/node_modules/zod/v4/mini/iso.d.cts +0 -22
- package/node_modules/zod/v4/mini/iso.d.ts +0 -22
- package/node_modules/zod/v4/mini/iso.js +0 -34
- package/node_modules/zod/v4/mini/package.json +0 -7
- package/node_modules/zod/v4/mini/parse.cjs +0 -16
- package/node_modules/zod/v4/mini/parse.d.cts +0 -1
- package/node_modules/zod/v4/mini/parse.d.ts +0 -1
- package/node_modules/zod/v4/mini/parse.js +0 -1
- package/node_modules/zod/v4/mini/schemas.cjs +0 -1083
- package/node_modules/zod/v4/mini/schemas.d.cts +0 -445
- package/node_modules/zod/v4/mini/schemas.d.ts +0 -445
- package/node_modules/zod/v4/mini/schemas.js +0 -961
- package/node_modules/zod/v4/package.json +0 -7
- package/node_modules/zod/v4-mini/index.cjs +0 -32
- package/node_modules/zod/v4-mini/index.d.cts +0 -3
- package/node_modules/zod/v4-mini/index.d.ts +0 -3
- package/node_modules/zod/v4-mini/index.js +0 -3
- package/node_modules/zod/v4-mini/package.json +0 -7
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { spawn } from "node:child_process";
|
|
2
|
-
import ffmpeg from "fluent-ffmpeg";
|
|
3
|
-
import ffmpegStatic from "ffmpeg-static";
|
|
4
|
-
/**
|
|
5
|
-
* Compose one storyboard shot into a WxH MP4: footage/clip scaled to fill the
|
|
6
|
-
* frame, the TTS narration as the audio track, and (when a font is available)
|
|
7
|
-
* the narration burned in as a styled subtitle. Optional fade-in/out gives an
|
|
8
|
-
* inter-shot transition without cross-clip probing. All shots use identical
|
|
9
|
-
* encode settings so the final concat-merge can stream-copy.
|
|
10
|
-
*
|
|
11
|
-
* Shot length follows the narration: we probe the TTS audio duration and bound
|
|
12
|
-
* the output with `-t` (NOT `-shortest` — that drops the audio track entirely
|
|
13
|
-
* when paired with a lavfi/looped video source in ffmpeg-static).
|
|
14
|
-
*/
|
|
15
|
-
const FFMPEG_BIN = ffmpegStatic || "ffmpeg";
|
|
16
|
-
if (ffmpegStatic)
|
|
17
|
-
ffmpeg.setFfmpegPath(FFMPEG_BIN);
|
|
18
|
-
/** Probe a media file's duration (ms) by parsing `ffmpeg -i` stderr. Null if unknown. */
|
|
19
|
-
function probeDurationMs(file) {
|
|
20
|
-
return new Promise((resolve) => {
|
|
21
|
-
const p = spawn(FFMPEG_BIN, ["-i", file], { stdio: ["ignore", "ignore", "pipe"] });
|
|
22
|
-
let err = "";
|
|
23
|
-
p.stderr.on("data", (d) => (err += d.toString()));
|
|
24
|
-
p.on("error", () => resolve(null));
|
|
25
|
-
p.on("close", () => {
|
|
26
|
-
const m = err.match(/Duration:\s*(\d+):(\d+):(\d+(?:\.\d+)?)/);
|
|
27
|
-
if (!m)
|
|
28
|
-
return resolve(null);
|
|
29
|
-
resolve(Math.round((Number(m[1]) * 3600 + Number(m[2]) * 60 + Number(m[3])) * 1000));
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
/** Escape text for ffmpeg drawtext (colon, backslash, quote, percent, newline). */
|
|
34
|
-
function escapeDrawtext(s) {
|
|
35
|
-
return s
|
|
36
|
-
.replace(/\\/g, "\\\\")
|
|
37
|
-
.replace(/:/g, "\\:")
|
|
38
|
-
.replace(/'/g, "’")
|
|
39
|
-
.replace(/%/g, "\\%")
|
|
40
|
-
.replace(/\n/g, "\\n");
|
|
41
|
-
}
|
|
42
|
-
/** Word/char wrap so long narration doesn't run off-frame (CJK has no spaces → char wrap). */
|
|
43
|
-
function wrap(text, perLine = 20) {
|
|
44
|
-
const t = text.trim();
|
|
45
|
-
const hasSpaces = /\s/.test(t);
|
|
46
|
-
const lines = [];
|
|
47
|
-
if (hasSpaces) {
|
|
48
|
-
let cur = "";
|
|
49
|
-
for (const w of t.split(/\s+/)) {
|
|
50
|
-
if ((cur + " " + w).trim().length > perLine) {
|
|
51
|
-
if (cur)
|
|
52
|
-
lines.push(cur);
|
|
53
|
-
cur = w;
|
|
54
|
-
}
|
|
55
|
-
else
|
|
56
|
-
cur = (cur + " " + w).trim();
|
|
57
|
-
}
|
|
58
|
-
if (cur)
|
|
59
|
-
lines.push(cur);
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
for (let i = 0; i < t.length; i += perLine)
|
|
63
|
-
lines.push(t.slice(i, i + perLine));
|
|
64
|
-
}
|
|
65
|
-
return lines.slice(0, 4).join("\n");
|
|
66
|
-
}
|
|
67
|
-
export async function composeShot(input) {
|
|
68
|
-
const { width: W, height: H } = input;
|
|
69
|
-
// Shot length follows the narration audio (so it's never cut off). Fall back
|
|
70
|
-
// to the planned duration when there's no audio to probe.
|
|
71
|
-
let durMs = input.durationMs ?? 4000;
|
|
72
|
-
if (input.audio) {
|
|
73
|
-
const probed = await probeDurationMs(input.audio);
|
|
74
|
-
if (probed && probed > 500)
|
|
75
|
-
durMs = probed;
|
|
76
|
-
}
|
|
77
|
-
const durSec = Math.max(1, durMs / 1000);
|
|
78
|
-
const frames = Math.round(durSec * 30);
|
|
79
|
-
return new Promise((resolve, reject) => {
|
|
80
|
-
const cmd = ffmpeg();
|
|
81
|
-
if (input.video) {
|
|
82
|
-
cmd.input(input.video).inputOptions(["-stream_loop", "-1"]); // loop footage to cover narration
|
|
83
|
-
}
|
|
84
|
-
else if (input.image) {
|
|
85
|
-
cmd.input(input.image).inputOptions(["-loop", "1"]);
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
// No footage/image → a dark "text-card" background (free, no provider).
|
|
89
|
-
cmd.input(`color=c=0x0f172a:s=${W}x${H}`).inputFormat("lavfi");
|
|
90
|
-
}
|
|
91
|
-
if (input.audio)
|
|
92
|
-
cmd.input(input.audio);
|
|
93
|
-
// Build the base video filter depending on source type.
|
|
94
|
-
let baseFilter;
|
|
95
|
-
if (input.image && input.motion === "kenburns") {
|
|
96
|
-
// Scale way up so zoompan has resolution headroom (avoids jitter), then
|
|
97
|
-
// slow zoom-in centered. d = total output frames.
|
|
98
|
-
baseFilter =
|
|
99
|
-
`[0:v]scale=8000:-1,zoompan=z='min(zoom+0.0012,1.4)':d=${frames}:` +
|
|
100
|
-
`x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':s=${W}x${H}:fps=30,setsar=1[vbg]`;
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
baseFilter = `[0:v]scale=${W}:${H}:force_original_aspect_ratio=increase,crop=${W}:${H},setsar=1[vbg]`;
|
|
104
|
-
}
|
|
105
|
-
const filters = [baseFilter];
|
|
106
|
-
let last = "[vbg]";
|
|
107
|
-
if (input.subtitle && input.fontFile) {
|
|
108
|
-
const st = input.subtitleStyle ?? {};
|
|
109
|
-
const text = escapeDrawtext(wrap(input.subtitle));
|
|
110
|
-
const fontSize = Math.round(H * (st.fontSizeRatio ?? 1 / 22));
|
|
111
|
-
const color = st.color ?? "white";
|
|
112
|
-
const pos = st.position ?? "bottom";
|
|
113
|
-
const y = pos === "center" ? "(h-text_h)/2" : pos === "top" ? `${Math.round(H / 12)}` : `h-text_h-${Math.round(H / 10)}`;
|
|
114
|
-
const box = st.background === false ? "" : ":box=1:boxcolor=black@0.5:boxborderw=16";
|
|
115
|
-
const border = st.stroke === false ? "" : ":borderw=3:bordercolor=black@0.9";
|
|
116
|
-
filters.push(`${last}drawtext=fontfile='${input.fontFile}':text='${text}':` +
|
|
117
|
-
`fontcolor=${color}:fontsize=${fontSize}:line_spacing=8:` +
|
|
118
|
-
`x=(w-text_w)/2:y=${y}${box}${border}[vt]`);
|
|
119
|
-
last = "[vt]";
|
|
120
|
-
}
|
|
121
|
-
if (input.fade) {
|
|
122
|
-
const fadeD = 0.3;
|
|
123
|
-
const outStart = Math.max(0, durSec - fadeD);
|
|
124
|
-
filters.push(`${last}fade=t=in:st=0:d=${fadeD},fade=t=out:st=${outStart.toFixed(2)}:d=${fadeD}[vf]`);
|
|
125
|
-
last = "[vf]";
|
|
126
|
-
}
|
|
127
|
-
cmd.complexFilter(filters);
|
|
128
|
-
// Bound the whole output with -t (NOT -shortest — it drops audio with a
|
|
129
|
-
// looped/lavfi video source). All sources loop, so -t defines shot length.
|
|
130
|
-
const outputOptions = ["-map", last];
|
|
131
|
-
if (input.audio)
|
|
132
|
-
outputOptions.push("-map", "1:a", "-c:a", "aac", "-b:a", "192k");
|
|
133
|
-
outputOptions.push("-t", durSec.toFixed(2), "-c:v", "libx264", "-pix_fmt", "yuv420p", "-r", "30", "-preset", "veryfast", "-movflags", "+faststart");
|
|
134
|
-
cmd
|
|
135
|
-
.outputOptions(outputOptions)
|
|
136
|
-
.on("error", (err) => reject(new Error(`ffmpeg compose failed: ${err.message}`)))
|
|
137
|
-
.on("end", () => resolve())
|
|
138
|
-
.save(input.out);
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
//# sourceMappingURL=ffmpeg-compose.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ffmpeg-compose.js","sourceRoot":"","sources":["../../src/render/ffmpeg-compose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,MAAM,MAAM,eAAe,CAAC;AACnC,OAAO,YAAY,MAAM,eAAe,CAAC;AAEzC;;;;;;;;;;GAUG;AAEH,MAAM,UAAU,GAAI,YAAkC,IAAI,QAAQ,CAAC;AACnE,IAAI,YAAY;IAAE,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;AAEnD,yFAAyF;AACzF,SAAS,eAAe,CAAC,IAAY;IACnC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAC,E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CAAC;aAC1B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { unlink, writeFile } from "node:fs/promises";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import ffmpeg from "fluent-ffmpeg";
|
|
4
|
-
import ffmpegStatic from "ffmpeg-static";
|
|
5
|
-
/**
|
|
6
|
-
* Concatenate the ordered per-shot clips into the final video, then (optionally)
|
|
7
|
-
* mix background music under the narration. Concat is a stream-copy demuxer pass
|
|
8
|
-
* (all shots share encode settings → fast, lossless); BGM is a second pass that
|
|
9
|
-
* re-encodes audio only (video copied). Adapted from huobao-drama's ffmpeg-merge.
|
|
10
|
-
*/
|
|
11
|
-
if (ffmpegStatic)
|
|
12
|
-
ffmpeg.setFfmpegPath(ffmpegStatic);
|
|
13
|
-
function concat(clipPaths, out) {
|
|
14
|
-
return (async () => {
|
|
15
|
-
const listPath = `${out}.concat.txt`;
|
|
16
|
-
const listBody = clipPaths.map((p) => `file '${p.replace(/'/g, "'\\''")}'`).join("\n");
|
|
17
|
-
await writeFile(listPath, listBody, "utf-8");
|
|
18
|
-
await new Promise((resolve, reject) => {
|
|
19
|
-
ffmpeg()
|
|
20
|
-
.input(listPath)
|
|
21
|
-
.inputOptions(["-f", "concat", "-safe", "0"])
|
|
22
|
-
.outputOptions(["-c", "copy", "-movflags", "+faststart"])
|
|
23
|
-
.on("error", (err) => reject(new Error(`ffmpeg concat failed: ${err.message}`)))
|
|
24
|
-
.on("end", () => resolve())
|
|
25
|
-
.save(out);
|
|
26
|
-
});
|
|
27
|
-
})();
|
|
28
|
-
}
|
|
29
|
-
/** Mix bgm under the existing audio of `video`, looping bgm and ending with video. */
|
|
30
|
-
function mixBgm(video, bgm, volume, out) {
|
|
31
|
-
return new Promise((resolve, reject) => {
|
|
32
|
-
ffmpeg()
|
|
33
|
-
.input(video)
|
|
34
|
-
.input(bgm)
|
|
35
|
-
.inputOptions(["-stream_loop", "-1"]) // applies to the most recent input (bgm) → loop to cover video
|
|
36
|
-
.complexFilter([
|
|
37
|
-
`[1:a]volume=${volume}[bg]`,
|
|
38
|
-
`[0:a][bg]amix=inputs=2:duration=first:dropout_transition=2[a]`,
|
|
39
|
-
])
|
|
40
|
-
.outputOptions(["-map", "0:v", "-map", "[a]", "-c:v", "copy", "-c:a", "aac", "-b:a", "192k", "-shortest", "-movflags", "+faststart"])
|
|
41
|
-
.on("error", (err) => reject(new Error(`ffmpeg bgm mix failed: ${err.message}`)))
|
|
42
|
-
.on("end", () => resolve())
|
|
43
|
-
.save(out);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
export async function mergeClips(clipPaths, out, opts = {}) {
|
|
47
|
-
if (!opts.bgm) {
|
|
48
|
-
await concat(clipPaths, out);
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
// Concat to a temp, then mix BGM into the final output.
|
|
52
|
-
const tmp = path.join(path.dirname(out), `concat-${Date.now()}.mp4`);
|
|
53
|
-
await concat(clipPaths, tmp);
|
|
54
|
-
try {
|
|
55
|
-
await mixBgm(tmp, opts.bgm, opts.bgmVolume ?? 0.2, out);
|
|
56
|
-
}
|
|
57
|
-
finally {
|
|
58
|
-
await unlink(tmp).catch(() => undefined);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=ffmpeg-merge.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ffmpeg-merge.js","sourceRoot":"","sources":["../../src/render/ffmpeg-merge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,MAAM,MAAM,eAAe,CAAC;AACnC,OAAO,YAAY,MAAM,eAAe,CAAC;AAEzC;;;;;GAKG;AAEH,IAAI,YAAY;IAAE,MAAM,CAAC,aAAa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CAAC,CAAC;IAC3C,CAAC;AACH,CAAC"}
|
package/dist/render/font.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function ensureFont(workspace: string): Promise<string | null>;
|
package/dist/render/font.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import { mkdir, writeFile } from "node:fs/promises";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
/**
|
|
5
|
-
* Resolve a drawtext-usable font for burned subtitles. Order:
|
|
6
|
-
* 1. DP_RENDER_FONT_PATH (explicit override)
|
|
7
|
-
* 2. A system font from the candidate list (incl. macOS CJK fonts — the
|
|
8
|
-
* production hosts are Macs, so PingFang/STHeiti give reliable Chinese).
|
|
9
|
-
* 3. Download DP_RENDER_FONT_URL into <workspace>/fonts (cached) — for Linux
|
|
10
|
-
* hosts without a bundled CJK font.
|
|
11
|
-
* 4. null → caller skips subtitle burning (render still succeeds).
|
|
12
|
-
*/
|
|
13
|
-
const CANDIDATES = [
|
|
14
|
-
process.env.DP_RENDER_FONT_PATH,
|
|
15
|
-
// macOS (CJK-capable)
|
|
16
|
-
"/System/Library/Fonts/PingFang.ttc",
|
|
17
|
-
"/System/Library/Fonts/STHeiti Medium.ttc",
|
|
18
|
-
"/System/Library/Fonts/Hiragino Sans GB.ttc",
|
|
19
|
-
"/System/Library/Fonts/Supplemental/Arial Unicode.ttf",
|
|
20
|
-
"/System/Library/Fonts/Supplemental/Arial.ttf",
|
|
21
|
-
"/Library/Fonts/Arial Unicode.ttf",
|
|
22
|
-
// Linux
|
|
23
|
-
"/usr/share/fonts/opentype/noto/NotoSansCJK-Regular.ttc",
|
|
24
|
-
"/usr/share/fonts/truetype/noto/NotoSansCJK-Regular.ttc",
|
|
25
|
-
"/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf",
|
|
26
|
-
"/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf",
|
|
27
|
-
].filter((p) => Boolean(p));
|
|
28
|
-
let cached;
|
|
29
|
-
export async function ensureFont(workspace) {
|
|
30
|
-
if (cached !== undefined)
|
|
31
|
-
return cached;
|
|
32
|
-
for (const c of CANDIDATES) {
|
|
33
|
-
if (existsSync(c)) {
|
|
34
|
-
cached = c;
|
|
35
|
-
return c;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
const url = process.env.DP_RENDER_FONT_URL;
|
|
39
|
-
if (url) {
|
|
40
|
-
try {
|
|
41
|
-
const dir = path.join(workspace, "fonts");
|
|
42
|
-
await mkdir(dir, { recursive: true });
|
|
43
|
-
const dest = path.join(dir, url.toLowerCase().endsWith(".otf") ? "subtitle.otf" : "subtitle.ttf");
|
|
44
|
-
if (!existsSync(dest)) {
|
|
45
|
-
const res = await fetch(url);
|
|
46
|
-
if (res.ok)
|
|
47
|
-
await writeFile(dest, new Uint8Array(await res.arrayBuffer()));
|
|
48
|
-
}
|
|
49
|
-
if (existsSync(dest)) {
|
|
50
|
-
cached = dest;
|
|
51
|
-
return dest;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
catch {
|
|
55
|
-
/* fall through */
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
cached = null;
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=font.js.map
|
package/dist/render/font.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"font.js","sourceRoot":"","sources":["../../src/render/font.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;;;;;;;GAQG;AAEH,MAAM,UAAU,GAAG;IACjB,OAAO,CAAC,GAAG,CAAC,mBAAmB;IAC/B,sBAAsB;IACtB,oCAAoC;IACpC,0CAA0C;IAC1C,4CAA4C;IAC5C,sDAAsD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AC,EAAE,CAAC;gBACrB,MAAM,GAAG,IAAI,CAAC;gBACd,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,kBAAkB;QACpB,CAAC;IACH,CAAC;IAED,MAAM,GAAG,IAAI,CAAC;IACd,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Text-to-image on the worker, using the worker's OWN bootstrap llm_profile
|
|
3
|
-
* image config (OpenAI-compatible /v1/images/generations). No key travels over
|
|
4
|
-
* the wire — the worker already has its profile's image key from bootstrap.
|
|
5
|
-
*/
|
|
6
|
-
export interface WorkerImageConfig {
|
|
7
|
-
baseUrl: string;
|
|
8
|
-
apiKey: string;
|
|
9
|
-
model: string;
|
|
10
|
-
}
|
|
11
|
-
export declare function generateImage(cfg: WorkerImageConfig, prompt: string, size: string, dest: string): Promise<void>;
|
package/dist/render/image-gen.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { writeFile } from "node:fs/promises";
|
|
2
|
-
function ver(base) {
|
|
3
|
-
const b = base.replace(/\/+$/, "");
|
|
4
|
-
return b.endsWith("/v1") ? b : `${b}/v1`;
|
|
5
|
-
}
|
|
6
|
-
/** Map "WxH" to the nearest size the OpenAI image model accepts. */
|
|
7
|
-
function mapSize(model, size) {
|
|
8
|
-
const [w, h] = (size ?? "1024x1024").split("x").map(Number);
|
|
9
|
-
const aspect = w && h ? w / h : 1;
|
|
10
|
-
const isDalle3 = /dall-?e-?3/i.test(model);
|
|
11
|
-
if (aspect < 0.83)
|
|
12
|
-
return isDalle3 ? "1024x1792" : "1024x1536"; // portrait
|
|
13
|
-
if (aspect > 1.2)
|
|
14
|
-
return isDalle3 ? "1792x1024" : "1536x1024"; // landscape
|
|
15
|
-
return "1024x1024";
|
|
16
|
-
}
|
|
17
|
-
export async function generateImage(cfg, prompt, size, dest) {
|
|
18
|
-
const res = await fetch(`${ver(cfg.baseUrl)}/images/generations`, {
|
|
19
|
-
method: "POST",
|
|
20
|
-
headers: { Authorization: `Bearer ${cfg.apiKey}`, "Content-Type": "application/json" },
|
|
21
|
-
body: JSON.stringify({ model: cfg.model, prompt, size: mapSize(cfg.model, size), n: 1 }),
|
|
22
|
-
});
|
|
23
|
-
if (!res.ok) {
|
|
24
|
-
throw new Error(`image gen HTTP ${res.status}: ${(await res.text().catch(() => "")).slice(0, 300)}`);
|
|
25
|
-
}
|
|
26
|
-
const json = (await res.json());
|
|
27
|
-
const url = json.data?.[0]?.url;
|
|
28
|
-
const b64 = json.data?.[0]?.b64_json;
|
|
29
|
-
if (url) {
|
|
30
|
-
const img = await fetch(url);
|
|
31
|
-
if (!img.ok)
|
|
32
|
-
throw new Error(`image download HTTP ${img.status}`);
|
|
33
|
-
await writeFile(dest, new Uint8Array(await img.arrayBuffer()));
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
if (b64) {
|
|
37
|
-
await writeFile(dest, Buffer.from(b64, "base64"));
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
throw new Error("image gen returned no url/b64");
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=image-gen.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"image-gen.js","sourceRoot":"","sources":["../../src/render/image-gen.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAc7C,SAAS,GAAG,CAAC,IAAY;IACvB,MAAM,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACnC,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC;AAC3C,CAAC;AAED,oEAAoE;AACpE,SAAS,OAAO,CAAC,KAAa,EAAE,IAAa;IAC3C,MAAM,CAAC,CAAC,EAAE,CAAC,CAA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GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;IACvG,CAAC;IACD,MAAM,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAS,CAAC;IACxC,MAAM,GAAG,GAAuB,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC;IACpD,MAAM,GAAG,GAAuB,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC;IACzD,IAAI,GAAG,EAAE,CAAC;QACR,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;QAC7B,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;QAClE,MAAM,SAAS,CAAC,IAAI,EAAE,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QAC/D,OAAO;IACT,CAAC;IACD,IAAI,GAAG,EAAE,CAAC;QACR,MAAM,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;QAClD,OAAO;IACT,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { CenterClient } from "../center/center-client.js";
|
|
2
|
-
import { type WorkerLlmConfig } from "./render-runner.js";
|
|
3
|
-
/**
|
|
4
|
-
* Render-worker analogue of CenterFrontend. A render worker (--render) has no
|
|
5
|
-
* Agent/Chrome: it connects to center with the SAME CenterClient + bootstrap,
|
|
6
|
-
* advertises itself via `hello`, and handles `task_dispatch` envelopes whose
|
|
7
|
-
* `kind` is "render" by running ffmpeg (download inputs → compose/merge →
|
|
8
|
-
* upload to R2) and reporting a structured `task_event { finished, result }`.
|
|
9
|
-
*
|
|
10
|
-
* It imports nothing from src/agent, src/browser, or src/llm — render is fully
|
|
11
|
-
* isolated from the shared agent core (SYNC.md safe).
|
|
12
|
-
*/
|
|
13
|
-
export interface RenderFrontendOpts {
|
|
14
|
-
client: CenterClient;
|
|
15
|
-
workerId: string;
|
|
16
|
-
version?: string;
|
|
17
|
-
/** Scratch dir for ffmpeg temp files. */
|
|
18
|
-
workspace: string;
|
|
19
|
-
/** The worker's own llm_profile (image gen + profile TTS). */
|
|
20
|
-
llm?: WorkerLlmConfig;
|
|
21
|
-
logger?: {
|
|
22
|
-
info: (m: string) => void;
|
|
23
|
-
warn: (m: string) => void;
|
|
24
|
-
error: (m: string) => void;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export declare class RenderFrontend {
|
|
28
|
-
private readonly client;
|
|
29
|
-
private readonly workerId;
|
|
30
|
-
private readonly version;
|
|
31
|
-
private readonly workspace;
|
|
32
|
-
private readonly llm?;
|
|
33
|
-
private readonly logger;
|
|
34
|
-
private inFlight;
|
|
35
|
-
private heartbeatTimer;
|
|
36
|
-
private detachers;
|
|
37
|
-
private currentStatus;
|
|
38
|
-
constructor(opts: RenderFrontendOpts);
|
|
39
|
-
start(): Promise<void>;
|
|
40
|
-
stop(): Promise<void>;
|
|
41
|
-
private sendHello;
|
|
42
|
-
private handleIncoming;
|
|
43
|
-
private handleDispatch;
|
|
44
|
-
private emitEvent;
|
|
45
|
-
private sendStatus;
|
|
46
|
-
}
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { runRender } from "./render-runner.js";
|
|
2
|
-
export class RenderFrontend {
|
|
3
|
-
client;
|
|
4
|
-
workerId;
|
|
5
|
-
version;
|
|
6
|
-
workspace;
|
|
7
|
-
llm;
|
|
8
|
-
logger;
|
|
9
|
-
inFlight = null;
|
|
10
|
-
heartbeatTimer = null;
|
|
11
|
-
detachers = [];
|
|
12
|
-
currentStatus = "idle";
|
|
13
|
-
constructor(opts) {
|
|
14
|
-
this.client = opts.client;
|
|
15
|
-
this.workerId = opts.workerId;
|
|
16
|
-
this.version = opts.version ?? "unknown";
|
|
17
|
-
this.workspace = opts.workspace;
|
|
18
|
-
this.llm = opts.llm;
|
|
19
|
-
this.logger = opts.logger ?? {
|
|
20
|
-
info: (m) => console.log(m),
|
|
21
|
-
warn: (m) => console.warn(m),
|
|
22
|
-
error: (m) => console.error(m),
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
async start() {
|
|
26
|
-
const onMessage = (msg) => {
|
|
27
|
-
this.handleIncoming(msg).catch((err) => this.logger.error(`RenderFrontend handler crashed for ${msg.type}: ${err instanceof Error ? err.message : err}`));
|
|
28
|
-
};
|
|
29
|
-
this.client.on("message", onMessage);
|
|
30
|
-
this.detachers.push(() => this.client.off("message", onMessage));
|
|
31
|
-
const onOpen = () => {
|
|
32
|
-
this.sendHello().catch((err) => this.logger.warn(`RenderFrontend hello failed: ${err instanceof Error ? err.message : err}`));
|
|
33
|
-
};
|
|
34
|
-
this.client.on("open", onOpen);
|
|
35
|
-
this.detachers.push(() => this.client.off("open", onOpen));
|
|
36
|
-
this.heartbeatTimer = setInterval(() => {
|
|
37
|
-
this.client.send({ type: "worker_heartbeat", payload: {} }).catch((err) => this.logger.warn(`[RenderFrontend] heartbeat failed: ${err instanceof Error ? err.message : err}`));
|
|
38
|
-
}, 30_000);
|
|
39
|
-
}
|
|
40
|
-
async stop() {
|
|
41
|
-
if (this.heartbeatTimer) {
|
|
42
|
-
clearInterval(this.heartbeatTimer);
|
|
43
|
-
this.heartbeatTimer = null;
|
|
44
|
-
}
|
|
45
|
-
for (const d of this.detachers)
|
|
46
|
-
d();
|
|
47
|
-
this.detachers = [];
|
|
48
|
-
if (this.inFlight) {
|
|
49
|
-
this.inFlight.controller.abort();
|
|
50
|
-
this.inFlight = null;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
async sendHello() {
|
|
54
|
-
const extras = this.client.getExtras();
|
|
55
|
-
await this.client.send({
|
|
56
|
-
type: "hello",
|
|
57
|
-
payload: {
|
|
58
|
-
worker_id: this.workerId,
|
|
59
|
-
version: this.version,
|
|
60
|
-
config_etag: extras?.configEtag ?? "unknown",
|
|
61
|
-
current_status: this.currentStatus,
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
async handleIncoming(msg) {
|
|
66
|
-
switch (msg.type) {
|
|
67
|
-
case "task_dispatch":
|
|
68
|
-
await this.handleDispatch(msg.payload);
|
|
69
|
-
return;
|
|
70
|
-
case "cancel_task": {
|
|
71
|
-
const p = msg.payload;
|
|
72
|
-
if (this.inFlight?.taskRunId === p.task_run_id) {
|
|
73
|
-
this.inFlight.controller.abort();
|
|
74
|
-
}
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
case "ping_request": {
|
|
78
|
-
const p = msg.payload;
|
|
79
|
-
await this.client.send({
|
|
80
|
-
type: "pong",
|
|
81
|
-
payload: { ref_id: p.ref_id, status: this.currentStatus },
|
|
82
|
-
});
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
default:
|
|
86
|
-
// Render workers ignore chat/config messages.
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
async handleDispatch(payload) {
|
|
91
|
-
if (payload.kind !== "render" || !payload.render) {
|
|
92
|
-
this.logger.warn(`[RenderFrontend] ignoring non-render dispatch ${payload.task_run_id}`);
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
if (this.inFlight) {
|
|
96
|
-
this.logger.warn(`[RenderFrontend] busy; rejecting ${payload.task_run_id}`);
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
const controller = new AbortController();
|
|
100
|
-
this.inFlight = { taskRunId: payload.task_run_id, controller };
|
|
101
|
-
this.currentStatus = "busy";
|
|
102
|
-
await this.emitEvent({ task_run_id: payload.task_run_id, event: "dispatched_ack" });
|
|
103
|
-
await this.emitEvent({ task_run_id: payload.task_run_id, event: "started", status: "running" });
|
|
104
|
-
await this.sendStatus("busy", payload.task_run_id);
|
|
105
|
-
try {
|
|
106
|
-
const result = await runRender(payload.render, {
|
|
107
|
-
workspace: this.workspace,
|
|
108
|
-
llm: this.llm,
|
|
109
|
-
signal: controller.signal,
|
|
110
|
-
logger: this.logger,
|
|
111
|
-
});
|
|
112
|
-
await this.emitEvent({
|
|
113
|
-
task_run_id: payload.task_run_id,
|
|
114
|
-
event: "finished",
|
|
115
|
-
status: "success",
|
|
116
|
-
result,
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
catch (err) {
|
|
120
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
121
|
-
this.logger.error(`[RenderFrontend] render ${payload.task_run_id} failed: ${message}`);
|
|
122
|
-
await this.emitEvent({
|
|
123
|
-
task_run_id: payload.task_run_id,
|
|
124
|
-
event: "finished",
|
|
125
|
-
status: "failed",
|
|
126
|
-
error: message,
|
|
127
|
-
result: { error: message },
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
finally {
|
|
131
|
-
this.inFlight = null;
|
|
132
|
-
this.currentStatus = "idle";
|
|
133
|
-
await this.sendStatus("idle", null);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
async emitEvent(payload) {
|
|
137
|
-
try {
|
|
138
|
-
await this.client.send({ type: "task_event", payload });
|
|
139
|
-
}
|
|
140
|
-
catch (err) {
|
|
141
|
-
this.logger.warn(`[RenderFrontend] task_event send failed: ${err instanceof Error ? err.message : err}`);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
async sendStatus(status, taskId) {
|
|
145
|
-
try {
|
|
146
|
-
await this.client.send({
|
|
147
|
-
type: "status_change",
|
|
148
|
-
payload: { status, ...(taskId ? { current_task_id: taskId } : {}) },
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
catch (err) {
|
|
152
|
-
this.logger.warn(`[RenderFrontend] status_change failed: ${err instanceof Error ? err.message : err}`);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
//# sourceMappingURL=render-frontend.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"render-frontend.js","sourceRoot":"","sources":["../../src/render/render-frontend.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,SAAS,EAAwB,MAAM,oBAAoB,CAAC;AA6BrE,MAAM,OAAO,cAAc;IACR,MAAM,CAAe;IACrB,QAAQ,CAAS;IACjB,OAAO,CAAS;IAChB,SAAS,CAAS;IAClB,GAAG,CAAmB;IACtB,MAAM,CAA4C;IAC3D,QAAQ,GAAoB,IAAI,CAAC;IACjC,cAAc,GAA0B,IAAI,CAAC;IAC7C,SAAS,GAAsB,EAAE,CAAC;IAClC,aAAa,GAAkB,MAAM,CAAC;IAE9C,YAAY,IAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,IAAI,SAAS,CAAC;QACzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QAChC,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC;QACpB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI;YAC3B,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;YAC3B,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YAC5B,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;SAC/B,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,KAAK;QACT,MAAM,SAAS,GAAG,CAAC,GAA0B,EAAE,EAAE;YAC/C,IAAI,CAAC,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AE,IAAI,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,SAAS,CAAC,OAMvB;QACC,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,CAAC;QAC1D,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,4CAA4C,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;QAC3G,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,UAAU,CAAC,MAAqB,EAAE,MAAqB;QACnE,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;gBACrB,IAAI,EAAE,eAAe;gBACrB,OAAO,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE;aACpE,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,0CAA0C,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;QACzG,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { RenderResultPayload, RenderSpecPayload } from "dp-shared";
|
|
2
|
-
/**
|
|
3
|
-
* Execute one worker task:
|
|
4
|
-
* - produce_shot: GENERATE the visual (worker's profile image key, or a
|
|
5
|
-
* pre-resolved stock URL) + voice (profile TTS / free edge-tts), then ffmpeg
|
|
6
|
-
* compose (Ken Burns for stills) → upload. All on the worker's machine.
|
|
7
|
-
* - merge: concat the shot clips (+ optional BGM) → upload.
|
|
8
|
-
* Returns the structured RenderResult the center persists to task_runs.result_json.
|
|
9
|
-
*/
|
|
10
|
-
/** The worker's own bootstrap llm_profile — used for image gen + profile TTS. */
|
|
11
|
-
export interface WorkerLlmConfig {
|
|
12
|
-
baseUrl: string;
|
|
13
|
-
apiKey: string;
|
|
14
|
-
model: string;
|
|
15
|
-
imageGeneration?: {
|
|
16
|
-
apiKey: string;
|
|
17
|
-
model: string;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export interface RunRenderOpts {
|
|
21
|
-
workspace: string;
|
|
22
|
-
llm?: WorkerLlmConfig;
|
|
23
|
-
signal?: AbortSignal;
|
|
24
|
-
logger?: {
|
|
25
|
-
info: (m: string) => void;
|
|
26
|
-
warn: (m: string) => void;
|
|
27
|
-
error: (m: string) => void;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
export declare function runRender(spec: RenderSpecPayload, opts: RunRenderOpts): Promise<RenderResultPayload>;
|