feat: add native macOS foreground desktop support - #93
Open
Silhouette-my wants to merge 27 commits into
Open
Silhouette-my wants to merge 27 commits into
Silhouette-my wants to merge 27 commits into
Conversation
…eground-mvp # Conflicts: # ok/notification/manager.py # ok/util/windows_schedule.py # tests/test_notifications.py
| python -m pip install "pip==26.2.1" | ||
| # Development-only branch guardrail: the editable project is this exact checkout; | ||
| # release dependency locking is handled by the normal release workflow. | ||
| python -m pip install -e ".[default,web,qt,adb,ocr,dev]" "opencv-python==5.0.0.93" "pytest-subtests==0.15.0" # NOSONAR |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



概要
为 ok-script 增加可复用的原生 macOS 前台桌面 provider,同时保持现有 Windows/ADB 行为。该实现由 OK-WW 的 macOS 移植实际使用并完成交叉平台回归。
主要内容:
DesktopWindowTarget,macOS 窗口发现、绑定、重绑、前台观察与权限服务ScreenCaptureKitSCStream单窗口捕获,bounded latest-frame、BGRuint8、Retina/geometry generation 与 stale-frame rejectionForegroundGuard、HeldInputState、幂等release_all()与 2 秒 capture heartbeat gateDeviceCapabilities、任务执行前 capability gate、Mac 任务/UI 状态支持安全边界
CGEvent.postToPid后台输入、BetterDisplay/虚拟显示、private API、进程注入、hook 或 TCC 绕过relative_mouse继续作为独立 capability,当前不作为基础前台 MVP 的统一阻断项验证
当前 framework PR HEAD:
f306651c1f292056d65fa8febaa477401d319846本地:
744 passed, 12 skipped, 4 subtests passedpip check通过GitHub Actions / quality gate:
391aa7ba7d366a6c99961b1c606a0cd3f2d74024的完整 macOS framework regression: https://github.com/Silhouette-my/ok-script/actions/runs/34138542759 - success391aa7b之后仅调整开发期 CI/source-guardrail,不再改变 capture/input/window runtime。当前 OK-WW PR 已固定测试本 PR HEAD 的 immutable framework SHA。真实硬件侧已经完成官方《鸣潮》Mac 客户端窗口发现、persistent capture、Retina/16:9/16:10 几何、基础键鼠及失焦释放等验证;详细 consumer/package 证据在配套 OK-WW PR 中记录。兼容性说明
ok-script的通用 public-API host gate 保留 macOS 13+;当前 OK-WW packaged MVP 因其 Python/PySide6 等 consumer 二进制依赖明确收窄为 macOS 15+,不把 consumer 的二进制限制错误上推到 framework。配套 PR