@takboo/dsh-coopanion 0.4.8 → 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 +41 -29
- package/desktop/preload.cjs +2 -0
- package/desktop/test-display-probe.cjs +13 -0
- package/desktop/tray-state.cjs +5 -4
- package/dist/bridge.js +53 -19
- package/dist/bridge.js.map +3 -3
- package/dist/client.js +111 -14
- package/dist/index.js +447 -83
- 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 +17 -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 +18 -9
- package/scripts/check-package.mjs +5 -2
- package/scripts/measure-idle.mjs +76 -0
- package/src/bridge.ts +39 -20
- package/src/chat.ts +72 -0
- package/src/client/Settings.tsx +13 -4
- package/src/client/locales.ts +8 -2
- package/src/client/notification-copy.ts +2 -2
- 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 +38 -23
- 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 +81 -4
- 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 +136 -3
- 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 +57 -12
- package/tests/presentation.test.js +11 -0
- package/tests/session-host-contract.mjs +53 -0
- package/tests/session-recovery.test.ts +20 -0
- package/tests/session-replies-ui.mjs +72 -0
- package/tests/text-scale-ui.mjs +113 -0
- package/tests/text-scale.test.ts +7 -0
- package/tests/ui.mjs +2 -0
- 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 +1 -1
- package/web/locale.d.ts +2 -0
- package/web/locale.js +39 -9
- package/web/notification-ui.js +3 -3
- package/web/pet.js +141 -38
- package/web/session-ui.js +29 -0
- package/web/style.css +77 -59
- package/web/text-scale.d.ts +4 -0
- package/web/text-scale.js +6 -0
package/dist/bridge.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/bridge.ts"],
|
|
4
|
-
"sourcesContent": ["import { spawn, type ChildProcess } from 'node:child_process';\nimport { createRequire } from 'node:module';\nimport { fileURLToPath } from 'node:url';\nimport { EventEmitter } from 'node:events';\nimport type { PetSnapshot, PetNotice } from './model.ts';\nimport type { NotificationRuntime, NotificationSnapshot, TaskNotice } from './notification-contract.ts';\n\nexport interface StartLifetime { signal: AbortSignal; generation: number; }\nexport interface NativeLifecycle { running: boolean; visible: boolean; error?: string; generation?: number; visibilityRevision?: number; suspended?: boolean; }\n\nexport interface DesktopOptions { size: number; roam: boolean; notifications: boolean; bubbleDurationMs: number; electronPath?: string; locale?: string; systemNotifications?: boolean; reminders?: boolean; reminderDelayMs?: number; }\nexport interface PetBridge {\n start(options: DesktopOptions, lifetime?: StartLifetime): Promise<void>;\n update(snapshot: PetSnapshot): void;\n notify(notice: PetNotice | TaskNotice): void;\n notificationState?(snapshot: NotificationSnapshot): void;\n snoozeResult?(interactionId: string, ok: boolean, error?: string): void;\n presentRole?(notice: TaskNotice, runtime: NotificationRuntime): boolean;\n onAction(listener: (action: unknown) => void): void;\n removeAction(listener: (action: unknown) => void): void;\n dispose(): Promise<void>;\n configure?(options: DesktopOptions): void;\n control?(command: 'show' | 'hide' | 'characters'): void;\n focusHarness?(): void;\n onLifecycle?(listener: (state: NativeLifecycle) => void): void;\n removeLifecycle?(listener: (state: NativeLifecycle) => void): void;\n}\n\n/** Owns a separate Electron window; no changes or private IPC in the Harness desktop shell are needed. */\nexport class ElectronBridge extends EventEmitter implements PetBridge {\n private child?: ChildProcess;\n private latest?: PetSnapshot;\n private resultKey?: string;\n private closing = false;\n\n private generation = 0;\n private visibilityRevision = 0;\n private nativeVisible = false;\n private suspended = false;\n private lastNotificationState?: NotificationSnapshot;\n\n async start(options: DesktopOptions, lifetime?: StartLifetime): Promise<void> {\n if (this.child) throw new Error('Desktop pet is already running');\n if (lifetime?.signal.aborted) throw new Error('\u684C\u5BA0\u542F\u52A8\u5DF2\u53D6\u6D88');\n this.closing = false;\n this.generation = lifetime?.generation ?? this.generation + 1;\n this.visibilityRevision = 0; this.nativeVisible = false; this.suspended = false;\n if (process.platform === 'linux' && !process.env.DISPLAY && !process.env.WAYLAND_DISPLAY) throw new Error('\u684C\u5BA0\u9700\u8981\u684C\u9762\u663E\u793A\u73AF\u5883\u3002');\n const executable: string = options.electronPath ?? createRequire(import.meta.url)('electron');\n const env: NodeJS.ProcessEnv = { ...process.env, DSH_PET_GENERATION: String(this.generation) };\n delete (env as NodeJS.ProcessEnv).ELECTRON_RUN_AS_NODE;\n const args = [fileURLToPath(new URL('../desktop/main.cjs', import.meta.url))];\n if (env.DSH_PET_TEST_NO_SANDBOX === '1') args.unshift('--no-sandbox');\n const child = spawn(executable, args, { env, stdio: ['ignore', 'pipe', 'pipe', 'ipc'] });\n const generation = this.generation; this.child = child;\n let diagnostic = '';\n child.stderr?.on('data', data => { diagnostic = (diagnostic + data.toString()).slice(-4000); });\n child.on('message', message => {\n if (this.child !== child || !isRecord(message)) return;\n if (message.type === 'action') this.emit('action', message.action);\n if (message.type === 'tray-state') this.emit('tray-state', message.state);\n if (message.type === 'tray-icon') this.emit('tray-icon', message);\n if (message.type === 'visibility' && message.generation === generation && typeof message.visible === 'boolean' && Number.isSafeInteger(message.visibilityRevision) && (message.visibilityRevision as number) > this.visibilityRevision) {\n this.visibilityRevision = message.visibilityRevision as number;\n this.nativeVisible = message.visible; this.suspended = message.suspended === true;\n this.emit('lifecycle', { running: true, visible: this.nativeVisible, generation, visibilityRevision: this.visibilityRevision, suspended: this.suspended });\n }\n });\n child.once('exit', (code, signal) => {\n if (this.child !== child) return;\n this.child = undefined; this.nativeVisible = false;\n const error = !this.closing && (code !== 0 || signal) ? `\u684C\u5BA0\u8FDB\u7A0B\u5DF2\u9000\u51FA (${signal ?? code})` : undefined;\n this.emit('lifecycle', { running: false, visible: false, generation, visibilityRevision: ++this.visibilityRevision, suspended: false, ...(error ? { error } : {}) });\n if (error) this.emit('failure', new Error(error));\n });\n await new Promise<void>((resolve, reject) => {\n let done = false;\n const finish = (error?: Error) => {\n if (done) return; done = true;\n clearTimeout(timer); child.off('message', ready); child.off('error', failed); child.off('exit', exited); lifetime?.signal.removeEventListener('abort', aborted);\n if (error) { child.kill(); reject(error); } else resolve();\n };\n const ready = (message: unknown) => {\n if (isRecord(message) && message.type === 'ready' && this.child === child && !lifetime?.signal.aborted) {\n this.send({ type: 'init', options, snapshot: this.latest && desktopSnapshot(this.latest, true) });\n if (this.lastNotificationState) this.notificationState(this.lastNotificationState);\n finish();\n }\n };\n const failed = (error: Error) => finish(error);\n const exited = (code: number | null, signal: string | null) => finish(new Error(`\u684C\u5BA0\u542F\u52A8\u5931\u8D25 (${signal ?? code}): ${diagnostic}`));\n const aborted = () => finish(new Error('\u684C\u5BA0\u542F\u52A8\u5DF2\u53D6\u6D88'));\n const timer = setTimeout(() => finish(new Error(`\u684C\u5BA0\u672A\u80FD\u5728 20 \u79D2\u5185\u542F\u52A8: ${diagnostic}`)), 20000);\n child.on('message', ready); child.once('error', failed); child.once('exit', exited);\n lifetime?.signal.addEventListener('abort', aborted, { once: true });\n if (lifetime?.signal.aborted) aborted();\n });\n child.on('error', error => { if (this.child === child && !this.closing) this.emit('failure', error); });\n }\n\n update(snapshot: PetSnapshot): void {\n this.latest = snapshot;\n const key = snapshot.results.map(result => `${result.id}:${result.read}`).join('|');\n this.send({ type: 'snapshot', snapshot: desktopSnapshot(snapshot, key !== this.resultKey) });\n this.resultKey = key;\n }\n notify(notice: PetNotice | TaskNotice): void { this.send({ type: 'notice', notice }); }\n notificationState(snapshot: NotificationSnapshot): void { this.lastNotificationState = structuredClone(snapshot); this.send({ type: 'notification-state', snapshot }); }\n snoozeResult(interactionId: string, ok: boolean, error?: string): void { this.send({ type: 'notification-snooze-result', interactionId, ok, ...(error ? { error: error.slice(0, 600) } : {}) }); }\n presentRole(notice: TaskNotice, runtime: NotificationRuntime): boolean {\n if (!this.child?.connected || this.closing || !this.nativeVisible || this.suspended || runtime.generation !== this.generation || runtime.visibilityRevision !== this.visibilityRevision || !runtime.visible) return false;\n this.send({ type: 'notice', notice, generation: runtime.generation, visibilityRevision: runtime.visibilityRevision }); return true;\n }\n onAction(listener: (action: unknown) => void): void { this.on('action', listener); }\n removeAction(listener: (action: unknown) => void): void { this.off('action', listener); }\n // JSON IPC omits undefined. An explicit null lets a cleared Harness\n // preference restore the renderer's automatic language instead of retaining\n // its previous locale during a merged configuration update.\n configure(options: DesktopOptions): void { this.send({ type: 'configure', options: { ...options, locale: options.locale ?? null } }); }\n control(command: 'show' | 'hide' | 'characters'): void { this.send({ type: 'control', command }); }\n focusHarness(): void { this.send({ type: 'control', command: 'focus-harness' }); }\n onLifecycle(listener: (state: NativeLifecycle) => void): void { this.on('lifecycle', listener); }\n removeLifecycle(listener: (state: NativeLifecycle) => void): void { this.off('lifecycle', listener); }\n private send(message: object): void {\n if (this.child?.connected) this.child.send(message, error => { if (error && !this.closing) this.emit('failure', error); });\n }\n\n async dispose(): Promise<void> {\n this.closing = true;\n const child = this.child;\n if (!child) return;\n if (child.pid === undefined || child.exitCode !== null || child.signalCode !== null) { if (this.child === child) this.child = undefined; return; }\n await new Promise<void>((resolve, reject) => {\n let deadline: ReturnType<typeof setTimeout>;\n const timer = setTimeout(() => { child.kill('SIGKILL'); deadline = setTimeout(() => { if (child.exitCode !== null || child.signalCode !== null) resolve(); else reject(new Error('\u684C\u5BA0\u8FDB\u7A0B\u672A\u786E\u8BA4\u9000\u51FA')); }, 1000); }, 3000);\n child.once('exit', () => { clearTimeout(timer); clearTimeout(deadline); resolve(); });\n if (child.connected) child.send({ type: 'quit' }, error => { if (error) child.kill(); }); else child.kill();\n });\n if (this.child === child) this.child = undefined;\n }\n}\n\nexport function isRecord(value: unknown): value is Record<string, unknown> { return typeof value === 'object' && value !== null && !Array.isArray(value); }\n\n/** Stream animation updates carry metadata; full result text crosses IPC only when it changes. */\nfunction desktopSnapshot(snapshot: PetSnapshot, includeResults: boolean) {\n const { results, ...state } = snapshot;\n return { ...state, text: state.mood === 'happy' ? '' : state.text,\n sessions: state.sessions.map(session => ({ ...session, text: session.mood === 'happy' ? '' : session.text, reply: '' })),\n ...(includeResults ? { results } : {}),\n };\n}\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,aAAgC;AACzC,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;
|
|
3
|
+
"sources": ["../src/bridge.ts", "../src/desktop-lifecycle.ts"],
|
|
4
|
+
"sourcesContent": ["import { spawn, type ChildProcess } from 'node:child_process';\nimport { createRequire } from 'node:module';\nimport { fileURLToPath } from 'node:url';\nimport { EventEmitter } from 'node:events';\nimport type { ChatReceipt } from '../web/chat-contract.js';\nimport type { PetSnapshot, PetNotice } from './model.ts';\nimport type { NotificationRuntime, NotificationSnapshot, TaskNotice } from './notification-contract.ts';\nimport { NativeStartError, type StartLifetime, type NativeLifecycle } from './desktop-lifecycle.ts';\nexport { NativeStartError, type StartLifetime, type NativeLifecycle } from './desktop-lifecycle.ts';\n\nimport type { TextScale } from '../web/text-scale.js';\n\nexport interface DesktopOptions { size: number; textScale?: TextScale; roam: boolean; dailyRhythm?: boolean; notifications: boolean; bubbleDurationMs: number; electronPath?: string; locale?: string; systemNotifications?: boolean; reminders?: boolean; reminderDelayMs?: number; }\nexport interface PetBridge {\n start(options: DesktopOptions, lifetime?: StartLifetime): Promise<void>;\n update(snapshot: PetSnapshot): void;\n chatResult?(receipt: ChatReceipt): void;\n notify(notice: PetNotice | TaskNotice): void;\n notificationState?(snapshot: NotificationSnapshot): void;\n snoozeResult?(interactionId: string, ok: boolean, error?: string): void;\n presentRole?(notice: TaskNotice, runtime: NotificationRuntime): boolean;\n onAction(listener: (action: unknown) => void): void;\n removeAction(listener: (action: unknown) => void): void;\n dispose(): Promise<void>;\n configure?(options: DesktopOptions): void;\n control?(command: 'show' | 'hide' | 'characters'): void;\n focusHarness?(): void;\n onLifecycle?(listener: (state: NativeLifecycle) => void): void;\n removeLifecycle?(listener: (state: NativeLifecycle) => void): void;\n}\n\n/** Owns a separate Electron window; no changes or private IPC in the Harness desktop shell are needed. */\nexport class ElectronBridge extends EventEmitter implements PetBridge {\n private child?: ChildProcess;\n private latest?: PetSnapshot;\n private latestOptions?: DesktopOptions;\n private resultKey?: string;\n private closing = false;\n\n private generation = 0;\n private visibilityRevision = 0;\n private nativeVisible = false;\n private suspended = false;\n private screenLocked = false;\n private systemAsleep = false;\n private lastNotificationState?: NotificationSnapshot;\n\n async start(options: DesktopOptions, lifetime?: StartLifetime): Promise<void> {\n if (this.child) throw new NativeStartError('Desktop pet is already running', false);\n if (lifetime?.signal.aborted) throw new Error('\u684C\u5BA0\u542F\u52A8\u5DF2\u53D6\u6D88');\n this.latestOptions = { ...options };\n this.closing = false;\n this.generation = lifetime?.generation ?? this.generation + 1;\n this.visibilityRevision = 0; this.nativeVisible = false;\n if (process.platform === 'linux' && !process.env.DISPLAY && !process.env.WAYLAND_DISPLAY) throw new NativeStartError('\u684C\u5BA0\u9700\u8981\u684C\u9762\u663E\u793A\u73AF\u5883\u3002', false);\n let executable: string;\n try { executable = options.electronPath ?? createRequire(import.meta.url)('electron'); }\n catch (error) { throw new NativeStartError(String(error).slice(0, 600), false); }\n const env: NodeJS.ProcessEnv = { ...process.env, DSH_PET_GENERATION: String(this.generation), DSH_PET_VISIBLE: lifetime?.visible === false ? '0' : '1', DSH_PET_SCREEN_LOCKED: this.screenLocked ? '1' : '0', DSH_PET_SYSTEM_ASLEEP: this.systemAsleep ? '1' : '0' };\n delete (env as NodeJS.ProcessEnv).ELECTRON_RUN_AS_NODE;\n const args = [fileURLToPath(new URL('../desktop/main.cjs', import.meta.url))];\n if (env.DSH_PET_TEST_NO_SANDBOX === '1') args.unshift('--no-sandbox');\n const child = spawn(executable, args, { env, stdio: ['ignore', 'pipe', 'pipe', 'ipc'] });\n const generation = this.generation; this.child = child;\n let diagnostic = '', userClosed = false;\n child.stderr?.on('data', data => { diagnostic = (diagnostic + data.toString()).slice(-4000); });\n child.on('message', message => {\n if (this.child !== child || this.closing || lifetime?.signal.aborted || !isRecord(message)) return;\n if (message.type === 'closed') userClosed = true;\n if (message.type === 'action') this.emit('action', message.action);\n if (message.type === 'tray-state') this.emit('tray-state', message.state);\n if (message.type === 'tray-icon') this.emit('tray-icon', message);\n if (message.type === 'visibility' && message.generation === generation && typeof message.visible === 'boolean' && Number.isSafeInteger(message.visibilityRevision) && (message.visibilityRevision as number) > this.visibilityRevision) {\n this.visibilityRevision = message.visibilityRevision as number;\n this.nativeVisible = message.visible; this.suspended = message.suspended === true;\n if (typeof message.screenLocked === 'boolean') this.screenLocked = message.screenLocked;\n if (typeof message.systemAsleep === 'boolean') this.systemAsleep = message.systemAsleep;\n this.emit('lifecycle', { running: true, visible: this.nativeVisible, generation, visibilityRevision: this.visibilityRevision, suspended: this.suspended, ...(typeof message.desiredVisible === 'boolean' ? { desiredVisible: message.desiredVisible } : {}) });\n }\n });\n child.once('exit', (code, signal) => {\n if (this.child !== child) return;\n this.child = undefined; this.nativeVisible = false;\n const unexpected = !this.closing && !userClosed && !lifetime?.signal.aborted;\n const error = unexpected ? `\u684C\u5BA0\u8FDB\u7A0B\u5DF2\u9000\u51FA (${signal ?? code}): ${diagnostic}`.slice(0, 600) : undefined;\n this.emit('lifecycle', { running: false, visible: false, generation, visibilityRevision: ++this.visibilityRevision, suspended: false, unexpected, ...(error ? { error } : {}) });\n if (error) this.emit('failure', new Error(error));\n });\n child.on('error', error => { if (this.child === child && !this.closing && !lifetime?.signal.aborted) this.emit('failure', error); });\n await new Promise<void>((resolve, reject) => {\n let done = false;\n const finish = (error?: Error) => {\n if (done) return; done = true;\n clearTimeout(timer); child.off('message', ready); child.off('error', failed); child.off('exit', exited); lifetime?.signal.removeEventListener('abort', aborted);\n if (error) { child.kill(); reject(error); } else resolve();\n };\n const ready = (message: unknown) => {\n if (isRecord(message) && message.type === 'startup-error' && this.child === child && typeof message.error === 'string') {\n finish(new NativeStartError(message.error.slice(0, 600), message.recoverable === true)); return;\n }\n if (isRecord(message) && message.type === 'ready' && this.child === child && !lifetime?.signal.aborted) {\n this.resultKey = undefined;\n this.send({ type: 'init', options: { ...this.latestOptions, locale: this.latestOptions?.locale ?? null }, baseline: true, snapshot: this.latest && desktopSnapshot(this.latest, true) });\n if (this.lastNotificationState) this.notificationState(this.lastNotificationState);\n finish();\n }\n };\n const failed = (error: NodeJS.ErrnoException) => finish(new NativeStartError(error.message.slice(0, 600), error.code === 'EAGAIN' || error.code === 'ENOMEM'));\n const exited = (code: number | null, signal: string | null) => finish(new NativeStartError(`\u684C\u5BA0\u542F\u52A8\u5931\u8D25 (${signal ?? code}): ${diagnostic}`.slice(0, 600), true));\n const aborted = () => finish(new Error('\u684C\u5BA0\u542F\u52A8\u5DF2\u53D6\u6D88'));\n const timer = setTimeout(() => finish(new NativeStartError(`\u684C\u5BA0\u672A\u80FD\u5728 20 \u79D2\u5185\u542F\u52A8: ${diagnostic}`.slice(0, 600), true)), 20000);\n child.on('message', ready); child.once('error', failed); child.once('exit', exited);\n lifetime?.signal.addEventListener('abort', aborted, { once: true });\n if (lifetime?.signal.aborted) aborted();\n });\n }\n\n update(snapshot: PetSnapshot): void {\n this.latest = snapshot;\n const key = snapshot.results.map(result => `${result.id}:${result.read}`).join('|');\n this.send({ type: 'snapshot', snapshot: desktopSnapshot(snapshot, key !== this.resultKey) });\n this.resultKey = key;\n }\n notify(notice: PetNotice | TaskNotice): void { this.send({ type: 'notice', notice }); }\n notificationState(snapshot: NotificationSnapshot): void { this.lastNotificationState = structuredClone(snapshot); this.send({ type: 'notification-state', snapshot }); }\n snoozeResult(interactionId: string, ok: boolean, error?: string): void { this.send({ type: 'notification-snooze-result', interactionId, ok, ...(error ? { error: error.slice(0, 600) } : {}) }); }\n presentRole(notice: TaskNotice, runtime: NotificationRuntime): boolean {\n if (!this.child?.connected || this.closing || !this.nativeVisible || this.suspended || runtime.generation !== this.generation || runtime.visibilityRevision !== this.visibilityRevision || !runtime.visible) return false;\n this.send({ type: 'notice', notice, generation: runtime.generation, visibilityRevision: runtime.visibilityRevision }); return true;\n }\n chatResult(receipt: ChatReceipt): void { this.send(receipt); }\n onAction(listener: (action: unknown) => void): void { this.on('action', listener); }\n removeAction(listener: (action: unknown) => void): void { this.off('action', listener); }\n // JSON IPC omits undefined. An explicit null lets a cleared Harness\n // preference restore the renderer's automatic language instead of retaining\n // its previous locale during a merged configuration update.\n configure(options: DesktopOptions): void { this.latestOptions = { ...options }; this.send({ type: 'configure', options: { ...options, locale: options.locale ?? null } }); }\n control(command: 'show' | 'hide' | 'characters'): void { this.send({ type: 'control', command }); }\n focusHarness(): void { this.send({ type: 'control', command: 'focus-harness' }); }\n onLifecycle(listener: (state: NativeLifecycle) => void): void { this.on('lifecycle', listener); }\n removeLifecycle(listener: (state: NativeLifecycle) => void): void { this.off('lifecycle', listener); }\n private send(message: object): void {\n const child = this.child;\n if (child?.connected && !this.closing) child.send(message, error => { if (error && this.child === child && !this.closing) this.emit('failure', error); });\n }\n\n async dispose(): Promise<void> {\n this.closing = true;\n const child = this.child;\n if (!child) return;\n if (child.pid === undefined || child.exitCode !== null || child.signalCode !== null) { if (this.child === child) this.child = undefined; return; }\n await new Promise<void>((resolve, reject) => {\n let deadline: ReturnType<typeof setTimeout>;\n const timer = setTimeout(() => { child.kill('SIGKILL'); deadline = setTimeout(() => { if (child.exitCode !== null || child.signalCode !== null) resolve(); else reject(new Error('\u684C\u5BA0\u8FDB\u7A0B\u672A\u786E\u8BA4\u9000\u51FA')); }, 1000); }, 3000);\n child.once('exit', () => { clearTimeout(timer); clearTimeout(deadline); resolve(); });\n if (child.connected) child.send({ type: 'quit' }, error => { if (error) child.kill(); }); else child.kill();\n });\n if (this.child === child) this.child = undefined;\n }\n}\n\nexport function isRecord(value: unknown): value is Record<string, unknown> { return typeof value === 'object' && value !== null && !Array.isArray(value); }\n\n/** Stream animation updates carry metadata; full result text crosses IPC only when it changes. */\nfunction desktopSnapshot(snapshot: PetSnapshot, includeResults: boolean) {\n const { results, ...state } = snapshot;\n return { ...state, text: state.mood === 'happy' ? '' : state.text,\n sessions: state.sessions.map(session => ({ ...session, text: session.mood === 'happy' ? '' : session.text, reply: '' })),\n ...(includeResults ? { results } : {}),\n };\n}\n", "/** Shared Host/native lifetime contract. Only explicitly recoverable failures retry. */\nexport interface StartLifetime { signal: AbortSignal; generation: number; visible?: boolean; }\nexport interface NativeLifecycle {\n running: boolean; visible: boolean; error?: string;\n generation?: number; visibilityRevision?: number; suspended?: boolean;\n desiredVisible?: boolean; unexpected?: boolean;\n}\nexport class NativeStartError extends Error {\n constructor(message: string, readonly recoverable: boolean) { super(message); this.name = 'NativeStartError'; }\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,aAAgC;AACzC,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAC9B,SAAS,oBAAoB;;;ACItB,IAAM,mBAAN,cAA+B,MAAM;AAAA,EAC1C,YAAY,SAA0B,aAAsB;AAAE,UAAM,OAAO;AAArC;AAAwC,SAAK,OAAO;AAAA,EAAoB;AAChH;;;ADuBO,IAAM,iBAAN,cAA6B,aAAkC;AAAA,EAC5D;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EAEV,aAAa;AAAA,EACb,qBAAqB;AAAA,EACrB,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,eAAe;AAAA,EACf;AAAA,EAER,MAAM,MAAM,SAAyB,UAAyC;AAC5E,QAAI,KAAK,MAAO,OAAM,IAAI,iBAAiB,kCAAkC,KAA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S,UAAU,KAAK,QAAQ,MAAM,OAAO,GAAG,EAAE;AAAA,IACvH,GAAI,iBAAiB,EAAE,QAAQ,IAAI,CAAC;AAAA,EACtC;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
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,
|
|
@@ -20126,6 +20178,11 @@ var zh2 = {
|
|
|
20126
20178
|
sessionUnavailableBody: "\u8BF7\u5148\u56DE\u5230 Harness \u6253\u5F00\u8FD9\u4E2A\u4F1A\u8BDD\uFF0C\u7136\u540E\u518D\u53D1\u9001\u6D88\u606F\u3002",
|
|
20127
20179
|
messageFailed: "\u6D88\u606F\u672A\u80FD\u53D1\u9001",
|
|
20128
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",
|
|
20129
20186
|
stoppedBody: "\u5148\u505C\u5728\u8FD9\u91CC\uFF0C\u968F\u65F6\u7EE7\u7EED\u3002",
|
|
20130
20187
|
interruptedBody: "\u8FD9\u6BB5\u4EFB\u52A1\u4E2D\u65AD\u4E86\uFF0C\u966A\u4F60\u56DE\u53BB\u770B\u770B\u3002",
|
|
20131
20188
|
demoTitle: "\u5DE5\u4F5C\u7684\u65F6\u5019\uFF0C\n\u5927\u80A5\u9C7C\u966A\u7740\u3002",
|
|
@@ -20169,6 +20226,10 @@ var zh2 = {
|
|
|
20169
20226
|
messageLabel: "\u6D88\u606F",
|
|
20170
20227
|
sendHint: "\u2318 / Ctrl + Enter \u53D1\u9001",
|
|
20171
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`,
|
|
20172
20233
|
companion: "\u684C\u4E0A\u7684\u5C0F\u4F19\u4F34",
|
|
20173
20234
|
menuClose: "\u6536\u8D77\u4F19\u4F34\u83DC\u5355",
|
|
20174
20235
|
appearance: "\u6362\u4E2A\u6A21\u6837",
|
|
@@ -20220,7 +20281,7 @@ var zh2 = {
|
|
|
20220
20281
|
emptyPending: "\u90FD\u770B\u8FC7\u5566\uFF0C\u5B89\u5FC3\u505A\u624B\u8FB9\u7684\u4E8B\u3002",
|
|
20221
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",
|
|
20222
20283
|
noChat: "\u5148\u5728 Harness \u4E2D\u6253\u5F00\u4E00\u6BB5\u5BF9\u8BDD\uFF0C\u5C31\u53EF\u4EE5\u4ECE\u8FD9\u91CC\u548C\u6211\u8BF4\u8BDD\u3002",
|
|
20223
|
-
unavailableChat: "\
|
|
20284
|
+
unavailableChat: "\u4F1A\u8BDD\u670D\u52A1\u6682\u4E0D\u53EF\u7528\uFF0C\u8BF7\u5728 Harness \u4E2D\u68C0\u67E5\u3002",
|
|
20224
20285
|
sleepBusy: "\u6B63\u5728\u5FD9\uFF0C\u5B8C\u6210\u540E\u518D\u4F11\u606F",
|
|
20225
20286
|
sleepWake: "\u6709\u65B0\u7684\u4EFB\u52A1\u4F1A\u81EA\u52A8\u9192\u6765",
|
|
20226
20287
|
issueError: "\u4EFB\u52A1\u9047\u5230\u4E86\u95EE\u9898\uFF0C\u8BF7\u56DE\u5230 Harness \u67E5\u770B\u8BE6\u60C5\u3002",
|
|
@@ -20242,6 +20303,8 @@ var zh2 = {
|
|
|
20242
20303
|
previewError: (detail) => `\u9884\u89C8\u5931\u8D25\uFF1A${detail}`,
|
|
20243
20304
|
restoreError: (detail) => `\u5DF2\u6062\u590D\u5185\u7F6E\u5927\u80A5\u9C7C\uFF1A${detail}`,
|
|
20244
20305
|
loadError: (detail) => `\u89D2\u8272\u52A0\u8F7D\u5931\u8D25\uFF1A${detail}`,
|
|
20306
|
+
trayDisplay: "\u79FB\u5230\u663E\u793A\u5668",
|
|
20307
|
+
display: "\u663E\u793A\u5668",
|
|
20245
20308
|
trayOpen: "\u56DE\u5230\u5F53\u524D\u4F1A\u8BDD",
|
|
20246
20309
|
traySwitch: "\u5207\u6362\u966A\u4F34\u4F1A\u8BDD",
|
|
20247
20310
|
trayChat: "\u8BF4\u53E5\u8BDD",
|
|
@@ -20269,6 +20332,11 @@ var en2 = {
|
|
|
20269
20332
|
sessionUnavailableBody: "Open this conversation in Harness before sending a message.",
|
|
20270
20333
|
messageFailed: "Message was not sent",
|
|
20271
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.",
|
|
20272
20340
|
stoppedBody: "Paused here. Continue whenever you are ready.",
|
|
20273
20341
|
interruptedBody: "This task was interrupted. Open the conversation to check it.",
|
|
20274
20342
|
demoTitle: "While you work,\nWhale keeps you company.",
|
|
@@ -20312,6 +20380,10 @@ var en2 = {
|
|
|
20312
20380
|
messageLabel: "Message",
|
|
20313
20381
|
sendHint: "\u2318 / Ctrl + Enter to send",
|
|
20314
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.`,
|
|
20315
20387
|
companion: "Your desktop companion",
|
|
20316
20388
|
menuClose: "Close companion menu",
|
|
20317
20389
|
appearance: "Change appearance",
|
|
@@ -20363,7 +20435,7 @@ var en2 = {
|
|
|
20363
20435
|
emptyPending: "All read. Carry on with your work.",
|
|
20364
20436
|
emptySessions: "No conversation is available. Open one in Harness to get started.",
|
|
20365
20437
|
noChat: "Open a conversation in Harness to chat here.",
|
|
20366
|
-
unavailableChat: "
|
|
20438
|
+
unavailableChat: "The conversation service is unavailable. Check Harness.",
|
|
20367
20439
|
sleepBusy: "Working now. Rest when it is done.",
|
|
20368
20440
|
sleepWake: "Wake automatically when new work starts.",
|
|
20369
20441
|
issueError: "The task needs attention. Open Harness for details.",
|
|
@@ -20373,7 +20445,7 @@ var en2 = {
|
|
|
20373
20445
|
finalReply: (name) => `Final reply from ${name}`,
|
|
20374
20446
|
recent: (text) => `Recent: ${text}`,
|
|
20375
20447
|
chatTarget: (label) => `Current conversation: ${label}. Click to switch`,
|
|
20376
|
-
chatHelp: (label) => `Send to \u201C${label}\u201D.
|
|
20448
|
+
chatHelp: (label) => `Send to \u201C${label}\u201D. Each turn\u2019s full reply is kept here.`,
|
|
20377
20449
|
activity: (busy, unread) => `${busy} active \xB7 ${unread} unread replies`,
|
|
20378
20450
|
authorCredit: (author, credits, license) => `Author: ${author} \xB7 ${credits} \xB7 License: ${license}`,
|
|
20379
20451
|
unknownAuthor: "Not specified",
|
|
@@ -20385,6 +20457,8 @@ var en2 = {
|
|
|
20385
20457
|
previewError: (detail) => `Preview failed: ${detail}`,
|
|
20386
20458
|
restoreError: (detail) => `Built-in Whale restored: ${detail}`,
|
|
20387
20459
|
loadError: (detail) => `Character failed to load: ${detail}`,
|
|
20460
|
+
trayDisplay: "Move to display",
|
|
20461
|
+
display: "Display",
|
|
20388
20462
|
trayOpen: "Open current conversation",
|
|
20389
20463
|
traySwitch: "Choose companion conversation",
|
|
20390
20464
|
trayChat: "Say something",
|
|
@@ -20406,14 +20480,35 @@ function petCopy(locale) {
|
|
|
20406
20480
|
return petLanguage(locale) === "zh" ? zh2 : en2;
|
|
20407
20481
|
}
|
|
20408
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
|
+
}
|
|
20409
20486
|
const key = { error: "issueError", blocked: "issueWaiting", "max-tokens": "issueWaiting", stopped: "stoppedBody", interrupted: "interruptedBody" }[notice.category];
|
|
20410
20487
|
if (!key || notice.body !== zh2[key] && notice.body !== en2[key]) return notice.body;
|
|
20411
20488
|
return petCopy(locale)[key];
|
|
20412
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
|
+
}
|
|
20413
20506
|
|
|
20414
20507
|
// src/client/notification-copy.ts
|
|
20415
20508
|
var zh3 = {
|
|
20416
|
-
|
|
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",
|
|
20417
20512
|
approval: "\u4E0B\u4E00\u6B65\u9700\u8981\u4F60\u786E\u8BA4",
|
|
20418
20513
|
question: "\u6709\u4E2A\u95EE\u9898\u60F3\u95EE\u4F60",
|
|
20419
20514
|
error: "\u4EFB\u52A1\u9700\u8981\u5173\u6CE8",
|
|
@@ -20425,7 +20520,9 @@ var zh3 = {
|
|
|
20425
20520
|
grouped: (count) => `\u6709 ${count} \u4EF6\u4E8B\uFF0C\u8FD8\u7B49\u4F60\u770B\u770B`
|
|
20426
20521
|
};
|
|
20427
20522
|
var en3 = {
|
|
20428
|
-
|
|
20523
|
+
reply: "This turn\u2019s reply is ready",
|
|
20524
|
+
"goal-progress": "Goal still in progress",
|
|
20525
|
+
completed: "Goal completed",
|
|
20429
20526
|
approval: "The next step needs your approval",
|
|
20430
20527
|
question: "There is a question for you",
|
|
20431
20528
|
error: "This task needs attention",
|