protocol.ts 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. import type { RemoteAssetInstallMode } from "./remoteAssetInstallMode.js";
  2. import type { RemoteResourcePackageSelection } from "./remoteResourcePackages.js";
  3. import type { ProviderFamilyDomain } from "./model-provider-family.js";
  4. import type { ProviderFamilyConnectionSelectionSettings } from "./provider-family-connection-selection.js";
  5. import type { ZCodeProvider } from "./zcode-task-types-core.js";
  6. import type { WorkspacePurpose } from "./workspacePurpose.js";
  7. import type { DynamicWorkflowMode } from "./dynamic-workflow-feature.js";
  8. import type { EmbeddedBrowserViewportPreference } from "./browser-use/command-metadata.js";
  9. import type { AppToolSearchMode } from "./app-runtime-preferences.js";
  10. // ── Domain types ──
  11. export interface FileEntry {
  12. name: string;
  13. path: string;
  14. type: "file" | "directory";
  15. /** 旧远端服务端可能不返回;调用方应按 false 处理。 */
  16. isSymbolicLink?: boolean;
  17. }
  18. export interface FileStat {
  19. path: string;
  20. type: "file" | "directory";
  21. /** 文件字节数;旧远端服务端可能不返回,调用方需按 undefined 处理。 */
  22. size?: number;
  23. /** 文件最后修改时间;分享分块读取用它检测读取期间的并发改写。 */
  24. mtimeMs?: number;
  25. }
  26. /** 文件系统变更事件(目录级粒度) */
  27. export interface FileWatchEvent {
  28. /** 发生变更的目录路径 */
  29. dirPath: string;
  30. /**
  31. * 能由底层 watcher 确认时返回发生变化的完整路径。
  32. * 旧 Host、平台未返回 filename 或同一防抖窗口包含多个路径时省略,调用方应保守刷新。
  33. */
  34. changedPath?: string;
  35. }
  36. export interface FileTextSlice {
  37. path: string;
  38. content: string;
  39. offset: number;
  40. bytesRead: number;
  41. totalBytes: number;
  42. truncated: boolean;
  43. isBinary: boolean;
  44. }
  45. export interface FileMediaPreview {
  46. path: string;
  47. mediaType: string;
  48. dataBase64: string;
  49. totalBytes: number;
  50. }
  51. export interface FileBinaryPreview {
  52. path: string;
  53. dataBase64: string;
  54. totalBytes: number;
  55. }
  56. export interface WorkspaceFileEntry {
  57. name: string;
  58. path: string;
  59. relativePath: string;
  60. type: "file" | "directory";
  61. }
  62. export interface SystemInfo {
  63. homedir: string;
  64. platform: string;
  65. }
  66. /**
  67. * 支持的界面语言(BCP-47)。顺序即设置页下拉的展示顺序。
  68. * 新增语言的步骤见 docs/i18n/ui-locales.md。
  69. */
  70. export const SUPPORTED_LOCALES = ["zh-CN", "en-US", "ja-JP", "ru-RU", "ko-KR"] as const;
  71. /** 支持的语言 */
  72. export type Locale = (typeof SUPPORTED_LOCALES)[number];
  73. /** 界面语言偏好;system 表示跟随当前运行端系统语言。 */
  74. export type LocalePreference = "system" | Locale;
  75. /** ZCode 运行中继续输入时的交互行为 */
  76. export type ZCodeInteractionBehavior = "queue" | "guide";
  77. /** 桌面端 Electron 自动更新发布通道。 */
  78. export type ElectronReleaseChannel = "stable" | "preview";
  79. /** Windows Bash 工具可使用的集成终端 shell 方言。 */
  80. export type IntegratedTerminalShellDialect = "cmd" | "git-bash";
  81. /** 设置页中 Windows Bash shell 的用户选择。 */
  82. export type IntegratedTerminalShellSelection =
  83. | { mode: "auto" }
  84. | {
  85. mode: "shell";
  86. dialect: IntegratedTerminalShellDialect;
  87. id: string;
  88. label: string;
  89. path: string;
  90. };
  91. /** 当前 host 可识别的 Windows shell 选项。 */
  92. export interface IntegratedTerminalShellOption {
  93. dialect: IntegratedTerminalShellDialect;
  94. id: string;
  95. label: string;
  96. path: string;
  97. source: "system" | "path";
  98. }
  99. /** 默认语言 */
  100. export const DEFAULT_LOCALE: Locale = "zh-CN";
  101. // ── Workspace / Tab ──
  102. /** 标签页唯一标识 */
  103. export type TabId = string;
  104. /** 单个标签页的状态 */
  105. export interface TabState {
  106. id: TabId;
  107. /** workspace 绝对路径 */
  108. workspacePath: string;
  109. /** 显示名称,通常为路径最后一段 */
  110. label: string;
  111. }
  112. export interface SSHRemoteTargetSnapshot {
  113. kind: "ssh";
  114. host: string;
  115. port?: number;
  116. username: string;
  117. /** 用户建立连接时选择的 SSH config Host alias,仅用于 UI 展示。 */
  118. sshConfigAlias?: string;
  119. privateKeyPath?: string;
  120. assetInstallMode?: RemoteAssetInstallMode;
  121. resourcePackages?: RemoteResourcePackageSelection;
  122. /**
  123. * SSH 密码不会写入 setting.json。
  124. * 这里只保存 credentialService 的键名,恢复时再去安全存储读取真实密码。
  125. */
  126. passwordCredentialKey?: string;
  127. /**
  128. * 私钥口令不会写入 setting.json。
  129. * 这里只保存 credentialService 的键名,恢复时再去安全存储读取真实口令。
  130. */
  131. privateKeyPassphraseCredentialKey?: string;
  132. }
  133. export interface WSLRemoteTargetSnapshot {
  134. kind: "wsl";
  135. distro?: string;
  136. user?: string;
  137. }
  138. export interface DockerRemoteTargetSnapshot {
  139. kind: "docker";
  140. container: string;
  141. }
  142. export interface ServerRemoteTargetSnapshot {
  143. kind: "server";
  144. url: string;
  145. name?: string;
  146. workspacePath?: string;
  147. serverId?: string;
  148. /**
  149. * Server token 不写入 setting.json。
  150. * 这里只保存 credentialService 的键名,恢复时再读取真实 token。
  151. */
  152. tokenCredentialKey?: string;
  153. }
  154. export type RemoteTargetSnapshot =
  155. | SSHRemoteTargetSnapshot
  156. | WSLRemoteTargetSnapshot
  157. | DockerRemoteTargetSnapshot
  158. | ServerRemoteTargetSnapshot;
  159. export interface RemoteWorkspaceSessionSnapshot {
  160. /** 远程 workspace 的真实绝对路径 */
  161. workspacePath: string;
  162. /** 用户可见的 workspace 分类;旧远端快照缺失时按 project 兼容读取。 */
  163. workspacePurpose?: WorkspacePurpose;
  164. /** 发起远程连接时的本机 workspace 路径,仅用于 MCP filesystem 路径改写。 */
  165. localWorkspacePath?: string;
  166. /** 远程 workspace 的稳定身份键(authority + canonicalPath)。 */
  167. workspaceIdentity?: string;
  168. /** 远程连接目标的可恢复快照 */
  169. target: RemoteTargetSnapshot;
  170. /** 最近一次成功打开该 workspace 的时间戳 */
  171. lastOpenedAt: number;
  172. /** 最近一次恢复/重连结果 */
  173. lastConnectionStatus: "connected" | "failed";
  174. /** 最近一次失败原因;成功后清空 */
  175. lastConnectionError?: string;
  176. /** 最近一次失败的错误码,与 lastConnectionError 同写同清;等待点也写成失败,只看文案分不清两类 */
  177. lastConnectionErrorCode?: string;
  178. }
  179. export interface LocalWorkspaceSessionEntry {
  180. kind: "local";
  181. workspacePath: string;
  182. /** 项目展示分类;旧数据缺省为 project,conversation 仍使用真实 workspacePath 作为 cwd/key。 */
  183. workspacePurpose?: WorkspacePurpose;
  184. }
  185. export interface RemoteWorkspaceSessionEntry extends RemoteWorkspaceSessionSnapshot {
  186. kind: "remote";
  187. }
  188. export type PersistedWorkspaceSessionEntry =
  189. | LocalWorkspaceSessionEntry
  190. | RemoteWorkspaceSessionEntry;
  191. // ── Process Monitor ──
  192. /** 资源管理器分类:基础服务 / 任务进程 / 内置插件 / 社区插件 */
  193. export type ResourceUsageCategory = "base" | "task" | "builtin-plugin" | "community-plugin";
  194. /** 基础服务分组键;插件分组键为插件名或 MCP server name */
  195. export type ResourceUsageBaseGroupKey = "main" | "gpu" | "renderer" | "host" | "cli" | "utility";
  196. /** 资源管理器中的一个进程行(CPU 为整机归一化百分比,内存为字节) */
  197. export interface ResourceUsageProcess {
  198. pid: number;
  199. /** 进程显示名,如 zcode-main / zcode-agent-zcode-demo / node_repl */
  200. name: string;
  201. category: ResourceUsageCategory;
  202. groupKey: string;
  203. groupLabel: string;
  204. cpuPercent: number;
  205. memoryBytes: number;
  206. /** false 表示只知道拓扑,指标尚未采到(显示为 —) */
  207. sampled: boolean;
  208. }
  209. /** Host 侧采样得到的外部进程行(Agent / MCP / 终端等),由 main 合并进快照 */
  210. export type HostResourceUsageProcess = Omit<ResourceUsageProcess, "sampled">;
  211. /** 资源管理器一次完整快照,由 main 进程合并 Electron 指标、系统总量与 Host 采样后返回 */
  212. export interface ResourceUsageSnapshot {
  213. sampledAt: number;
  214. logicalCpuCount: number;
  215. system: {
  216. cpuPercent: number;
  217. memoryTotalBytes: number;
  218. memoryUsedBytes: number;
  219. };
  220. app: {
  221. cpuPercent: number;
  222. memoryBytes: number;
  223. };
  224. processes: ResourceUsageProcess[];
  225. }
  226. export interface AppSettings {
  227. /** 当前 App/Host 不再显示提交前体验套餐推荐;不改变任何入口的模型选择。 */
  228. startPlanRecommendationDismissed?: boolean;
  229. recentProjects: string[]; // 最近项目列表,最多保留 10 个
  230. /**
  231. * 项目显示别名(workspaceKey → 用户自定义名称)。纯展示层覆盖:不改变
  232. * workspacePath / workspaceIdentity(身份与执行路径语义不变,见 task-realtime-core
  233. * 的 resolveWorkspaceKey),项目关闭重开后别名仍在。key 用
  234. * workspaceIdentity?.trim() || workspacePath 与全局 workspaceKey 规则一致。
  235. */
  236. workspaceAliases?: Record<string, string>;
  237. locale: Locale; // 界面语言
  238. /**
  239. * 用户覆盖的快捷键绑定(命令 ID → 绑定串数组,格式见 shortcutCommands.ts)。
  240. * 只存用户覆盖:未覆盖的命令不落盘,读取时与 SHORTCUT_COMMANDS 默认绑定合并;
  241. * 覆盖语义为整组替换(如 openCommandCenter 的双默认绑定被覆盖时同时失效)。
  242. */
  243. shortcutBindings?: Record<string, string[]>;
  244. /** 界面语言偏好;locale 保存偏好解析后的实际语言,供 main/menu/远控等非浏览器上下文使用。 */
  245. localePreference?: LocalePreference;
  246. /** 是否尽量继承系统终端 profile、shell 环境和字体 */
  247. terminalInheritSystemProfile?: boolean;
  248. /** 用户显式覆盖的终端字体;为空时从系统终端配置自动探测 */
  249. terminalFontFamily?: string;
  250. /** Windows 下 Bash 工具使用的本机 shell;未配置时自动选择。 */
  251. integratedTerminalShell?: IntegratedTerminalShellSelection;
  252. /** HTTP/HTTPS 出口代理,例如 http://127.0.0.1:7890;为空时直连。下次启动 app/agent 生效。 */
  253. httpProxy?: string;
  254. /** 代理绕过规则,例如 localhost,127.0.0.1,.example.com;只在 httpProxy 存在时影响 renderer,agent/tool 仍按显式环境使用。 */
  255. httpProxyNoProxy?: string;
  256. /** 自定义 PEM 根证书路径;下次启动 app/agent 时用于 renderer 校验与 agent NODE_EXTRA_CA_CERTS。 */
  257. httpProxyCaCertPath?: string;
  258. /** 本机预装工具的自动准备偏好;由预装工具进程写入。 */
  259. preinstalledToolsAutoInstall?: boolean;
  260. /** Agent 禁用预装版本的工具;缺省全部开启,仅由本机预装进程写入。 */
  261. preinstalledToolsAgentDisabled?: string[];
  262. /**
  263. * 内置浏览器忽略 HTTPS 证书校验错误(自签名、过期、域名不匹配等),用于访问内网测试站点。
  264. * 只影响内置浏览器出口,不影响 ZCode 自身对后端与模型 API 的请求。默认关闭,重启后生效。
  265. */
  266. embeddedBrowserAllowInsecureCertificates?: boolean;
  267. /** 文件树单击本地 .html 文件时在内置浏览器打开(默认 false:沿用源码预览)。右键「打开」始终是源码预览。 */
  268. fileTreeHtmlClickOpensBrowser?: boolean;
  269. /** 人类用户主动打开 Browser tab 时的一次性显示偏好;Agent Browser Use 不读写。 */
  270. embeddedBrowserViewportPreference?: EmbeddedBrowserViewportPreference;
  271. /**
  272. * 用户已在设置页关闭输入框的「电脑操作」按钮(内部 hidden 态)。
  273. * 取 hidden 语义而非 visible:undefined 即默认显示,老用户无需数据迁移。
  274. * 关闭后按钮不再渲染,且不因重启或版本更新自愈,仅能在设置页重新开启。
  275. */
  276. computerUseComposerEntryHidden?: boolean;
  277. /** 自动归档旧会话的总开关 */
  278. taskAutoArchiveEnabled?: boolean;
  279. /** 自动归档修复后的一次性关闭标记;只用于设置迁移,不参与归档判断。 */
  280. taskAutoArchiveResetVersion?: 1;
  281. /** 自动归档阈值;当任务最后更新时间早于该天数时允许被归档 */
  282. taskAutoArchiveOlderThanDays?: number;
  283. /** 桌面端关闭窗口时隐藏到托盘驻留(Windows/Linux;spec:docs/desktop/linux-close-to-tray.md) */
  284. closeToTrayOnWindows?: boolean;
  285. /** 存在执行中的闲时任务时阻止系统闲置休眠(手动开关,防不了合盖)。 */
  286. keepAwakeWhileRunning?: boolean;
  287. /** 本机 offline push 上报开关,缺省视为开启(spec:docs/web-remote-control/mobile-event-push.md 6.4)。 */
  288. mobilePushEnabled?: boolean;
  289. /** Windows 关闭到托盘默认值是否已执行过一次性迁移;只用于设置迁移,不参与业务判断。 */
  290. closeToTrayOnWindowsMigrationInitialized?: boolean;
  291. /**
  292. * Linux 关闭到托盘默认值(关)是否已执行过一次性归位迁移。
  293. * shared 迁移无平台概念、曾把存量 Linux 用户归为 true,而 Linux 此前无设置入口,
  294. * main 进程 bootstrap 借此标记把首次启动的 Linux 用户一次性归位为默认关。
  295. */
  296. closeToTrayLinuxMigrationInitialized?: boolean;
  297. /** 桌面端全局页面缩放档位;用于重启后恢复界面缩放,Web/手机端忽略。 */
  298. desktopZoomLevel?: number;
  299. /** 桌面主窗口最近一次非最大化宽高及最大化状态;Web/手机端忽略。 */
  300. desktopWindowSize?: {
  301. width: number;
  302. height: number;
  303. maximized: boolean;
  304. };
  305. /** 桌面端 Chromium 硬件加速开关;只在下次启动 main 进程早期生效,Web/手机端忽略。 */
  306. desktopChromiumHardwareAccelerationEnabled?: boolean;
  307. /** 是否在消息流中展示模型思考过程 */
  308. messageStreamShowReasoning?: boolean;
  309. // TODO(settings-schema-version): 能证明所有受支持升级路径都已执行本次迁移后,改用统一 settings schema version,并一起删除此 marker、迁移函数和持久化判断。
  310. /** 显示模型思考过程的默认值是否已执行过一次性迁移;只用于设置迁移,不参与消息渲染判断。 */
  311. messageStreamShowReasoningMigrationInitialized?: boolean;
  312. /** 是否在消息流中展示 todo 工具渲染;不影响摘要面板的 todo */
  313. messageStreamShowTodos?: boolean;
  314. /** ZCode 运行中继续输入时,是排队到下一轮,还是引导到下一次工具调用后运行 */
  315. zcodeInteractionBehavior?: ZCodeInteractionBehavior;
  316. /** Agent 提问五分钟无人回答时是否允许自动继续;缺失按开启兼容旧配置。 */
  317. askUserQuestionAutoResolutionEnabled?: boolean;
  318. /** 默认关闭,控制对话中的插件发现和推荐;设置页手动安装保持可用。 */
  319. pluginAutoRecommendationEnabled?: boolean;
  320. /** 是否完整保留 Model I/O;开启后不轮转、不限额重置、不压缩或裁剪,鉴权信息仍会脱敏。 */
  321. modelIoFullRetentionEnabled?: boolean;
  322. /**
  323. * 用户选的动态工作流模式(docs/dynamic-workflow/launch.md「The user's choice」)。缺席 = 跟随服务端
  324. * 提供的模式;只在功能已提供时生效。选回提供的模式时删除该字段,未改动的安装继续跟随服务端翻转。
  325. */
  326. dynamicWorkflowMode?: DynamicWorkflowMode;
  327. /** 已启用的内置 Agent CLI;UI 对外仍展示为“Install”,底层语义保持为启用内置能力。 */
  328. enabledBuiltinAgentCliProviders?: ZCodeProvider[];
  329. /** 设置页中每个 Provider Family 当前唯一的结构化连接选择。 */
  330. providerFamilyConnectionSelections?: ProviderFamilyConnectionSelectionSettings;
  331. /** 用户通过 WelcomeScreen 成功连接后确认的 ZAI / BigModel provider family 运行域。 */
  332. providerFamilyDomain?: ProviderFamilyDomain;
  333. /** 最近一次设置或清空 providerFamilyDomain 的时间。 */
  334. providerFamilyDomainUpdatedAt?: number;
  335. /** 旧 oauth/provider 状态是否已经尝试迁移到 providerFamilyDomain。 */
  336. providerFamilyDomainMigrated?: boolean;
  337. /** 新建或冷恢复 Session 是否为 Bash 注入 bfs/ugrep 增强;默认启用。 */
  338. nativeSearchEnhancementsEnabled?: boolean;
  339. /** 新建或冷恢复时读取;已有 Runtime 保持原策略。 */
  340. toolSearchMode?: AppToolSearchMode;
  341. /** token 预算提醒;新建或冷恢复时读取,已有 Runtime 保持原值。默认关闭。 */
  342. totalTokensReminderEnabled?: boolean;
  343. /** Agent 是否总在后台运行;新建或冷恢复时读取,已有 Runtime 保持原值。默认开启。 */
  344. agentAlwaysBackgroundEnabled?: boolean;
  345. /** 新建或冷恢复 Session 是否启用 Memory;默认关闭。 */
  346. memoryEnabled?: boolean;
  347. /** Agent 回复语言(自由文本,未设置时跟随对话语言);只由 Main 写入,见 docs/i18n/agent-reply-language.md。 */
  348. replyLanguage?: string;
  349. onboardingOccupation?:
  350. | "office"
  351. | "developer"
  352. | "independent"
  353. | "infrastructure"
  354. | "product"
  355. | "design"
  356. | "student"
  357. | "creator"
  358. | "operations"
  359. | "marketing"
  360. | "finance"
  361. | "accounting"
  362. | "legal"
  363. | "other"
  364. | null;
  365. proactiveSuggestionsEnabled?: boolean;
  366. /** 新版只保存活动执行目录;不表达项目/连接成员,null 表示明确清空。 */
  367. lastActiveWorkspace?: PersistedWorkspaceSessionEntry | null;
  368. /** Host 从项目/本机入口派生,供旧版降级读取;新版不作为入口真相。 */
  369. lastWorkspaceSession?: PersistedWorkspaceSessionEntry[];
  370. /** 每个 Source Server 已解析的 canonical conversation backing workspace。 */
  371. remoteConversationWorkspaceBySourceServerId?: Record<
  372. string,
  373. {
  374. workspacePath: string;
  375. lastResolvedAt: number;
  376. }
  377. >;
  378. /** R3 控制端已识别的 Source Server;运行态仍由远端 Server 权威提供。 */
  379. sourceServers?: import("./source-server/contracts.js").SourceServerRecord[];
  380. /** R3 到达 Source Server 的线路;只保存 credential key,不保存 secret。 */
  381. connectionProfiles?: import("./source-server/contracts.js").ConnectionProfile[];
  382. /** R3 workspace 打开历史;连接线路与 workspace 实体分离。 */
  383. sourceServerWorkspaceHistory?: import("./source-server/contracts.js").SourceServerWorkspaceHistoryEntry[];
  384. /** 桌面端启动时是否执行 Source Server 静默重连;缺失按 true 兼容旧设置。 */
  385. remoteStartupAutoReconnectEnabled?: boolean;
  386. sourceServerDirectoryMigrationVersion?: 1;
  387. /** 旧客户端只接受 2;保留回滚兼容,新介绍不使用该字段判断已读。 */
  388. remoteBoundaryOnboardingVersion?: 2;
  389. /** 仅表示用户明确确认持续运行介绍。 */
  390. remoteBoundaryIntroAcknowledgedVersion?: 1;
  391. /** 上次关闭时激活的 tab 索引 */
  392. lastActiveTabIndex?: number;
  393. /** 每个 workspace 的最后活跃 taskId,下次打开自动恢复 */
  394. lastActiveTaskByWorkspace?: Record<string, string>;
  395. /** 数据目录的根路径(替代 homedir),默认为 os.homedir();.zcode/v2 后缀不变 */
  396. dataBaseDir?: string;
  397. /** 自动更新安装完成后,等待首次启动展示的版本说明 */
  398. pendingPostUpdateReleaseNotes?: {
  399. version: string;
  400. title: string;
  401. markdown: string;
  402. releaseDate?: string;
  403. releaseNotesByLocale?: Partial<Record<Locale, { title: string; markdown: string }>>;
  404. };
  405. /** 设置页“接收 preview 自动更新”偏好;仅桌面端自动更新读取。 */
  406. receivePreviewUpdates?: boolean;
  407. /** 设置页/更新弹窗“以后自动下载并安装更新”偏好;仅桌面端自动更新读取。 */
  408. autoDownloadAndInstallUpdates?: boolean;
  409. /** 用户跳过的 Electron 自动更新版本;按通道隔离,避免 stable / preview 互相遮挡。 */
  410. skippedElectronUpdateVersions?: Partial<Record<ElectronReleaseChannel, string>>;
  411. /** 首次启动设置同步提示是否已消费;只表示弹窗不再出现,不代表导入成功。 */
  412. settingsSyncFirstRunPromptHandled?: boolean;
  413. /** 外部 Web 远控 relay 的非敏感设备身份;passHash 必须存 credentialService。 */
  414. /** V2 非敏感注册身份;JWT 和一次性 token 不持久化于 AppSettings。 */
  415. webRemoteControlRelayV2Device?: {
  416. deviceSid: string;
  417. userId: string;
  418. endpointOrigin: string;
  419. };
  420. webRemoteControlExternalRelayDevice?: {
  421. deviceSid: string;
  422. };
  423. /** 上次成功开启 Web 远控时的目标;缺失表示用户已明确关闭,不自动恢复。 */
  424. webRemoteControlLastEnabledContext?: {
  425. workspacePath: string;
  426. workspaceIdentity?: string;
  427. initialTaskId?: string;
  428. };
  429. /** 设置页里的临时 endpoint override;正式/测试默认 base url 由 ZCODE_BASE_URL env 管理。 */
  430. zcodeEndpointOrigin?: string;
  431. }