@qilin-agent/desktop 3.1.8 → 3.1.10

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.i18n.yaml CHANGED
@@ -24,8 +24,8 @@
24
24
  en: 24390aa079a4a210
25
25
  zh: 13779319413d18e1
26
26
  /qilin-desktop-desktop/closing-the-window-and-quitting:
27
- en: 892e4df9961ec303
28
- zh: 2298945feab91889
27
+ en: 2ea71d5cf0369d11
28
+ zh: 8be3c7fdd6aae66e
29
29
  /qilin-desktop-desktop/key-technical-decisions:
30
30
  en: 2b75d72e6eb8da5b
31
31
  zh: d1757564e99cdea1
package/README.md CHANGED
@@ -77,9 +77,9 @@ Command registration is optional after installing Desktop. Use **Manage qilin Co
77
77
 
78
78
  ## Closing the window and quitting
79
79
 
80
- Closing the main window (macOS close button and ⌘W; Windows ×, Alt+F4, and the taskbar Close window command) hides it; Windows asks for acknowledgement before the first hide. The page and the Host keep running, tasks continue, and the next show presents the same document with its session, drafts, and scroll position; a fullscreen macOS window leaves fullscreen before hiding. The window returns through the Dock icon, a second launch, or `qilin://open` on macOS, and through the tray on Windows. Minimize is unchanged. Closing the welcome window before the workspace opens quits on Windows and, on macOS, keeps the application in the Dock without a window.
80
+ Closing the main window (macOS close button and ⌘W; Windows ×, Alt+F4, and the taskbar Close window command) hides it; Windows asks for acknowledgement before the first hide. The page and the Host keep running, tasks continue, and the next show presents the same document with its session, drafts, and scroll position; a fullscreen macOS window leaves fullscreen before hiding. The window returns through the Dock icon, the menu bar item, a second launch, or `qilin://open` on macOS, and through the tray icon on Windows. Minimize is unchanged. Closing the welcome window before the workspace opens quits on Windows and, on macOS, keeps the application in the Dock without a window.
81
81
 
82
- Windows keeps a tray icon for the whole run. Its tooltip is the product name, a single click shows and focuses the window, and the context menu offers Open QiLin Desktop and Quit QiLin Desktop in the shell locale. Before the first hide, the shared update-dialog overlay explains that running tasks continue and the window can be reopened from the system tray. Confirm hides the window and writes `background-close-confirmed` under Electron userData; Escape, dismissal, or dialog failure keeps the window visible and does not record acknowledgement. Repeated close requests focus the existing shell dialog. In-place updates retain the marker and uninstall removes it. The old `background-notice-shown` marker does not suppress this confirmation. Closing the window sends no system notification. The tray bitmaps are `resources/tray-windows.ico`, rendered from `resources/icon-windows.svg` at 16, 20, 24, 32, 40, 48, and 64 pixels by `pnpm run render:tray-icon`, and packaged as `resources/tray.ico`. macOS ships no menu bar icon.
82
+ Windows and macOS keep a tray icon for the whole run: the notification area on Windows and a menu bar item on macOS. Its tooltip is the product name, the context menu offers Open QiLin Desktop and Quit QiLin Desktop in the shell locale, and a single click shows and focuses the window on Windows; a menu bar item answers a click with that menu, so macOS reaches the window through the menu or the Dock. Before the first hide, the shared update-dialog overlay explains that running tasks continue and the window can be reopened from the system tray. Confirm hides the window and writes `background-close-confirmed` under Electron userData; Escape, dismissal, or dialog failure keeps the window visible and does not record acknowledgement. Repeated close requests focus the existing shell dialog. In-place updates retain the marker and uninstall removes it. The old `background-notice-shown` marker does not suppress this confirmation. Closing the window sends no system notification. The Windows bitmaps are `resources/tray-windows.ico`, rendered from `resources/icon-windows.svg` at 16, 20, 24, 32, 40, 48, and 64 pixels by `pnpm run render:tray-icon` and packaged as `resources/tray.ico`; the menu bar takes the application tile as `resources/tray-macos.png` and `resources/tray-macos@2x.png`, rendered at 18 and 36 pixels and packaged under the same names so the platform resolves the `@2x` sibling, because a monochrome silhouette of the two dense characters is unreadable at that size.
83
83
 
84
84
  Every ordinary quit entry — ⌘Q, the application menu, the Dock menu, the Windows tray and caption Application menu, and the quits caused by closing the mandatory-update or welcome window — asks the Host what it would interrupt. The Host answers over the private IPC channel with two facts: active tasks under the same rule as the update restart check (running agents including subagents and approval waits, queued messages, running or stopping jobs), and armed scheduled reminders reported by the `schedule` family of `workspace/session-activity` for the sessions loaded during this run. Neither fact, the quit proceeds silently. Otherwise a native message box without an owner window — hidden windows stay hidden — shows **Quit QiLin Desktop?** with one of three localized explanations: running tasks will be interrupted, scheduled tasks will not run while the application is closed, or both. Quit is the default button and Cancel answers Esc; macOS places Cancel left of Quit, Windows places Quit left of Cancel, and the Windows task dialog shows the application icon and stays light regardless of the application theme. A Host that has not reached ready or has failed cannot run tasks, so the quit proceeds without asking. An inspection failure or a Host that misses the two-second deadline is treated as running tasks. While the box is open, another quit request joins it instead of stacking a second one (macOS also raises it; Electron exposes no handle to the Windows task dialog), the explanation does not change when work starts or ends, Quit stops the application without re-inspecting, and Cancel changes nothing. Cancelling a quit that closing the welcome window started shows the welcome window again.
85
85
 
@@ -87,7 +87,7 @@ The mandatory update confirmation includes the installation wait notice on Windo
87
87
 
88
88
  The confirmation is skipped when the installer restart already confirmed task interruption, when the fatal-recovery dialog exits or restarts, when the development Restart App and Host command runs, and during operating-system shutdown, restart, or log-off: Windows sets this on the definitive session-end message; macOS sets it on the power-off notification, and because another application can still cancel that shutdown, the next focus or show of the main window clears it. Installer-owned quit cancels any pending ordinary quit decision; late inspection results and dialog answers cannot open another confirmation or repeat cleanup. A user-initiated update download that finishes while the window is hidden defers its Install and Restart confirmation until the window is shown again; the mandatory flow keeps its taskbar and Dock attention. The Windows installer and uninstaller tell a user whose application is still running to quit it from the system tray. Desktop does not enable scheduled tasks by default, so the scheduled-task explanations appear only once that feature is on; reminders fire only in loaded sessions, and unloaded sessions are neither counted nor resumed until they are opened.
89
89
 
90
- The tray renderer enlarges the whale by 20% around the tile center while preserving the background and aspect ratio; application and installer icons retain their original proportions.
90
+ The tray renderer enlarges the mark by 20% around the tile center for the Windows bitmap while preserving the background and aspect ratio; the menu bar image, the application icon, and the installer icons keep their original proportions.
91
91
 
92
92
  <a id="key-technical-decisions"></a>
93
93
 
package/README.zh.md CHANGED
@@ -77,9 +77,9 @@ macOS 安装会创建 `/usr/local/bin/qilin`;目录权限需要时,系统会
77
77
 
78
78
  ## 关闭窗口与退出
79
79
 
80
- 关闭主窗口(macOS 的关闭按钮和 ⌘W;Windows 的 ×、Alt+F4 和任务栏"关闭窗口")会隐藏窗口;Windows 首次隐藏前需要确认。页面和 Host 继续运行,任务不受影响,下次显示时仍是原来的文档,会话、草稿和滚动位置都保留;macOS 全屏窗口先退出全屏再隐藏。macOS 通过 Dock 图标、再次启动或 `qilin://open` 找回窗口,Windows 通过托盘找回。最小化行为不变。进入工作区前关闭欢迎窗口,Windows 上走退出流程,macOS 上应用留在 Dock 中且没有窗口。
80
+ 关闭主窗口(macOS 的关闭按钮和 ⌘W;Windows 的 ×、Alt+F4 和任务栏"关闭窗口")会隐藏窗口;Windows 首次隐藏前需要确认。页面和 Host 继续运行,任务不受影响,下次显示时仍是原来的文档,会话、草稿和滚动位置都保留;macOS 全屏窗口先退出全屏再隐藏。macOS 通过 Dock 图标、菜单栏图标、再次启动或 `qilin://open` 找回窗口,Windows 通过托盘图标找回。最小化行为不变。进入工作区前关闭欢迎窗口,Windows 上走退出流程,macOS 上应用留在 Dock 中且没有窗口。
81
81
 
82
- Windows 在整个运行期间常驻托盘图标。悬停提示为产品名,单击显示并聚焦窗口,右键菜单提供壳语言下的"打开 QiLin Desktop"和"退出 QiLin Desktop"。首次隐藏前复用更新弹窗,显示“正在运行的任务不会中断,可在系统托盘中重新打开窗口”和“确认”按钮。确认后隐藏窗口,并在 Electron userData 下写入 `background-close-confirmed`;Esc、关闭弹窗或加载失败均保持主窗口可见,不记录确认。重复关闭请求会聚焦已有壳弹窗。覆盖更新保留标记,卸载删除标记。旧的 `background-notice-shown` 标记不会跳过此确认。关闭窗口不发送系统通知。托盘位图是 `resources/tray-windows.ico`,由 `pnpm run render:tray-icon` 从 `resources/icon-windows.svg` 按 16、20、24、32、40、48、64 像素分别渲染,打包为 `resources/tray.ico`。macOS 不提供菜单栏图标。
82
+ Windows 和 macOS 在整个运行期间常驻托盘图标:Windows 在通知区域,macOS 在菜单栏。悬停提示为产品名,右键菜单提供壳语言下的"打开 QiLin Desktop"和"退出 QiLin Desktop";Windows 上单击即显示并聚焦窗口,而菜单栏图标单击打开该菜单,macOS 从菜单或 Dock 找回窗口。首次隐藏前复用更新弹窗,显示“正在运行的任务不会中断,可在系统托盘中重新打开窗口”和“确认”按钮。确认后隐藏窗口,并在 Electron userData 下写入 `background-close-confirmed`;Esc、关闭弹窗或加载失败均保持主窗口可见,不记录确认。重复关闭请求会聚焦已有壳弹窗。覆盖更新保留标记,卸载删除标记。旧的 `background-notice-shown` 标记不会跳过此确认。关闭窗口不发送系统通知。Windows 位图是 `resources/tray-windows.ico`,由 `pnpm run render:tray-icon` 从 `resources/icon-windows.svg` 按 16、20、24、32、40、48、64 像素分别渲染,打包为 `resources/tray.ico`;菜单栏使用应用底板,即 `resources/tray-macos.png` 与 `resources/tray-macos@2x.png`,按 18 与 36 像素渲染并以相同文件名打包,由平台按名称解析 `@2x` 兄弟文件——这两个笔画密集的汉字做单色剪影在该尺寸下无法辨认。
83
83
 
84
84
  所有普通退出入口——⌘Q、应用菜单、Dock 菜单、Windows 托盘和标题栏"应用程序"菜单,以及关闭强制更新窗口或欢迎窗口引起的退出——都先向 Host 查询退出会中断什么。Host 通过私有 IPC 通道回答两项事实:与更新重启检查同一口径的运行中任务(运行中的 agent,包括子代理和等待审批的回合、排队消息、运行中或停止中的后台任务),以及本次运行中已加载会话里由 `workspace/session-activity` 的 `schedule` family 报告的已挂定时器的提醒。两项都没有时直接退出,不弹框。否则弹出一个没有父窗口的原生消息框——隐藏的窗口保持隐藏——标题为**退出 QiLin Desktop?**,正文为三种本地化说明之一:正在运行的任务将会中断、应用关闭期间定时任务不会运行,或两者兼有。"退出"是默认按钮,Esc 等同"取消";macOS 上"取消"在"退出"左侧,Windows 上"退出"在"取消"左侧,Windows 任务对话框显示应用图标且不跟随应用主题、始终为浅色。Host 尚未就绪或已失败时不可能有任务在跑,直接退出。查询失败或 Host 超过两秒截止时间未答复,按运行中任务处理。弹框打开期间,再次请求退出只会并入同一弹框而不叠加新弹框(macOS 上还会把它提到前面;Electron 不暴露 Windows 任务对话框的句柄);任务开始或结束不会改变文案;点"退出"不再重新查询即停止应用;点"取消"不发生任何变化。取消由关闭欢迎窗口引起的退出时,欢迎窗口会重新显示。
85
85
 
@@ -87,7 +87,7 @@ Windows 在整个运行期间常驻托盘图标。悬停提示为产品名,单
87
87
 
88
88
  以下情况跳过确认:安装更新的重启已确认过任务中断、致命错误恢复对话框中的退出或重启、开发版"重启应用与 Host"命令,以及操作系统关机、重启或注销:Windows 在确定性的会话结束消息上设置该状态;macOS 在关机通知上设置,而其他应用仍可能取消这次关机,因此主窗口下一次获得焦点或显示时会清除它。安装器接管退出时会取消尚未结束的普通退出决策;晚到的查询结果和弹框答复不会再次打开确认框或重复清理。窗口隐藏期间完成的用户主动发起的更新下载,把"安装并重启"确认推迟到窗口再次显示时;强制更新流程沿用其任务栏和 Dock 提醒。Windows 安装程序和卸载程序在应用仍在运行时提示用户先在系统托盘中退出。Desktop 默认未开启定时任务,定时任务的说明只在该功能开启后出现;提醒只在已加载的会话中触发,未加载的会话既不计入,也要等到打开后才会继续。
89
89
 
90
- 托盘渲染器以底板中心为基准将鲸鱼放大 20%,保留背景和宽高比;应用和安装器图标保持原有比例。
90
+ 托盘渲染器以底板中心为基准把 Windows 位图中的标识放大 20%,保留背景和宽高比;菜单栏图标、应用图标和安装器图标保持原有比例。
91
91
 
92
92
  <a id="key-technical-decisions"></a>
93
93
 
package/lib/main.js CHANGED
@@ -4569,7 +4569,7 @@ function parseRemoteStreamServerMessage(raw) {
4569
4569
  * @throws Error when the build carries no client version, instead of reporting a guessed one.
4570
4570
  */
4571
4571
  function desktopClientVersion() {
4572
- return "3.1.8";
4572
+ return "3.1.10";
4573
4573
  }
4574
4574
  /**
4575
4575
  * Sample the Desktop client identity for one Platform request.
@@ -12223,17 +12223,20 @@ var DesktopQuitConfirmation = class {
12223
12223
  };
12224
12224
  //#endregion
12225
12225
  //#region lib/types/tray.js
12226
- /** Windows system tray: the always-present way back to a hidden window and the explicit quit entry. */
12226
+ /**
12227
+ * Desktop tray: the Windows notification-area icon and the macOS menu bar item — the always-present way back to a
12228
+ * hidden window and the explicit quit entry.
12229
+ */
12227
12230
  /** Tray icon present for the whole run, not only while the window is hidden. */
12228
12231
  var DesktopTray = class {
12229
12232
  options;
12230
12233
  tray;
12231
- /** @param options - Icon path, locale reader, and the open and quit actions. */
12234
+ /** @param options - Icon path, click behaviour, locale reader, and the open and quit actions. */
12232
12235
  constructor(options) {
12233
12236
  this.options = options;
12234
12237
  const tray = new Tray(nativeImage.createFromPath(options.iconPath));
12235
12238
  this.tray = tray;
12236
- tray.on("click", () => {
12239
+ if (options.openOnClick) tray.on("click", () => {
12237
12240
  options.open();
12238
12241
  });
12239
12242
  this.relabel();
@@ -13426,9 +13429,12 @@ async function main() {
13426
13429
  };
13427
13430
  refreshApplicationMenu();
13428
13431
  const trayIconPath = development ? join(app.getAppPath(), "resources", "tray-windows.ico") : join(process.resourcesPath, "tray.ico");
13429
- if (process.platform === "win32") try {
13432
+ const menuBarIconPath = development ? join(app.getAppPath(), "resources", "tray-macos.png") : join(process.resourcesPath, "tray-macos.png");
13433
+ const menuBar = process.platform === "darwin";
13434
+ if (menuBar || process.platform === "win32") try {
13430
13435
  tray = new DesktopTray({
13431
- iconPath: trayIconPath,
13436
+ iconPath: menuBar ? menuBarIconPath : trayIconPath,
13437
+ openOnClick: !menuBar,
13432
13438
  locale: currentDesktopLocale,
13433
13439
  open: () => {
13434
13440
  focusPrimaryWindow();
@@ -1,9 +1,17 @@
1
- /** Windows system tray: the always-present way back to a hidden window and the explicit quit entry. */
1
+ /**
2
+ * Desktop tray: the Windows notification-area icon and the macOS menu bar item — the always-present way back to a
3
+ * hidden window and the explicit quit entry.
4
+ */
2
5
  import type { DesktopLocale } from './locale.ts';
3
6
  /** Main-process actions the tray triggers; both run the same paths as the window and application menu. */
4
7
  export interface DesktopTrayOptions {
5
- /** Multi-size ICO rendered by `scripts/render-tray-icon.ts`; Windows picks the bitmap for the display scale. */
8
+ /** Icon rendered by `scripts/render-tray-icon.ts`: Windows takes the multi-size ICO, macOS the `@2x` PNG pair. */
6
9
  readonly iconPath: string;
10
+ /**
11
+ * Open the window on a single click. Windows' notification-area icon answers a click that way; a macOS menu bar
12
+ * item answers it with the context menu instead, which the platform opens by itself.
13
+ */
14
+ readonly openOnClick: boolean;
7
15
  readonly locale: () => DesktopLocale;
8
16
  /** Show and focus the primary window. */
9
17
  readonly open: () => void;
@@ -14,7 +22,7 @@ export interface DesktopTrayOptions {
14
22
  export declare class DesktopTray {
15
23
  private readonly options;
16
24
  private tray;
17
- /** @param options - Icon path, locale reader, and the open and quit actions. */
25
+ /** @param options - Icon path, click behaviour, locale reader, and the open and quit actions. */
18
26
  constructor(options: DesktopTrayOptions);
19
27
  /** Rebuild the tooltip and context menu in the current locale. */
20
28
  relabel(): void;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@qilin-agent/desktop",
3
3
  "description": "Electron desktop shell for a bundled qilin runtime and external plugins",
4
- "version": "3.1.8",
4
+ "version": "3.1.10",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "lib/main.js",
8
8
  "dependencies": {
9
- "@qilin-agent/api-gateway": "3.1.8",
10
- "@qilin-agent/kylin": "~4.0.6-alpha.2",
9
+ "@qilin-agent/api-gateway": "3.1.10",
10
+ "@qilin-agent/kylin": "~4.0.7",
11
11
  "electron-updater": "^6.8.9",
12
12
  "semver": "^7.8.5",
13
13
  "ws": "^8.21.3"
@@ -15,19 +15,19 @@
15
15
  "devDependencies": {
16
16
  "@electron/get": "^5.1.0",
17
17
  "@electron/notarize": "2.5.0",
18
- "@qilin-agent/app-boot": "3.1.8",
19
- "@qilin-agent/atomic-write": "3.1.8",
20
- "@qilin-agent/client-product-analytics": "3.1.8",
21
- "@qilin-agent/client-shortcuts": "3.1.8",
22
- "@qilin-agent/client-ui-file-actions": "3.1.8",
23
- "@qilin-agent/client-ui-primitives": "3.1.8",
24
- "@qilin-agent/client-ui-settings-general": "3.1.8",
25
- "@qilin-agent/client-ui-sidebar-browser": "3.1.8",
26
- "@qilin-agent/client-ui-theme": "3.1.8",
27
- "@qilin-agent/client-ui-theme-brand": "3.1.8",
28
- "@qilin-agent/home-paths": "3.1.8",
18
+ "@qilin-agent/app-boot": "3.1.10",
19
+ "@qilin-agent/atomic-write": "3.1.10",
20
+ "@qilin-agent/client-product-analytics": "3.1.10",
21
+ "@qilin-agent/client-shortcuts": "3.1.10",
22
+ "@qilin-agent/client-ui-file-actions": "3.1.10",
23
+ "@qilin-agent/client-ui-primitives": "3.1.10",
24
+ "@qilin-agent/client-ui-settings-general": "3.1.10",
25
+ "@qilin-agent/client-ui-sidebar-browser": "3.1.10",
26
+ "@qilin-agent/client-ui-theme": "3.1.10",
27
+ "@qilin-agent/client-ui-theme-brand": "3.1.10",
28
+ "@qilin-agent/home-paths": "3.1.10",
29
29
  "@qilin-agent/node-addon-system": "~0.1.2",
30
- "@qilin-agent/util-file-drag": "3.1.8",
30
+ "@qilin-agent/util-file-drag": "3.1.10",
31
31
  "@types/js-yaml": "^4.0.9",
32
32
  "@types/node": "^22.20.1",
33
33
  "@types/semver": "^7.8.0",