@qilin-agent/desktop 0.0.0-stage → 3.1.6

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.
Files changed (77) hide show
  1. package/LICENSE +21 -0
  2. package/README.i18n.yaml +79 -0
  3. package/README.md +383 -2
  4. package/README.zh.md +384 -0
  5. package/lib/command-manager-entry.js +554 -0
  6. package/lib/main.js +11534 -0
  7. package/lib/types/account-backend.d.ts +37 -0
  8. package/lib/types/account-types.d.ts +74 -0
  9. package/lib/types/backend-controller.d.ts +59 -0
  10. package/lib/types/background-notice.d.ts +29 -0
  11. package/lib/types/browser-bridge-types.d.ts +26 -0
  12. package/lib/types/browser-guests.d.ts +33 -0
  13. package/lib/types/client-metadata.d.ts +15 -0
  14. package/lib/types/command-installation.d.ts +54 -0
  15. package/lib/types/command-management.d.ts +46 -0
  16. package/lib/types/command-manager-entry.d.ts +3 -0
  17. package/lib/types/core-package-set.d.ts +51 -0
  18. package/lib/types/crash-report.d.ts +92 -0
  19. package/lib/types/desktop-home.d.ts +12 -0
  20. package/lib/types/device-info.d.ts +8 -0
  21. package/lib/types/directory-picker.d.ts +8 -0
  22. package/lib/types/duration-env.d.ts +10 -0
  23. package/lib/types/fatal-recovery.d.ts +37 -0
  24. package/lib/types/host-process.d.ts +97 -0
  25. package/lib/types/host-protocol.d.ts +4 -0
  26. package/lib/types/ipc.d.ts +78 -0
  27. package/lib/types/keybindings.d.ts +11 -0
  28. package/lib/types/keyboard.d.ts +40 -0
  29. package/lib/types/local-auth.d.ts +22 -0
  30. package/lib/types/locale.d.ts +407 -0
  31. package/lib/types/login-shell-environment.d.ts +66 -0
  32. package/lib/types/main.d.ts +2 -0
  33. package/lib/types/mandatory-update-ipc.d.ts +7 -0
  34. package/lib/types/mandatory-update-policy.d.ts +83 -0
  35. package/lib/types/mandatory-update-window.d.ts +90 -0
  36. package/lib/types/microphone-permissions.d.ts +9 -0
  37. package/lib/types/node-environment.d.ts +10 -0
  38. package/lib/types/owned-directory.d.ts +8 -0
  39. package/lib/types/paths.d.ts +13 -0
  40. package/lib/types/platform-ipc.d.ts +12 -0
  41. package/lib/types/platform-view.d.ts +77 -0
  42. package/lib/types/policy-test-auth.d.ts +49 -0
  43. package/lib/types/preload-app.d.ts +3 -0
  44. package/lib/types/preload-browser.d.ts +4 -0
  45. package/lib/types/preload-mandatory-overlay.d.ts +3 -0
  46. package/lib/types/preload-mandatory.d.ts +2 -0
  47. package/lib/types/preload-menu.d.ts +9 -0
  48. package/lib/types/preload-platform-account.d.ts +2 -0
  49. package/lib/types/preload-platform.d.ts +13 -0
  50. package/lib/types/preload-theme.d.ts +12 -0
  51. package/lib/types/preload-update-dialog.d.ts +2 -0
  52. package/lib/types/preload-welcome.d.ts +2 -0
  53. package/lib/types/preload-windows.d.ts +3 -0
  54. package/lib/types/project-manager.d.ts +39 -0
  55. package/lib/types/quit-confirmation.d.ts +47 -0
  56. package/lib/types/release.d.ts +14 -0
  57. package/lib/types/runtime-tree.d.ts +70 -0
  58. package/lib/types/settings.d.ts +13 -0
  59. package/lib/types/single-instance.d.ts +15 -0
  60. package/lib/types/startup-error.d.ts +11 -0
  61. package/lib/types/tray.d.ts +24 -0
  62. package/lib/types/update-attention.d.ts +28 -0
  63. package/lib/types/update-channel.d.ts +10 -0
  64. package/lib/types/update-coordinator.d.ts +60 -0
  65. package/lib/types/update-dialog.d.ts +69 -0
  66. package/lib/types/update-error.d.ts +14 -0
  67. package/lib/types/update-http-executor.d.ts +14 -0
  68. package/lib/types/update-journal.d.ts +35 -0
  69. package/lib/types/update-overlay.d.ts +23 -0
  70. package/lib/types/update-presentation.d.ts +16 -0
  71. package/lib/types/update-schedule.d.ts +47 -0
  72. package/lib/types/web-document.d.ts +69 -0
  73. package/lib/types/welcome-api.d.ts +86 -0
  74. package/lib/types/welcome-backend.d.ts +36 -0
  75. package/lib/types/welcome-window.d.ts +19 -0
  76. package/lib/types/windows-layout.d.ts +4 -0
  77. package/package.json +98 -3
@@ -0,0 +1,407 @@
1
+ /** Typed English and Chinese copy owned by the Electron shell. */
2
+ export declare const en: {
3
+ readonly cliCommandMenu: "Manage qilin Command…";
4
+ readonly cliCommandTitle: "Manage qilin Command";
5
+ readonly cliCommandLocation: "Desktop command: {path}";
6
+ readonly cliCommandSelected: "Current qilin command: {path}";
7
+ readonly cliCommandTarget: "Current launcher target: {path}";
8
+ readonly cliCommandShadowed: "Another qilin takes precedence. Remove or reorder that installation to use the Desktop command by default. You can also run the Desktop command by its full path.";
9
+ readonly cliCommandSelectionUnknown: "Your shell command could not be verified. An alias or another qilin installation may take precedence.";
10
+ readonly cliCommandInstalled: "The Desktop command is installed.";
11
+ readonly cliCommandNotInstalled: "Add the Desktop command to your terminal.";
12
+ readonly cliCommandBroken: "The Desktop command needs repair.";
13
+ readonly cliCommandInstall: "Install";
14
+ readonly cliCommandRepair: "Repair";
15
+ readonly cliCommandRemove: "Remove";
16
+ readonly cliCommandClose: "Close";
17
+ readonly cliCommandSwitch: "Continue with the Desktop command?";
18
+ readonly cliCommandPreserve: "An existing command will be preserved. Other installations and shell startup files will not be changed.";
19
+ readonly cliCommandContinue: "Continue";
20
+ readonly cliCommandInstallApp: "Install Desktop in your Applications folder before managing the qilin command.";
21
+ readonly cliCommandUpdating: "An update is being installed. Manage the command after installation finishes.";
22
+ readonly cliCommandNewTerminal: "Open a new terminal and run qilin --version.";
23
+ readonly cliCommandRemoved: "Desktop command registration removed.";
24
+ readonly cliCommandPreviousRestored: "The previous launcher has been restored.";
25
+ readonly cliCommandOtherKept: "Other command installations have been left in place.";
26
+ readonly cliCommandBackupKept: "A previous launcher is preserved at: {path}";
27
+ readonly cliCommandChanged: "The command or PATH changed while this dialog was open. Open Manage qilin Command again to review the current state.";
28
+ readonly cliCommandOwnershipError: "The command registration or backup changed. No unrelated command was removed.";
29
+ readonly cliCommandFailed: "The command could not be updated. Check that the application is installed and the destination is writable, then retry.";
30
+ readonly application: "Application";
31
+ readonly fileMenu: "File";
32
+ readonly closePage: "Close Page or Window";
33
+ readonly aboutMenu: "About QiLin Desktop";
34
+ readonly aboutProduct: "QiLin Desktop";
35
+ readonly aboutVersion: "Version V{version}";
36
+ readonly hideApplication: "Hide QiLin Desktop";
37
+ readonly hideOtherApplications: "Hide Others";
38
+ readonly showAllApplications: "Show All";
39
+ readonly quitApplication: "Quit QiLin Desktop";
40
+ readonly openApplication: "Open QiLin Desktop";
41
+ readonly quit: "Quit";
42
+ readonly cancel: "Cancel";
43
+ readonly quitTitle: "Quit QiLin Desktop?";
44
+ readonly quitActiveTasks: "Running tasks will be interrupted.";
45
+ readonly quitScheduledTasks: "Scheduled tasks will not run while the app is closed.";
46
+ readonly quitActiveAndScheduledTasks: "Running tasks will be interrupted, and scheduled tasks will not run while the app is closed.";
47
+ readonly backgroundNoticeBody: "Running tasks will continue. You can reopen the window from the system tray.";
48
+ readonly backgroundNoticeConfirm: "Confirm";
49
+ readonly edit: "Edit";
50
+ readonly menuBar: "Application menu";
51
+ readonly delete: "Delete";
52
+ readonly undo: "Undo";
53
+ readonly redo: "Redo";
54
+ readonly cut: "Cut";
55
+ readonly copy: "Copy";
56
+ readonly paste: "Paste";
57
+ readonly selectAll: "Select All";
58
+ readonly startupFailed: "QiLin Desktop is unavailable";
59
+ readonly fatalSummary: "The application could not start or stopped unexpectedly.";
60
+ readonly startupAddressInUse: "Another QILIN instance (such as qilin web or the desktop app) is running. They cannot start at the same time. Quit the other running QILIN instance, then restart.";
61
+ readonly diagnosticTruncated: "… Error details shortened.";
62
+ readonly reportWrittenTo: "Diagnostic report: {path}";
63
+ readonly startupReinstallAdvice: "If application files are missing or damaged, close the application and reinstall it. Your tasks are stored separately.";
64
+ readonly exitApplication: "Exit";
65
+ readonly restartApplication: "Restart";
66
+ readonly recoveryOperationFailed: "The recovery operation failed";
67
+ readonly disableThirdPartyPlugins: "Disable third-party plugins, back up profile patch, and restart";
68
+ readonly welcomeTitle: "QiLin Desktop";
69
+ readonly welcomeBrand: "QiLin Desktop";
70
+ readonly welcomeTaglineBefore: "";
71
+ readonly welcomeTaglineBrand: "Anything, with QiLin";
72
+ readonly welcomeTaglineAfter: "";
73
+ readonly welcomeDescription: "An open-source agent orchestration platform driven by sandboxes, memory, tools, skills, and subagents, autonomous on tasks that run from minutes to hours.";
74
+ readonly welcomeAuthStarting: "Opening sign in…";
75
+ readonly welcomeAuthWaiting: "Browser didn’t open automatically?";
76
+ readonly welcomeAuthWaitingDescription: "Copy the sign-in link and open it in your browser to sign in.";
77
+ readonly welcomeAuthExchanging: "Completing sign in…";
78
+ readonly welcomeAuthExpired: "Sign in timed out";
79
+ readonly welcomeAuthExpiredDescription: "Sign in again to continue";
80
+ readonly welcomeAuthFailed: "Could not complete sign in. Please try again.";
81
+ readonly welcomeAuthCopyLink: "Copy sign-in link";
82
+ readonly welcomeAuthCopied: "Copied";
83
+ readonly welcomeAuthCopyFailed: "Could not copy. Try again.";
84
+ readonly welcomeAuthCancel: "Cancel";
85
+ readonly welcomeAuthRetry: "Sign in again";
86
+ readonly welcomeSignIn: "Sign in";
87
+ readonly welcomeLoginTitle: "Sign in";
88
+ readonly welcomeLoginDescription: "Use your local account on this computer.";
89
+ readonly welcomeLoginName: "Account name";
90
+ readonly welcomeLoginPassword: "Password";
91
+ readonly welcomeLoginSubmit: "Sign in";
92
+ readonly welcomeLoginToRegister: "No account yet? Register";
93
+ readonly welcomeLoginFailed: "Sign-in failed. Check the account name and password.";
94
+ readonly welcomeAccountExists: "This computer already has an account. Sign in instead.";
95
+ readonly welcomeRegisterTitle: "Create an account";
96
+ readonly welcomeRegisterDescription: "The account is stored on this computer only.";
97
+ readonly welcomeRegisterName: "Account name";
98
+ readonly welcomeRegisterEmail: "Email (optional)";
99
+ readonly welcomeRegisterPassword: "Password";
100
+ readonly welcomeRegisterPasswordConfirm: "Confirm password";
101
+ readonly welcomeRegisterSubmit: "Register";
102
+ readonly welcomeRegisterToLogin: "Already registered? Sign in";
103
+ readonly welcomeRegisterFailed: "Registration failed. Check the account name and password length.";
104
+ readonly welcomeRegisterPasswordMismatch: "The passwords do not match.";
105
+ readonly welcomePasswordShow: "Show password";
106
+ readonly welcomePasswordHide: "Hide password";
107
+ readonly welcomeApiKey: "Add API Key";
108
+ readonly welcomeKeyTitle: "Add an API key to get started";
109
+ readonly welcomeKeyDescription: "Configure official DeepSeek models to start using Harness";
110
+ readonly welcomeKeyPlaceholder: "Enter API key";
111
+ readonly welcomeKeySave: "Save and continue";
112
+ readonly welcomeKeyLater: "Set up later";
113
+ readonly welcomeKeyBack: "Back to sign in";
114
+ readonly welcomeSessionExpired: "You have signed out of your account, please log in again.";
115
+ readonly welcomeKeyBlank: "Enter an API key.";
116
+ readonly welcomeKeyInvalid: "Enter the API key itself, without quotes, spaces, or an environment-variable assignment.";
117
+ readonly welcomeKeyFailed: "Could not save the API key. Please try again.";
118
+ readonly welcomeContinueFailed: "Could not open the workspace. Please try again.";
119
+ readonly checkUpdatesMenu: "Check for Updates…";
120
+ readonly reloadPageMenu: "Reload Page";
121
+ readonly restartAppHostMenu: "Restart App and Host";
122
+ readonly updateCheckFailedTitle: "Update Check Failed";
123
+ readonly updateCheckFailed: "Could not check for updates. Please try again later.";
124
+ readonly updateDownloadFailed: "Could not download the update. Please try again.";
125
+ readonly updateInstallFailed: "Could not install the update. Please try again later.";
126
+ readonly updateCheckNetworkFailed: "Could not check for updates. Check your connection and try again.";
127
+ readonly updateDownloadNetworkFailed: "Could not download the update. Check your connection and try again.";
128
+ readonly updateInstallNetworkFailed: "Could not install the update. Check your connection and try again.";
129
+ readonly unknownError: "Unknown error";
130
+ readonly updateCheckTitle: "Check for Updates";
131
+ readonly updateCurrentDetail: "Current version: {version}";
132
+ readonly updateCurrent: "You’re up to date!";
133
+ readonly updateChecking: "Checking for updates…";
134
+ readonly updateDownload: "Download update";
135
+ readonly updateDownloadedTitle: "Version {version} is ready to install";
136
+ readonly updateDownloadedDetail: "The app will close during the update and reopen automatically when it is complete.";
137
+ readonly updateDownloadedDetailWindows: "The app will close temporarily during the update and reopen automatically when it is complete.\n\nThe update may take some time. Please wait and do not launch the app again during installation.";
138
+ readonly updateClose: "Close";
139
+ readonly updateAcknowledge: "OK";
140
+ readonly updateLater: "Update later";
141
+ readonly updateDownloading: "Downloading {percent}%…";
142
+ readonly updateVerifying: "Verifying update files…";
143
+ readonly updateInstalling: "Preparing to restart…";
144
+ readonly updateRetry: "Retry update";
145
+ readonly updateActiveTasks: "Tasks are still in progress";
146
+ readonly updateActiveTasksDetail: "Updating will stop the tasks in progress and restart the app. Continue?";
147
+ readonly updateStopTasks: "Stop tasks and update";
148
+ readonly updateTasksChanged: "New tasks have started. Confirm again to stop the tasks and update.";
149
+ readonly updateTasksUnavailable: "Task status is unavailable. Try updating again when the workspace is ready.";
150
+ readonly updateStopFailed: "Could not safely stop the tasks. The update has not been installed. Please try again later.";
151
+ readonly updateTechnicalDetails: "View technical details";
152
+ readonly updateTitle: "QiLin Desktop Update";
153
+ readonly updateAvailable: "New version available: {version}";
154
+ readonly updateDetail: "Once the download is complete, you can install the update and restart the app.";
155
+ readonly installAndRestart: "Install and Restart";
156
+ readonly later: "Later";
157
+ readonly updateFailedTitle: "Update Failed";
158
+ readonly mandatoryTitle: "Update to continue";
159
+ readonly mandatoryDetail: "This version is no longer supported. Update to continue. Tasks in progress will keep running until you confirm installation and restart.";
160
+ readonly mandatoryUnavailable: "Could not check update requirements. Please try again later.";
161
+ readonly policyLoginTitle: "Sign in to the test environment";
162
+ readonly policyLoginRequired: "Sign in with Feishu to check update requirements for this test build. Signing in will not download or install an update.";
163
+ readonly policyLogin: "Sign in with Feishu";
164
+ readonly policyLoginFailed: "Feishu sign-in did not complete. Please try again.";
165
+ readonly policyLoginLoading: "Loading sign-in page…";
166
+ readonly mandatoryNoRelease: "No compatible update was found. Check again or contact support.";
167
+ readonly mandatoryRefresh: "Check again";
168
+ readonly mandatoryPage: "Download from the official website";
169
+ readonly mandatoryCopy: "Copy download link";
170
+ readonly mandatoryPageFailed: "Could not open the official download page. Copy the link and open it in your browser.";
171
+ readonly mandatoryActionFailed: "The action failed. Please try again. You can use the app again after the update is complete.";
172
+ readonly mandatoryReady: "Update ready";
173
+ readonly mandatoryVersion: "New version: {version}";
174
+ readonly mandatoryReadyDetail: "The app will close during the update and reopen automatically when it is complete.";
175
+ readonly mandatoryDeferred: "Tasks in progress will keep running. Complete the update before using the app again.";
176
+ readonly mandatoryContinue: "Continue update";
177
+ readonly mandatoryInspecting: "Checking tasks…";
178
+ readonly mandatoryStopping: "Stopping tasks…";
179
+ readonly mandatoryRestarting: "The app will restart shortly. Please wait.";
180
+ readonly mandatoryDownloadFailed: "The update files could not be downloaded or prepared. Please retry.";
181
+ readonly mandatoryInstallFailed: "The update has not been installed. Check the tasks again and retry.";
182
+ readonly mandatoryOpenHelp: "Page didn’t open?";
183
+ readonly mandatoryReopen: "Open the official download page again";
184
+ readonly mandatoryCopied: "Link copied";
185
+ readonly mandatoryCopyFailed: "Could not copy the link. Select and copy it below.";
186
+ readonly mandatoryAddress: "Download link";
187
+ readonly mandatoryNotification: "Return to the application to confirm installation and restart.";
188
+ };
189
+ /** Every Desktop locale supplies the complete English key set. */
190
+ export type DesktopMessages = {
191
+ readonly [Key in keyof typeof en]: string;
192
+ };
193
+ export declare const zh: {
194
+ readonly cliCommandMenu: "管理 qilin 命令…";
195
+ readonly cliCommandTitle: "管理 qilin 命令";
196
+ readonly cliCommandLocation: "Desktop 命令:{path}";
197
+ readonly cliCommandSelected: "当前 qilin 命令:{path}";
198
+ readonly cliCommandTarget: "当前启动器目标:{path}";
199
+ readonly cliCommandShadowed: "另一个 qilin 的优先级更高。请移除或调整该安装的顺序,以默认使用 Desktop 命令;也可以通过完整路径运行 Desktop 命令。";
200
+ readonly cliCommandSelectionUnknown: "无法确认 shell 中的命令。别名或另一个 qilin 安装可能具有更高优先级。";
201
+ readonly cliCommandInstalled: "Desktop 命令已安装。";
202
+ readonly cliCommandNotInstalled: "将 Desktop 命令添加到终端。";
203
+ readonly cliCommandBroken: "Desktop 命令需要修复。";
204
+ readonly cliCommandInstall: "安装";
205
+ readonly cliCommandRepair: "修复";
206
+ readonly cliCommandRemove: "移除";
207
+ readonly cliCommandClose: "关闭";
208
+ readonly cliCommandSwitch: "继续使用 Desktop 命令?";
209
+ readonly cliCommandPreserve: "现有命令会被保留,不会修改其他安装或 shell 启动文件。";
210
+ readonly cliCommandContinue: "继续";
211
+ readonly cliCommandInstallApp: "请先将 Desktop 安装到“应用程序”文件夹,再管理 qilin 命令。";
212
+ readonly cliCommandUpdating: "正在安装更新。请在安装完成后管理命令。";
213
+ readonly cliCommandNewTerminal: "打开新终端并运行 qilin --version。";
214
+ readonly cliCommandRemoved: "已移除 Desktop 命令注册。";
215
+ readonly cliCommandPreviousRestored: "已恢复之前的启动器。";
216
+ readonly cliCommandOtherKept: "其他命令安装保持不变。";
217
+ readonly cliCommandBackupKept: "之前的启动器保留在:{path}";
218
+ readonly cliCommandChanged: "对话框打开期间命令或 PATH 已改变。请重新打开“管理 qilin 命令”检查当前状态。";
219
+ readonly cliCommandOwnershipError: "命令注册或备份已改变,未移除无关命令。";
220
+ readonly cliCommandFailed: "无法更新命令。请检查应用是否已安装、目标位置是否可写,然后重试。";
221
+ readonly application: "应用";
222
+ readonly fileMenu: "文件";
223
+ readonly closePage: "关闭页面或窗口";
224
+ readonly aboutMenu: "关于 QiLin Desktop";
225
+ readonly aboutProduct: "QiLin Desktop";
226
+ readonly aboutVersion: "版本 V{version}";
227
+ readonly hideApplication: "隐藏 QiLin Desktop";
228
+ readonly hideOtherApplications: "隐藏其他";
229
+ readonly showAllApplications: "显示全部";
230
+ readonly quitApplication: "退出 QiLin Desktop";
231
+ readonly openApplication: "打开 QiLin Desktop";
232
+ readonly quit: "退出";
233
+ readonly cancel: "取消";
234
+ readonly quitTitle: "退出 QiLin Desktop?";
235
+ readonly quitActiveTasks: "当前正在运行的任务将会中断";
236
+ readonly quitScheduledTasks: "应用关闭期间,定时任务不会运行";
237
+ readonly quitActiveAndScheduledTasks: "当前正在运行的任务将会中断,且应用关闭期间,定时任务不会运行";
238
+ readonly backgroundNoticeBody: "正在运行的任务不会中断,可在系统托盘中重新打开窗口";
239
+ readonly backgroundNoticeConfirm: "确认";
240
+ readonly edit: "编辑";
241
+ readonly menuBar: "应用菜单";
242
+ readonly delete: "删除";
243
+ readonly undo: "撤销";
244
+ readonly redo: "重做";
245
+ readonly cut: "剪切";
246
+ readonly copy: "复制";
247
+ readonly paste: "粘贴";
248
+ readonly selectAll: "全选";
249
+ readonly startupFailed: "QiLin Desktop 无法使用";
250
+ readonly fatalSummary: "应用无法启动或已意外停止。";
251
+ readonly startupAddressInUse: "有其他正在运行的 QILIN(如其他 qilin web、桌面端),无法同时启动,请退出其他正在运行的 QILIN 后重启。";
252
+ readonly diagnosticTruncated: "… 错误详情已截短。";
253
+ readonly reportWrittenTo: "诊断报告:{path}";
254
+ readonly startupReinstallAdvice: "如果应用文件缺失或损坏,请关闭应用并重新安装。任务数据存储在独立位置。";
255
+ readonly exitApplication: "退出";
256
+ readonly restartApplication: "重启";
257
+ readonly recoveryOperationFailed: "恢复操作失败";
258
+ readonly disableThirdPartyPlugins: "禁用第三方插件、备份 profile patch 并重启";
259
+ readonly welcomeTitle: "QiLin Desktop";
260
+ readonly welcomeBrand: "QiLin Desktop";
261
+ readonly welcomeTaglineBefore: "";
262
+ readonly welcomeTaglineBrand: "做任何事,就用 QiLin";
263
+ readonly welcomeTaglineAfter: "";
264
+ readonly welcomeDescription: "一个开源的智能体编排平台,由沙箱、记忆、工具、技能和子智能体驱动,可自主完成从数分钟到数小时的复杂任务。";
265
+ readonly welcomeAuthStarting: "正在打开登录…";
266
+ readonly welcomeAuthWaiting: "没有自动打开浏览器?";
267
+ readonly welcomeAuthWaitingDescription: "复制登录链接,用浏览器手动打开完成登录";
268
+ readonly welcomeAuthExchanging: "正在完成登录…";
269
+ readonly welcomeAuthExpired: "登录已超时";
270
+ readonly welcomeAuthExpiredDescription: "请重新登录后继续操作";
271
+ readonly welcomeAuthFailed: "登录未完成,请重试。";
272
+ readonly welcomeAuthCopyLink: "复制登录链接";
273
+ readonly welcomeAuthCopied: "已复制";
274
+ readonly welcomeAuthCopyFailed: "复制失败,请重试";
275
+ readonly welcomeAuthCancel: "取消";
276
+ readonly welcomeAuthRetry: "重新登录";
277
+ readonly welcomeSignIn: "登录";
278
+ readonly welcomeLoginTitle: "登录";
279
+ readonly welcomeLoginDescription: "使用本机上的本地账号。";
280
+ readonly welcomeLoginName: "账号";
281
+ readonly welcomeLoginPassword: "密码";
282
+ readonly welcomeLoginSubmit: "登录";
283
+ readonly welcomeLoginToRegister: "还没有账号?注册";
284
+ readonly welcomeLoginFailed: "登录失败,请检查账号与密码。";
285
+ readonly welcomeAccountExists: "这台电脑已经有账号了,请直接登录。";
286
+ readonly welcomeRegisterTitle: "注册账号";
287
+ readonly welcomeRegisterDescription: "账号只保存在本机。";
288
+ readonly welcomeRegisterName: "账号";
289
+ readonly welcomeRegisterEmail: "邮箱(可选)";
290
+ readonly welcomeRegisterPassword: "密码";
291
+ readonly welcomeRegisterPasswordConfirm: "确认密码";
292
+ readonly welcomeRegisterSubmit: "注册";
293
+ readonly welcomeRegisterToLogin: "已有账号?登录";
294
+ readonly welcomeRegisterFailed: "注册失败,请检查账号与密码长度(账号≥3,密码≥8)。";
295
+ readonly welcomeRegisterPasswordMismatch: "两次输入的密码不一致。";
296
+ readonly welcomePasswordShow: "显示密码";
297
+ readonly welcomePasswordHide: "隐藏密码";
298
+ readonly welcomeApiKey: "添加 API Key";
299
+ readonly welcomeKeyTitle: "添加一个 API Key 开始使用";
300
+ readonly welcomeKeyDescription: "配置 DeepSeek 官方模型,即可开始使用";
301
+ readonly welcomeKeyPlaceholder: "输入 API 密钥";
302
+ readonly welcomeKeySave: "保存并继续";
303
+ readonly welcomeKeyLater: "稍后配置";
304
+ readonly welcomeKeyBack: "返回登录";
305
+ readonly welcomeSessionExpired: "登录信息已失效,请重新登录";
306
+ readonly welcomeKeyBlank: "请输入 API 密钥。";
307
+ readonly welcomeKeyInvalid: "请仅输入 API 密钥,不要包含引号、空格或环境变量赋值。";
308
+ readonly welcomeKeyFailed: "无法保存 API 密钥,请重试。";
309
+ readonly welcomeContinueFailed: "无法打开工作区,请重试。";
310
+ readonly checkUpdatesMenu: "检查更新…";
311
+ readonly reloadPageMenu: "刷新页面";
312
+ readonly restartAppHostMenu: "重启应用与 Host";
313
+ readonly updateCheckFailedTitle: "更新检查失败";
314
+ readonly updateCheckFailed: "检查更新失败,请稍后重试。";
315
+ readonly updateDownloadFailed: "下载更新失败,请重试。";
316
+ readonly updateInstallFailed: "安装更新失败,请稍后重试。";
317
+ readonly updateCheckNetworkFailed: "检查更新失败,请检查网络连接后重试。";
318
+ readonly updateDownloadNetworkFailed: "下载更新失败,请检查网络连接后重试。";
319
+ readonly updateInstallNetworkFailed: "安装更新失败,请检查网络连接后重试。";
320
+ readonly unknownError: "未知错误";
321
+ readonly updateCheckTitle: "检查更新";
322
+ readonly updateCurrentDetail: "当前版本:{version}";
323
+ readonly updateCurrent: "已是最新版本";
324
+ readonly updateChecking: "正在检查更新…";
325
+ readonly updateDownload: "下载更新";
326
+ readonly updateDownloadedTitle: "新版本 {version} 已准备就绪";
327
+ readonly updateDownloadedDetail: "更新期间应用将暂时关闭,完成后会自动打开。";
328
+ readonly updateDownloadedDetailWindows: "更新期间应用将暂时关闭,完成后会自动打开。\n\n更新可能需要一些时间,请耐心等待,期间请勿重复启动应用。";
329
+ readonly updateClose: "关闭";
330
+ readonly updateAcknowledge: "确定";
331
+ readonly updateLater: "稍后更新";
332
+ readonly updateDownloading: "正在下载 {percent}%…";
333
+ readonly updateVerifying: "正在校验更新文件…";
334
+ readonly updateInstalling: "正在准备重启…";
335
+ readonly updateRetry: "重试更新";
336
+ readonly updateActiveTasks: "仍有进行中的任务";
337
+ readonly updateActiveTasksDetail: "更新将停止进行中的任务并重启应用,是否继续?";
338
+ readonly updateStopTasks: "停止任务并更新";
339
+ readonly updateTasksChanged: "有新任务开始运行,请重新确认是否停止任务并更新。";
340
+ readonly updateTasksUnavailable: "无法确认任务状态,请在工作区就绪后重试更新。";
341
+ readonly updateStopFailed: "未能安全停止任务,更新尚未安装,请稍后重试。";
342
+ readonly updateTechnicalDetails: "查看技术详情";
343
+ readonly updateTitle: "QiLin Desktop 更新";
344
+ readonly updateAvailable: "发现新版本 {version}";
345
+ readonly updateDetail: "下载完成后,可安装并重启应用。";
346
+ readonly installAndRestart: "安装并重启";
347
+ readonly later: "稍后";
348
+ readonly updateFailedTitle: "更新失败";
349
+ readonly mandatoryTitle: "请更新后继续使用";
350
+ readonly mandatoryDetail: "当前版本已停止支持,请更新后继续使用。确认安装并重启前,进行中的任务会继续运行。";
351
+ readonly mandatoryUnavailable: "暂时无法检查更新要求,请稍后重试。";
352
+ readonly policyLoginTitle: "登录测试环境";
353
+ readonly policyLoginRequired: "此测试版需要先通过飞书登录,才能检查更新要求。登录不会下载或安装更新。";
354
+ readonly policyLogin: "通过飞书登录";
355
+ readonly policyLoginFailed: "飞书登录未完成,请重试。";
356
+ readonly policyLoginLoading: "正在加载登录页面…";
357
+ readonly mandatoryNoRelease: "暂未找到适用的更新,请重新检查或联系支持人员。";
358
+ readonly mandatoryRefresh: "重新检查";
359
+ readonly mandatoryPage: "前往官网下载";
360
+ readonly mandatoryCopy: "复制下载链接";
361
+ readonly mandatoryPageFailed: "无法打开官网下载页面,请复制链接后在浏览器中打开。";
362
+ readonly mandatoryActionFailed: "操作失败,请重试。完成更新后才能继续使用应用。";
363
+ readonly mandatoryReady: "更新已准备就绪";
364
+ readonly mandatoryVersion: "新版本:{version}";
365
+ readonly mandatoryReadyDetail: "更新期间应用将暂时关闭,完成后会自动打开。";
366
+ readonly mandatoryDeferred: "进行中的任务会继续运行。请完成更新后再操作应用。";
367
+ readonly mandatoryContinue: "继续更新";
368
+ readonly mandatoryInspecting: "正在检查任务状态…";
369
+ readonly mandatoryStopping: "正在停止任务…";
370
+ readonly mandatoryRestarting: "应用即将重启,请稍候。";
371
+ readonly mandatoryDownloadFailed: "更新文件下载或准备失败,请重试。";
372
+ readonly mandatoryInstallFailed: "更新尚未安装,请重新检查任务后重试。";
373
+ readonly mandatoryOpenHelp: "页面未打开?";
374
+ readonly mandatoryReopen: "重新前往官网下载";
375
+ readonly mandatoryCopied: "链接已复制";
376
+ readonly mandatoryCopyFailed: "复制失败,请手动选择并复制下方链接。";
377
+ readonly mandatoryAddress: "下载链接";
378
+ readonly mandatoryNotification: "返回应用确认安装并重启。";
379
+ };
380
+ /** Locale payload exposed to the Desktop-owned renderer. */
381
+ export interface DesktopLocale {
382
+ readonly id: 'en' | 'zh-CN';
383
+ readonly messages: DesktopMessages;
384
+ }
385
+ /** Resolve Electron's locale to one shipped Desktop dictionary. */
386
+ export declare function resolveDesktopLocale(locale: string): DesktopLocale;
387
+ /**
388
+ * Choose a built-in dictionary from the shared preference, then ordered OS languages.
389
+ * @param preference - explicit locale.preference, or null when no language was selected.
390
+ * @param languages - operating-system languages in preference order.
391
+ * @returns the supported dictionary, falling back to English.
392
+ */
393
+ export declare function resolveDesktopStartupLocale(preference: string | null, languages: readonly string[]): DesktopLocale;
394
+ /** Replace named placeholders in one locale-owned message. */
395
+ export declare function formatDesktopMessage(message: string, values: Readonly<Record<string, string>>): string;
396
+ /**
397
+ * Select localized copy for an ordinary downloaded-update confirmation.
398
+ * @param messages - Selected Desktop dictionary.
399
+ * @param version - Prepared update version, including any prerelease suffix.
400
+ * @param platform - Operating system presenting the confirmation.
401
+ * @returns The versioned title and installation guidance.
402
+ */
403
+ export declare function desktopUpdateReadyConfirmation(messages: DesktopMessages, version: string, platform: string): {
404
+ message: string;
405
+ detail: string;
406
+ };
407
+ //# sourceMappingURL=locale.d.ts.map
@@ -0,0 +1,66 @@
1
+ /** Login-shell environment for POSIX Desktop launches that inherit only the session manager's environment. */
2
+ /** Validated login-shell read settings. */
3
+ export interface DesktopLoginShellConfig {
4
+ /** Deadline for each candidate shell, in milliseconds. */
5
+ readonly timeoutMs: number;
6
+ }
7
+ /** One candidate shell that did not produce an environment. */
8
+ export interface DesktopLoginShellFailure {
9
+ readonly shell: string;
10
+ /**
11
+ * `exit <code>`, terminating signal name, spawn error, `timeout`, `aborted`, or `unparsed`
12
+ * for output without both delimiters.
13
+ */
14
+ readonly reason: string;
15
+ }
16
+ /** Environment for the Host and the candidate failures that preceded it. */
17
+ export interface DesktopLoginShellResult {
18
+ /** `base` merged with the first successful shell's variables, or `base` itself when none succeeded. */
19
+ readonly environment: NodeJS.ProcessEnv;
20
+ readonly failures: readonly DesktopLoginShellFailure[];
21
+ }
22
+ /** Inputs of {@link readDesktopLoginShellEnvironment} that callers other than tests leave unset. */
23
+ export interface DesktopLoginShellReadOptions {
24
+ /** Operating system running Desktop; defaults to `process.platform`. */
25
+ readonly platform?: NodeJS.Platform;
26
+ /** Candidates in trial order; defaults to {@link loginShellCandidates}. */
27
+ readonly shells?: readonly string[];
28
+ /** Aborting kills the running candidate's process group and skips the remaining candidates. */
29
+ readonly signal?: AbortSignal;
30
+ }
31
+ /**
32
+ * Resolve login-shell read settings.
33
+ * @param env - Desktop process environment.
34
+ * @returns Validated per-candidate deadline; `QILIN_DESKTOP_LOGIN_SHELL_TIMEOUT_MS` defaults to 10000.
35
+ */
36
+ export declare function resolveDesktopLoginShellConfig(env: NodeJS.ProcessEnv): DesktopLoginShellConfig;
37
+ /**
38
+ * Candidate shells in order: the account record's login shell (not `$SHELL`), then fixed system shells.
39
+ * @returns Distinct absolute candidates; only the fixed shells when the account record is unreadable or empty.
40
+ */
41
+ export declare function loginShellCandidates(): readonly string[];
42
+ /**
43
+ * Extract the variables printed between the two delimiters of the dump command.
44
+ * @param stdout - Probe output, including anything rc files printed around the dump.
45
+ * @returns Variables, or undefined when both delimiters are not present.
46
+ */
47
+ export declare function parseLoginShellOutput(stdout: string): Record<string, string> | undefined;
48
+ /**
49
+ * Overlay login-shell variables on the inherited environment; shell values win except for
50
+ * probe-session variables and launcher-owned `QILIN_*` / `ELECTRON_*` names.
51
+ * @param base - Environment Desktop inherited.
52
+ * @param shell - Variables printed by the login shell.
53
+ * @returns A new environment; neither argument is modified.
54
+ */
55
+ export declare function mergeLoginShellEnvironment(base: NodeJS.ProcessEnv, shell: Readonly<Record<string, string>>): NodeJS.ProcessEnv;
56
+ /**
57
+ * Read the user's login-shell environment once; Windows GUI launches already inherit the registry
58
+ * environment, so `win32` returns `base` unchanged. Never rejects: each failing candidate is
59
+ * recorded and the next one tried, and `base` is returned when all fail or the read is aborted.
60
+ * @param base - Environment Desktop inherited.
61
+ * @param config - Validated read settings.
62
+ * @param options - Platform, candidates, and cancellation.
63
+ * @returns Host environment and the candidate failures that preceded it.
64
+ */
65
+ export declare function readDesktopLoginShellEnvironment(base: NodeJS.ProcessEnv, config: DesktopLoginShellConfig, options?: DesktopLoginShellReadOptions): Promise<DesktopLoginShellResult>;
66
+ //# sourceMappingURL=login-shell-environment.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1,7 @@
1
+ /** Dependency-free IPC names shared with the sandboxed mandatory-update preload. */
2
+ export declare const MANDATORY_IPC: {
3
+ readonly status: "qilin-desktop:mandatory-status";
4
+ readonly state: "qilin-desktop:mandatory-state";
5
+ readonly action: "qilin-desktop:mandatory-action";
6
+ };
7
+ //# sourceMappingURL=mandatory-update-ipc.d.ts.map
@@ -0,0 +1,83 @@
1
+ /** Mandatory-update policy, independent of local business traffic and updater artifacts. */
2
+ import { type AccountClientMetadata } from './account-types.ts';
3
+ /** Installed release identity; no field is supplied by a renderer. */
4
+ export interface DesktopPolicyIdentity {
5
+ readonly platform: 'win32' | 'darwin';
6
+ readonly bundledDshVersion: string;
7
+ readonly arch: 'x64' | 'arm64';
8
+ readonly channel: 'nightly' | 'latest';
9
+ }
10
+ /** Validated deployment choices; test authentication is explicitly enabled, never inferred from a redirect. */
11
+ export interface DesktopPolicyConfig {
12
+ readonly origin: string;
13
+ readonly allowedPageOrigins: readonly string[];
14
+ readonly allowedAuthOrigins: readonly string[];
15
+ readonly intervalMs: number;
16
+ readonly timeoutMs: number;
17
+ readonly maxBackoffMs: number;
18
+ readonly jitter: number;
19
+ readonly authentication: 'anonymous' | 'feishu-test';
20
+ }
21
+ /** A known block survives transport and parsing failures, but not a fresh no-force success. */
22
+ export interface DesktopPolicyState {
23
+ readonly blocking: boolean;
24
+ readonly checking: boolean;
25
+ readonly title?: string;
26
+ readonly detail?: string;
27
+ readonly page?: string;
28
+ readonly error?: 'unavailable' | 'authentication-required';
29
+ }
30
+ /**
31
+ * Resolve deployment JSON without guessing a production service or download destination.
32
+ * @param input - Parsed configuration with origin and allowedPageOrigins; absent configuration disables policy queries.
33
+ * @param allowLoopback - Explicit unpackaged/test permission for an HTTP 127.0.0.1 policy origin only.
34
+ * @returns Validated polling options, or undefined when unconfigured.
35
+ */
36
+ export declare function resolveDesktopPolicyConfig(input: unknown, allowLoopback?: boolean): DesktopPolicyConfig | undefined;
37
+ /**
38
+ * Validate the fallback page immediately before browser or clipboard use.
39
+ * @param value - Policy-provided page, never an updater feed or shell command.
40
+ * @param allowedOrigins - Exact HTTPS origins from deployment configuration.
41
+ * @returns Normalized allowed URL, or undefined for a missing/disallowed destination.
42
+ */
43
+ export declare function desktopPolicyPage(value: unknown, allowedOrigins: readonly string[]): string | undefined;
44
+ /** Owns one installed-client context, its in-flight request, and polling schedule. */
45
+ export declare class DesktopMandatoryUpdatePolicy {
46
+ private readonly config;
47
+ private readonly identity;
48
+ private readonly publish;
49
+ private readonly request;
50
+ private readonly client;
51
+ private readonly random;
52
+ private current;
53
+ private pending;
54
+ private controller;
55
+ private timer;
56
+ private disposed;
57
+ private failures;
58
+ private nextCheck;
59
+ /**
60
+ * @param config - Resolved deployment settings.
61
+ * @param identity - Installed software identity, fixed for this application build.
62
+ * @param publish - Receives policy changes without controlling downloads or existing tasks.
63
+ * @param request - Anonymous Fetch or the dedicated test-authentication Session transport.
64
+ * @param client - UI build version, language, and UTC offset, sampled for every check.
65
+ * @param random - Jitter source, replaceable for clock-driven tests.
66
+ */
67
+ constructor(config: DesktopPolicyConfig, identity: DesktopPolicyIdentity, publish: (state: DesktopPolicyState) => void, request: typeof fetch | undefined, client: () => AccountClientMetadata, random?: () => number);
68
+ /** Platform headers for one check; the calling UI's language and UTC offset are read now. */
69
+ private requestHeaders;
70
+ /** Latest policy; failures never erase a known mandatory decision. */
71
+ get state(): DesktopPolicyState;
72
+ /**
73
+ * Check immediately when manual, otherwise only when due; matching concurrent callers share one request.
74
+ * @param scenario - Trigger recorded in the query, independent of backend matching.
75
+ * @param manual - Bypass interval/backoff without bypassing request coalescing.
76
+ * @returns Current decision or retained decision with an error; disposed instances reject.
77
+ */
78
+ check(scenario: string, manual?: boolean): Promise<DesktopPolicyState>;
79
+ /** Abort the owned request and await settlement; late responses cannot publish or schedule work. */
80
+ dispose(): Promise<void>;
81
+ private setState;
82
+ }
83
+ //# sourceMappingURL=mandatory-update-policy.d.ts.map