dsh-duet 0.2.0 → 0.3.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/README.md +26 -6
- package/assets/avatar/character.glb +0 -0
- package/assets/avatar/desktop/character.glb +0 -0
- package/assets/avatar/desktop/companion.mjs +3 -3
- package/assets/avatar/desktop/index.html +10 -0
- package/assets/avatar/desktop/manifest.json +4 -4
- package/assets/avatar/desktop/portrait.png +0 -0
- package/assets/avatar/portrait.png +0 -0
- package/config/duet.patch.yml +176 -0
- package/node_modules/dsh-duet-superagent/LICENSE +21 -0
- package/node_modules/dsh-duet-superagent/README.md +39 -0
- package/node_modules/dsh-duet-superagent/cordis.patch.yml +193 -0
- package/node_modules/dsh-duet-superagent/lib/client.js +6883 -0
- package/node_modules/dsh-duet-superagent/lib/deployment-CFE4xX4v.d.ts +736 -0
- package/node_modules/dsh-duet-superagent/lib/duet.d.ts +1160 -0
- package/node_modules/dsh-duet-superagent/lib/duet.js +837 -0
- package/node_modules/dsh-duet-superagent/lib/engine-B2un4KNA.d.ts +243 -0
- package/node_modules/dsh-duet-superagent/lib/feishu-rAGM9U9b.js +1324 -0
- package/node_modules/dsh-duet-superagent/lib/feishu-watch.d.ts +125 -0
- package/node_modules/dsh-duet-superagent/lib/feishu-watch.js +2 -0
- package/node_modules/dsh-duet-superagent/lib/github-pull-gSbjzypm.js +596 -0
- package/node_modules/dsh-duet-superagent/lib/github-watch.d.ts +2 -0
- package/node_modules/dsh-duet-superagent/lib/github-watch.js +832 -0
- package/node_modules/dsh-duet-superagent/lib/index.d.ts +129 -0
- package/node_modules/dsh-duet-superagent/lib/index.js +107 -0
- package/node_modules/dsh-duet-superagent/lib/poll-Dh7J1cdM.js +872 -0
- package/node_modules/dsh-duet-superagent/lib/registry-BTgyFZ8S.d.ts +1509 -0
- package/node_modules/dsh-duet-superagent/lib/runtime-CbDPyQoo.js +10653 -0
- package/node_modules/dsh-duet-superagent/locale/en.json +6 -0
- package/node_modules/dsh-duet-superagent/locale/zh.json +6 -0
- package/node_modules/dsh-duet-superagent/package.json +113 -0
- package/node_modules/dsh-duet-superagent/prompts/admission.md +68 -0
- package/node_modules/dsh-duet-superagent/prompts/cli.md +17 -0
- package/node_modules/dsh-duet-superagent/prompts/dispatch.md +59 -0
- package/node_modules/dsh-duet-superagent/prompts/handoff-orchestrator.md +4 -0
- package/node_modules/dsh-duet-superagent/prompts/handoff-worker.md +7 -0
- package/node_modules/dsh-duet-superagent/prompts/handoff.md +6 -0
- package/node_modules/dsh-duet-superagent/prompts/orchestrator.md +16 -0
- package/node_modules/dsh-duet-superagent/prompts/replies.md +35 -0
- package/node_modules/dsh-duet-superagent/prompts/shared.md +7 -0
- package/node_modules/dsh-duet-superagent/prompts/subscriptions.md +13 -0
- package/node_modules/dsh-duet-superagent/prompts/team/communication.md +97 -0
- package/node_modules/dsh-duet-superagent/prompts/team/delivery.md +28 -0
- package/node_modules/dsh-duet-superagent/prompts/team/scope.md +22 -0
- package/node_modules/dsh-duet-superagent/prompts/work.md +49 -0
- package/node_modules/dsh-duet-superagent/prompts/worker.md +10 -0
- package/node_modules/dsh-duet-superagent/skills/dsh-superagent-feishu/SKILL.md +12 -0
- package/node_modules/dsh-duet-superagent/skills/dsh-superagent-github/SKILL.md +14 -0
- package/node_modules/graceful-fs/LICENSE.md +55 -0
- package/node_modules/graceful-fs/README.md +143 -0
- package/node_modules/graceful-fs/clone.js +23 -0
- package/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/node_modules/graceful-fs/package.json +52 -0
- package/node_modules/graceful-fs/polyfills.js +355 -0
- package/node_modules/proper-lockfile/CHANGELOG.md +108 -0
- package/node_modules/proper-lockfile/LICENSE +21 -0
- package/node_modules/proper-lockfile/README.md +183 -0
- package/node_modules/proper-lockfile/index.js +40 -0
- package/node_modules/proper-lockfile/lib/adapter.js +85 -0
- package/node_modules/proper-lockfile/lib/lockfile.js +342 -0
- package/node_modules/proper-lockfile/lib/mtime-precision.js +55 -0
- package/node_modules/proper-lockfile/package.json +71 -0
- package/node_modules/retry/.npmignore +3 -0
- package/node_modules/retry/.travis.yml +15 -0
- package/node_modules/retry/License +21 -0
- package/node_modules/retry/Makefile +18 -0
- package/node_modules/retry/README.md +227 -0
- package/node_modules/retry/equation.gif +0 -0
- package/node_modules/retry/example/dns.js +31 -0
- package/node_modules/retry/example/stop.js +40 -0
- package/node_modules/retry/index.js +1 -0
- package/node_modules/retry/lib/retry.js +100 -0
- package/node_modules/retry/lib/retry_operation.js +158 -0
- package/node_modules/retry/package.json +32 -0
- package/node_modules/retry/test/common.js +10 -0
- package/node_modules/retry/test/integration/test-forever.js +24 -0
- package/node_modules/retry/test/integration/test-retry-operation.js +258 -0
- package/node_modules/retry/test/integration/test-retry-wrap.js +101 -0
- package/node_modules/retry/test/integration/test-timeouts.js +69 -0
- package/node_modules/signal-exit/LICENSE.txt +16 -0
- package/node_modules/signal-exit/README.md +39 -0
- package/node_modules/signal-exit/index.js +202 -0
- package/node_modules/signal-exit/package.json +38 -0
- package/node_modules/signal-exit/signals.js +53 -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 +6 -3
- package/src/avatar/companion.html +10 -0
- package/src/avatar/companion.mjs +1 -1
- package/src/avatar/surface.mjs +2 -0
- package/src/client/agent-tasks.mjs +165 -0
- package/src/client/audio.mjs +30 -4
- package/src/client/avatar-surfaces.mjs +7 -4
- package/src/client/avatar-tasks.mjs +5 -2
- package/src/client/avatar.mjs +21 -2
- package/src/client/browser.mjs +73 -38
- package/src/client/composer-bridge.mjs +1 -1
- package/src/client/connection-hint.mjs +1 -1
- package/src/client/entry.js +1 -1
- package/src/client/feedback.mjs +1 -1
- package/src/client/identity.mjs +2 -2
- package/src/client/notice.mjs +19 -4
- package/src/client/settings.html +65 -4
- package/src/client/tutorial-adapter.mjs +11 -4
- package/src/client/tutorial.mjs +11 -4
- package/src/client/voices.mjs +137 -0
- package/src/client/work-mode.mjs +250 -0
- package/src/client/workspaces.mjs +1 -1
- package/src/host/agent-connection.mjs +199 -0
- package/src/host/agent-trace.mjs +56 -0
- package/src/host/assets.mjs +3 -0
- package/src/host/diagnostics.mjs +37 -2
- package/src/host/plugin.mjs +112 -12
- package/src/host/proxy.mjs +93 -19
- package/src/host/service-info.mjs +30 -0
- package/src/host/settings.mjs +23 -2
- package/src/host/trace.mjs +4 -1
- package/src/host/voices.mjs +205 -0
- package/src/shared/avatar-menu-ui.mjs +5 -3
- package/src/shared/avatar-menu.mjs +3 -0
- package/src/shared/avatar-surface.mjs +2 -1
- package/src/shared/state.mjs +31 -7
- package/src/shared/work-mode.mjs +59 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.z = void 0;
|
|
30
|
+
const z = __importStar(require("../v4/mini/external.cjs"));
|
|
31
|
+
exports.z = z;
|
|
32
|
+
__exportStar(require("../v4/mini/external.cjs"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-duet",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "duet(二重奏):只用语音就能操作 DSH,边听边说、随时插话的全双工语音助手。",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh-plugin",
|
|
@@ -22,14 +22,15 @@
|
|
|
22
22
|
"scripts": {
|
|
23
23
|
"test": "node scripts/test.mjs",
|
|
24
24
|
"check": "node scripts/check-package.mjs",
|
|
25
|
-
"test:browser": "node tests/browser/entry-loading.mjs && node tests/browser/settings.mjs && node tests/browser/tutorial.mjs && node tests/browser/feedback.mjs && node tests/browser/connection-hint.mjs && node tests/browser/controls-layout.mjs && node tests/browser/resilience.mjs && node tests/browser/page-binding.mjs && node tests/browser/stop-task.mjs && node tests/browser/desktop-settings.mjs && node tests/browser/desktop-identity.mjs && node tests/browser/audio-interruption.mjs",
|
|
25
|
+
"test:browser": "node tests/browser/entry-loading.mjs && node tests/browser/settings.mjs && node tests/browser/tutorial.mjs && node tests/browser/feedback.mjs && node tests/browser/connection-hint.mjs && node tests/browser/update-notice.mjs && node tests/browser/voices.mjs && node tests/browser/controls-layout.mjs && node tests/browser/resilience.mjs && node tests/browser/page-binding.mjs && node tests/browser/stop-task.mjs && node tests/browser/desktop-settings.mjs && node tests/browser/desktop-identity.mjs && node tests/browser/audio-interruption.mjs",
|
|
26
|
+
"test:work-mode": "node tests/browser/work-mode.mjs",
|
|
26
27
|
"test:host": "node tests/host/isolated-host.mjs",
|
|
27
28
|
"build:avatar": "node scripts/build-avatar.mjs",
|
|
28
29
|
"build:avatar:desktop": "node scripts/build-avatar-desktop.mjs",
|
|
29
30
|
"test:avatar:desktop": "npm run build:avatar && node tests/browser/companion.mjs && node tests/browser/avatar-style.mjs",
|
|
30
31
|
"test:avatar": "node --test tests/unit/avatar.test.mjs && node tests/browser/avatar.mjs && node tests/browser/input-effect.mjs",
|
|
31
32
|
"test:avatar:surfaces": "node tests/browser/avatar-surfaces.mjs && node tests/browser/surface-origins.mjs",
|
|
32
|
-
"prepack": "npm run check",
|
|
33
|
+
"prepack": "npm run check && node scripts/verify-agent-package.mjs",
|
|
33
34
|
"test:avatar:placement": "npm run build:avatar && node tests/browser/companion-placement.mjs",
|
|
34
35
|
"test:avatar:menu": "node --test tests/unit/avatar-menu.test.mjs && node tests/browser/avatar-menu.mjs && node tests/browser/companion-placement.mjs"
|
|
35
36
|
},
|
|
@@ -55,8 +56,10 @@
|
|
|
55
56
|
"desktop/bin/"
|
|
56
57
|
],
|
|
57
58
|
"dependencies": {
|
|
59
|
+
"dsh-duet-superagent": "file:vendor/dsh-duet-superagent",
|
|
58
60
|
"ws": "^8.18.3"
|
|
59
61
|
},
|
|
62
|
+
"bundleDependencies": ["dsh-duet-superagent"],
|
|
60
63
|
"devDependencies": {
|
|
61
64
|
"@tauri-apps/cli": "2.12.4",
|
|
62
65
|
"esbuild": "0.25.12",
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
<!doctype html><html lang="zh-CN"><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
|
2
2
|
<title>duet</title><style>
|
|
3
|
+
#surface[data-layout=tasks]{background:transparent;border:0;box-shadow:none;padding:4px;white-space:normal}
|
|
4
|
+
#surface[data-layout=tasks] br{display:none}
|
|
5
|
+
#surface[data-layout=tasks] button{display:flex;align-items:center;gap:12px;box-sizing:border-box;width:100%;margin:0 0 8px;padding:14px 16px;border:1px solid #ffffffa0;border-radius:20px;background:#f7f9fbea;color:#253344;text-align:left;font:550 14px/1.5 -apple-system,BlinkMacSystemFont,system-ui,sans-serif;box-shadow:0 6px 18px -8px #172c4938;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);cursor:pointer}
|
|
6
|
+
#surface[data-layout=tasks] button:hover{background:#fff}
|
|
7
|
+
#surface[data-layout=tasks] [data-task-state]::before{content:'';display:block;flex:0 0 18px;width:18px;height:18px;box-sizing:border-box;border:2px solid #62a0cd45;border-top-color:#468abf;border-radius:50%;animation:duet-task-spin 1s linear infinite}
|
|
8
|
+
#surface[data-layout=tasks] [data-task-state=completed]::before{content:'✓';border:0;background:#dcefe8;color:#23845e;text-align:center;font:600 14px/18px system-ui;animation:none}
|
|
9
|
+
#surface[data-layout=tasks] [data-task-state=waiting]::before{content:'?';border:0;background:#fff0d9;color:#ad7523;text-align:center;font:600 13px/18px system-ui;animation:none}
|
|
10
|
+
#surface[data-layout=tasks] [data-task-state=failed]::before,#surface[data-layout=tasks] [data-task-state=stopped]::before{content:'!';border:0;background:#f8e3e3;color:#b45353;text-align:center;font:600 13px/18px system-ui;animation:none}
|
|
11
|
+
@keyframes duet-task-spin{to{transform:rotate(360deg)}}
|
|
3
12
|
html,body{margin:0;background:transparent;font:13px/1.6 system-ui;overflow:hidden;color:#e9f4ff;user-select:none}
|
|
4
13
|
#stage{--scale:1;position:absolute;left:0;top:0;width:280px;height:calc(210px + 280px * var(--scale));transform-origin:top left}
|
|
5
14
|
#avatar{position:absolute;left:calc((280px - 260px * var(--scale)) / 2);top:140px;height:calc(280px * var(--scale));width:calc(260px * var(--scale));cursor:grab;touch-action:none}
|
|
15
|
+
#avatar,#avatar canvas{outline:none;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}
|
|
6
16
|
#bubble{position:absolute;bottom:calc(100% - 134px);left:12px;right:12px;padding:12px 14px;background:#142638ed;border:1px solid #8dc5ed45;border-radius:17px;box-shadow:0 5px 20px #0002;max-height:180px;overflow-y:auto;white-space:pre-wrap;overflow-wrap:anywhere;scrollbar-width:thin}
|
|
7
17
|
#bubble{box-sizing:border-box}#bubble[hidden]{display:none}#bubble[data-input=true]{background:#193b53f5;border-color:#7cb8e599}
|
|
8
18
|
#keyboard{display:inline-block;vertical-align:middle;margin-right:7px}#keyboard[hidden]{display:none}
|
package/src/avatar/companion.mjs
CHANGED
|
@@ -67,7 +67,7 @@ function positionSurface(){
|
|
|
67
67
|
bubble.style.width='256px';bubble.style.right='auto'
|
|
68
68
|
for(const n of nodes)n.style.maxHeight=(Math.max(1,h-24)/fit)+'px'
|
|
69
69
|
const bubbleHeight=bubble.hidden?0:Math.min({small:90,medium:180,large:260}[bubbleSize]*fit,bubble.getBoundingClientRect().height)
|
|
70
|
-
const panelHeight=panel.hidden?0:Math.min(256*fit,panel.getBoundingClientRect().height)
|
|
70
|
+
const panelHeight=panel.hidden?0:Math.min((panel.dataset.layout==='tasks'?384:256)*fit,panel.getBoundingClientRect().height)
|
|
71
71
|
const separation=nodes.length>1?gap:0,needed=bubbleHeight+panelHeight+separation
|
|
72
72
|
const above=Math.max(0,avatar.top-gap-(y+12)),below=Math.max(0,y+h-12-(tools.bottom+gap))
|
|
73
73
|
let side=desiredPanel?surfaceSide:null
|
package/src/avatar/surface.mjs
CHANGED
|
@@ -8,6 +8,7 @@ export function mountCompanionSurface(root,{send,changed}) {
|
|
|
8
8
|
const focused=root.contains(document.activeElement)?document.activeElement.dataset.surfaceAction:null,scroll=root.scrollTop
|
|
9
9
|
const samePanel=current?.id===panel?.id
|
|
10
10
|
key=next;current=panel;root.hidden=!panel
|
|
11
|
+
root.dataset.layout=panel?.layout||''
|
|
11
12
|
const desired=[],nextElements=new Map()
|
|
12
13
|
const element=(id,tag)=>{
|
|
13
14
|
const old=samePanel?elements.get(id):null
|
|
@@ -22,6 +23,7 @@ export function mountCompanionSurface(root,{send,changed}) {
|
|
|
22
23
|
for(const [index,n] of panel.nodes.entries()){
|
|
23
24
|
const tag=n.kind==='break'?'br':n.kind==='heading'?'h3':n.kind==='button'?'button':n.kind==='checkbox'?'input':'span'
|
|
24
25
|
const e=element(n.action||'node'+index,tag)
|
|
26
|
+
if(n.taskState)e.dataset.taskState=n.taskState;else delete e.dataset.taskState
|
|
25
27
|
if(e.textContent!==n.text)e.textContent=n.text
|
|
26
28
|
if(n.kind==='checkbox'){e.type='checkbox';e.checked=n.checked}
|
|
27
29
|
if(n.kind==='button'||n.kind==='checkbox'){
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import {focusedSession,openLocalSession} from './composer.mjs'
|
|
2
|
+
import {TASK_STATES as states, noteTaskVisit, visibleTaskRows} from '../shared/work-mode.mjs'
|
|
3
|
+
const active=new Set(['queued','pending','running','progress','waiting','waiting_user','blocked'])
|
|
4
|
+
const bubbleCSS=`
|
|
5
|
+
[data-duet-agent-tasks]{position:fixed;isolation:isolate;z-index:2147483599;margin:0;color:CanvasText;font:13px/1.35 -apple-system,BlinkMacSystemFont,system-ui,sans-serif}
|
|
6
|
+
[data-duet-agent-tasks] summary,[data-duet-agent-tasks] [data-task-list]{box-sizing:border-box;background:Canvas;border:1px solid color-mix(in srgb,CanvasText 12%,Canvas);box-shadow:0 8px 22px -7px #0003,0 1px 4px #0001}
|
|
7
|
+
[data-duet-agent-tasks] summary{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:8px;padding:7px 15px;border-radius:24px;text-align:start;list-style:none;cursor:pointer;user-select:none}
|
|
8
|
+
[data-duet-agent-tasks] summary::-webkit-details-marker{display:none}
|
|
9
|
+
[data-duet-agent-tasks] summary:focus-visible{outline:2px solid Highlight;outline-offset:2px}
|
|
10
|
+
[data-duet-agent-tasks] summary strong{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
11
|
+
[data-duet-agent-tasks] summary small{grid-column:1;color:color-mix(in srgb,CanvasText 70%,Canvas);font-size:11px}
|
|
12
|
+
[data-duet-agent-tasks] summary span{grid-area:1 / 2 / span 2;font-size:10px;color:color-mix(in srgb,CanvasText 62%,Canvas);white-space:nowrap}
|
|
13
|
+
[data-duet-agent-tasks][data-stacked]:not([open])::before{content:'';pointer-events:none;position:absolute;inset:6px 8px -4px;border-radius:24px;background:Canvas;box-shadow:0 3px 7px #0002;z-index:-1}
|
|
14
|
+
[data-duet-agent-tasks] [data-task-list]{position:fixed;width:min(264px,calc(100vw - 16px));overflow:auto;padding:6px;border-radius:18px}
|
|
15
|
+
[data-duet-agent-tasks] [data-task-list] button{border-radius:10px}
|
|
16
|
+
[data-duet-agent-tasks] [data-task-list] button:hover{background:color-mix(in srgb,CanvasText 8%,transparent)!important}
|
|
17
|
+
[data-duet-agent-tasks][data-inline] summary{display:none}
|
|
18
|
+
[data-duet-agent-tasks][data-inline] [data-task-list]{position:static;width:100%;max-height:65vh;overflow:auto}
|
|
19
|
+
[data-duet-agent-tasks] [data-task-list]{background:transparent!important;border:0;box-shadow:none;padding:0;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
|
|
20
|
+
[data-duet-agent-tasks] [data-task-list] button{display:flex;align-items:center;gap:12px;width:100%;box-sizing:border-box;padding:14px 16px;margin:0 0 8px;border:1px solid #ffffff90;border-radius:20px;background:#f7f9fbe8;color:#253344;text-align:left;cursor:pointer;box-shadow:0 6px 18px -8px #172c4938;backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)}
|
|
21
|
+
[data-duet-agent-tasks] [data-task-list] button span{font-size:13px;font-weight:550;line-height:1.5;overflow-wrap:anywhere}
|
|
22
|
+
[data-task-state]::before{content:'';display:block;flex:0 0 18px;width:18px;height:18px;box-sizing:border-box;border:2px solid #62a0cd45;border-top-color:#468abf;border-radius:50%;animation:duet-task-spin 1s linear infinite}
|
|
23
|
+
[data-task-state=completed]::before{content:'✓';border:0;background:#dcefe8;color:#23845e;text-align:center;font:600 14px/18px system-ui;animation:none}
|
|
24
|
+
[data-task-state=waiting]::before{content:'?';border:0;background:#fff0d9;color:#ad7523;text-align:center;font:600 13px/18px system-ui;animation:none}
|
|
25
|
+
[data-task-state=failed]::before,[data-task-state=stopped]::before{content:'!';border:0;background:#f8e3e3;color:#b45353;text-align:center;font:600 13px/18px system-ui;animation:none}
|
|
26
|
+
@keyframes duet-task-spin{to{transform:rotate(360deg)}}
|
|
27
|
+
@supports ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
|
|
28
|
+
[data-duet-agent-tasks] summary,[data-duet-agent-tasks] [data-task-list]{background:color-mix(in srgb,Canvas 82%,transparent);-webkit-backdrop-filter:blur(18px) saturate(1.25);backdrop-filter:blur(18px) saturate(1.25)}
|
|
29
|
+
}
|
|
30
|
+
@media (prefers-reduced-transparency:reduce),(forced-colors:active){
|
|
31
|
+
[data-duet-agent-tasks] summary,[data-duet-agent-tasks] [data-task-list]{background:Canvas;-webkit-backdrop-filter:none;backdrop-filter:none}
|
|
32
|
+
}`
|
|
33
|
+
|
|
34
|
+
/** A local, connection-owned projection; never turn the model's short handles into UI routes. */
|
|
35
|
+
export function agentTaskPanel(ctx,anchor,notice,presentation=()=>null){
|
|
36
|
+
let box,summary,title,statusLine,count,list,attempt,currentFrame,limit=50,lifecycle,resize,mutations,raf=0,tracked
|
|
37
|
+
function reset(){
|
|
38
|
+
attempt?.abort();lifecycle?.abort();resize?.disconnect();mutations?.disconnect();cancelAnimationFrame(raf)
|
|
39
|
+
box?.remove();box=null;currentFrame=null;tracked=null;raf=0;limit=50
|
|
40
|
+
}
|
|
41
|
+
function place(){
|
|
42
|
+
if(!box||box.hidden)return
|
|
43
|
+
const view=presentation(),pet=view?.anchor,stage=pet?.querySelector('[data-duet-avatar-stage]')||pet
|
|
44
|
+
// Native presentation is projected through avatar-surfaces, not positioned
|
|
45
|
+
// against the DSH toolbar. Keep it off-page during desktop reconnects too.
|
|
46
|
+
if(view?.native || ['desktop','connecting','recovering','other'].includes(view?.mode)){
|
|
47
|
+
box.style.visibility='hidden';return
|
|
48
|
+
}
|
|
49
|
+
const target=stage?.isConnected && stage.getBoundingClientRect().height?stage:anchor()
|
|
50
|
+
if(!target?.isConnected){box.style.visibility='hidden';return}
|
|
51
|
+
if(target!==tracked){resize.disconnect();resize.observe(target);tracked=target}
|
|
52
|
+
const a=target.getBoundingClientRect(), gap=8
|
|
53
|
+
if(!a.width||!a.height){box.style.visibility='hidden';return}
|
|
54
|
+
box.style.visibility='visible'
|
|
55
|
+
const clamp=(v,hi)=>Math.max(gap,Math.min(v,hi-gap))
|
|
56
|
+
const room=innerWidth-a.right-2*gap
|
|
57
|
+
// On tiny viewports keep the card at the right edge rather than moving it above the pet.
|
|
58
|
+
const width=Math.min(224,Math.max(112,room))
|
|
59
|
+
summary.style.width=Math.min(innerWidth-2*gap,width)+'px'
|
|
60
|
+
const inline=box.hasAttribute('data-inline')
|
|
61
|
+
if(inline)box.style.width=Math.min(innerWidth-2*gap,width)+'px';else box.style.width=''
|
|
62
|
+
const card=inline?box:summary
|
|
63
|
+
const left=clamp(a.right+gap,innerWidth-card.offsetWidth)
|
|
64
|
+
const top=clamp(a.top+(a.height-card.offsetHeight)/2,innerHeight-card.offsetHeight)
|
|
65
|
+
Object.assign(box.style,{left:left+'px',top:top+'px'})
|
|
66
|
+
if(inline){Object.assign(list.style,{width:'100%',left:'',top:'',bottom:'',maxHeight:'65vh'});return}
|
|
67
|
+
if(!box.open)return
|
|
68
|
+
list.style.width=Math.min(264,innerWidth-left-gap)+'px'
|
|
69
|
+
const below=innerHeight-top-summary.offsetHeight-2*gap,above=top-2*gap
|
|
70
|
+
const up=above>below
|
|
71
|
+
Object.assign(list.style,{left:clamp(left,innerWidth-list.offsetWidth)+'px',
|
|
72
|
+
top:up?'auto':top+summary.offsetHeight+gap+'px',bottom:up?innerHeight-top+gap+'px':'auto',
|
|
73
|
+
maxHeight:Math.max(32,Math.min(innerHeight*.46,up?above:below))+'px'})
|
|
74
|
+
}
|
|
75
|
+
function schedule(){if(!raf)raf=requestAnimationFrame(()=>{raf=0;place()})}
|
|
76
|
+
function observe(){
|
|
77
|
+
if(!currentFrame || document.hidden || !document.hasFocus())return
|
|
78
|
+
const id=focusedSession(ctx)
|
|
79
|
+
if(visibleTaskRows(currentFrame.rows).some(r=>r.session_id===id && r.finished_at)){
|
|
80
|
+
noteTaskVisit(id); update({...currentFrame,focus:null},false)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
async function open(id,automatic){
|
|
84
|
+
attempt?.abort()
|
|
85
|
+
const controller=attempt=new AbortController(),{signal}=controller
|
|
86
|
+
const before=focusedSession(ctx)
|
|
87
|
+
try {
|
|
88
|
+
if(automatic && (before===id || document.hidden || !document.hasFocus()))return
|
|
89
|
+
// The acceptance can precede registration of the worker in DSH.
|
|
90
|
+
for(let n=0;n<6;n++){
|
|
91
|
+
await ctx.sessions.refresh();signal.throwIfAborted()
|
|
92
|
+
if(ctx.sessions.list.getSnapshot().byId?.[id])break
|
|
93
|
+
if(n===5)throw Error('session_not_ready')
|
|
94
|
+
await new Promise(resolve=>setTimeout(resolve,300))
|
|
95
|
+
}
|
|
96
|
+
if(ctx.workspaces?.list?.getSnapshot()?.archivedSessionIds?.includes(id))return
|
|
97
|
+
if(automatic){
|
|
98
|
+
if(document.hidden || !document.hasFocus() || focusedSession(ctx)!==before)return
|
|
99
|
+
if(before && ctx.conversation.input.for(ctx.sessions.scope(before)).state.getSnapshot().draft?.trim())return
|
|
100
|
+
if(document.activeElement?.matches('input:not([type=button])'))return
|
|
101
|
+
}
|
|
102
|
+
await openLocalSession(ctx,id,signal)
|
|
103
|
+
observe()
|
|
104
|
+
}catch{if(!signal.aborted&&!automatic)notice('暂时打不开这个任务会话,请稍后再试。')}
|
|
105
|
+
}
|
|
106
|
+
function update(frame,follow){
|
|
107
|
+
const controls=anchor()
|
|
108
|
+
if(!controls?.parentElement||!Array.isArray(frame.rows))return
|
|
109
|
+
if(!box){
|
|
110
|
+
box=document.createElement('details');box.dataset.duetAgentTasks=''
|
|
111
|
+
box.dataset.duetAvatarSurface='10';box.dataset.duetAvatarNativeOnly=''
|
|
112
|
+
const style=document.createElement('style');style.textContent=bubbleCSS
|
|
113
|
+
summary=document.createElement('summary');title=document.createElement('strong')
|
|
114
|
+
statusLine=document.createElement('small');count=document.createElement('span')
|
|
115
|
+
summary.append(title,statusLine,count)
|
|
116
|
+
list=document.createElement('div');list.dataset.taskList=''
|
|
117
|
+
box.append(summary,list,style);document.body.append(box)
|
|
118
|
+
lifecycle=new AbortController();const {signal}=lifecycle
|
|
119
|
+
resize=new ResizeObserver(schedule);mutations=new MutationObserver(schedule)
|
|
120
|
+
mutations.observe(controls.closest('[data-slot="sidebar"]')||controls.parentElement,{childList:true,subtree:true})
|
|
121
|
+
window.addEventListener('resize',schedule,{signal});document.addEventListener('scroll',schedule,{signal,capture:true,passive:true})
|
|
122
|
+
window.addEventListener('duet:avatar-presentation',schedule,{signal})
|
|
123
|
+
box.addEventListener('toggle',place,{signal})
|
|
124
|
+
document.addEventListener('pointerdown',e=>{if(box.open&&!box.hasAttribute('data-inline')&&!box.contains(e.target))box.open=false},{signal,capture:true})
|
|
125
|
+
document.addEventListener('keydown',e=>{if(box.open&&!box.hasAttribute('data-inline')&&e.key==='Escape'){box.open=false;summary.focus()}},{signal})
|
|
126
|
+
}
|
|
127
|
+
currentFrame=frame
|
|
128
|
+
const candidates=frame.rows.filter(r=>r && /^worker-[a-f0-9]{32}$/.test(r.session_id))
|
|
129
|
+
const id=focusedSession(ctx)
|
|
130
|
+
if(!document.hidden && document.hasFocus() && visibleTaskRows(candidates).some(r=>r.finished_at && r.session_id===id))
|
|
131
|
+
noteTaskVisit(id)
|
|
132
|
+
const rows=visibleTaskRows(candidates)
|
|
133
|
+
const running=rows.filter(r=>active.has(r.state)).length,unread=rows.filter(r=>r.finished_at).length
|
|
134
|
+
const lead=rows.find(r=>r.state==='waiting_user')||rows.find(r=>active.has(r.state))||rows[0]
|
|
135
|
+
title.textContent='代理任务'
|
|
136
|
+
statusLine.textContent=states[lead?.state]||'状态待确认'
|
|
137
|
+
statusLine.hidden=true
|
|
138
|
+
count.textContent=[running&&running+' 进行中',unread&&unread+' 未读'].filter(Boolean).join(' · ')||rows.length+' 个任务'
|
|
139
|
+
summary.title=title.textContent
|
|
140
|
+
summary.setAttribute('aria-label',['代理任务',title.textContent,statusLine.textContent,count.textContent].join(','))
|
|
141
|
+
box.toggleAttribute('data-stacked',rows.length>1)
|
|
142
|
+
box.hidden=!rows.length
|
|
143
|
+
const inline=rows.length<=3,wasInline=box.hasAttribute('data-inline')
|
|
144
|
+
box.toggleAttribute('data-inline',inline);summary.hidden=inline
|
|
145
|
+
if(inline)box.open=true;else if(wasInline)box.open=false
|
|
146
|
+
if(box.hidden)box.open=false
|
|
147
|
+
list.replaceChildren()
|
|
148
|
+
if(!rows.length)list.textContent='还没有任务'
|
|
149
|
+
for(const r of rows.slice(0,limit)){
|
|
150
|
+
const button=document.createElement('button');button.type='button'
|
|
151
|
+
const label=document.createElement('span');label.textContent=r.name||'未命名任务'
|
|
152
|
+
button.dataset.taskState=['completed','merged','ready','ended'].includes(r.state)?'completed':['failed'].includes(r.state)?'failed':['stopped','dropped','closed','cancelled'].includes(r.state)?'stopped':['queued','pending','running','progress'].includes(r.state)?'running':'waiting'
|
|
153
|
+
button.title=label.textContent+' · '+(states[r.state]||'状态待确认')
|
|
154
|
+
button.setAttribute('aria-label',button.title)
|
|
155
|
+
button.append(label);button.onclick=()=>void open(r.session_id,false);list.append(button)
|
|
156
|
+
}
|
|
157
|
+
if(rows.length>limit){
|
|
158
|
+
const more=document.createElement('button');more.type='button';more.textContent='查看更多任务(剩余 '+(rows.length-limit)+')'
|
|
159
|
+
more.onclick=()=>{limit+=50;update({...currentFrame,focus:null},false)};list.append(more)
|
|
160
|
+
}
|
|
161
|
+
if(follow&&rows.some(r=>r.session_id===frame.focus))void open(frame.focus,true)
|
|
162
|
+
place()
|
|
163
|
+
}
|
|
164
|
+
return {update,reset,observe}
|
|
165
|
+
}
|
package/src/client/audio.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { microphoneConstraints } from './microphone.mjs?v=0.
|
|
1
|
+
import { microphoneConstraints } from './microphone.mjs?v=0.3.0'
|
|
2
2
|
import { captionCue, captionAt, AudioCaptionTimeline } from '../shared/avatar.mjs'
|
|
3
3
|
|
|
4
4
|
export const AUDIO_STOP_PROTOCOL = 'audio_stop_candidates_v1'
|
|
@@ -17,6 +17,7 @@ export class DuetAudio {
|
|
|
17
17
|
this.tones = new Set()
|
|
18
18
|
this.captureCleanup = null
|
|
19
19
|
this.captionTimeline = new AudioCaptionTimeline()
|
|
20
|
+
this.spokenSegments = new Map()
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
prepare() {
|
|
@@ -103,6 +104,14 @@ export class DuetAudio {
|
|
|
103
104
|
|
|
104
105
|
event(event, send, present = () => {}) {
|
|
105
106
|
const key = `${event.response_id}:${event.generation}`
|
|
107
|
+
const segmentKey=JSON.stringify([event.response_id,event.segment_id??0])
|
|
108
|
+
// Legacy workers send spoken deltas without timestamps or generation, while
|
|
109
|
+
// the paired PCM has a generation but sometimes no text. Join by response/segment.
|
|
110
|
+
if(event.response_id && event.type==='response.output_text.delta' &&
|
|
111
|
+
!Object.hasOwn(event,'audio_sample_end') && typeof event.delta==='string'){
|
|
112
|
+
this.spokenSegments.set(segmentKey,((this.spokenSegments.get(segmentKey)||'')+event.delta).slice(0,4000))
|
|
113
|
+
if(this.spokenSegments.size>48)this.spokenSegments.delete(this.spokenSegments.keys().next().value)
|
|
114
|
+
}
|
|
106
115
|
if (['response.output_text.delta','response.output_text.done'].includes(event.type)
|
|
107
116
|
&& Object.hasOwn(event,'audio_sample_end')) {
|
|
108
117
|
if (this.cleared.has(key)) return true
|
|
@@ -137,7 +146,15 @@ export class DuetAudio {
|
|
|
137
146
|
this.nextTime = start + pcm.length / rate
|
|
138
147
|
const response = this.responses.get(key) || { response_id: event.response_id, generation: event.generation, played: 0, basePlayed: 0, received: 0, chunks: [] }
|
|
139
148
|
const chunk = { start, samples: pcm.length, rate, sampleStart: response.received, node, gain, ended: false }
|
|
140
|
-
|
|
149
|
+
let spoken=event.text
|
|
150
|
+
if(!spoken && this.spokenSegments.has(segmentKey)){
|
|
151
|
+
// Approximate only when no TTS cue is available. Do not reveal a long
|
|
152
|
+
// generated sentence in the first 80ms of playback.
|
|
153
|
+
if(response.legacySegment!==segmentKey){response.legacySegment=segmentKey;response.legacySeconds=0}
|
|
154
|
+
response.legacySeconds+=pcm.length/rate
|
|
155
|
+
spoken=Array.from(this.spokenSegments.get(segmentKey)).slice(0,Math.ceil(response.legacySeconds*7)).join('')
|
|
156
|
+
}
|
|
157
|
+
chunk.caption = captionCue(response, spoken===event.text?event:{...event,text:spoken})
|
|
141
158
|
response.received += pcm.length
|
|
142
159
|
response.chunks.push(chunk)
|
|
143
160
|
this.responses.set(key, response)
|
|
@@ -146,7 +163,9 @@ export class DuetAudio {
|
|
|
146
163
|
const until = Math.min(this.context.currentTime, response.stopAt ?? Infinity)
|
|
147
164
|
if (until > chunk.start) {
|
|
148
165
|
const played=this.playedAt(response,until)
|
|
149
|
-
|
|
166
|
+
const final=response.done && !response.stopping && !this.cleared.has(key) && played>=response.received
|
|
167
|
+
? this.spokenSegments.get(response.legacySegment)?.slice(-240) : null
|
|
168
|
+
this.avatarCaption = { text: this.captionTimeline.text(key,played) ?? final ?? captionAt(chunk.caption, (until-chunk.start)*rate/pcm.length), at: performance.now(), key, played }
|
|
150
169
|
}
|
|
151
170
|
chunk.ended = true
|
|
152
171
|
this.nodes.delete(node); node.disconnect(); gain.disconnect()
|
|
@@ -174,7 +193,13 @@ export class DuetAudio {
|
|
|
174
193
|
while (!r.stopping && r.chunks.length && this.context.currentTime >= r.chunks[0].start + r.chunks[0].samples / r.chunks[0].rate) {
|
|
175
194
|
r.basePlayed += r.chunks.shift().samples
|
|
176
195
|
}
|
|
177
|
-
if (r.done && !r.stopping && !r.chunks.length)
|
|
196
|
+
if (r.done && !r.stopping && !r.chunks.length) {
|
|
197
|
+
const final=this.spokenSegments.get(r.legacySegment)
|
|
198
|
+
if(final && this.avatarCaption?.key===key && this.captionTimeline.text(key,played)==null){
|
|
199
|
+
this.avatarCaption.text=final.slice(-240);this.avatarCaption.at=performance.now()
|
|
200
|
+
}
|
|
201
|
+
this.responses.delete(key)
|
|
202
|
+
}
|
|
178
203
|
}
|
|
179
204
|
}
|
|
180
205
|
|
|
@@ -288,6 +313,7 @@ export class DuetAudio {
|
|
|
288
313
|
this.nextTime = 0
|
|
289
314
|
this.avatarCaption = null
|
|
290
315
|
this.captionTimeline.clear()
|
|
316
|
+
this.spokenSegments.clear()
|
|
291
317
|
}
|
|
292
318
|
|
|
293
319
|
stop() {
|
|
@@ -14,11 +14,13 @@ export function mountAvatarSurfaces({avatar,canActivate=()=>false}) {
|
|
|
14
14
|
if(nodes.length>=160)return
|
|
15
15
|
if(node.nodeType===3){if(node.textContent.trim())nodes.push({kind:'text',text:node.textContent.slice(0,4000)});return}
|
|
16
16
|
if(node.nodeType!==1||node.hidden||node.getAttribute('aria-hidden')==='true'||['SVG','SCRIPT','STYLE'].includes(node.tagName))return
|
|
17
|
+
if(node.tagName==='DETAILS'&&!node.open){const summary=node.querySelector(':scope > summary');if(summary)walk(summary);return}
|
|
17
18
|
if(node.matches('button,input[type=checkbox],summary')) {
|
|
18
19
|
let action=actionIds.get(node);if(!action){action=`a${++actionSerial}`;actionIds.set(node,action)}
|
|
19
20
|
const gesture=node.hasAttribute('data-duet-user-gesture')&&!canActivate()
|
|
20
21
|
actions.set(action,node)
|
|
21
|
-
|
|
22
|
+
const text=node.matches('summary')?[...node.children].map(n=>n.textContent).join('\n'):node.textContent
|
|
23
|
+
nodes.push({kind:node.matches('input')?'checkbox':'button',text:node.matches('input')?'':text.slice(0,4000),action,disabled:node.disabled===true,checked:node.checked===true,gesture,label:node.getAttribute('aria-label')||node.closest('label')?.textContent.slice(0,100)||'',...(node.dataset.taskState?{taskState:node.dataset.taskState}:{})})
|
|
22
24
|
return
|
|
23
25
|
}
|
|
24
26
|
if(/^H[1-6]$/.test(node.tagName)){nodes.push({kind:'heading',text:node.textContent.slice(0,4000)});return}
|
|
@@ -33,18 +35,19 @@ export function mountAvatarSurfaces({avatar,canActivate=()=>false}) {
|
|
|
33
35
|
if(disposed)return
|
|
34
36
|
const view=avatar()?.presentation?.()||{},native=view.native===true
|
|
35
37
|
// Sidebar branding uses data-duet-surface too; only explicit numeric panels are eligible.
|
|
36
|
-
const candidates=[...document.querySelectorAll('[data-duet-avatar-surface]')].filter(n=>/^\d{1,3}$/.test(n.dataset.duetAvatarSurface)&&n.dataset.duetSurfaceOrigin!=='page'&&!n.hidden&&n.isConnected&&(n.tagName!=='DIALOG'||n.open))
|
|
38
|
+
const candidates=[...document.querySelectorAll('[data-duet-avatar-surface]')].filter(n=>/^\d{1,3}$/.test(n.dataset.duetAvatarSurface)&&n.dataset.duetSurfaceOrigin!=='page'&&(!n.hasAttribute('data-duet-avatar-native-only')||native)&&!n.hidden&&n.isConnected&&(n.tagName!=='DIALOG'||n.open))
|
|
37
39
|
const panel=candidates.sort((a,b)=>Number(b.dataset.duetAvatarSurface)-Number(a.dataset.duetAvatarSurface))[0]
|
|
38
40
|
for(const node of moved.keys())if(!candidates.includes(node))restore(node)
|
|
39
41
|
for(const node of candidates)if(node!==panel){restore(node);if(native){node.setAttribute('data-duet-surface-native','');moved.set(node,true)}}
|
|
40
42
|
if(!panel){if(current||last||native!==nativeBefore)avatar()?.surface?.({type:'surface',panel:null});last='';semantic='';current=null;actions.clear();nativeBefore=native;return}
|
|
41
43
|
let id=ids.get(panel);if(!id){id=`s${++serial}`;ids.set(panel,id)}
|
|
42
44
|
const nodes=snapshot(panel),target=panel.dataset.duetSurfaceTarget||null
|
|
43
|
-
const
|
|
45
|
+
const layout=panel.hasAttribute('data-duet-agent-tasks')?'tasks':null
|
|
46
|
+
const key=JSON.stringify({id,nodes,target,layout}),changed=key!==last
|
|
44
47
|
// Cosmetic countdown text does not invalidate an in-flight click. All other
|
|
45
48
|
// content and action state still fence stale confirmations.
|
|
46
49
|
const actionKey=JSON.stringify({id,target,nodes:nodes.map(n=>n.action&&actions.get(n.action)?.hasAttribute('data-duet-live-text')?{...n,text:''}:n)})
|
|
47
|
-
if(changed)current={id,revision:(current?.revision||0)+(actionKey!==semantic?1:0),nodes,target}
|
|
50
|
+
if(changed)current={id,revision:(current?.revision||0)+(actionKey!==semantic?1:0),nodes,target,...(layout?{layout}:{})}
|
|
48
51
|
semantic=actionKey
|
|
49
52
|
// A real click must happen in the playback document. Keep that counterpart visible.
|
|
50
53
|
const audioUnlock=panel.hasAttribute('data-duet-audio-unlock')
|
|
@@ -26,12 +26,15 @@ export function mountAvatarTasks({ctx,sync,avatar,tutorial,settings,focus=()=>wi
|
|
|
26
26
|
const s=scope()
|
|
27
27
|
let pending=[];try{pending=interactions?.snapshot()||[]}catch{}
|
|
28
28
|
model.update({scope:s.id,epoch:sync.epoch,sessions:s.rows,results:sync.active?(sync.snapshot?.results||[]):[],interactions:pending})
|
|
29
|
+
if(!document.hidden&&document.hasFocus())model.readSession(focusedSession(ctx))
|
|
29
30
|
publish()
|
|
30
31
|
}
|
|
31
32
|
const unsubscribe=sync.subscribe(refresh),workspaceStop=ctx.workspaces?.list?.subscribe?.(refresh),sessionStop=ctx.sessions?.list?.subscribe?.(refresh)
|
|
32
33
|
if(interactions)unwatch=interactions.subscribe(refresh)
|
|
33
34
|
const preferenceChange=()=>{prefs=noticePreferences();publish()}
|
|
34
35
|
window.addEventListener('storage',preferenceChange)
|
|
36
|
+
window.addEventListener('focus',refresh)
|
|
37
|
+
document.addEventListener('visibilitychange',refresh)
|
|
35
38
|
const channel=typeof BroadcastChannel==='undefined'?null:new BroadcastChannel(NOTICE_KEY)
|
|
36
39
|
if(channel)channel.onmessage=preferenceChange
|
|
37
40
|
const change=patch=>{prefs=saveNoticePreferences({...prefs,...patch});channel?.postMessage('changed');publish()}
|
|
@@ -47,7 +50,7 @@ export function mountAvatarTasks({ctx,sync,avatar,tutorial,settings,focus=()=>wi
|
|
|
47
50
|
refresh()
|
|
48
51
|
const item=model.items.get(request.id)
|
|
49
52
|
if(!sync.active||!item||!scope().rows.some(s=>s.session_id===item.session_id))throw Error('这条通知已失效,请回到 DSH 查看')
|
|
50
|
-
await openLocalSession(ctx,item.session_id,controller.signal);focus();model.
|
|
53
|
+
await openLocalSession(ctx,item.session_id,controller.signal);focus();model.readSession(item.session_id);publish()
|
|
51
54
|
return result(request,true)
|
|
52
55
|
}
|
|
53
56
|
case 'dismiss':model.dismiss(request.id);publish();break
|
|
@@ -64,5 +67,5 @@ export function mountAvatarTasks({ctx,sync,avatar,tutorial,settings,focus=()=>wi
|
|
|
64
67
|
}
|
|
65
68
|
// Only expires local DND; never polls a server.
|
|
66
69
|
const timer=setInterval(publish,1000);refresh()
|
|
67
|
-
return{action,refresh,dispose(){dead=true;controller.abort();clearInterval(timer);unsubscribe();unwatch();workspaceStop?.();sessionStop?.();channel?.close();window.removeEventListener('storage',preferenceChange)}}
|
|
70
|
+
return{action,refresh,dispose(){dead=true;controller.abort();clearInterval(timer);unsubscribe();unwatch();workspaceStop?.();sessionStop?.();channel?.close();window.removeEventListener('storage',preferenceChange);window.removeEventListener('focus',refresh);document.removeEventListener('visibilitychange',refresh)}}
|
|
68
71
|
}
|
package/src/client/avatar.mjs
CHANGED
|
@@ -24,7 +24,7 @@ export function mountAvatar({controls, audio, state, notice, requestMode, onSurf
|
|
|
24
24
|
const activityTimer=setInterval(()=>activity.tick(),30000)
|
|
25
25
|
const pagehide=()=>{clearTimeout(activityStartTimer);activityStartTimer=null;activity.stop('pagehide')}
|
|
26
26
|
window.addEventListener('pagehide',pagehide)
|
|
27
|
-
const publishPresentation=mode=>{presentationMode=mode;channel?.postMessage({type:'presentation',mode})}
|
|
27
|
+
const publishPresentation=mode=>{presentationMode=mode;channel?.postMessage({type:'presentation',mode});window.dispatchEvent(new Event('duet:avatar-presentation'))}
|
|
28
28
|
const ownerKind=location.protocol==='dsh-app:'?'desktop':/Edg\//.test(navigator.userAgent)?'edge':/Firefox\//.test(navigator.userAgent)?'firefox':/Chrome\//.test(navigator.userAgent)?'chrome':/Safari\//.test(navigator.userAgent)?'safari':'browser'
|
|
29
29
|
const rememberOwner=()=>{if(native&&document.visibilityState==='visible'&&document.hasFocus())send({type:'owner_focus'})}
|
|
30
30
|
window.addEventListener('focus',rememberOwner)
|
|
@@ -49,6 +49,25 @@ export function mountAvatar({controls, audio, state, notice, requestMode, onSurf
|
|
|
49
49
|
if(!root)return
|
|
50
50
|
const c=controls(),r=c?.getBoundingClientRect()
|
|
51
51
|
root.hidden=!r||c.dataset.compact==='true'
|
|
52
|
+
// Insert a sibling between DSH's scrollable workspace region and its footer.
|
|
53
|
+
// Never insert inside a session row or clear/reparent anything owned by DSH.
|
|
54
|
+
const list=c?.closest('[data-slot="sidebar"]')?.querySelector('[data-slot="sidebar.workspaces"]')
|
|
55
|
+
let foot=c
|
|
56
|
+
while(foot?.parentElement && list && !foot.parentElement.contains(list))foot=foot.parentElement
|
|
57
|
+
if(list && foot?.parentElement && foot!==document.body && !foot.contains(list)){
|
|
58
|
+
if(root.parentElement!==foot.parentElement||root.nextElementSibling!==foot)foot.before(root)
|
|
59
|
+
if(root.hidden){root.style.display='none';return}
|
|
60
|
+
const width=Math.max(1,Math.min(foot.parentElement.clientWidth||r.width,260))
|
|
61
|
+
const scale=Math.min(avatarScale(prefs.size),width/180,innerHeight*.32/210)
|
|
62
|
+
root.dataset.size=prefs.size
|
|
63
|
+
root.style.cssText='position:relative;flex:0 0 auto;align-self:stretch;min-width:0;display:flex;flex-direction:column;align-items:center;pointer-events:none'
|
|
64
|
+
stage.style.cssText=`position:relative;width:${width}px;max-width:100%;height:${210*scale}px`
|
|
65
|
+
caption.style.position='relative';caption.style.bottom='auto';caption.style.left='auto';caption.style.right='auto'
|
|
66
|
+
caption.style.width='calc(100% - 16px)';caption.style.maxHeight=`min(${{small:90,medium:180,large:260}[noticePreferences().bubble]}px,16vh)`
|
|
67
|
+
caption.style.order='-1';if(!caption.hidden)caption.scrollTop=caption.scrollHeight
|
|
68
|
+
root.querySelector('[data-duet-caption-tail]').style.display='none'
|
|
69
|
+
return
|
|
70
|
+
}
|
|
52
71
|
if(r){
|
|
53
72
|
const base=Math.min(260,Math.max(180,r.width)),scale=Math.min(avatarScale(prefs.size),Math.max(1,innerWidth-16)/base)
|
|
54
73
|
const width=base*scale,height=210*scale,top=Math.max(0,r.top-height-4)
|
|
@@ -81,7 +100,7 @@ export function mountAvatar({controls, audio, state, notice, requestMode, onSurf
|
|
|
81
100
|
viewport.oncontextmenu=e=>menu.open(e)
|
|
82
101
|
viewport.onkeydown=e=>{if(e.key==='ContextMenu'||e.key==='F10'&&e.shiftKey)menu.open(e)}
|
|
83
102
|
if(localState)menu.update(localState)
|
|
84
|
-
renderer=mountAvatarRenderer(viewport,{modelURL:'/duet/avatar/character.glb',onReady:()=>{if(!dead&&ticket===epoch&&root){root.dataset.ready='true';activity.start('web')}},onError:()=>{activity.stop('unavailable');publishPresentation('unavailable');notice('3D 形象暂不可用,可在设置中关闭。')}})
|
|
103
|
+
renderer=mountAvatarRenderer(viewport,{modelURL:'/duet/avatar/character.glb?v=4d39cf66',onReady:()=>{if(!dead&&ticket===epoch&&root){root.dataset.ready='true';activity.start('web')}},onError:()=>{activity.stop('unavailable');publishPresentation('unavailable');notice('3D 形象暂不可用,可在设置中关闭。')}})
|
|
85
104
|
}catch{root?.remove();root=null;publishPresentation('unavailable');notice('3D 形象暂不可用,语音功能不受影响。')}
|
|
86
105
|
finally{if(ticket===epoch)loading=false}
|
|
87
106
|
}
|