@takboo/dsh-coopanion 0.4.7 → 0.4.9
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 +20 -10
- package/desktop/display-controller.cjs +21 -0
- package/desktop/main.cjs +58 -42
- package/desktop/preload.cjs +2 -0
- package/desktop/test-display-probe.cjs +13 -0
- package/desktop/tray-state.cjs +12 -6
- package/dist/bridge.js +57 -20
- package/dist/bridge.js.map +3 -3
- package/dist/client.js +479 -18
- package/dist/index.js +777 -88
- package/dist/index.js.map +4 -4
- package/dist/model.js +71 -4
- package/dist/model.js.map +3 -3
- package/docs/daily-rhythm-contract.md +29 -0
- package/docs/desktop-recovery-contract.md +17 -0
- package/docs/evidence/m1/README.md +68 -0
- package/docs/evidence/m1/goal-host-0.2.0-rc.2.json +918 -0
- package/docs/evidence/m1/goal-host-0.2.1-alpha.1.json +918 -0
- package/docs/evidence/m1/install-0.2.0-rc.2.json +24 -0
- package/docs/evidence/m1/install-0.2.1-alpha.1.json +24 -0
- package/docs/evidence/m1/package-verification.json +7 -0
- package/docs/evidence/m1/runtime-lock-0.2.0-rc.2.json.gz +0 -0
- package/docs/evidence/m1/runtime-lock-0.2.1-alpha.1.json.gz +0 -0
- package/docs/evidence/m1/validation.json +94 -0
- package/docs/evidence/m2/README.md +77 -0
- package/docs/evidence/m2/controller-0.2.0-rc.2.json +1632 -0
- package/docs/evidence/m2/controller-0.2.1-alpha.1.json +1925 -0
- package/docs/evidence/m2/controller-probe.mjs +52 -0
- package/docs/evidence/m2/goal-host-0.2.0-rc.2.json +918 -0
- package/docs/evidence/m2/goal-host-0.2.1-alpha.1.json +918 -0
- package/docs/evidence/m2/install-0.2.0-rc.2.json +27 -0
- package/docs/evidence/m2/install-0.2.1-alpha.1.json +27 -0
- package/docs/evidence/m2/notification-host-0.2.0-rc.2.json +182 -0
- package/docs/evidence/m2/notification-host-0.2.1-alpha.1.json +182 -0
- package/docs/evidence/m2/notification-integration-0.2.0-rc.2.json +108 -0
- package/docs/evidence/m2/notification-integration-0.2.1-alpha.1.json +108 -0
- package/docs/evidence/m2/notification-source-0.2.0-rc.2.json +17 -0
- package/docs/evidence/m2/notification-source-0.2.1-alpha.1.json +17 -0
- package/docs/evidence/m2/package-source-content.json +18 -0
- package/docs/evidence/m2/package-verification.json +7 -0
- package/docs/evidence/m2/release-notes.md +12 -0
- package/docs/evidence/m2/runtime-lock-0.2.0-rc.2.json.gz +0 -0
- package/docs/evidence/m2/runtime-lock-0.2.1-alpha.1.json.gz +0 -0
- package/docs/evidence/m2/session-host-0.2.0-rc.2.json +3181 -0
- package/docs/evidence/m2/session-host-0.2.1-alpha.1.json +3767 -0
- package/docs/evidence/m2/session-native-0.2.0-rc.2.json +1161 -0
- package/docs/evidence/m2/session-native-0.2.1-alpha.1.json +1523 -0
- package/docs/evidence/m2/validation.json +187 -0
- package/docs/evidence/m3/README.md +64 -0
- package/docs/evidence/m3/build.log.gz +0 -0
- package/docs/evidence/m3/character-pack.log.gz +0 -0
- package/docs/evidence/m3/ci.log.gz +0 -0
- package/docs/evidence/m3/desktop-recovery-0.2.0-rc.2.json +392 -0
- package/docs/evidence/m3/desktop-recovery-0.2.1-alpha.1.json +394 -0
- package/docs/evidence/m3/desktop-recovery.json +615 -0
- package/docs/evidence/m3/desktop.log.gz +0 -0
- package/docs/evidence/m3/electron-setup.log.gz +0 -0
- package/docs/evidence/m3/goal-host-0.2.0-rc.2.json +918 -0
- package/docs/evidence/m3/goal-host-0.2.1-alpha.1.json +918 -0
- package/docs/evidence/m3/inbox-ui.log.gz +0 -0
- package/docs/evidence/m3/install-0.2.0-rc.2.json +28 -0
- package/docs/evidence/m3/install-0.2.1-alpha.1.json +28 -0
- package/docs/evidence/m3/install-alpha.log.gz +0 -0
- package/docs/evidence/m3/install-rc.log.gz +0 -0
- package/docs/evidence/m3/metadata.log.gz +0 -0
- package/docs/evidence/m3/notification-host-0.2.0-rc.2.json +182 -0
- package/docs/evidence/m3/notification-host-0.2.1-alpha.1.json +182 -0
- package/docs/evidence/m3/notification-integration-0.2.0-rc.2.json +108 -0
- package/docs/evidence/m3/notification-integration-0.2.1-alpha.1.json +108 -0
- package/docs/evidence/m3/notification-source-0.2.0-rc.2.json +17 -0
- package/docs/evidence/m3/notification-source-0.2.1-alpha.1.json +17 -0
- package/docs/evidence/m3/notification-ui.log.gz +0 -0
- package/docs/evidence/m3/package-source-content.json +3070 -0
- package/docs/evidence/m3/package-verification.json +7 -0
- package/docs/evidence/m3/package.log.gz +0 -0
- package/docs/evidence/m3/release-notes.md +12 -0
- package/docs/evidence/m3/runtime-lock-0.2.0-rc.2.json.gz +0 -0
- package/docs/evidence/m3/runtime-lock-0.2.1-alpha.1.json.gz +0 -0
- package/docs/evidence/m3/session-host-0.2.0-rc.2.json +3181 -0
- package/docs/evidence/m3/session-host-0.2.1-alpha.1.json +3767 -0
- package/docs/evidence/m3/session-native-0.2.0-rc.2.json +1131 -0
- package/docs/evidence/m3/session-native-0.2.1-alpha.1.json +1424 -0
- package/docs/evidence/m3/test.log.gz +0 -0
- package/docs/evidence/m3/typecheck.log.gz +0 -0
- package/docs/evidence/m3/ui.log.gz +0 -0
- package/docs/evidence/m3/validation.json +306 -0
- package/docs/evidence/m4/README.md +61 -0
- package/docs/evidence/m4/build.log.gz +0 -0
- package/docs/evidence/m4/character-pack.log.gz +0 -0
- package/docs/evidence/m4/ci.log.gz +0 -0
- package/docs/evidence/m4/desktop-recovery-0.2.0-rc.2.json +392 -0
- package/docs/evidence/m4/desktop-recovery-0.2.1-alpha.1.json +392 -0
- package/docs/evidence/m4/desktop-recovery.json +615 -0
- package/docs/evidence/m4/desktop.log.gz +0 -0
- package/docs/evidence/m4/electron-setup.log.gz +0 -0
- package/docs/evidence/m4/goal-host-0.2.0-rc.2.json +918 -0
- package/docs/evidence/m4/goal-host-0.2.1-alpha.1.json +918 -0
- package/docs/evidence/m4/inbox-ui.log.gz +0 -0
- package/docs/evidence/m4/install-0.2.0-rc.2.json +28 -0
- package/docs/evidence/m4/install-0.2.1-alpha.1.json +28 -0
- package/docs/evidence/m4/install-alpha.log.gz +0 -0
- package/docs/evidence/m4/install-rc.log.gz +0 -0
- package/docs/evidence/m4/metadata.log.gz +0 -0
- package/docs/evidence/m4/notification-host-0.2.0-rc.2.json +182 -0
- package/docs/evidence/m4/notification-host-0.2.1-alpha.1.json +182 -0
- package/docs/evidence/m4/notification-integration-0.2.0-rc.2.json +108 -0
- package/docs/evidence/m4/notification-integration-0.2.1-alpha.1.json +108 -0
- package/docs/evidence/m4/notification-source-0.2.0-rc.2.json +17 -0
- package/docs/evidence/m4/notification-source-0.2.1-alpha.1.json +17 -0
- package/docs/evidence/m4/notification-ui.log.gz +0 -0
- package/docs/evidence/m4/package-check.log.gz +0 -0
- package/docs/evidence/m4/package-negative-check.json +8 -0
- package/docs/evidence/m4/package-source-content.json +2638 -0
- package/docs/evidence/m4/package-verification.json +7 -0
- package/docs/evidence/m4/package.log.gz +0 -0
- package/docs/evidence/m4/release-notes.md +12 -0
- package/docs/evidence/m4/runtime-lock-0.2.0-rc.2.json.gz +0 -0
- package/docs/evidence/m4/runtime-lock-0.2.1-alpha.1.json.gz +0 -0
- package/docs/evidence/m4/session-host-0.2.0-rc.2.json +3181 -0
- package/docs/evidence/m4/session-host-0.2.1-alpha.1.json +3767 -0
- package/docs/evidence/m4/session-native-0.2.0-rc.2.json +1161 -0
- package/docs/evidence/m4/session-native-0.2.1-alpha.1.json +1454 -0
- package/docs/evidence/m4/test.log.gz +0 -0
- package/docs/evidence/m4/text-scale-chat-en-US.png +0 -0
- package/docs/evidence/m4/text-scale-chat-zh-CN.png +0 -0
- package/docs/evidence/m4/text-scale-en-US-240-1.25.png +0 -0
- package/docs/evidence/m4/text-scale-en-US-240-1.5.png +0 -0
- package/docs/evidence/m4/text-scale-en-US-240-1.png +0 -0
- package/docs/evidence/m4/text-scale-en-US-90-1.25.png +0 -0
- package/docs/evidence/m4/text-scale-en-US-90-1.5.png +0 -0
- package/docs/evidence/m4/text-scale-en-US-90-1.png +0 -0
- package/docs/evidence/m4/text-scale-en-US.json +50 -0
- package/docs/evidence/m4/text-scale-inbox-en-US.png +0 -0
- package/docs/evidence/m4/text-scale-inbox-zh-CN.png +0 -0
- package/docs/evidence/m4/text-scale-installed-0.2.0-rc.2.json +95 -0
- package/docs/evidence/m4/text-scale-installed-0.2.0-rc.2.png +0 -0
- package/docs/evidence/m4/text-scale-installed-0.2.1-alpha.1.json +95 -0
- package/docs/evidence/m4/text-scale-installed-0.2.1-alpha.1.png +0 -0
- package/docs/evidence/m4/text-scale-native.json +166 -0
- package/docs/evidence/m4/text-scale-native.png +0 -0
- package/docs/evidence/m4/text-scale-zh-CN-240-1.25.png +0 -0
- package/docs/evidence/m4/text-scale-zh-CN-240-1.5.png +0 -0
- package/docs/evidence/m4/text-scale-zh-CN-240-1.png +0 -0
- package/docs/evidence/m4/text-scale-zh-CN-90-1.25.png +0 -0
- package/docs/evidence/m4/text-scale-zh-CN-90-1.5.png +0 -0
- package/docs/evidence/m4/text-scale-zh-CN-90-1.png +0 -0
- package/docs/evidence/m4/text-scale-zh-CN.json +50 -0
- package/docs/evidence/m4/toolchain.log.gz +0 -0
- package/docs/evidence/m4/typecheck.log.gz +0 -0
- package/docs/evidence/m4/ui.log.gz +0 -0
- package/docs/evidence/m4/validation.json +407 -0
- package/docs/evidence/m5/README.md +87 -0
- package/docs/evidence/m5/active-drag-fixed.json +27 -0
- package/docs/evidence/m5/active-drag-fixed.log.gz +0 -0
- package/docs/evidence/m5/active-drag-reproduction.json +27 -0
- package/docs/evidence/m5/baseline-reproduction.json +88 -0
- package/docs/evidence/m5/build.log.gz +0 -0
- package/docs/evidence/m5/character-pack.log.gz +0 -0
- package/docs/evidence/m5/ci.log.gz +0 -0
- package/docs/evidence/m5/desktop-recovery-0.2.0-rc.2.json +394 -0
- package/docs/evidence/m5/desktop-recovery-0.2.1-alpha.1.json +392 -0
- package/docs/evidence/m5/desktop-recovery.json +615 -0
- package/docs/evidence/m5/desktop.log.gz +0 -0
- package/docs/evidence/m5/electron-setup.log.gz +0 -0
- package/docs/evidence/m5/evidence-identity.json +138 -0
- package/docs/evidence/m5/goal-host-0.2.0-rc.2.json +918 -0
- package/docs/evidence/m5/goal-host-0.2.1-alpha.1.json +918 -0
- package/docs/evidence/m5/inbox-ui.log.gz +0 -0
- package/docs/evidence/m5/install-0.2.0-rc.2.json +28 -0
- package/docs/evidence/m5/install-0.2.0-rc.2.log.gz +0 -0
- package/docs/evidence/m5/install-0.2.1-alpha.1.json +28 -0
- package/docs/evidence/m5/install-0.2.1-alpha.1.log.gz +0 -0
- package/docs/evidence/m5/metadata.log.gz +0 -0
- package/docs/evidence/m5/multi-display-installed-0.2.0-rc.2.json +557 -0
- package/docs/evidence/m5/multi-display-installed-0.2.1-alpha.1.json +557 -0
- package/docs/evidence/m5/multi-display-native.json +518 -0
- package/docs/evidence/m5/multi-display-native.png +0 -0
- package/docs/evidence/m5/multi-display-reader.png +0 -0
- package/docs/evidence/m5/multi-display-ui.json +133 -0
- package/docs/evidence/m5/native-input-failure.json +9 -0
- package/docs/evidence/m5/native-input-failure.redacted.log.gz +0 -0
- package/docs/evidence/m5/native-input-startup-loop.json +2197 -0
- package/docs/evidence/m5/native-input-startup-loop.log.gz +0 -0
- package/docs/evidence/m5/native-input-startup-loop.mjs.txt +23 -0
- package/docs/evidence/m5/native-pet.png +0 -0
- package/docs/evidence/m5/notification-host-0.2.0-rc.2.json +182 -0
- package/docs/evidence/m5/notification-host-0.2.1-alpha.1.json +182 -0
- package/docs/evidence/m5/notification-integration-0.2.0-rc.2.json +108 -0
- package/docs/evidence/m5/notification-integration-0.2.1-alpha.1.json +108 -0
- package/docs/evidence/m5/notification-source-0.2.0-rc.2.json +17 -0
- package/docs/evidence/m5/notification-source-0.2.1-alpha.1.json +17 -0
- package/docs/evidence/m5/notification-ui.log.gz +0 -0
- package/docs/evidence/m5/pack.log.gz +0 -0
- package/docs/evidence/m5/package-negative-check.json +8 -0
- package/docs/evidence/m5/package-source-content.json +2946 -0
- package/docs/evidence/m5/package-verification.json +7 -0
- package/docs/evidence/m5/package.log.gz +0 -0
- package/docs/evidence/m5/previous-milestones.json +36 -0
- package/docs/evidence/m5/release-notes.md +12 -0
- package/docs/evidence/m5/reproduce-active-drag.mjs +32 -0
- package/docs/evidence/m5/reproduce-baseline.mjs +23 -0
- package/docs/evidence/m5/runtime-lock-0.2.0-rc.2.json.gz +0 -0
- package/docs/evidence/m5/runtime-lock-0.2.1-alpha.1.json.gz +0 -0
- package/docs/evidence/m5/session-host-0.2.0-rc.2.json +3181 -0
- package/docs/evidence/m5/session-host-0.2.1-alpha.1.json +3767 -0
- package/docs/evidence/m5/session-native-0.2.0-rc.2.json +1131 -0
- package/docs/evidence/m5/session-native-0.2.1-alpha.1.json +1523 -0
- package/docs/evidence/m5/test.log.gz +0 -0
- package/docs/evidence/m5/text-scale-chat-en-US.png +0 -0
- package/docs/evidence/m5/text-scale-chat-zh-CN.png +0 -0
- package/docs/evidence/m5/text-scale-en-US-240-1.25.png +0 -0
- package/docs/evidence/m5/text-scale-en-US-240-1.5.png +0 -0
- package/docs/evidence/m5/text-scale-en-US-240-1.png +0 -0
- package/docs/evidence/m5/text-scale-en-US-90-1.25.png +0 -0
- package/docs/evidence/m5/text-scale-en-US-90-1.5.png +0 -0
- package/docs/evidence/m5/text-scale-en-US-90-1.png +0 -0
- package/docs/evidence/m5/text-scale-en-US.json +50 -0
- package/docs/evidence/m5/text-scale-inbox-en-US.png +0 -0
- package/docs/evidence/m5/text-scale-inbox-zh-CN.png +0 -0
- package/docs/evidence/m5/text-scale-installed-0.2.0-rc.2.json +629 -0
- package/docs/evidence/m5/text-scale-installed-0.2.0-rc.2.png +0 -0
- package/docs/evidence/m5/text-scale-installed-0.2.1-alpha.1.json +629 -0
- package/docs/evidence/m5/text-scale-installed-0.2.1-alpha.1.png +0 -0
- package/docs/evidence/m5/text-scale-native.json +1234 -0
- package/docs/evidence/m5/text-scale-native.png +0 -0
- package/docs/evidence/m5/text-scale-zh-CN-240-1.25.png +0 -0
- package/docs/evidence/m5/text-scale-zh-CN-240-1.5.png +0 -0
- package/docs/evidence/m5/text-scale-zh-CN-240-1.png +0 -0
- package/docs/evidence/m5/text-scale-zh-CN-90-1.25.png +0 -0
- package/docs/evidence/m5/text-scale-zh-CN-90-1.5.png +0 -0
- package/docs/evidence/m5/text-scale-zh-CN-90-1.png +0 -0
- package/docs/evidence/m5/text-scale-zh-CN.json +50 -0
- package/docs/evidence/m5/toolchain.log.gz +0 -0
- package/docs/evidence/m5/typecheck.log.gz +0 -0
- package/docs/evidence/m5/ui.log.gz +0 -0
- package/docs/evidence/m5/validation.json +542 -0
- package/docs/evidence/m6/README.md +110 -0
- package/docs/evidence/m6/baseline-identity.json +10 -0
- package/docs/evidence/m6/build.log.gz +0 -0
- package/docs/evidence/m6/character-pack.log.gz +0 -0
- package/docs/evidence/m6/daily-rhythm-installed-0.2.0-rc.2.json +14 -0
- package/docs/evidence/m6/daily-rhythm-installed-0.2.1-alpha.1.json +14 -0
- package/docs/evidence/m6/daily-rhythm-native.json +147 -0
- package/docs/evidence/m6/daily-rhythm-native.png +0 -0
- package/docs/evidence/m6/daily-rhythm-ui.json +119 -0
- package/docs/evidence/m6/daily-rhythm-ui.png +0 -0
- package/docs/evidence/m6/desktop-recovery-0.2.0-rc.2.json +403 -0
- package/docs/evidence/m6/desktop-recovery-0.2.1-alpha.1.json +403 -0
- package/docs/evidence/m6/desktop-recovery.json +615 -0
- package/docs/evidence/m6/desktop.log.gz +0 -0
- package/docs/evidence/m6/electron.log.gz +0 -0
- package/docs/evidence/m6/evidence-identity.json +151 -0
- package/docs/evidence/m6/goal-host-0.2.0-rc.2.json +918 -0
- package/docs/evidence/m6/goal-host-0.2.1-alpha.1.json +918 -0
- package/docs/evidence/m6/idle-baseline-controlled.json.gz +0 -0
- package/docs/evidence/m6/idle-baseline-controlled.log.gz +0 -0
- package/docs/evidence/m6/idle-baseline.json +7850 -0
- package/docs/evidence/m6/idle-day.json.gz +0 -0
- package/docs/evidence/m6/idle-day.log.gz +0 -0
- package/docs/evidence/m6/idle-night.json.gz +0 -0
- package/docs/evidence/m6/idle-night.log.gz +0 -0
- package/docs/evidence/m6/idle-off.json.gz +0 -0
- package/docs/evidence/m6/idle-off.log.gz +0 -0
- package/docs/evidence/m6/inbox-ui.log.gz +0 -0
- package/docs/evidence/m6/install-0.2.0-rc.2.json +28 -0
- package/docs/evidence/m6/install-0.2.0-rc.2.log.gz +0 -0
- package/docs/evidence/m6/install-0.2.1-alpha.1.json +28 -0
- package/docs/evidence/m6/install-0.2.1-alpha.1.log.gz +0 -0
- package/docs/evidence/m6/measure-isolated.mjs +42 -0
- package/docs/evidence/m6/metadata.log.gz +0 -0
- package/docs/evidence/m6/multi-display-installed-0.2.0-rc.2.json +557 -0
- package/docs/evidence/m6/multi-display-installed-0.2.1-alpha.1.json +557 -0
- package/docs/evidence/m6/multi-display-native.json +518 -0
- package/docs/evidence/m6/multi-display-native.png +0 -0
- package/docs/evidence/m6/multi-display-reader.png +0 -0
- package/docs/evidence/m6/multi-display-ui.json +133 -0
- package/docs/evidence/m6/native-pet.png +0 -0
- package/docs/evidence/m6/notification-host-0.2.0-rc.2.json +182 -0
- package/docs/evidence/m6/notification-host-0.2.1-alpha.1.json +182 -0
- package/docs/evidence/m6/notification-integration-0.2.0-rc.2.json +108 -0
- package/docs/evidence/m6/notification-integration-0.2.1-alpha.1.json +108 -0
- package/docs/evidence/m6/notification-source-0.2.0-rc.2.json +17 -0
- package/docs/evidence/m6/notification-source-0.2.1-alpha.1.json +17 -0
- package/docs/evidence/m6/notification-ui.log.gz +0 -0
- package/docs/evidence/m6/npm-ci.log.gz +0 -0
- package/docs/evidence/m6/pack.log.gz +0 -0
- package/docs/evidence/m6/package-negative-check.json +7 -0
- package/docs/evidence/m6/package-source-content.json +3310 -0
- package/docs/evidence/m6/package-verification.json +7 -0
- package/docs/evidence/m6/package.log.gz +0 -0
- package/docs/evidence/m6/previous-milestones.json +45 -0
- package/docs/evidence/m6/release-notes.md +12 -0
- package/docs/evidence/m6/resource-budget.json +12 -0
- package/docs/evidence/m6/resource-comparison.json +228 -0
- package/docs/evidence/m6/runtime-lock-0.2.0-rc.2.json.gz +0 -0
- package/docs/evidence/m6/runtime-lock-0.2.1-alpha.1.json.gz +0 -0
- package/docs/evidence/m6/session-host-0.2.0-rc.2.json +3181 -0
- package/docs/evidence/m6/session-host-0.2.1-alpha.1.json +3767 -0
- package/docs/evidence/m6/session-native-0.2.0-rc.2.json +1230 -0
- package/docs/evidence/m6/session-native-0.2.1-alpha.1.json +1424 -0
- package/docs/evidence/m6/settings-0.2.0-rc.2.png +0 -0
- package/docs/evidence/m6/settings-0.2.1-alpha.1.png +0 -0
- package/docs/evidence/m6/settings-dark-0.2.0-rc.2.png +0 -0
- package/docs/evidence/m6/settings-dark-0.2.1-alpha.1.png +0 -0
- package/docs/evidence/m6/settings-en-0.2.0-rc.2.png +0 -0
- package/docs/evidence/m6/settings-en-0.2.1-alpha.1.png +0 -0
- package/docs/evidence/m6/settings-system-en-US-0.2.0-rc.2.png +0 -0
- package/docs/evidence/m6/settings-system-en-US-0.2.1-alpha.1.png +0 -0
- package/docs/evidence/m6/settings-system-zh-CN-0.2.0-rc.2.png +0 -0
- package/docs/evidence/m6/settings-system-zh-CN-0.2.1-alpha.1.png +0 -0
- package/docs/evidence/m6/test.log.gz +0 -0
- package/docs/evidence/m6/text-scale-chat-en-US.png +0 -0
- package/docs/evidence/m6/text-scale-chat-zh-CN.png +0 -0
- package/docs/evidence/m6/text-scale-en-US-240-1.25.png +0 -0
- package/docs/evidence/m6/text-scale-en-US-240-1.5.png +0 -0
- package/docs/evidence/m6/text-scale-en-US-240-1.png +0 -0
- package/docs/evidence/m6/text-scale-en-US-90-1.25.png +0 -0
- package/docs/evidence/m6/text-scale-en-US-90-1.5.png +0 -0
- package/docs/evidence/m6/text-scale-en-US-90-1.png +0 -0
- package/docs/evidence/m6/text-scale-en-US.json +50 -0
- package/docs/evidence/m6/text-scale-inbox-en-US.png +0 -0
- package/docs/evidence/m6/text-scale-inbox-zh-CN.png +0 -0
- package/docs/evidence/m6/text-scale-installed-0.2.0-rc.2.json +629 -0
- package/docs/evidence/m6/text-scale-installed-0.2.0-rc.2.png +0 -0
- package/docs/evidence/m6/text-scale-installed-0.2.1-alpha.1.json +629 -0
- package/docs/evidence/m6/text-scale-installed-0.2.1-alpha.1.png +0 -0
- package/docs/evidence/m6/text-scale-native.json +1234 -0
- package/docs/evidence/m6/text-scale-native.png +0 -0
- package/docs/evidence/m6/text-scale-zh-CN-240-1.25.png +0 -0
- package/docs/evidence/m6/text-scale-zh-CN-240-1.5.png +0 -0
- package/docs/evidence/m6/text-scale-zh-CN-240-1.png +0 -0
- package/docs/evidence/m6/text-scale-zh-CN-90-1.25.png +0 -0
- package/docs/evidence/m6/text-scale-zh-CN-90-1.5.png +0 -0
- package/docs/evidence/m6/text-scale-zh-CN-90-1.png +0 -0
- package/docs/evidence/m6/text-scale-zh-CN.json +50 -0
- package/docs/evidence/m6/toolchain.log.gz +0 -0
- package/docs/evidence/m6/typecheck.log.gz +0 -0
- package/docs/evidence/m6/ui.log.gz +0 -0
- package/docs/evidence/m6/validation.json +852 -0
- package/docs/multi-display-contract.md +29 -0
- package/docs/notification-contract.md +25 -1
- package/docs/release-notes.md +30 -0
- package/docs/releasing.md +2 -0
- package/docs/roadmap.md +184 -0
- package/docs/session-chat-contract.md +44 -0
- package/docs/text-readability-contract.md +28 -0
- package/npm-shrinkwrap.json +32 -11
- package/package.json +20 -10
- package/scripts/check-package.mjs +5 -2
- package/scripts/measure-idle.mjs +76 -0
- package/src/bridge.ts +42 -20
- package/src/chat.ts +72 -0
- package/src/client/Settings.tsx +13 -4
- package/src/client/index.ts +21 -3
- package/src/client/locale-sync.ts +34 -0
- package/src/client/locales.ts +8 -2
- package/src/client/notification-copy.ts +5 -4
- package/src/client/settings.css +2 -0
- package/src/completion.ts +66 -0
- package/src/controls.ts +90 -28
- package/src/desktop-lifecycle.ts +10 -0
- package/src/index.ts +70 -27
- package/src/model.ts +21 -6
- package/src/notification-broker.ts +14 -7
- package/src/notification-contract.ts +4 -2
- package/tests/bridge.test.ts +123 -2
- package/tests/chat.test.ts +61 -0
- package/tests/completion.test.ts +110 -0
- package/tests/controls.test.ts +132 -2
- package/tests/daily-rhythm-native.mjs +51 -0
- package/tests/daily-rhythm-ui.mjs +166 -0
- package/tests/daily-rhythm.test.js +83 -0
- package/tests/desktop.mjs +96 -7
- package/tests/display-geometry.test.js +55 -0
- package/tests/fixtures/desktop-recovery.ts +3 -0
- package/tests/fixtures/goal-host.mjs +104 -0
- package/tests/fixtures/host.mjs +40 -1
- package/tests/fixtures/session-host.mjs +119 -0
- package/tests/goal-host-contract.mjs +53 -0
- package/tests/helpers/daily-rhythm.mjs +34 -0
- package/tests/helpers/desktop-recovery.mjs +25 -0
- package/tests/helpers/installed-notifications.mjs +1 -1
- package/tests/helpers/multi-display-native.mjs +19 -0
- package/tests/helpers/native-pointer.mjs +37 -9
- package/tests/helpers/text-scale-native.mjs +34 -0
- package/tests/inbox-ui.mjs +2 -1
- package/tests/install.mjs +144 -3
- package/tests/locale-client.mjs +25 -0
- package/tests/locale-sync.test.ts +36 -0
- package/tests/locale-ui.mjs +79 -0
- package/tests/model.test.ts +15 -4
- package/tests/multi-display-native.mjs +91 -0
- package/tests/multi-display-ui.mjs +95 -0
- package/tests/notification-broker.test.ts +1 -1
- package/tests/notification-client.test.ts +8 -1
- package/tests/notification-integration.test.ts +50 -2
- package/tests/notification-ui.mjs +18 -0
- package/tests/plugin.test.ts +84 -13
- package/tests/presentation.test.js +27 -1
- package/tests/session-host-contract.mjs +53 -0
- package/tests/session-recovery.test.ts +20 -0
- package/tests/session-replies-ui.mjs +73 -1
- package/tests/text-scale-ui.mjs +113 -0
- package/tests/text-scale.test.ts +7 -0
- package/tests/ui.mjs +3 -1
- package/web/chat-contract.d.ts +4 -0
- package/web/chat-contract.js +14 -0
- package/web/daily-rhythm.d.ts +6 -0
- package/web/daily-rhythm.js +38 -0
- package/web/display-geometry.js +30 -0
- package/web/index.html +42 -42
- package/web/locale.d.ts +8 -0
- package/web/locale.js +106 -0
- package/web/notification-ui.js +6 -5
- package/web/pet.js +238 -83
- package/web/session-ui.js +32 -2
- package/web/style.css +79 -59
- package/web/text-scale.d.ts +4 -0
- package/web/text-scale.js +6 -0
package/dist/client.js
CHANGED
|
@@ -29,6 +29,15 @@ module.exports = __toCommonJS(index_exports);
|
|
|
29
29
|
// src/client/Settings.tsx
|
|
30
30
|
var import_react = require("react");
|
|
31
31
|
var import_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives");
|
|
32
|
+
|
|
33
|
+
// web/text-scale.js
|
|
34
|
+
var TEXT_SCALES = Object.freeze([1, 1.25, 1.5]);
|
|
35
|
+
var DEFAULT_TEXT_SCALE = 1;
|
|
36
|
+
function textScale(value) {
|
|
37
|
+
return TEXT_SCALES.includes(value) ? value : DEFAULT_TEXT_SCALE;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// src/client/Settings.tsx
|
|
32
41
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
33
42
|
function NumberPreference({ value, min, max, label, hint, invalidHint, id: id2, disabled, save }) {
|
|
34
43
|
const [draft, setDraft] = (0, import_react.useState)(String(value));
|
|
@@ -105,7 +114,7 @@ function Settings({ form, call, local, notifier, t }) {
|
|
|
105
114
|
};
|
|
106
115
|
}, [call, local]);
|
|
107
116
|
const command = async (value) => {
|
|
108
|
-
if (busy) return;
|
|
117
|
+
if (busy && value !== "stop") return;
|
|
109
118
|
setBusy(true);
|
|
110
119
|
setFailure("");
|
|
111
120
|
try {
|
|
@@ -181,14 +190,20 @@ function Settings({ form, call, local, notifier, t }) {
|
|
|
181
190
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.Button, { variant: "outline", disabled, onClick: () => void command(running ? "show" : "start"), children: t(running ? "show" : "start") }),
|
|
182
191
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.Button, { variant: "outline", disabled: disabled || !running, onClick: () => void command("hide"), children: t("hide") }),
|
|
183
192
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.Button, { variant: "outline", disabled, onClick: () => void command("restart"), children: t("restart") }),
|
|
184
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.Button, { disabled:
|
|
193
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dsh_client_ui_primitives.Button, { disabled: !local || status?.phase === "stopped" || status?.phase === "stopping", onClick: () => void command("stop"), children: t("stop") })
|
|
185
194
|
] }),
|
|
195
|
+
status?.recoveryAttempt ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { role: "status", children: [
|
|
196
|
+
t("recoveryHint"),
|
|
197
|
+
": ",
|
|
198
|
+
status.recoveryAttempt,
|
|
199
|
+
" / 3"
|
|
200
|
+
] }) : null,
|
|
186
201
|
failure2 || status?.error ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "pet-error", role: "alert", children: failure2 || status?.error }) : null
|
|
187
202
|
] }),
|
|
188
203
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "pet-card", "aria-label": t("preferences"), children: [
|
|
189
204
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { children: t("preferences") }),
|
|
190
205
|
!accepted.writable || !local ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: t("unavailable") }) : null,
|
|
191
|
-
["autoStart", "roam", "notifications"].map((field) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "pet-row", children: [
|
|
206
|
+
["autoStart", "roam", "dailyRhythm", "notifications"].map((field) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "pet-row", children: [
|
|
192
207
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "pet-label", children: [
|
|
193
208
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("strong", { children: t(field) }),
|
|
194
209
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: t(`${field}Hint`) })
|
|
@@ -197,6 +212,27 @@ function Settings({ form, call, local, notifier, t }) {
|
|
|
197
212
|
] }, field)),
|
|
198
213
|
prefs ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
199
214
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(NumberPreference, { id: "coopanion-size", label: t("size"), hint: t("sizeHint"), invalidHint: t("invalid"), value: prefs.size, min: 90, max: 240, disabled: !ready || !local, save: (value) => void save("size", value) }),
|
|
215
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "pet-row", children: [
|
|
216
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "pet-label", children: [
|
|
217
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { htmlFor: "coopanion-text-scale", children: t("textScale") }),
|
|
218
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { id: "coopanion-text-scale-hint", children: t("textScaleHint") })
|
|
219
|
+
] }),
|
|
220
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
221
|
+
"select",
|
|
222
|
+
{
|
|
223
|
+
className: "pet-number",
|
|
224
|
+
id: "coopanion-text-scale",
|
|
225
|
+
"aria-describedby": "coopanion-text-scale-hint",
|
|
226
|
+
value: textScale(prefs.textScale),
|
|
227
|
+
disabled: !ready || !local,
|
|
228
|
+
onChange: (event) => void save("textScale", textScale(Number(event.target.value))),
|
|
229
|
+
children: TEXT_SCALES.map((value) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("option", { value, children: [
|
|
230
|
+
value * 100,
|
|
231
|
+
"%"
|
|
232
|
+
] }, value))
|
|
233
|
+
}
|
|
234
|
+
)
|
|
235
|
+
] }),
|
|
200
236
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(NumberPreference, { id: "coopanion-duration", label: t("duration"), hint: t("durationHint"), invalidHint: t("invalid"), value: prefs.bubbleDurationMs / 1e3, min: 2, max: 60, disabled: !ready || !local, save: (value) => void save("bubbleDurationMs", value * 1e3) })
|
|
201
237
|
] }) : null,
|
|
202
238
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "pet-feedback", role: "status", children: saving ? t("saving") : saveFailure || (feedback ? t(feedback) : "") })
|
|
@@ -263,7 +299,9 @@ var zh = {
|
|
|
263
299
|
hide: "\u9690\u85CF\u684C\u5BA0",
|
|
264
300
|
restart: "\u91CD\u542F",
|
|
265
301
|
stop: "\u5173\u95ED\u684C\u5BA0",
|
|
266
|
-
|
|
302
|
+
recovering: "\u7B49\u5F85\u81EA\u52A8\u6062\u590D\u2026",
|
|
303
|
+
recoveryHint: "\u81EA\u52A8\u6062\u590D\u6B21\u6570\uFF08\u6700\u591A 3 \u6B21\uFF09",
|
|
304
|
+
runtimeHint: "\u610F\u5916\u9000\u51FA\u4F1A\u6709\u9650\u91CD\u8BD5\uFF0C\u5931\u8D25\u540E\u53EF\u624B\u52A8\u91CD\u542F\u3002\u9690\u85CF\u65F6\u6309\u7CFB\u7EDF\u901A\u77E5\u5F00\u5173\u63A5\u6536\u63D0\u9192\uFF1B\u8FDB\u7A0B\u9000\u51FA\u4F1A\u4E22\u5931\u7A97\u53E3\u5185\u8349\u7A3F\u3002",
|
|
267
305
|
preferences: "\u504F\u597D\u8BBE\u7F6E",
|
|
268
306
|
autoStart: "\u968F Harness \u542F\u52A8",
|
|
269
307
|
autoStartHint: "\u4E0B\u6B21\u542F\u52A8 Harness \u65F6\u81EA\u52A8\u6253\u5F00\u684C\u5BA0\u3002",
|
|
@@ -271,6 +309,8 @@ var zh = {
|
|
|
271
309
|
roamHint: "\u684C\u5BA0\u7A7A\u95F2\u65F6\u5728\u5F53\u524D\u5C4F\u5E55\u4E0A\u7F13\u6162\u79FB\u52A8\u3002",
|
|
272
310
|
notifications: "\u4EFB\u52A1\u901A\u77E5",
|
|
273
311
|
notificationsHint: "\u4EFB\u52A1\u5B8C\u6210\u3001\u51FA\u9519\u3001\u5BA1\u6279\u548C AI \u63D0\u95EE\u65F6\u63D0\u9192\u4F60\u3002",
|
|
312
|
+
dailyRhythm: "\u65E5\u5E38\u966A\u4F34\u8282\u594F",
|
|
313
|
+
dailyRhythmHint: "\u9ED8\u8BA4\u5173\u95ED\u3002\u5F00\u542F\u95F2\u65F6\u8D70\u52A8\u540E\uFF0C\u767D\u5929\u6BCF 45\u201390 \u79D2\u6D3B\u52A8\uFF0C22:00\u201307:00 \u6BCF 2\u20134 \u5206\u949F\u8F7B\u52A8\uFF1B\u5DE5\u4F5C\u3001\u9605\u8BFB\u3001\u8F93\u5165\u3001\u4F11\u606F\u548C\u51CF\u5C11\u52A8\u6001\u6548\u679C\u4F18\u5148\u3002",
|
|
274
314
|
notificationSettings: "\u63D0\u9192\u4E0E\u901A\u77E5",
|
|
275
315
|
systemNotifications: "\u7CFB\u7EDF\u901A\u77E5",
|
|
276
316
|
systemNotificationsHint: "\u89D2\u8272\u9690\u85CF\u65F6\u7531 Harness \u53D1\u9001\u7CFB\u7EDF\u901A\u77E5\uFF1B\u89D2\u8272\u663E\u793A\u65F6\u901A\u8FC7\u89D2\u8272\u63D0\u9192\u3002",
|
|
@@ -295,6 +335,8 @@ var zh = {
|
|
|
295
335
|
deliveryclicked: "\u6536\u5230\u70B9\u51FB\u56DE\u6267\uFF0C\u5DF2\u8BF7\u6C42\u6253\u5F00\u6E90\u4F1A\u8BDD\u3002",
|
|
296
336
|
deliveryfailed: "\u672C\u6B21\u901A\u77E5\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u6743\u9650\u53CA\u8FDE\u63A5\u3002",
|
|
297
337
|
deliveryunknown: "\u9001\u8FBE\u7ED3\u679C\u5F85\u786E\u8BA4\uFF0C\u8BF7\u68C0\u67E5\u901A\u77E5\u4E2D\u5FC3\u3002",
|
|
338
|
+
textScale: "\u6587\u5B57\u5927\u5C0F",
|
|
339
|
+
textScaleHint: "100%\u3001125% \u6216 150%\uFF0C\u72EC\u7ACB\u4E8E\u89D2\u8272\u5C3A\u5BF8\uFF1B\u7ACB\u5373\u751F\u6548\u5E76\u4FDD\u7559\u5F53\u524D\u9605\u8BFB\u4E0E\u8349\u7A3F\u3002",
|
|
298
340
|
size: "\u89D2\u8272\u5C3A\u5BF8",
|
|
299
341
|
sizeHint: "90\u2013240 \u50CF\u7D20\uFF0C\u4FEE\u6539\u540E\u7ACB\u5373\u751F\u6548\u3002",
|
|
300
342
|
duration: "\u6C14\u6CE1\u663E\u793A\u65F6\u957F",
|
|
@@ -326,7 +368,9 @@ var en = {
|
|
|
326
368
|
hide: "Hide pet",
|
|
327
369
|
restart: "Restart",
|
|
328
370
|
stop: "Close pet",
|
|
329
|
-
|
|
371
|
+
recovering: "Waiting to recover\u2026",
|
|
372
|
+
recoveryHint: "Automatic recovery attempts (up to 3)",
|
|
373
|
+
runtimeHint: "Unexpected exits retry a limited number of times. You can restart manually after failure. Hidden pets follow system notification settings. Window drafts are lost when the process exits.",
|
|
330
374
|
preferences: "Preferences",
|
|
331
375
|
autoStart: "Start with Harness",
|
|
332
376
|
autoStartHint: "Open the pet automatically the next time Harness starts.",
|
|
@@ -334,6 +378,8 @@ var en = {
|
|
|
334
378
|
roamHint: "Move slowly across the current screen while idle.",
|
|
335
379
|
notifications: "Task notifications",
|
|
336
380
|
notificationsHint: "Remind you about completion, errors, approvals and AI questions.",
|
|
381
|
+
dailyRhythm: "Daily rhythm",
|
|
382
|
+
dailyRhythmHint: "Off by default. With idle roaming on, act every 45\u201390 seconds by day, gently every 2\u20134 minutes at 22:00\u201307:00 local time. Work, reading, input, rest and reduced motion take priority.",
|
|
337
383
|
notificationSettings: "Reminders and notifications",
|
|
338
384
|
systemNotifications: "System notifications",
|
|
339
385
|
systemNotificationsHint: "Harness sends system notifications while the pet is hidden. A visible pet presents reminders itself.",
|
|
@@ -358,6 +404,8 @@ var en = {
|
|
|
358
404
|
deliveryclicked: "Click receipt received; opening the source session was requested.",
|
|
359
405
|
deliveryfailed: "Notification failed. Check permissions and connection.",
|
|
360
406
|
deliveryunknown: "Delivery awaits verification. Check Notification Center.",
|
|
407
|
+
textScale: "Text size",
|
|
408
|
+
textScaleHint: "100%, 125% or 150%, independently of character size. Applies immediately and keeps your reading and draft.",
|
|
361
409
|
size: "Character size",
|
|
362
410
|
sizeHint: "90\u2013240 pixels. Changes apply immediately.",
|
|
363
411
|
duration: "Bubble duration",
|
|
@@ -373,7 +421,7 @@ var en = {
|
|
|
373
421
|
};
|
|
374
422
|
|
|
375
423
|
// src/client/settings.css
|
|
376
|
-
var settings_default = ".dsh-coopanion-settings { display:flex; flex-direction:column; gap:16px; max-width:720px; color:var(--dsw-alias-label-primary); font:inherit; }\n.dsh-coopanion-settings h2,.dsh-coopanion-settings h3 { margin:0; font-size:16px; line-height:24px; font-weight:500; }\n.dsh-coopanion-settings p { margin:0; font-size:14px; line-height:22px; color:var(--dsw-alias-label-tertiary); }\n.dsh-coopanion-settings .pet-card { border:0.5px solid var(--dsw-alias-settings-card-stroke); background:var(--dsw-alias-settings-card-fill); border-radius:var(--dsw-radius-xl); padding:16px; display:flex; flex-direction:column; gap:16px; }\n.dsh-coopanion-settings .pet-row { display:flex; gap:16px; align-items:center; justify-content:space-between; }\n.dsh-coopanion-settings .pet-label { display:flex; flex-direction:column; gap:4px; min-width:0; }\n.dsh-coopanion-settings .pet-label label,.dsh-coopanion-settings .pet-label strong { font-size:14px; line-height:22px; font-weight:500; }\n.dsh-coopanion-settings .pet-label p { font-size:12px; line-height:18px; }\n.dsh-coopanion-settings .pet-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }\n.dsh-coopanion-settings .pet-status { display:inline-flex; align-items:center; gap:8px; font-size:14px; }\n.dsh-coopanion-settings .pet-error { color:var(--dsw-alias-state-error-primary); white-space:pre-wrap; overflow-wrap:anywhere; }\n.dsh-coopanion-settings .pet-feedback { min-height:22px; font-size:12px; }\n.dsh-coopanion-settings .pet-number { width:104px; flex:none; }\n@media(max-width:480px) { .dsh-coopanion-settings .pet-row { align-items:flex-start; } .dsh-coopanion-settings .pet-card { padding:12px; } }\n";
|
|
424
|
+
var settings_default = ".dsh-coopanion-settings { display:flex; flex-direction:column; gap:16px; max-width:720px; color:var(--dsw-alias-label-primary); font:inherit; }\n.dsh-coopanion-settings h2,.dsh-coopanion-settings h3 { margin:0; font-size:16px; line-height:24px; font-weight:500; }\n.dsh-coopanion-settings p { margin:0; font-size:14px; line-height:22px; color:var(--dsw-alias-label-tertiary); }\n.dsh-coopanion-settings .pet-card { border:0.5px solid var(--dsw-alias-settings-card-stroke); background:var(--dsw-alias-settings-card-fill); border-radius:var(--dsw-radius-xl); padding:16px; display:flex; flex-direction:column; gap:16px; }\n.dsh-coopanion-settings .pet-row { display:flex; gap:16px; align-items:center; justify-content:space-between; }\n.dsh-coopanion-settings .pet-label { display:flex; flex-direction:column; gap:4px; min-width:0; }\n.dsh-coopanion-settings .pet-label label,.dsh-coopanion-settings .pet-label strong { font-size:14px; line-height:22px; font-weight:500; }\n.dsh-coopanion-settings .pet-label p { font-size:12px; line-height:18px; }\n.dsh-coopanion-settings .pet-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }\n.dsh-coopanion-settings .pet-status { display:inline-flex; align-items:center; gap:8px; font-size:14px; }\n.dsh-coopanion-settings .pet-error { color:var(--dsw-alias-state-error-primary); white-space:pre-wrap; overflow-wrap:anywhere; }\n.dsh-coopanion-settings .pet-feedback { min-height:22px; font-size:12px; }\n.dsh-coopanion-settings .pet-number { width:104px; flex:none; }\n@media(max-width:480px) { .dsh-coopanion-settings .pet-row { align-items:flex-start; } .dsh-coopanion-settings .pet-card { padding:12px; } }\n\n.dsh-coopanion-settings select.pet-number { color:inherit; background:var(--dsw-alias-settings-card-fill); border:1px solid var(--dsw-alias-settings-card-stroke); border-radius:8px; padding:8px; font:inherit; }\n";
|
|
377
425
|
|
|
378
426
|
// node_modules/zod/v4/classic/external.js
|
|
379
427
|
var external_exports = {};
|
|
@@ -20058,7 +20106,8 @@ var noticeSchema = external_exports.object({
|
|
|
20058
20106
|
turn: counter,
|
|
20059
20107
|
seq: counter,
|
|
20060
20108
|
time: counter,
|
|
20061
|
-
category: external_exports.enum(["completed", "approval", "question", "error", "stopped", "interrupted", "blocked", "max-tokens"]),
|
|
20109
|
+
category: external_exports.enum(["reply", "goal-progress", "completed", "approval", "question", "error", "stopped", "interrupted", "blocked", "max-tokens"]),
|
|
20110
|
+
goal: external_exports.object({ id, revision: counter.positive(), round: counter }).strict().optional(),
|
|
20062
20111
|
stage: external_exports.enum(["initial", "reminder"]),
|
|
20063
20112
|
title: external_exports.string().max(256),
|
|
20064
20113
|
body: external_exports.string().max(2048),
|
|
@@ -20080,12 +20129,15 @@ var interactionSchema = external_exports.object({
|
|
|
20080
20129
|
automaticReminders: external_exports.number().int().min(0).max(1)
|
|
20081
20130
|
}).strict();
|
|
20082
20131
|
var runtimeSchema = external_exports.object({
|
|
20083
|
-
phase: external_exports.enum(["stopped", "starting", "running", "stopping", "error"]),
|
|
20132
|
+
phase: external_exports.enum(["stopped", "starting", "running", "stopping", "recovering", "error"]),
|
|
20084
20133
|
generation: counter,
|
|
20085
20134
|
visibilityRevision: counter,
|
|
20086
20135
|
visible: external_exports.boolean(),
|
|
20087
20136
|
suspended: external_exports.boolean(),
|
|
20088
|
-
error: external_exports.string().max(600).optional()
|
|
20137
|
+
error: external_exports.string().max(600).optional(),
|
|
20138
|
+
desiredVisible: external_exports.boolean().optional(),
|
|
20139
|
+
recoveryAttempt: counter.max(3).optional(),
|
|
20140
|
+
retryAt: counter.optional()
|
|
20089
20141
|
}).strict();
|
|
20090
20142
|
var deliveryClaimSchema = external_exports.object({
|
|
20091
20143
|
token: id,
|
|
@@ -20112,9 +20164,351 @@ var notificationRequests = {
|
|
|
20112
20164
|
snooze: external_exports.object({ interactionId: id, generation: counter }).strict()
|
|
20113
20165
|
};
|
|
20114
20166
|
|
|
20115
|
-
//
|
|
20167
|
+
// web/locale.js
|
|
20168
|
+
function petLanguage(locale = "en") {
|
|
20169
|
+
return /^zh(?:-|$)/i.test(locale) ? "zh" : "en";
|
|
20170
|
+
}
|
|
20116
20171
|
var zh2 = {
|
|
20117
|
-
|
|
20172
|
+
defaultName: "DeepSeek \u5927\u80A5\u9C7C",
|
|
20173
|
+
title: "DeepSeek \u5927\u80A5\u9C7C \xB7 Harness",
|
|
20174
|
+
words: { neutral: "\u5E73\u9759", happy: "\u5F00\u5FC3", wink: "\u7728\u773C", love: "\u559C\u6B22", shy: "\u5BB3\u7F9E", surprised: "\u60CA\u8BB6", angry: "\u751F\u6C14", sad: "\u96BE\u8FC7", sleepy: "\u72AF\u56F0", thinking: "\u601D\u8003", smug: "\u5F97\u610F", pout: "\u561F\u5634", worried: "\u62C5\u5FC3", determined: "\u8BA4\u771F", flustered: "\u614C\u5F20", scared: "\u5BB3\u6015", excited: "\u671F\u5F85", cry: "\u5927\u54ED", confused: "\u7591\u60D1", stand: "\u7AD9\u8D77", jump: "\u8DF3", hop: "\u5C0F\u8DF3", look: "\u5F20\u671B", turn: "\u8F6C\u8EAB", nod: "\u70B9\u5934", shake: "\u6447\u5934", spin: "\u8F6C\u5708", sit: "\u5750\u4E0B", sleep: "\u7761\u89C9", dizzy: "\u6655", walk: "\u6563\u6B65", run: "\u8DD1", wave: "\u62DB\u624B", bow: "\u97A0\u8EAC", shiver: "\u53D1\u6296", flap: "\u6251\u817E", dance: "\u8DF3\u821E" },
|
|
20175
|
+
settingFailed: "\u8BBE\u7F6E\u672A\u80FD\u4FDD\u5B58",
|
|
20176
|
+
settingFailedBody: "\u8BF7\u56DE\u5230 Harness \u68C0\u67E5\u63D2\u4EF6\u8BBE\u7F6E\u3002",
|
|
20177
|
+
sessionUnavailable: "\u4F1A\u8BDD\u5C1A\u672A\u5C31\u7EEA",
|
|
20178
|
+
sessionUnavailableBody: "\u8BF7\u5148\u56DE\u5230 Harness \u6253\u5F00\u8FD9\u4E2A\u4F1A\u8BDD\uFF0C\u7136\u540E\u518D\u53D1\u9001\u6D88\u606F\u3002",
|
|
20179
|
+
messageFailed: "\u6D88\u606F\u672A\u80FD\u53D1\u9001",
|
|
20180
|
+
messageFailedBody: "\u8BF7\u56DE\u5230 Harness \u68C0\u67E5\u4F1A\u8BDD\u72B6\u6001\u3002",
|
|
20181
|
+
replyBody: "\u672C\u8F6E\u56DE\u590D\u5DF2\u751F\u6210\uFF0C\u56DE\u5230\u4F1A\u8BDD\u67E5\u770B\u3002",
|
|
20182
|
+
progressBody: "\u672C\u8F6E\u56DE\u590D\u5DF2\u751F\u6210\uFF0C\u76EE\u6807\u4ECD\u5728\u8FDB\u884C\u4E2D\u3002",
|
|
20183
|
+
completeBody: "\u76EE\u6807\u5DF2\u5B8C\u6210\uFF0C\u56DE\u5230\u4F1A\u8BDD\u67E5\u770B\u3002",
|
|
20184
|
+
goalPausedBody: "\u76EE\u6807\u5DF2\u6682\u505C\uFF0C\u56DE\u5230\u4F1A\u8BDD\u67E5\u770B\u3002",
|
|
20185
|
+
goalBlockedBody: "\u76EE\u6807\u9047\u5230\u963B\u788D\uFF0C\u56DE\u5230\u4F1A\u8BDD\u67E5\u770B\u3002",
|
|
20186
|
+
stoppedBody: "\u5148\u505C\u5728\u8FD9\u91CC\uFF0C\u968F\u65F6\u7EE7\u7EED\u3002",
|
|
20187
|
+
interruptedBody: "\u8FD9\u6BB5\u4EFB\u52A1\u4E2D\u65AD\u4E86\uFF0C\u966A\u4F60\u56DE\u53BB\u770B\u770B\u3002",
|
|
20188
|
+
demoTitle: "\u5DE5\u4F5C\u7684\u65F6\u5019\uFF0C\n\u5927\u80A5\u9C7C\u966A\u7740\u3002",
|
|
20189
|
+
demoIntro: "\u4F4F\u5728\u684C\u9762\u4E0A\u7684 DeepSeek \u5927\u80A5\u9C7C\u3002\n\u70B9\u70B9\u5979\u3001\u62D6\u7740\u5979\u8D70\uFF0C\u6216\u548C\u5979\u8BF4\u53E5\u8BDD\u3002",
|
|
20190
|
+
demoStatus: "\u6D4F\u89C8\u5668\u6F14\u793A \xB7 \u6A21\u62DF Harness \u4E8B\u4EF6",
|
|
20191
|
+
demoHint: "\u684C\u9762\u63D2\u4EF6\u4F1A\u8BA2\u9605\u771F\u5B9E\u4EFB\u52A1\uFF0C\u65E0\u9700\u53E6\u586B API Key\u3002",
|
|
20192
|
+
demoButtons: { thinking: "\u601D\u8003", talking: "\u56DE\u590D", working: "\u5DE5\u4F5C", waiting: "\u7B49\u4F60\u786E\u8BA4", happy: "\u4EFB\u52A1\u5B8C\u6210", error: "\u9047\u5230\u95EE\u9898", idle: "\u7A7A\u95F2", long: "\u957F\u56DE\u590D", background: "\u540E\u53F0\u5B8C\u6210" },
|
|
20193
|
+
demoSession: "\u6F14\u793A\u4F1A\u8BDD",
|
|
20194
|
+
demoOther: "\u53E6\u4E00\u4E2A\u60F3\u6CD5",
|
|
20195
|
+
demoPrompt: "\u8BA9\u89D2\u8272\u5728\u601D\u8003\u4E0E\u56DE\u590D\u65F6\u505A\u51FA\u5BF9\u5E94\u7684\u52A8\u4F5C",
|
|
20196
|
+
demoOtherPrompt: "\u91CD\u505A\u89D2\u8272\u83DC\u5355\u4E0E\u4F1A\u8BDD\u9009\u62E9\uFF0C\u8BA9\u5B83\u66F4\u50CF\u4F19\u4F34",
|
|
20197
|
+
demoTexts: { thinking: "\u8BA9\u6211\u60F3\u4E00\u60F3\uFF0C\u600E\u6837\u628A\u8FD9\u4E2A\u529F\u80FD\u505A\u597D\u2026", talking: "\u6211\u60F3\u5230\u4E86\u3002\u8BA9\u601D\u8003\u3001\u8BF4\u8BDD\u4E0E\u5DE5\u4F5C\u5404\u6709\u81EA\u5DF1\u7684\u52A8\u4F5C\uFF0C\u5C31\u80FD\u4E00\u773C\u770B\u51FA\u8FD9\u6BB5\u5BF9\u8BDD\u5728\u505A\u4EC0\u4E48\u3002", working: "\u6B63\u5728\u770B\u6587\u4EF6 \xB7 src/index.ts", waiting: "\u4E0B\u4E00\u6B65\u9700\u8981\u4F60\u786E\u8BA4\u3002\u771F\u5B9E\u63D2\u4EF6\u4F1A\u5F15\u5BFC\u4F60\u56DE\u5230 Harness\u3002", happy: "\u4EFB\u52A1\u5B8C\u6210\u5566\uFF01\u8981\u4E0D\u8981\u4F11\u606F\u4E00\u4E0B\uFF1F\u{1F433}", error: "\u4EFB\u52A1\u9047\u5230\u4E86\u95EE\u9898\uFF0C\u8BF7\u56DE\u5230 Harness \u67E5\u770B\u8BE6\u60C5\u3002" },
|
|
20198
|
+
demoLong: "\u52A8\u753B\u3001\u6C14\u6CE1\u548C\u4F1A\u8BDD\u7684\u5C55\u793A\u5DF2\u7ECF\u5206\u5F00\u4E86\u3002\n\n" + "\u601D\u8003\u548C\u5DE5\u5177\u8C03\u7528\u7531\u52A8\u4F5C\u8868\u8FBE\uFF0C\u6700\u7EC8\u56DE\u590D\u53EF\u4EE5\u5C55\u5F00\u9605\u8BFB\u3002\u957F\u5185\u5BB9\u4F1A\u5B8C\u6574\u4FDD\u7559\uFF0C\u4E0D\u4F1A\u5728\u4E00\u5343\u4E8C\u767E\u5B57\u5904\u622A\u65AD\u3002\n\n".repeat(35) + "\u6700\u540E\u4E00\u53E5\uFF1A\u8FD9\u4EFD\u56DE\u590D\u5B8C\u6574\u5730\u4FDD\u7559\u4E0B\u6765\u4E86\u3002",
|
|
20199
|
+
demoBackground: "\u540E\u53F0\u4F1A\u8BDD\u5DF2\u7ECF\u5B8C\u6210\uFF0C\u8FD9\u662F\u5B83\u7684\u6700\u7EC8\u56DE\u590D\u3002",
|
|
20200
|
+
demoReply: (text) => `\u6536\u5230\u300C${text}\u300D\uFF01\u8FD9\u662F\u6F14\u793A\u56DE\u590D\u3002\u771F\u5B9E\u63D2\u4EF6\u4F1A\u4F7F\u7528 Harness \u7684\u6A21\u578B\u3002`,
|
|
20201
|
+
labels: { idle: "\u5728\u8FD9\u91CC\u966A\u4F60", thinking: "\u6B63\u5728\u601D\u8003", talking: "\u6B63\u5728\u56DE\u590D", working: "\u6B63\u5728\u5FD9", waiting: "\u7B49\u4F60\u786E\u8BA4", happy: "\u5B8C\u6210\u5566", error: "\u9700\u8981\u5173\u6CE8", sleeping: "\u4F11\u606F\u4E2D" },
|
|
20202
|
+
stage: "\u684C\u5BA0\u6D3B\u52A8\u533A\u57DF",
|
|
20203
|
+
dismiss: "\u6536\u8D77\u6C14\u6CE1",
|
|
20204
|
+
reveal: "\u7ACB\u5373\u663E\u793A",
|
|
20205
|
+
expand: "\u5C55\u5F00\u5B8C\u6574\u56DE\u590D \u2197",
|
|
20206
|
+
back: "\u56DE\u5230\u4F1A\u8BDD \u2197",
|
|
20207
|
+
readerClose: "\u6536\u8D77\u5B8C\u6574\u56DE\u590D",
|
|
20208
|
+
conversationsCaption: "\u4E00\u8D77\u5DE5\u4F5C\u7684\u7247\u6BB5",
|
|
20209
|
+
conversationsTitle: "\u8FD9\u6B21\uFF0C\u966A\u54EA\u4E00\u6BB5\uFF1F",
|
|
20210
|
+
conversationsClose: "\u6536\u8D77\u5BF9\u8BDD\u6C14\u6CE1",
|
|
20211
|
+
conversationsIntro: "\u56FA\u5B9A\u966A\u7740\u4F60\u9009\u7684\u8FD9\u6BB5\u3002\u540E\u53F0\u7EE7\u7EED\u5DE5\u4F5C\uFF0C\u56DE\u590D\u7559\u5728\u8FD9\u91CC\uFF0C\u9047\u5230\u8981\u7D27\u4E8B\u5C31\u53EB\u4F60\u3002",
|
|
20212
|
+
all: "\u5168\u90E8",
|
|
20213
|
+
pending: "\u5F85\u67E5\u770B",
|
|
20214
|
+
searchPlaceholder: "\u627E\u63D0\u95EE\u3001\u9879\u76EE\u6216\u7F16\u53F7\u2026",
|
|
20215
|
+
searchLabel: "\u641C\u7D22\u4F1A\u8BDD",
|
|
20216
|
+
switchConversation: "\u5207\u6362\u5F53\u524D\u5BF9\u8BDD",
|
|
20217
|
+
openCurrent: "\u6253\u5F00\u5F53\u524D\u4F1A\u8BDD \u2197",
|
|
20218
|
+
chatTitle: "\u6211\u5728\uFF0C\u6162\u6162\u8BF4\u3002",
|
|
20219
|
+
chatClose: "\u5173\u95ED\u804A\u5929",
|
|
20220
|
+
changeConversation: "\u6362\u4E00\u6BB5 \u203A",
|
|
20221
|
+
readFull: "\u8BFB\u5B8C\u6574\u56DE\u590D \u2197",
|
|
20222
|
+
interact: "\u548C\u89D2\u8272\u4E92\u52A8",
|
|
20223
|
+
wave: "\u6253\u4E2A\u62DB\u547C",
|
|
20224
|
+
cheer: "\u7ED9\u6211\u6253\u6C14",
|
|
20225
|
+
messagePlaceholder: "\u63A5\u7740\u8FD9\u6BB5\u5BF9\u8BDD\u8BF4\u70B9\u4EC0\u4E48\u2026",
|
|
20226
|
+
messageLabel: "\u6D88\u606F",
|
|
20227
|
+
sendHint: "\u2318 / Ctrl + Enter \u53D1\u9001",
|
|
20228
|
+
send: "\u634E\u7ED9\u8FD9\u6BB5\u5BF9\u8BDD \u2197",
|
|
20229
|
+
retrySend: "\u91CD\u8BD5\u53D1\u9001 \u2197",
|
|
20230
|
+
sending: "\u53D1\u9001\u4E2D\u2026",
|
|
20231
|
+
sendAccepted: "\u5DF2\u8FDB\u5165\u8FD9\u6BB5\u4F1A\u8BDD\u7684\u6536\u4EF6\u961F\u5217\u3002\u56DE\u590D\u5C06\u7EE7\u7EED\u663E\u793A\u5728\u8FD9\u91CC\u3002",
|
|
20232
|
+
sendFailure: (code) => `\u53D1\u9001\u672A\u786E\u8BA4\uFF1A${chatFailure(code, "zh")}\u3002\u8349\u7A3F\u5DF2\u4FDD\u7559\uFF0C\u53EF\u91CD\u8BD5\u3002`,
|
|
20233
|
+
companion: "\u684C\u4E0A\u7684\u5C0F\u4F19\u4F34",
|
|
20234
|
+
menuClose: "\u6536\u8D77\u4F19\u4F34\u83DC\u5355",
|
|
20235
|
+
appearance: "\u6362\u4E2A\u6A21\u6837",
|
|
20236
|
+
appearanceHint: "\u89D2\u8272 \xB7 \u914D\u8272 \xB7 \u52A8\u4F5C",
|
|
20237
|
+
say: "\u8BF4\u53E5\u8BDD",
|
|
20238
|
+
sayHint: "\u63A5\u7740\u4F60\u7684\u4F1A\u8BDD\u804A",
|
|
20239
|
+
roam: "\u6563\u6563\u6B65",
|
|
20240
|
+
roamHint: "\u81EA\u5728\u8D70\u52A8",
|
|
20241
|
+
sleep: "\u6B47\u4E00\u4F1A",
|
|
20242
|
+
sleepHint: "\u5FD9\u8D77\u6765\u4F1A\u9192",
|
|
20243
|
+
notices: "\u63D0\u9192\u6211",
|
|
20244
|
+
noticesHint: "\u8981\u7D27\u4E8B\u4E0D\u6F0F\u6389",
|
|
20245
|
+
sound: "\u5C0F\u5C0F\u58F0",
|
|
20246
|
+
soundHint: "\u52A8\u4F5C\u4E0E\u8BF4\u8BDD\u97F3\u6548",
|
|
20247
|
+
hide: "\u6682\u65F6\u85CF\u8D77\u6765",
|
|
20248
|
+
source: "\u6E90\u7801 \xB7 AGPL \u2197",
|
|
20249
|
+
sourceHint: "\u4E0B\u8F7D\u5F53\u524D\u7248\u672C\u5B8C\u6574\u5BF9\u5E94\u6E90\u7801",
|
|
20250
|
+
characters: "\u89D2\u8272\u4E0E\u52A8\u753B",
|
|
20251
|
+
charactersClose: "\u5173\u95ED\u89D2\u8272\u9762\u677F",
|
|
20252
|
+
selectCharacter: "\u9009\u62E9\u89D2\u8272",
|
|
20253
|
+
character: "\u89D2\u8272",
|
|
20254
|
+
outfit: "\u914D\u8272 / \u6362\u88C5",
|
|
20255
|
+
characterScheme: "\u89D2\u8272\u914D\u8272",
|
|
20256
|
+
preview: "\u89D2\u8272\u52A8\u753B\u9884\u89C8",
|
|
20257
|
+
previewAction: "\u9884\u89C8\u52A8\u4F5C",
|
|
20258
|
+
play: "\u64AD\u653E\u52A8\u4F5C",
|
|
20259
|
+
useCharacter: "\u4F7F\u7528\u89D2\u8272",
|
|
20260
|
+
import: "\u5BFC\u5165\u89D2\u8272\u5305",
|
|
20261
|
+
remove: "\u5220\u9664",
|
|
20262
|
+
characterHint: "\u652F\u6301 Coopanion API 2 ZIP \u89D2\u8272\u5305\uFF1B\u89D2\u8272\u548C\u914D\u8272\u4F1A\u5728\u91CD\u542F\u540E\u4FDD\u7559\u3002",
|
|
20263
|
+
using: "\u6B63\u5728\u4F7F\u7528",
|
|
20264
|
+
useScheme: "\u4F7F\u7528\u8FD9\u4E2A\u914D\u8272",
|
|
20265
|
+
useOutfit: "\u4F7F\u7528\u8FD9\u4E2A\u642D\u914D",
|
|
20266
|
+
customOutfit: "\u81EA\u5B9A\u4E49\u642D\u914D",
|
|
20267
|
+
defaultScheme: "\u9ED8\u8BA4",
|
|
20268
|
+
imported: "\u5DF2\u5BFC\u5165\u3002\u9884\u89C8\u6EE1\u610F\u540E\u70B9\u51FB\u4F7F\u7528\u89D2\u8272\u3002",
|
|
20269
|
+
switched: "\u5DF2\u5207\u6362\uFF0C\u91CD\u542F\u540E\u4F1A\u4FDD\u7559\u8FD9\u4E2A\u89D2\u8272\u548C\u914D\u8272\u3002",
|
|
20270
|
+
removed: "\u5DF2\u5220\u9664\u672C\u5730\u89D2\u8272\u5305\u3002",
|
|
20271
|
+
packTooLarge: "\u89D2\u8272\u5305\u4E0D\u80FD\u8D85\u8FC7 128 MiB",
|
|
20272
|
+
noSession: "\u8FD8\u6CA1\u6709\u5BF9\u8BDD",
|
|
20273
|
+
noConversation: "\u8FD8\u6CA1\u6709\u4F1A\u8BDD",
|
|
20274
|
+
session: "\u4F1A\u8BDD",
|
|
20275
|
+
sessionReply: "\u4F1A\u8BDD\u56DE\u590D",
|
|
20276
|
+
focused: "\u5173\u6CE8",
|
|
20277
|
+
unread: "1 \u4EFD\u672A\u8BFB",
|
|
20278
|
+
notOpen: "\u672A\u6253\u5F00",
|
|
20279
|
+
connected: "\u6709\u4F1A\u8BDD\u76F8\u4F34",
|
|
20280
|
+
emptySearch: "\u6CA1\u627E\u5230\u8FD9\u6BB5\u5BF9\u8BDD\u3002\u8BD5\u8BD5\u63D0\u95EE\u91CC\u7684\u8BCD\u6216\u9879\u76EE\u540D\uFF1F",
|
|
20281
|
+
emptyPending: "\u90FD\u770B\u8FC7\u5566\uFF0C\u5B89\u5FC3\u505A\u624B\u8FB9\u7684\u4E8B\u3002",
|
|
20282
|
+
emptySessions: "\u8FD8\u6CA1\u6709\u53EF\u7528\u7684\u5BF9\u8BDD\u3002\u5148\u5728 Harness \u4E2D\u6253\u5F00\u4E00\u6BB5\u5BF9\u8BDD\uFF0C\u6211\u5C31\u80FD\u542C\u89C1\u5B83\u3002",
|
|
20283
|
+
noChat: "\u5148\u5728 Harness \u4E2D\u6253\u5F00\u4E00\u6BB5\u5BF9\u8BDD\uFF0C\u5C31\u53EF\u4EE5\u4ECE\u8FD9\u91CC\u548C\u6211\u8BF4\u8BDD\u3002",
|
|
20284
|
+
unavailableChat: "\u4F1A\u8BDD\u670D\u52A1\u6682\u4E0D\u53EF\u7528\uFF0C\u8BF7\u5728 Harness \u4E2D\u68C0\u67E5\u3002",
|
|
20285
|
+
sleepBusy: "\u6B63\u5728\u5FD9\uFF0C\u5B8C\u6210\u540E\u518D\u4F11\u606F",
|
|
20286
|
+
sleepWake: "\u6709\u65B0\u7684\u4EFB\u52A1\u4F1A\u81EA\u52A8\u9192\u6765",
|
|
20287
|
+
issueError: "\u4EFB\u52A1\u9047\u5230\u4E86\u95EE\u9898\uFF0C\u8BF7\u56DE\u5230 Harness \u67E5\u770B\u8BE6\u60C5\u3002",
|
|
20288
|
+
issueWaiting: "\u4EFB\u52A1\u6682\u65F6\u505C\u4E0B\u4E86\uFF0C\u8BF7\u56DE\u5230 Harness \u770B\u770B\u3002",
|
|
20289
|
+
timeUnknown: "\u65F6\u95F4\u672A\u8BB0\u5F55",
|
|
20290
|
+
petLabel: (name) => `${name}\uFF0C\u70B9\u51FB\u4E92\u52A8\uFF0C\u53CC\u51FB\u804A\u5929\uFF0C\u53F3\u952E\u83DC\u5355\uFF0C\u62D6\u52A8\u79FB\u52A8`,
|
|
20291
|
+
finalReply: (name) => `${name}\u7684\u6700\u7EC8\u56DE\u590D`,
|
|
20292
|
+
recent: (text) => `\u6700\u8FD1\uFF1A${text}`,
|
|
20293
|
+
chatTarget: (label) => `\u5F53\u524D\u5BF9\u8BDD\uFF1A${label}\u3002\u70B9\u51FB\u5207\u6362`,
|
|
20294
|
+
chatHelp: (label) => `\u6D88\u606F\u4EA4\u7ED9\u300C${label}\u300D\uFF0C\u5B8C\u6210\u540E\u53EA\u5C55\u793A\u6700\u7EC8\u56DE\u590D\u3002`,
|
|
20295
|
+
activity: (busy, unread) => `${busy} \u6BB5\u8FDB\u884C\u4E2D \xB7 ${unread} \u4EFD\u672A\u8BFB\u56DE\u590D`,
|
|
20296
|
+
authorCredit: (author, credits, license) => `\u4F5C\u8005\uFF1A${author} \xB7 ${credits} \xB7 \u8BB8\u53EF\uFF1A${license}`,
|
|
20297
|
+
unknownAuthor: "\u672A\u6CE8\u660E",
|
|
20298
|
+
builtinLicense: "\u4EE3\u7801 AGPL-3.0-or-later\uFF1B\u7D20\u6750\u89C1\u6743\u5229\u58F0\u660E",
|
|
20299
|
+
authorLicense: "\u7531\u89D2\u8272\u4F5C\u8005\u6CE8\u660E",
|
|
20300
|
+
operationError: (detail) => `\u64CD\u4F5C\u672A\u5B8C\u6210\uFF1A${detail}`,
|
|
20301
|
+
bodyError: (detail) => `\u89D2\u8272\u8FD0\u884C\u5931\u8D25\uFF1A${detail}`,
|
|
20302
|
+
builtinError: (detail) => `\u65E0\u6CD5\u52A0\u8F7D\u5185\u7F6E\u89D2\u8272\uFF1A${detail}`,
|
|
20303
|
+
previewError: (detail) => `\u9884\u89C8\u5931\u8D25\uFF1A${detail}`,
|
|
20304
|
+
restoreError: (detail) => `\u5DF2\u6062\u590D\u5185\u7F6E\u5927\u80A5\u9C7C\uFF1A${detail}`,
|
|
20305
|
+
loadError: (detail) => `\u89D2\u8272\u52A0\u8F7D\u5931\u8D25\uFF1A${detail}`,
|
|
20306
|
+
trayDisplay: "\u79FB\u5230\u663E\u793A\u5668",
|
|
20307
|
+
display: "\u663E\u793A\u5668",
|
|
20308
|
+
trayOpen: "\u56DE\u5230\u5F53\u524D\u4F1A\u8BDD",
|
|
20309
|
+
traySwitch: "\u5207\u6362\u966A\u4F34\u4F1A\u8BDD",
|
|
20310
|
+
trayChat: "\u8BF4\u53E5\u8BDD",
|
|
20311
|
+
trayCharacters: "\u89D2\u8272\u4E0E\u914D\u8272",
|
|
20312
|
+
trayRoam: "\u81EA\u5728\u8D70\u52A8",
|
|
20313
|
+
traySleep: "\u4F11\u606F\u4E00\u4E0B\uFF08\u65B0\u4EFB\u52A1\u4F1A\u5524\u9192\uFF09",
|
|
20314
|
+
trayNotices: "\u4EFB\u52A1\u63D0\u9192",
|
|
20315
|
+
traySound: "\u52A8\u4F5C\u4E0E\u8BF4\u8BDD\u97F3\u6548",
|
|
20316
|
+
trayShow: "\u663E\u793A\u4F19\u4F34",
|
|
20317
|
+
trayQuit: "\u5173\u95ED\u684C\u5BA0",
|
|
20318
|
+
trayNeeds: " \xB7 \u9700\u8981\u4F60",
|
|
20319
|
+
trayUnread: (n) => ` \xB7 ${n} \u4EFD\u672A\u8BFB`,
|
|
20320
|
+
trayPending: (unread, pending) => `\u5F85\u67E5\u770B \xB7 ${unread} \u4EFD\u56DE\u590D \xB7 ${pending} \u6BB5\u9700\u8981\u4F60`,
|
|
20321
|
+
trayTooltip: (name, mood, label, busy, pending, unread) => `${name} \xB7 ${mood}
|
|
20322
|
+
\u5173\u6CE8\uFF1A${label}
|
|
20323
|
+
${busy} \u6BB5\u8FDB\u884C\u4E2D \xB7 ${pending} \u6BB5\u9700\u8981\u4F60 \xB7 ${unread} \u4EFD\u672A\u8BFB\u56DE\u590D`
|
|
20324
|
+
};
|
|
20325
|
+
var en2 = {
|
|
20326
|
+
defaultName: "DeepSeek Whale",
|
|
20327
|
+
title: "DeepSeek Whale \xB7 Harness",
|
|
20328
|
+
words: { neutral: "Neutral", happy: "Happy", wink: "Wink", love: "Love", shy: "Shy", surprised: "Surprised", angry: "Angry", sad: "Sad", sleepy: "Sleepy", thinking: "Thinking", smug: "Smug", pout: "Pout", worried: "Worried", determined: "Determined", flustered: "Flustered", scared: "Scared", excited: "Excited", cry: "Cry", confused: "Confused", stand: "Stand", jump: "Jump", hop: "Hop", look: "Look around", turn: "Turn", nod: "Nod", shake: "Shake head", spin: "Spin", sit: "Sit", sleep: "Sleep", dizzy: "Dizzy", walk: "Walk", run: "Run", wave: "Wave", bow: "Bow", shiver: "Shiver", flap: "Flap", dance: "Dance" },
|
|
20329
|
+
settingFailed: "Settings were not saved",
|
|
20330
|
+
settingFailedBody: "Open Harness to check the plugin settings.",
|
|
20331
|
+
sessionUnavailable: "Conversation not ready",
|
|
20332
|
+
sessionUnavailableBody: "Open this conversation in Harness before sending a message.",
|
|
20333
|
+
messageFailed: "Message was not sent",
|
|
20334
|
+
messageFailedBody: "Open Harness to check the conversation state.",
|
|
20335
|
+
replyBody: "This turn\u2019s reply is ready. Open the conversation to read it.",
|
|
20336
|
+
progressBody: "This turn\u2019s reply is ready. The goal is still in progress.",
|
|
20337
|
+
completeBody: "Goal completed. Open the conversation to read it.",
|
|
20338
|
+
goalPausedBody: "The goal is paused. Open the conversation for details.",
|
|
20339
|
+
goalBlockedBody: "The goal is blocked. Open the conversation for details.",
|
|
20340
|
+
stoppedBody: "Paused here. Continue whenever you are ready.",
|
|
20341
|
+
interruptedBody: "This task was interrupted. Open the conversation to check it.",
|
|
20342
|
+
demoTitle: "While you work,\nWhale keeps you company.",
|
|
20343
|
+
demoIntro: "Your DeepSeek Whale desktop companion.\nSay hello, drag her around, or continue a conversation.",
|
|
20344
|
+
demoStatus: "Browser demo \xB7 Simulated Harness events",
|
|
20345
|
+
demoHint: "The desktop plugin follows real tasks. No extra API key is needed.",
|
|
20346
|
+
demoButtons: { thinking: "Think", talking: "Reply", working: "Work", waiting: "Approval", happy: "Finished", error: "Error", idle: "Idle", long: "Long reply", background: "Background reply" },
|
|
20347
|
+
demoSession: "Demo conversation",
|
|
20348
|
+
demoOther: "Another idea",
|
|
20349
|
+
demoPrompt: "Match the character\u2019s actions to thinking and replying",
|
|
20350
|
+
demoOtherPrompt: "Make the character menu and conversation picker feel like a companion",
|
|
20351
|
+
demoTexts: { thinking: "Let me think about how to do this\u2026", talking: "Thinking, replying and working each have their own actions, so you can see what this conversation is doing.", working: "Reading files \xB7 src/index.ts", waiting: "The next step needs your approval. The installed plugin opens Harness.", happy: "Finished! Shall we take a rest? \u{1F433}", error: "This task needs attention. Open Harness for details." },
|
|
20352
|
+
demoLong: "Animation, bubbles and conversations are presented separately.\n\n" + "Actions show thinking and tool use. Final replies open in full and remain complete, including long content.\n\n".repeat(35) + "The complete reply has been preserved.",
|
|
20353
|
+
demoBackground: "The background conversation finished. Here is its final reply.",
|
|
20354
|
+
demoReply: (text) => `Received \u201C${text}\u201D! This is a demo reply. The installed plugin uses the Harness model.`,
|
|
20355
|
+
labels: { idle: "Here for you", thinking: "Thinking", talking: "Replying", working: "Working", waiting: "Waiting for you", happy: "Finished", error: "Needs attention", sleeping: "Resting" },
|
|
20356
|
+
stage: "Desktop pet activity area",
|
|
20357
|
+
dismiss: "Dismiss bubble",
|
|
20358
|
+
reveal: "Show now",
|
|
20359
|
+
expand: "Read full reply \u2197",
|
|
20360
|
+
back: "Back to conversation \u2197",
|
|
20361
|
+
readerClose: "Close full reply",
|
|
20362
|
+
conversationsCaption: "Working together",
|
|
20363
|
+
conversationsTitle: "Which conversation shall we join?",
|
|
20364
|
+
conversationsClose: "Close conversations",
|
|
20365
|
+
conversationsIntro: "Stay with the conversation you choose. Background work continues, replies stay here, and important requests get your attention.",
|
|
20366
|
+
all: "All",
|
|
20367
|
+
pending: "Inbox",
|
|
20368
|
+
searchPlaceholder: "Find a prompt, project or ID\u2026",
|
|
20369
|
+
searchLabel: "Search conversations",
|
|
20370
|
+
switchConversation: "Switch current conversation",
|
|
20371
|
+
openCurrent: "Open current conversation \u2197",
|
|
20372
|
+
chatTitle: "I\u2019m here. Take your time.",
|
|
20373
|
+
chatClose: "Close chat",
|
|
20374
|
+
changeConversation: "Switch \u203A",
|
|
20375
|
+
readFull: "Read full reply \u2197",
|
|
20376
|
+
interact: "Interact with the character",
|
|
20377
|
+
wave: "Say hello",
|
|
20378
|
+
cheer: "Cheer me on",
|
|
20379
|
+
messagePlaceholder: "Continue this conversation\u2026",
|
|
20380
|
+
messageLabel: "Message",
|
|
20381
|
+
sendHint: "\u2318 / Ctrl + Enter to send",
|
|
20382
|
+
send: "Send to this conversation \u2197",
|
|
20383
|
+
retrySend: "Retry send \u2197",
|
|
20384
|
+
sending: "Sending\u2026",
|
|
20385
|
+
sendAccepted: "Accepted into this conversation\u2019s inbox. Replies will appear here.",
|
|
20386
|
+
sendFailure: (code) => `Send unconfirmed: ${chatFailure(code, "en")}. Draft kept; you can retry.`,
|
|
20387
|
+
companion: "Your desktop companion",
|
|
20388
|
+
menuClose: "Close companion menu",
|
|
20389
|
+
appearance: "Change appearance",
|
|
20390
|
+
appearanceHint: "Character \xB7 Colours \xB7 Actions",
|
|
20391
|
+
say: "Say something",
|
|
20392
|
+
sayHint: "Continue your conversation",
|
|
20393
|
+
roam: "Take a walk",
|
|
20394
|
+
roamHint: "Roam freely",
|
|
20395
|
+
sleep: "Take a rest",
|
|
20396
|
+
sleepHint: "Wake when work starts",
|
|
20397
|
+
notices: "Keep me posted",
|
|
20398
|
+
noticesHint: "Remember important requests",
|
|
20399
|
+
sound: "A little sound",
|
|
20400
|
+
soundHint: "Action and reply sounds",
|
|
20401
|
+
hide: "Hide for now",
|
|
20402
|
+
source: "Source \xB7 AGPL \u2197",
|
|
20403
|
+
sourceHint: "Download the complete source for this version",
|
|
20404
|
+
characters: "Characters and animation",
|
|
20405
|
+
charactersClose: "Close character panel",
|
|
20406
|
+
selectCharacter: "Select character",
|
|
20407
|
+
character: "Character",
|
|
20408
|
+
outfit: "Colours / Outfit",
|
|
20409
|
+
characterScheme: "Character colours",
|
|
20410
|
+
preview: "Character animation preview",
|
|
20411
|
+
previewAction: "Preview action",
|
|
20412
|
+
play: "Play action",
|
|
20413
|
+
useCharacter: "Use character",
|
|
20414
|
+
import: "Import character pack",
|
|
20415
|
+
remove: "Delete",
|
|
20416
|
+
characterHint: "Coopanion API 2 ZIP packs. Characters and colours survive restarts.",
|
|
20417
|
+
using: "In use",
|
|
20418
|
+
useScheme: "Use these colours",
|
|
20419
|
+
useOutfit: "Use this outfit",
|
|
20420
|
+
customOutfit: "Custom outfit",
|
|
20421
|
+
defaultScheme: "Default",
|
|
20422
|
+
imported: "Imported. Preview the character, then choose Use character.",
|
|
20423
|
+
switched: "Changed. This character and its colours will survive restarts.",
|
|
20424
|
+
removed: "Local character pack deleted.",
|
|
20425
|
+
packTooLarge: "Character packs cannot exceed 128 MiB",
|
|
20426
|
+
noSession: "No conversation yet",
|
|
20427
|
+
noConversation: "No conversation yet",
|
|
20428
|
+
session: "Conversation",
|
|
20429
|
+
sessionReply: "Conversation reply",
|
|
20430
|
+
focused: "Focused",
|
|
20431
|
+
unread: "1 unread reply",
|
|
20432
|
+
notOpen: "Not open",
|
|
20433
|
+
connected: "Conversation connected",
|
|
20434
|
+
emptySearch: "No matching conversation. Try a word from the prompt or project name.",
|
|
20435
|
+
emptyPending: "All read. Carry on with your work.",
|
|
20436
|
+
emptySessions: "No conversation is available. Open one in Harness to get started.",
|
|
20437
|
+
noChat: "Open a conversation in Harness to chat here.",
|
|
20438
|
+
unavailableChat: "The conversation service is unavailable. Check Harness.",
|
|
20439
|
+
sleepBusy: "Working now. Rest when it is done.",
|
|
20440
|
+
sleepWake: "Wake automatically when new work starts.",
|
|
20441
|
+
issueError: "The task needs attention. Open Harness for details.",
|
|
20442
|
+
issueWaiting: "The task paused. Open Harness to check the next step.",
|
|
20443
|
+
timeUnknown: "Time not recorded",
|
|
20444
|
+
petLabel: (name) => `${name}, click to interact, double-click to chat, right-click for the menu, drag to move`,
|
|
20445
|
+
finalReply: (name) => `Final reply from ${name}`,
|
|
20446
|
+
recent: (text) => `Recent: ${text}`,
|
|
20447
|
+
chatTarget: (label) => `Current conversation: ${label}. Click to switch`,
|
|
20448
|
+
chatHelp: (label) => `Send to \u201C${label}\u201D. Each turn\u2019s full reply is kept here.`,
|
|
20449
|
+
activity: (busy, unread) => `${busy} active \xB7 ${unread} unread replies`,
|
|
20450
|
+
authorCredit: (author, credits, license) => `Author: ${author} \xB7 ${credits} \xB7 License: ${license}`,
|
|
20451
|
+
unknownAuthor: "Not specified",
|
|
20452
|
+
builtinLicense: "Code: AGPL-3.0-or-later; see artwork rights notice",
|
|
20453
|
+
authorLicense: "Specified by the character author",
|
|
20454
|
+
operationError: (detail) => `Operation failed: ${detail}`,
|
|
20455
|
+
bodyError: (detail) => `Character runtime failed: ${detail}`,
|
|
20456
|
+
builtinError: (detail) => `Cannot load the built-in character: ${detail}`,
|
|
20457
|
+
previewError: (detail) => `Preview failed: ${detail}`,
|
|
20458
|
+
restoreError: (detail) => `Built-in Whale restored: ${detail}`,
|
|
20459
|
+
loadError: (detail) => `Character failed to load: ${detail}`,
|
|
20460
|
+
trayDisplay: "Move to display",
|
|
20461
|
+
display: "Display",
|
|
20462
|
+
trayOpen: "Open current conversation",
|
|
20463
|
+
traySwitch: "Choose companion conversation",
|
|
20464
|
+
trayChat: "Say something",
|
|
20465
|
+
trayCharacters: "Characters and colours",
|
|
20466
|
+
trayRoam: "Roam freely",
|
|
20467
|
+
traySleep: "Rest (new work wakes the pet)",
|
|
20468
|
+
trayNotices: "Task reminders",
|
|
20469
|
+
traySound: "Action and reply sounds",
|
|
20470
|
+
trayShow: "Show companion",
|
|
20471
|
+
trayQuit: "Close desktop pet",
|
|
20472
|
+
trayNeeds: " \xB7 Needs attention",
|
|
20473
|
+
trayUnread: (n) => ` \xB7 ${n} unread`,
|
|
20474
|
+
trayPending: (unread, pending) => `Inbox \xB7 ${unread} replies \xB7 ${pending} need attention`,
|
|
20475
|
+
trayTooltip: (name, mood, label, busy, pending, unread) => `${name} \xB7 ${mood}
|
|
20476
|
+
Focused: ${label}
|
|
20477
|
+
${busy} active \xB7 ${pending} need attention \xB7 ${unread} unread replies`
|
|
20478
|
+
};
|
|
20479
|
+
function petCopy(locale) {
|
|
20480
|
+
return petLanguage(locale) === "zh" ? zh2 : en2;
|
|
20481
|
+
}
|
|
20482
|
+
function appStatusBody(notice, locale) {
|
|
20483
|
+
for (const key2 of ["replyBody", "progressBody", "completeBody", "goalPausedBody", "goalBlockedBody"]) {
|
|
20484
|
+
if (notice.body === zh2[key2] || notice.body === en2[key2]) return petCopy(locale)[key2];
|
|
20485
|
+
}
|
|
20486
|
+
const key = { error: "issueError", blocked: "issueWaiting", "max-tokens": "issueWaiting", stopped: "stoppedBody", interrupted: "interruptedBody" }[notice.category];
|
|
20487
|
+
if (!key || notice.body !== zh2[key] && notice.body !== en2[key]) return notice.body;
|
|
20488
|
+
return petCopy(locale)[key];
|
|
20489
|
+
}
|
|
20490
|
+
function chatFailure(code, language) {
|
|
20491
|
+
const reasons = {
|
|
20492
|
+
"session/not-found": ["\u4F1A\u8BDD\u4E0D\u5B58\u5728\u6216\u5DF2\u5220\u9664", "conversation missing or deleted"],
|
|
20493
|
+
"session/writer-held": ["\u4F1A\u8BDD\u6B63\u7531\u5176\u4ED6\u8FDB\u7A0B\u5360\u7528", "conversation held by another writer"],
|
|
20494
|
+
"session/subagent-owned": ["\u5B50\u4EE3\u7406\u4F1A\u8BDD\u4E0D\u80FD\u76F4\u63A5\u7EED\u63A5", "subagent conversation cannot be continued here"],
|
|
20495
|
+
"session/model-unavailable": ["\u4F1A\u8BDD\u6CA1\u6709\u53EF\u7528\u6A21\u578B", "no available model for this conversation"],
|
|
20496
|
+
"session/provider-credentials-unavailable": ["\u4F1A\u8BDD\u7684\u6A21\u578B\u51ED\u636E\u4E0D\u53EF\u7528", "model credentials unavailable"],
|
|
20497
|
+
"gateway/forbidden": ["\u6CA1\u6709\u6B64\u4F1A\u8BDD\u7684\u64CD\u4F5C\u6743\u9650", "permission denied"],
|
|
20498
|
+
"gateway/cancelled": ["\u63D0\u4EA4\u5DF2\u53D6\u6D88", "submission cancelled"],
|
|
20499
|
+
"coopanion/service-unavailable": ["\u4F1A\u8BDD\u670D\u52A1\u7F3A\u5931", "conversation service unavailable"],
|
|
20500
|
+
"coopanion/request-conflict": ["\u8BF7\u6C42\u8EAB\u4EFD\u4E0E\u539F\u6D88\u606F\u4E0D\u4E00\u81F4", "request identity conflicts with the original message"],
|
|
20501
|
+
"coopanion/no-receipt": ["\u672A\u6536\u5230\u63A5\u53D7\u56DE\u6267\uFF0C\u91CD\u8BD5\u4F1A\u590D\u7528\u539F\u8BF7\u6C42\u8EAB\u4EFD", "no acceptance receipt; retry uses the same request identity"],
|
|
20502
|
+
"session/agent-busy": ["\u4F1A\u8BDD\u6682\u65F6\u4E0D\u80FD\u63A5\u6536\u6D88\u606F", "conversation cannot accept the message now"]
|
|
20503
|
+
};
|
|
20504
|
+
return reasons[code]?.[language === "zh" ? 0 : 1] ?? (language === "zh" ? `\u4F1A\u8BDD\u6682\u4E0D\u53EF\u7528 (${code ?? "unknown"})` : `conversation unavailable (${code ?? "unknown"})`);
|
|
20505
|
+
}
|
|
20506
|
+
|
|
20507
|
+
// src/client/notification-copy.ts
|
|
20508
|
+
var zh3 = {
|
|
20509
|
+
reply: "\u672C\u8F6E\u56DE\u590D\u5DF2\u751F\u6210",
|
|
20510
|
+
"goal-progress": "\u76EE\u6807\u4ECD\u5728\u8FDB\u884C\u4E2D",
|
|
20511
|
+
completed: "\u76EE\u6807\u5DF2\u5B8C\u6210",
|
|
20118
20512
|
approval: "\u4E0B\u4E00\u6B65\u9700\u8981\u4F60\u786E\u8BA4",
|
|
20119
20513
|
question: "\u6709\u4E2A\u95EE\u9898\u60F3\u95EE\u4F60",
|
|
20120
20514
|
error: "\u4EFB\u52A1\u9700\u8981\u5173\u6CE8",
|
|
@@ -20125,8 +20519,10 @@ var zh2 = {
|
|
|
20125
20519
|
reminder: "\u521A\u624D\u90A3\u4EF6\u4E8B\uFF0C\u8FD8\u7B49\u4F60\u770B\u770B",
|
|
20126
20520
|
grouped: (count) => `\u6709 ${count} \u4EF6\u4E8B\uFF0C\u8FD8\u7B49\u4F60\u770B\u770B`
|
|
20127
20521
|
};
|
|
20128
|
-
var
|
|
20129
|
-
|
|
20522
|
+
var en3 = {
|
|
20523
|
+
reply: "This turn\u2019s reply is ready",
|
|
20524
|
+
"goal-progress": "Goal still in progress",
|
|
20525
|
+
completed: "Goal completed",
|
|
20130
20526
|
approval: "The next step needs your approval",
|
|
20131
20527
|
question: "There is a question for you",
|
|
20132
20528
|
error: "This task needs attention",
|
|
@@ -20138,14 +20534,14 @@ var en2 = {
|
|
|
20138
20534
|
grouped: (count) => `${count} requests are still waiting for you`
|
|
20139
20535
|
};
|
|
20140
20536
|
function systemNotificationCopy(notice, locale = "zh") {
|
|
20141
|
-
const copy =
|
|
20537
|
+
const copy = petLanguage(locale) === "zh" ? zh3 : en3;
|
|
20142
20538
|
if (notice.stage === "reminder") {
|
|
20143
20539
|
const summary = notice.requestIds.length > 1 ? copy.grouped(notice.requestIds.length) : copy.reminder;
|
|
20144
20540
|
return { ...notice, title: summary, body: summary };
|
|
20145
20541
|
}
|
|
20146
20542
|
const title = copy[notice.category];
|
|
20147
20543
|
const short = ["stopped", "interrupted", "blocked", "max-tokens"].includes(notice.category);
|
|
20148
|
-
return { ...notice, title, body: short ? title : notice
|
|
20544
|
+
return { ...notice, title, body: short ? title : appStatusBody(notice, locale) };
|
|
20149
20545
|
}
|
|
20150
20546
|
|
|
20151
20547
|
// src/client/system-notifications.ts
|
|
@@ -20413,10 +20809,75 @@ var NotificationClient = class {
|
|
|
20413
20809
|
}
|
|
20414
20810
|
};
|
|
20415
20811
|
|
|
20812
|
+
// src/client/locale-sync.ts
|
|
20813
|
+
function syncPetLocale({ current, subscribe, send, retryMs = 750, timeoutMs = 5e3 }) {
|
|
20814
|
+
let stopped = false, accepted, pending;
|
|
20815
|
+
let controller, retry;
|
|
20816
|
+
const sync = (force = false) => {
|
|
20817
|
+
if (stopped) return;
|
|
20818
|
+
const locale = petLanguage(current());
|
|
20819
|
+
if (!force && (locale === pending || locale === accepted && !pending)) return;
|
|
20820
|
+
clearTimeout(retry);
|
|
20821
|
+
controller?.abort();
|
|
20822
|
+
const request = new AbortController();
|
|
20823
|
+
controller = request;
|
|
20824
|
+
pending = locale;
|
|
20825
|
+
const deadline = setTimeout(() => request.abort(), timeoutMs);
|
|
20826
|
+
const aborted2 = new Promise((_, reject) => request.signal.addEventListener("abort", () => reject(new Error("Locale request cancelled")), { once: true }));
|
|
20827
|
+
void Promise.race([Promise.resolve().then(() => {
|
|
20828
|
+
if (request.signal.aborted) throw new Error("Locale request cancelled");
|
|
20829
|
+
return send(locale, request.signal);
|
|
20830
|
+
}), aborted2]).then(() => {
|
|
20831
|
+
if (controller === request && !request.signal.aborted) accepted = locale;
|
|
20832
|
+
}).catch(() => {
|
|
20833
|
+
if (controller === request && !stopped) retry = setTimeout(sync, retryMs);
|
|
20834
|
+
}).finally(() => {
|
|
20835
|
+
clearTimeout(deadline);
|
|
20836
|
+
if (controller === request) {
|
|
20837
|
+
pending = void 0;
|
|
20838
|
+
controller = void 0;
|
|
20839
|
+
}
|
|
20840
|
+
});
|
|
20841
|
+
};
|
|
20842
|
+
const unsubscribe = subscribe(sync);
|
|
20843
|
+
sync();
|
|
20844
|
+
return () => {
|
|
20845
|
+
stopped = true;
|
|
20846
|
+
unsubscribe();
|
|
20847
|
+
clearTimeout(retry);
|
|
20848
|
+
controller?.abort();
|
|
20849
|
+
};
|
|
20850
|
+
}
|
|
20851
|
+
|
|
20416
20852
|
// src/client/index.ts
|
|
20417
20853
|
var inject = ["slots", "locale", "configForms", "connection"];
|
|
20418
20854
|
function apply(ctx) {
|
|
20855
|
+
const currentLocale = () => ctx.locale.resolveText({ zh: "zh", en: "en" });
|
|
20419
20856
|
ctx.effect(() => ctx.locale.register("coopanion", { zh, en }));
|
|
20857
|
+
ctx.effect(() => {
|
|
20858
|
+
if (!ctx.connection.isLoopback) return () => {
|
|
20859
|
+
};
|
|
20860
|
+
return syncPetLocale({
|
|
20861
|
+
current: currentLocale,
|
|
20862
|
+
subscribe: (listener) => {
|
|
20863
|
+
const unsubscribe = ctx.locale.subscribe(() => listener());
|
|
20864
|
+
const focus = () => {
|
|
20865
|
+
if (document.visibilityState !== "hidden") listener(true);
|
|
20866
|
+
};
|
|
20867
|
+
window.addEventListener("focus", focus);
|
|
20868
|
+
document.addEventListener("visibilitychange", focus);
|
|
20869
|
+
return () => {
|
|
20870
|
+
unsubscribe();
|
|
20871
|
+
window.removeEventListener("focus", focus);
|
|
20872
|
+
document.removeEventListener("visibilitychange", focus);
|
|
20873
|
+
};
|
|
20874
|
+
},
|
|
20875
|
+
send: async (locale, signal) => {
|
|
20876
|
+
const response = await ctx.connection.rpc.call("/api", "coopanion/locale", { locale }, signal);
|
|
20877
|
+
if (!response.ok) throw new Error(response.error.message);
|
|
20878
|
+
}
|
|
20879
|
+
});
|
|
20880
|
+
});
|
|
20420
20881
|
ctx.effect(() => {
|
|
20421
20882
|
const tag = document.createElement("style");
|
|
20422
20883
|
tag.dataset.plugin = "dsh-coopanion";
|
|
@@ -20452,10 +20913,10 @@ function apply(ctx) {
|
|
|
20452
20913
|
return reply.value;
|
|
20453
20914
|
};
|
|
20454
20915
|
const client = new NotificationClient({
|
|
20455
|
-
locale:
|
|
20916
|
+
locale: currentLocale,
|
|
20456
20917
|
api: globalThis.Notification,
|
|
20457
20918
|
transport: {
|
|
20458
|
-
state: (signal) => request("notification-state", {
|
|
20919
|
+
state: (signal) => request("notification-state", {}, signal),
|
|
20459
20920
|
claim: (payload, signal) => request("notification-claim", payload, signal),
|
|
20460
20921
|
receipt: (payload, signal) => request("notification-receipt", payload, signal),
|
|
20461
20922
|
snooze: (payload, signal) => request("notification-snooze", payload, signal)
|
|
@@ -20469,7 +20930,7 @@ function apply(ctx) {
|
|
|
20469
20930
|
window.focus();
|
|
20470
20931
|
},
|
|
20471
20932
|
testClaim: async (clientId, signal) => {
|
|
20472
|
-
const state = await request("notification-state", {
|
|
20933
|
+
const state = await request("notification-state", {}, signal);
|
|
20473
20934
|
return request("notification-test", { clientId, generation: state.runtime.generation }, signal);
|
|
20474
20935
|
}
|
|
20475
20936
|
});
|