@qilin-agent/desktop 3.1.7 → 3.1.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.i18n.yaml +7 -4
- package/README.md +13 -2
- package/README.zh.md +13 -2
- package/lib/main.js +2508 -209
- package/lib/types/application-menu.d.ts +64 -0
- package/lib/types/file-actions.d.ts +8 -0
- package/lib/types/ipc.d.ts +4 -0
- package/lib/types/keyboard.d.ts +11 -1
- package/lib/types/locale.d.ts +46 -0
- package/lib/types/splash-window.d.ts +20 -0
- package/package.json +19 -17
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/** Standard desktop menu model: one definition drives the native menu bar and the Windows caption bar. */
|
|
2
|
+
import type { MenuItemConstructorOptions } from 'electron';
|
|
3
|
+
import type { ShortcutCommandId } from '@qilin-agent/client-shortcuts/protocol';
|
|
4
|
+
import type { DesktopMessages } from './locale.ts';
|
|
5
|
+
/** Project home the Help menu opens. */
|
|
6
|
+
export declare const PROJECT_HOME_URL = "https://github.com/kkutysllb/QiLin";
|
|
7
|
+
/** Issue tracker the Help menu opens. */
|
|
8
|
+
export declare const PROJECT_ISSUES_URL = "https://github.com/kkutysllb/QiLin/issues";
|
|
9
|
+
/** Caption-bar menus drawn inside the Windows title bar, in bar order. */
|
|
10
|
+
export declare const CAPTION_MENUS: readonly ["file", "edit", "view", "help"];
|
|
11
|
+
/** One caption-bar menu identity. */
|
|
12
|
+
export type CaptionMenu = (typeof CAPTION_MENUS)[number];
|
|
13
|
+
/** Operating systems whose menu layout differs. */
|
|
14
|
+
export type MenuPlatform = 'darwin' | 'win32' | 'linux';
|
|
15
|
+
/** Main-process actions and renderer bindings one menu definition needs. */
|
|
16
|
+
export interface ApplicationMenuActions {
|
|
17
|
+
/** Operating system presenting the menu. */
|
|
18
|
+
readonly platform: MenuPlatform;
|
|
19
|
+
/** Selected Desktop dictionary; every label comes from it. */
|
|
20
|
+
readonly messages: DesktopMessages;
|
|
21
|
+
/** Application name macOS shows on the first menu. */
|
|
22
|
+
readonly applicationName: string;
|
|
23
|
+
/** Whether developer entries are available. */
|
|
24
|
+
readonly development: boolean;
|
|
25
|
+
/** Show the product's About dialog. */
|
|
26
|
+
readonly showAbout: () => void;
|
|
27
|
+
/** Check for updates now. */
|
|
28
|
+
readonly checkUpdates: () => void;
|
|
29
|
+
/** Open the qilin command manager. */
|
|
30
|
+
readonly manageCommand: () => void;
|
|
31
|
+
/** Restart the application and its Host. */
|
|
32
|
+
readonly restart: () => void;
|
|
33
|
+
/** Open one https destination in the default browser. */
|
|
34
|
+
readonly openExternal: (url: string) => void;
|
|
35
|
+
/** Request quit through the same confirmation as the window control. */
|
|
36
|
+
readonly quit: () => void;
|
|
37
|
+
/** One renderer-owned command entry carrying its current binding. */
|
|
38
|
+
readonly command: (id: ShortcutCommandId, label: string) => MenuItemConstructorOptions;
|
|
39
|
+
/** Windows editing entries, whose history the editor owns. */
|
|
40
|
+
readonly editItems: () => MenuItemConstructorOptions[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The complete native menu template for this platform.
|
|
44
|
+
* @param actions - menu labels, renderer commands, and main-process callbacks.
|
|
45
|
+
* @returns menus for the native menu bar; Windows returns none because its caption bar owns them.
|
|
46
|
+
*/
|
|
47
|
+
export declare function applicationMenu(actions: ApplicationMenuActions): MenuItemConstructorOptions[];
|
|
48
|
+
/**
|
|
49
|
+
* One Windows caption-bar menu, anchored by the shell's own title-bar buttons.
|
|
50
|
+
* @param actions - menu labels, renderer commands, and main-process callbacks.
|
|
51
|
+
* @param menu - caption menu identity.
|
|
52
|
+
* @returns that menu's entries.
|
|
53
|
+
*/
|
|
54
|
+
export declare function captionMenu(actions: ApplicationMenuActions, menu: CaptionMenu): MenuItemConstructorOptions[];
|
|
55
|
+
/**
|
|
56
|
+
* Caption-bar button labels for the Windows title bar.
|
|
57
|
+
* @param messages - selected Desktop dictionary.
|
|
58
|
+
* @returns each menu identity with its bar label, in bar order.
|
|
59
|
+
*/
|
|
60
|
+
export declare function captionMenuLabels(messages: DesktopMessages): {
|
|
61
|
+
readonly id: CaptionMenu;
|
|
62
|
+
readonly label: string;
|
|
63
|
+
}[];
|
|
64
|
+
//# sourceMappingURL=application-menu.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BrowserWindow, IpcMainInvokeEvent } from 'electron';
|
|
2
|
+
/**
|
|
3
|
+
* Install trusted-window original-file operations.
|
|
4
|
+
* @param assertOwner - rejects shell pages, subframes, and unowned windows.
|
|
5
|
+
* @param hostUrl - current application Host excluded from image reads.
|
|
6
|
+
*/
|
|
7
|
+
export declare function installFileActions(assertOwner: (event: IpcMainInvokeEvent) => BrowserWindow, hostUrl?: () => string | undefined): void;
|
|
8
|
+
//# sourceMappingURL=file-actions.d.ts.map
|
package/lib/types/ipc.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/** Typed preload operations exposed only by the Electron shell. */
|
|
2
2
|
import type { DesktopKeyboardApi, DesktopShortcutsApi } from '@qilin-agent/client-shortcuts/protocol';
|
|
3
|
+
import type { DesktopFileActions } from '@qilin-agent/client-ui-file-actions/types';
|
|
3
4
|
import type { IpcMainInvokeEvent } from 'electron';
|
|
4
5
|
/** IPC channel names kept private to the desktop application bundle. */
|
|
5
6
|
export declare const DESKTOP_IPC: {
|
|
7
|
+
readonly fileSave: "qilin-desktop:file-save";
|
|
8
|
+
readonly clipboardImageRead: "qilin-desktop:clipboard-image-read";
|
|
6
9
|
readonly shortcutsInput: "qilin-desktop:shortcuts-input";
|
|
7
10
|
readonly shortcutsCloseWindow: "qilin-desktop:shortcuts-close-window";
|
|
8
11
|
readonly shortcutsGet: "qilin-desktop:shortcuts-get";
|
|
@@ -53,6 +56,7 @@ export interface DesktopUpdatePresentation {
|
|
|
53
56
|
}
|
|
54
57
|
/** Product documents cannot supply update versions, package URLs, or installation authorization. */
|
|
55
58
|
export interface QilinDesktopProductApi {
|
|
59
|
+
readonly fileActions: DesktopFileActions;
|
|
56
60
|
readonly protocolVersion: 1;
|
|
57
61
|
readonly keyboard: DesktopKeyboardApi;
|
|
58
62
|
readonly shortcuts: DesktopShortcutsApi;
|
package/lib/types/keyboard.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Product-window preference IPC and native menu interception during physical-key dispatch/recording. */
|
|
2
2
|
import { type BrowserWindow, type MenuItemConstructorOptions, type WebContents } from 'electron';
|
|
3
|
-
import type { ShortcutPlatform } from '@qilin-agent/client-shortcuts/protocol';
|
|
3
|
+
import type { ShortcutCommandId, ShortcutPlatform } from '@qilin-agent/client-shortcuts/protocol';
|
|
4
4
|
/** Name a sidebar browser lease carries in the main process, declared here because the client package ships no such type. */
|
|
5
5
|
import type { DesktopBrowserLeaseId } from './browser-bridge-types.ts';
|
|
6
6
|
/**
|
|
@@ -16,6 +16,16 @@ export declare function installDesktopShortcuts(getWindow: () => BrowserWindow |
|
|
|
16
16
|
readonly revision: number;
|
|
17
17
|
readonly blocked: boolean;
|
|
18
18
|
}): {
|
|
19
|
+
/**
|
|
20
|
+
* One native menu entry that runs a renderer-owned command with the binding the user currently has.
|
|
21
|
+
* @param id - registered command identity.
|
|
22
|
+
* @param label - localized entry label.
|
|
23
|
+
* @param extra - additional fixed properties, such as a role or visibility.
|
|
24
|
+
* @returns the menu item, disabled until the Web client publishes its shortcuts.
|
|
25
|
+
*/
|
|
26
|
+
commandItem(id: ShortcutCommandId, label: string, extra?: MenuItemConstructorOptions): MenuItemConstructorOptions;
|
|
27
|
+
/** Whether the renderer published a shortcut configuration this window can command. */
|
|
28
|
+
menuEnabled(): boolean;
|
|
19
29
|
fileMenu(labels: {
|
|
20
30
|
fileMenu: string;
|
|
21
31
|
closePage: string;
|
package/lib/types/locale.d.ts
CHANGED
|
@@ -119,6 +119,29 @@ export declare const en: {
|
|
|
119
119
|
readonly checkUpdatesMenu: "Check for Updates…";
|
|
120
120
|
readonly reloadPageMenu: "Reload Page";
|
|
121
121
|
readonly restartAppHostMenu: "Restart App and Host";
|
|
122
|
+
readonly settingsMenu: "Settings…";
|
|
123
|
+
readonly newSessionMenu: "New Session";
|
|
124
|
+
readonly searchSessionsMenu: "Search Sessions…";
|
|
125
|
+
readonly addWorkspaceMenu: "Add Workspace…";
|
|
126
|
+
readonly closeWindowMenu: "Close Window";
|
|
127
|
+
readonly viewMenu: "View";
|
|
128
|
+
readonly windowMenu: "Window";
|
|
129
|
+
readonly minimizeMenu: "Minimize";
|
|
130
|
+
readonly zoomWindowMenu: "Zoom";
|
|
131
|
+
readonly bringAllToFrontMenu: "Bring All to Front";
|
|
132
|
+
readonly servicesMenu: "Services";
|
|
133
|
+
readonly helpMenu: "Help";
|
|
134
|
+
readonly toggleLeftSidebarMenu: "Show or Hide Left Sidebar";
|
|
135
|
+
readonly toggleRightSidebarMenu: "Show or Hide Right Sidebar";
|
|
136
|
+
readonly resetZoomMenu: "Actual Size";
|
|
137
|
+
readonly zoomInMenu: "Zoom In";
|
|
138
|
+
readonly zoomOutMenu: "Zoom Out";
|
|
139
|
+
readonly toggleFullScreenMenu: "Toggle Full Screen";
|
|
140
|
+
readonly forceReloadMenu: "Force Reload";
|
|
141
|
+
readonly toggleDevToolsMenu: "Toggle Developer Tools";
|
|
142
|
+
readonly developerMenu: "Developer";
|
|
143
|
+
readonly projectHomeMenu: "QiLin Project Home";
|
|
144
|
+
readonly reportIssueMenu: "Report an Issue";
|
|
122
145
|
readonly updateCheckFailedTitle: "Update Check Failed";
|
|
123
146
|
readonly updateCheckFailed: "Could not check for updates. Please try again later.";
|
|
124
147
|
readonly updateDownloadFailed: "Could not download the update. Please try again.";
|
|
@@ -310,6 +333,29 @@ export declare const zh: {
|
|
|
310
333
|
readonly checkUpdatesMenu: "检查更新…";
|
|
311
334
|
readonly reloadPageMenu: "刷新页面";
|
|
312
335
|
readonly restartAppHostMenu: "重启应用与 Host";
|
|
336
|
+
readonly settingsMenu: "设置…";
|
|
337
|
+
readonly newSessionMenu: "新建会话";
|
|
338
|
+
readonly searchSessionsMenu: "搜索会话…";
|
|
339
|
+
readonly addWorkspaceMenu: "添加工作区…";
|
|
340
|
+
readonly closeWindowMenu: "关闭窗口";
|
|
341
|
+
readonly viewMenu: "视图";
|
|
342
|
+
readonly windowMenu: "窗口";
|
|
343
|
+
readonly minimizeMenu: "最小化";
|
|
344
|
+
readonly zoomWindowMenu: "缩放";
|
|
345
|
+
readonly bringAllToFrontMenu: "前置全部窗口";
|
|
346
|
+
readonly servicesMenu: "服务";
|
|
347
|
+
readonly helpMenu: "帮助";
|
|
348
|
+
readonly toggleLeftSidebarMenu: "显示或隐藏左侧栏";
|
|
349
|
+
readonly toggleRightSidebarMenu: "显示或隐藏右侧栏";
|
|
350
|
+
readonly resetZoomMenu: "实际大小";
|
|
351
|
+
readonly zoomInMenu: "放大";
|
|
352
|
+
readonly zoomOutMenu: "缩小";
|
|
353
|
+
readonly toggleFullScreenMenu: "切换全屏";
|
|
354
|
+
readonly forceReloadMenu: "强制重新加载";
|
|
355
|
+
readonly toggleDevToolsMenu: "开发者工具";
|
|
356
|
+
readonly developerMenu: "开发者";
|
|
357
|
+
readonly projectHomeMenu: "QiLin 项目主页";
|
|
358
|
+
readonly reportIssueMenu: "报告问题";
|
|
313
359
|
readonly updateCheckFailedTitle: "更新检查失败";
|
|
314
360
|
readonly updateCheckFailed: "检查更新失败,请稍后重试。";
|
|
315
361
|
readonly updateDownloadFailed: "下载更新失败,请重试。";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Native launch splash: a presentational window shown while the Host boots. */
|
|
2
|
+
import { BrowserWindow, type BrowserWindowConstructorOptions } from 'electron';
|
|
3
|
+
/**
|
|
4
|
+
* Resolve the frameless splash window's native material.
|
|
5
|
+
* @param platform - operating system hosting Electron.
|
|
6
|
+
* @returns fixed-size sandboxed window options without a preload or title bar.
|
|
7
|
+
*/
|
|
8
|
+
export declare function splashWindowOptions(platform: NodeJS.Platform): BrowserWindowConstructorOptions;
|
|
9
|
+
/**
|
|
10
|
+
* Open the process's sole splash window; a repeated open focuses the existing one.
|
|
11
|
+
* @returns the opened window, already loading its document; a failed document load
|
|
12
|
+
* destroys it before rejecting.
|
|
13
|
+
*/
|
|
14
|
+
export declare function openSplashWindow(): Promise<BrowserWindow>;
|
|
15
|
+
/**
|
|
16
|
+
* Close the splash wherever the launch reached a real surface or the process is
|
|
17
|
+
* leaving. Repeated calls, and calls before the first open, do nothing.
|
|
18
|
+
*/
|
|
19
|
+
export declare function closeSplashWindow(): void;
|
|
20
|
+
//# sourceMappingURL=splash-window.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,20 +1,33 @@
|
|
|
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.
|
|
4
|
+
"version": "3.1.9",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "lib/main.js",
|
|
8
8
|
"dependencies": {
|
|
9
|
+
"@qilin-agent/api-gateway": "3.1.9",
|
|
10
|
+
"@qilin-agent/kylin": "~4.0.7",
|
|
9
11
|
"electron-updater": "^6.8.9",
|
|
10
12
|
"semver": "^7.8.5",
|
|
11
|
-
"ws": "^8.21.3"
|
|
12
|
-
"@qilin-agent/api-gateway": "3.1.7",
|
|
13
|
-
"@qilin-agent/kylin": "~4.0.5"
|
|
13
|
+
"ws": "^8.21.3"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@electron/get": "^5.1.0",
|
|
17
17
|
"@electron/notarize": "2.5.0",
|
|
18
|
+
"@qilin-agent/app-boot": "3.1.9",
|
|
19
|
+
"@qilin-agent/atomic-write": "3.1.9",
|
|
20
|
+
"@qilin-agent/client-product-analytics": "3.1.9",
|
|
21
|
+
"@qilin-agent/client-shortcuts": "3.1.9",
|
|
22
|
+
"@qilin-agent/client-ui-file-actions": "3.1.9",
|
|
23
|
+
"@qilin-agent/client-ui-primitives": "3.1.9",
|
|
24
|
+
"@qilin-agent/client-ui-settings-general": "3.1.9",
|
|
25
|
+
"@qilin-agent/client-ui-sidebar-browser": "3.1.9",
|
|
26
|
+
"@qilin-agent/client-ui-theme": "3.1.9",
|
|
27
|
+
"@qilin-agent/client-ui-theme-brand": "3.1.9",
|
|
28
|
+
"@qilin-agent/home-paths": "3.1.9",
|
|
29
|
+
"@qilin-agent/node-addon-system": "~0.1.2",
|
|
30
|
+
"@qilin-agent/util-file-drag": "3.1.9",
|
|
18
31
|
"@types/js-yaml": "^4.0.9",
|
|
19
32
|
"@types/node": "^22.20.1",
|
|
20
33
|
"@types/semver": "^7.8.0",
|
|
@@ -26,23 +39,12 @@
|
|
|
26
39
|
"extract-zip": "^2.0.1",
|
|
27
40
|
"js-yaml": "^4.3.2",
|
|
28
41
|
"koffi": "3.1.1",
|
|
29
|
-
"pnpm": "
|
|
42
|
+
"pnpm": "12.16.1",
|
|
30
43
|
"react": "^18.2.0",
|
|
31
44
|
"react-dom": "^18.2.0",
|
|
32
45
|
"sharp": "0.35.5",
|
|
33
46
|
"typescript": "^6.0.3",
|
|
34
|
-
"vite": "^6.4.3"
|
|
35
|
-
"@qilin-agent/atomic-write": "3.1.7",
|
|
36
|
-
"@qilin-agent/app-boot": "3.1.7",
|
|
37
|
-
"@qilin-agent/client-shortcuts": "3.1.7",
|
|
38
|
-
"@qilin-agent/client-product-analytics": "3.1.7",
|
|
39
|
-
"@qilin-agent/client-ui-primitives": "3.1.7",
|
|
40
|
-
"@qilin-agent/client-ui-settings-general": "3.1.7",
|
|
41
|
-
"@qilin-agent/client-ui-sidebar-browser": "3.1.7",
|
|
42
|
-
"@qilin-agent/client-ui-theme": "3.1.7",
|
|
43
|
-
"@qilin-agent/client-ui-theme-brand": "3.1.7",
|
|
44
|
-
"@qilin-agent/node-addon-system": "~0.1.2",
|
|
45
|
-
"@qilin-agent/home-paths": "3.1.7"
|
|
47
|
+
"vite": "^6.4.3"
|
|
46
48
|
},
|
|
47
49
|
"peerDependencies": {},
|
|
48
50
|
"optionalDependencies": {},
|