Feat(client): complete the macOS feature set (phase 0 and 1)
Phase 0 makes implementations that already existed reachable. macOS now declares TERMINAL, SCREEN_CLIPBOARD, PROCESS and C2C_RECV_ACK; PROCESS is a new bit and Linux declares it too. SystemManager was dead code -- its constructor took a second argument and it did not derive IOCPManager, so the sub-connection skeleton could never instantiate it -- and now matches the createHandler/OnReceive contract, so COMMAND_SYSTEM really spawns a sub-connection (proc_listpids, SIGKILL). DataProcess always gets a NULL user, so main.mm keeps a g_pMainClient handle and the V2 C2C receiver finally answers TOKEN_C2C_RECV_RESULT. The server asks for SupportsTerminal() on MAC for exec_command / terminal_* and for SupportsProcess() for kill_process, so an old build gets "client is too old" instead of a command nobody answers; kToolPlatforms and mcp/tools.json follow. http_probe stays win/lnx: the terminal works on macOS, but the probe uses GNU-only base64 -w. Phase 1 is POSIX parity. ScreenPreview captures through CGDisplayCreateImage, scales and ships BGRX for the server to encode, and the capability is only declared when preflight or a real capture says the display is readable. ActivityHistory samples the frontmost layer-0 window once a second and prints the same records as Windows and Linux. COMMAND_SCREEN_KEYFRAME_REQ is now consumed by Linux (x264 IDR) and macOS (VideoToolbox force keyframe): the receive thread raises a flag, the capture thread -- which owns the encoder -- consumes it and puts it back if the frame never went out. The macOS quality level persists in NSUserDefaults because main.mm rewrites config.conf. Linux client and Debug x64 server rebuild green; check_platform_table PASS. Not built or run on a Mac. Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
c2b59f5d4a
commit
06b93f7bdb
19 files changed
+890
-121
No files matched your search
@@ -171,6 +171,16 @@ public:
|
||||
return (strtoul(caps.GetString(), nullptr, 16) & CLIENT_CAP_TERMINAL) != 0;
|
||||
}
|
||||
|
||||
// 检查客户端是否处理 COMMAND_SYSTEM(系统子连接:COMMAND_PSLIST / COMMAND_KILLPROCESS)。
|
||||
// Linux/macOS 声明;Windows 客户端一直有这条分支但不声明,调用方按平台区分。
|
||||
// 没有这一位的主机(如老 macOS 构建)收到 COMMAND_SYSTEM 只打一行日志,
|
||||
// 服务端据此提前拒绝 kill_process,而不是发下去后等刷新超时、再报一个假的 ok。
|
||||
bool SupportsProcess() const {
|
||||
CString caps = GetClientData(ONLINELIST_CAPABILITIES);
|
||||
if (caps.IsEmpty()) return false;
|
||||
return (strtoul(caps.GetString(), nullptr, 16) & CLIENT_CAP_PROCESS) != 0;
|
||||
}
|
||||
|
||||
// 检查客户端是否处理 COMMAND_SCREEN_BLOCK_INPUT / COMMAND_SCREEN_BLANK(Android 用
|
||||
// 无障碍全屏 overlay 实现:输入锁 = 透明 overlay 吃掉触摸,黑屏 = 黑色 overlay)。
|
||||
// Windows 客户端一直支持键鼠锁定但不声明这个位,调用方按平台区分;老 APK 收到两个
|
||||
|
||||
Reference in new issue
Block a user