docs: define Windows notification-area task
This commit is contained in:
+20
@@ -49,6 +49,26 @@ GUI 将优雅停止封装为异步 `InstanceStopper(ctx, InstanceRow) error` ada
|
||||
|
||||
状态刷新、受管进程退出、目录选择和 CDP 页面目标读取必须通过后台 adapter 回到 UI 结果通道;UI frame 不直接做进程、文件或 CDP I/O。受管退出结果至少包含实例 ID、启动代次、受管 PID、退出码和是否为 Chub 请求停止;UI 以实例 ID、代次和 PID 丢弃过期结果。刷新和页面目标读取都不构成外部实例接管授权。
|
||||
|
||||
Windows 通知区域使用仅限 platform 的内部 DTO;Gio shell 不直接调用 Shell API:
|
||||
|
||||
```go
|
||||
type TrayCommand uint8
|
||||
|
||||
const (
|
||||
TrayCommandShow TrayCommand = iota
|
||||
TrayCommandRefresh
|
||||
TrayCommandExit
|
||||
)
|
||||
|
||||
type TrayState struct {
|
||||
ManagedRunning int
|
||||
ExternalLinked int
|
||||
AttentionCount int
|
||||
}
|
||||
```
|
||||
|
||||
原生 adapter 通过结果通道发布 `TrayCommand`,并只接收 `TrayState` 汇总来更新 Tooltip 或图标状态。不得在 DTO 中放入实例名称、路径、URL、代理、PID、CDP 地址或平台句柄;`TrayCommand` 不是实例启动、停止、重启、删除或接管 API。
|
||||
|
||||
## CLI 当前合约
|
||||
|
||||
```text
|
||||
|
||||
Reference in New Issue
Block a user