Repository navigation
feat: multi-root workspace registry and source-folder management - #4336
Conversation
…tion workspaces.json v2 adds optional additional_dirs (plus create-time idempotency keys) on top of v1 entries with zero migration, and the writer now preserves unknown fields so mixed-version round-trips only drop what they do not know. Workspace ids split into two namespaces: wd_ hash identities stay the implicit channel (TUI/CLI/VSCode via createOrTouch, idempotent and alias-folding as before), while explicit registry creates mint wm_ uuid identities that may share a root with a hash entry. Alias resolution and list dedupe only fold wd_ spellings, delete tombstones only the id's own wd_ alias chain, and wm_-bucket session lines no longer feed implicit registry rebuild. Session attribution follows the channel: SDK workspaceIdsFor is locked to the workDir hash bucket so directory views are unchanged, while POST /sessions with an explicit workspace_id lands in that bucket directly. WorkspaceDirsService gains a registry source, injecting the registry dir set minus cwd into every workspace scope alongside local.toml and ephemeral dirs.
POST /workspaces now mints a fresh wm_ uuid per call (single-root
included; same-path duplicates stay unmerged) and accepts
additional_dirs plus a client idempotency_key for retry-safe creation.
PATCH /workspaces/{id} learns additional_dirs with whole-list replace
semantics so edit clients submit name and dirs in one transaction; dir
validation reuses the add-dir chain (absolutize, stat, dedupe,
not-the-root) with 40001/40409/40410. The wire shape gains
additional_dirs (default []) and workspace_id params accept wm_ ids,
keeping REST and WS event.workspace.* payloads aligned.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45f60a4381
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved workspace isolation, update forwarding, and session lifecycle regressions affect access boundaries and existing functionality.
6 open issues
Scope explicit workspaces by bound workspace ID · New Handle null catalogs during save recovery · New Add additionalDirs to the workspace update schema · New Resume sessions from deleted explicit workspaces · New Validate workspace directories before session creation · New Preserve normalized-root lookup for implicit workspaces · New
What changed in this PR
Adds the server-side foundation for multi-root workspaces, separating explicit desktop/web workspaces from implicit directory-based workspaces used by CLI and SDK clients.
Changes:
- Introduces registry v2, explicit workspace IDs, retry deduplication, and channel-specific session attribution.
- Adds source-folder management through REST, WebSocket payloads, and live engine updates.
- Expands tests and updates English and Chinese API documentation.
| File | Description |
|---|---|
packages/node-sdk/src/sdk-rpc-client-v2.ts |
Changes implicit session-bucket lookup. |
packages/klient/test/facade.test.ts |
Updates workspace response fixtures. |
packages/klient/src/contract/global/workspaces.ts |
Adds source folders to workspace responses. |
packages/kap-server/test/workspaces.test.ts |
Tests explicit IDs, attribution, and folder management. |
packages/kap-server/test/workspaceLayout.test.ts |
Expects registry format v2. |
packages/kap-server/src/transport/ws/v1/sessionEventBroadcaster.ts |
Includes source folders in lifecycle payloads. |
packages/kap-server/src/routes/workspaces.ts |
Implements explicit creation and folder updates. |
packages/kap-server/src/routes/sessions.ts |
Preserves explicit session-bucket selection. |
packages/kap-server/src/protocol/workspace.ts |
Extends workspace IDs and request schemas. |
packages/agent-core-v2/test/workspace/workspaceInstance/workspaceInstanceManager.test.ts |
Updates manager fixtures and dependencies. |
packages/agent-core-v2/test/workspace/workspaceDirs/workspaceDirsService.test.ts |
Tests registry-folder merging and live updates. |
packages/agent-core-v2/test/app/workspaceAliases/workspaceAliasesService.test.ts |
Tests separation of explicit and implicit aliases. |
packages/agent-core-v2/test/app/workspace/workspaceService.test.ts |
Covers registry creation, persistence, and deletion. |
packages/agent-core-v2/test/app/sessionExport/sessionExport.test.ts |
Updates workspace service stubs. |
packages/agent-core-v2/src/workspace/workspaceInstance/workspaceInstanceManagerService.ts |
Passes registry dependencies to programs. |
packages/agent-core-v2/src/workspace/workspaceDirs/workspaceDirsService.ts |
Merges registry folders into active workspace directories. |
packages/agent-core-v2/src/program/programDependencies.ts |
Declares registry dependencies. |
packages/agent-core-v2/src/program/program.ts |
Supplies registry dependencies to directory services. |
packages/agent-core-v2/src/app/workspaceAliases/workspaceAliasesService.ts |
Separates alias namespaces and supports index-only lookup. |
packages/agent-core-v2/src/app/workspace/workspaceService.ts |
Implements explicit creation, touching, and folder replacement. |
packages/agent-core-v2/src/app/workspace/workspacePersistence.ts |
Extends persisted registry types. |
packages/agent-core-v2/src/app/workspace/workspaceAlias.ts |
Limits folding and rebuilds to implicit workspaces. |
packages/agent-core-v2/src/app/workspace/workspace.ts |
Extends workspace service interfaces. |
packages/agent-core-v2/src/app/workspace/fileWorkspacePersistence.ts |
Persists registry v2 and preserves unknown fields. |
packages/agent-core-v2/src/_base/utils/workdir-slug.ts |
Adds implicit workspace-ID detection. |
docs/zh/reference/server-api.md |
Documents the workspace API changes in Chinese. |
docs/en/reference/server-api.md |
Documents the workspace API changes in English. |
Review effort: Balanced
…oots
resolveWithin no longer rejects absolute paths outright: any path
inside the workspace dir set (cwd plus the merged additional dirs)
passes the same containment and symlink guards as cwd-relative input,
while paths outside the set still fail with fs.path_escapes. fs:list
keys absolute-path responses relative to the requested root ('.' for
the top, request-root-relative for children) and resolves gitignore
rules against that root, so clients can switch the file-tree base
between a workspace's source folders without key-space drift.
Relative-path behavior is byte-identical.
…rkspace dir
Request-anchored keying broke deep browsing: listing a subdirectory of
an additional root re-anchored entry keys at that subdirectory, so the
client tree's key space shifted per request. Keys are now anchored at
the workspace dir (workdir or merged additional dir, longest match)
that contains the requested path, so a source folder has one stable
key space ('docs', 'docs/note.md') no matter which subpath is listed.
The longest-match comparison also no longer ties out additional roots
whose path length equals the workdir's.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2cc2ce5192
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
workspaceIdsFor now unions the directory's own hash bucket (plus spelling aliases) with every registered workspace whose dir set (root + additionalDirs) contains the directory, whether the directory is the workspace's primary or a member root. TUI /sessions, startup restore, kimi session/fork/export, and the VS Code folder session list all inherit the widened view. REST and desktop listing stay bucket-strict.
IWorkspaceService.setPrimary swaps root with an additional dir
atomically — the workspace id, session bucket, and all sessions are
untouched — and POST /workspaces/{id}/primary exposes it with
in-set/existence validation (40001/40409/40410). After a swap the
workspace instance is closed so the next materialization runs on the
new primary (local.toml follows the primary per the dir-merge rules);
registry-driven dirs keep flowing to live scopes through the
persistence change event.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 10cbac24ca
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
local.toml's workspace.additional_dir is now a legacy compatibility
input: it keeps being read and honored, is imported into the registry
once when a workspace is created or first edited (POST
/workspaces/{id}/import-project-config, and automatically on POST
/workspaces), and is cleared from the file after a successful import
while other keys are kept. TUI /add-dir 'remember' now writes the
registry entry directly (wm_ scope to the wm_ entry, hash scope to the
hash entry, registering on demand) instead of appending local.toml,
and the redundant POST /workspaces/{id}/add-dir endpoint is removed —
source-folder management lives on the workspace resource itself.
|
❌ Nix build failed |
…ce routes The previous commit accidentally swept an in-progress trust-store refactor (IWorkspaceTrustStore import, resolveTrust via the store, and its no-materialization test) into the add-dir removal — those files are not part of this branch. This restores the two contaminated files to their intended contents: the import-project-config endpoint and its tests, the add-dir endpoint and its tests removed, nothing else.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8a9bb83bfc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
… constructor A swept-in worktree change raised the filler count for a constructor parameter that does not exist on this branch, which misaligned the unit-host factory argument and failed the whole file on CI.
…dirs endpoint local.toml becomes a purely read-only legacy input: nothing in core writes it anymore. Workspace creation no longer merges the primary's additional_dir, and the import-project-config endpoint (unreleased) is removed together with the registry-side importProjectConfig method and the clear-after-import write path. Migration is driven explicitly by clients through the new GET /workspaces/project-config-dirs endpoint, which resolves a project's local.toml additional_dir without mutating the registry or the file, so a create/edit form can union the result and persist through the normal save path.
…aces Workspaces now carry a persisted kind: managed for explicitly created entries (wm_ ids) and implicit for directory-anchored ones (wd_ ids, including everything that predates the field). The kind rides through WorkspaceMeta into the workspace DI scope, so WorkspaceDirsService gates on a stored fact rather than the id string format. Managed workspaces treat the registry as the single source of truth: their sessions no longer merge or watch the project's local.toml. Implicit workspaces keep the legacy merge untouched, so TUI/CLI sessions anchored by cwd see no behavior change. The kind is exposed on the kap-server workspace wire and mirrored in the klient contract.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 27b2113d8b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Migrate the registry to projects.json without rewriting the legacy file. Serialize cross-process updates and preserve unrelated records and extension fields.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2cababb5b4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b917d41e33
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 638f0e770d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 730cca00a1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…t land yet Both need multi-root workspace registration (MoonshotAI#4336): the REST create and update schemas carry only `root` and `name`, so there is no `additional_dirs` field to pass through or to de-duplicate. MoonshotAI#4511's fs half is already in place — resolveWorkspaceFs forwards ws.additionalDirs — so it stays in_progress with that note rather than being closed or signed off.
First slice of upstream MoonshotAI/kimi-code 093e8f4 (MoonshotAI#4336). The registry only had `createOrTouch`, which derives an id from the root path and cannot carry a name or source folders from the caller. Managed creation arrives alongside it: - `create({ root, name?, additionalDirs?, idempotencyKey? })` mints a `wm_` id, keeps the kind `managed`, and records the idempotency key in the catalog so a retried request returns the same workspace, including across a restart. - `touch(id)` bumps `lastOpenedAt` after re-checking the root still exists, and `setPrimary(id, path)` swaps a registered source folder into the root, moving the old root into the folder list. - `additionalDirs` are validated and de-duplicated by root key, and a directory equal to the root itself is dropped. Fork adaptations: the catalog keeps the fork's `deletedIds` shape and gains an optional `idempotencyKeys` map persisted next to it; `createOrTouch` is untouched, so the fork's hash-id path and its `fs.path_not_found` mapping stay exactly as they were. Not in this slice: `readProjectConfigDirs` needs the project local config, which lives in the node-fs backend scope and is not injectable into an app-scoped service here. Verified: agent-core-v2 typecheck clean, the workspace service suite is 34 pass / 1 skip / 0 fail including three new cases for create, retry dedupe, touch and setPrimary, and check:no-comments is green.
Second slice of upstream MoonshotAI/kimi-code 093e8f4 (MoonshotAI#4336). `POST /workspaces` now accepts `additional_dirs` and `idempotency_key` and routes to the new managed creation when either is present, while a bare `root`/`name` keeps the existing create-or-touch behaviour. The workspace wire object carries `kind` and `additional_dirs`, and ids may now be either the existing `wd_<slug>_<hash12>` form or the new `wm_<uuid>`. The new route case pins the whole path: a managed id, `kind: managed`, the source folder echoed back, and a retried request returning the same workspace. Verified: kap-server typecheck clean, the workspaces suite is 24 pass / 1 fail, where that failure (legacy split-bucket session counts) fails identically before this change, and check:no-comments is green.
…MoonshotAI#4513 MoonshotAI#4336 is in_progress: d07cc07 adds managed creation with retry-safe ids and 0390f64 puts source folders on the REST and wire surfaces. MoonshotAI#4513 lands on top of that in 718a3ae and is closed against a route probe. MoonshotAI#4511 keeps its fs-side forwarding, but its route-level cross-folder search test is still missing, so it stays in_progress with a manual probe rather than borrowing the workspace-creation case as evidence.
Port of the search half of upstream MoonshotAI/kimi-code 093e8f4 (MoonshotAI#4336). `fs:search` walked only the work directory, so a file living in a registered source folder was invisible to the tool the model uses to find files. The fuzzy branch now walks each root with its own gitignore matcher and reports a non-primary root's hits as root-specific paths, matching what `fs:suggest` has always done. Fork adaptations: the empty-query branch still lists the work directory only. Listing a second root means handing `list` an absolute path, which this fork's `resolveWithin` refuses by design; giving it a per-root anchor is the remaining part of the multi-root filesystem work and is not smuggled in here. The added case searches a workspace with one source folder and fails when the walk is narrowed back to the work directory.
Port of the list half of upstream MoonshotAI/kimi-code 093e8f4 (MoonshotAI#4336). `fs:search` with an empty query could only see the work directory, because listing a second root means handing `list` an absolute path and this fork refuses absolutes outright. Absolute paths now anchor at the nearest registered root — the same validation the git status work already uses — and entries come back relative to that root. `list` and the ignored-ancestor probe both take the resolved base instead of reaching for the work directory, and each root keeps its own gitignore matcher. The added case lists a source folder by absolute path, then a directory inside it, and asserts entries stay relative to the registered root. Path confinement is unchanged: absolut es are accepted only when they resolve inside a registered root, the existing escape and symlink cases still pass, and `resolveWithin` keeps rejecting absolutes for every other caller.
Port of the registry half of upstream MoonshotAI/kimi-code 093e8f4 (MoonshotAI#4336). Source folders registered through `POST /workspaces` reached the catalog but never the session: `WorkspaceDirsService` built its list from local.toml and session-scoped additions only, so the filesystem and search layers kept seeing one root no matter what the registry held. `ProgramDependencies` now carries the workspace service, `WorkspaceDirsService` takes it, and `additionalDirs` is the union of the project-local config, the registry and the session-scoped entries. The registry is read on ready and re-read after each `addDir`, matching every workspace whose root set contains this session's working directory and skipping the directory that is already the root. Adaptation: this fork's `WorkspaceMeta` has no `kind`, so the upstream managed/implicit split collapses to "the current workspace first, then every other registered one" — the same filter result for the only case that matters, a session looking up its own source folders. The added case registers a workspace with one source folder and asserts it reaches `additionalDirs`.
Registry source folders now reach the session (ca6eec1), so the REST surface added in 0390f64 is finally wired end to end. Three pieces remain for the row: per-root change notifications, which need `ISessionWorkspaceInfo.primaryByWorkspace` that this fork's interface does not carry; `readProjectConfigDirs`, which has no consumer here; and upstream's route-level tests.
Port of the notification half of upstream MoonshotAI/kimi-code 093e8f4 (MoonshotAI#4336). A session's directory set can change while it runs — a source folder is added, or a folder becomes the primary root — but nothing told the agent, so it kept working against a stale picture. `ISessionWorkspaceInfo` now carries `primaryByWorkspace` next to `additionalDirs`, `IWorkspaceDirs` gains `reload()`, and the change notifier diffs both against the beliefs it last recorded and reminds once per change with the added and removed directories. Details that mirror upstream: the first observation only records a baseline, a primary move is reported as a move rather than as an add plus a remove, and the belief pair survives `ContextClear` and `ContextApplyCompaction` while the rest of the snapshot resets. Fork adaptations: the notifier reaches the info service through the agent scope, so every harness stub that built `ISessionWorkspaceInfo` or `IAgentChangeNotifierService` by hand needed the new members; the test dispatcher stub also has to carry the two new belief fields, or the snapshot never lands and the second change looks like the first. Both cases fail when the reminder call is removed.
d07cc07 managed creation with retry-safe ids, 0390f64 the REST and wire surface, 14ba59e+a14144db88 cross-folder search and per-root anchoring, ca6eec1 registry folders reaching the session, d96993d the source-folder change reminder, 0cff84f the workspace-scoped list route and upstream's four route tests. One piece is deliberately not ported and the evidence says so: readProjectConfigDirs. Upstream's only consumer is a REST route this fork does not expose, and no code here calls it, so adding the service method and the endpoint would be a speculative surface. Ledger: closed 37 -> 38, remaining 61.
Upstream MoonshotAI#4689 also clarifies the /workspaces/{id}/primary semantics, but that endpoint section belongs to the unported REST slice of upstream MoonshotAI#4336. The fork has no POST /workspaces/{id}/primary route, so the paragraph is not added rather than left dangling; the untrust wording matches the fork's WorkspaceTrustGroup.untrust, which revokes every root in the dir set.
The web bundle aligned to upstream f082f04 calls endpoints this fork never carried. Port the missing halves of two upstream changes. MoonshotAI#4525: engine PluginMarketplaceService and PluginPackageCache, PluginManager.inspect, per-record skills, PluginService.previewPlugin and install-by-marketplaceId, plus GET /plugins/{id}, POST /plugins/preview, the install request union and the full marketplace wire shape. MoonshotAI#4336: IWorkspaceService.readProjectConfigDirs, POST /workspaces/{id}/primary, GET /workspaces/project-config-dirs, additional_dirs normalization on create/update and the upstream dedupeByRoot split. Free 40934 for plugin.catalog_changed by renumbering the prompt-optimizer codes, and update the API surface snapshot, plugin and workspace tests, the orphan-export baseline and the ledger rows.


需求或 Bug
为 desktop/web 的多源文件夹项目提供 core 基础:
projects.json注册表、wd_/wm_身份与会话归属、源目录运行时、全根文件系统能力,以及 REST/WS 和 MCP 所需的目录解析。Bug 复现步骤
N/A
根本原因
N/A
代码变更
行为变化与影响范围
POST /workspaceswm_,同 root 可共存;重试使用idempotency_keywd_与wm_/workspaces/{id}/primary/add-dir选择记住.kimi-code/local.tomlprojects.json;隐式仍读取旧配置KIMI_CODE_HOME不共享新注册表(D04);二期互操作POST /workspaces/{id}/add-dirpersist: falselocal.toml合并workspaces.jsonprojects.json,保留备份kind均报损坏fs.path_escapes;附加根失效不再阻断其他根的 suggestprogram.dirs,不读取构造时 metadata 快照受影响模块:
agent-core-v2的注册表、目录服务、文件系统、运行时与 MCP;kap-server的 workspace/session/fs 路由和 WS;klient、node-sdk的契约与目录视图;中英文配置和 API 文档。测试覆盖:
workspaceService.test.ts:68 条通过(迁移、严格校验、幂等、alias、失败重试等)。fsService.test.ts:96 条通过(全根搜索/grep/suggest、缺失根、重叠根、符号链接与附加根锚点)。workspaceDirsService.test.ts:13 条通过(实时目录、隐式 alias、managed/implicit 差异)。workspaceInstanceManager.test.ts:11 条通过(MCP 实时目录与最长根匹配)。kap-server:1426 条通过,1 条跳过。agent-core-v2与kap-server构建通过;pnpm lint0 errors;中英文 VitePress 文档构建通过。agent-core-v2套件中的 subagent 超时用例已在基线复现;独立typecheck仍有基线undici版本冲突。未将这些失败描述为本 PR 回归。与
main已合并,merge commit 为730cca00a,冲突已解决;多根目录与main的符号链接目录支持均保留。暂缓项与边界
17 项均有明确决策,完整评论链接见 未修项台账:
local.toml互操作:D04、D05。__proto__幂等键)、D13(相对 root 输入)。Checklist
gen-changesetsskill,或本 PR 无需 changeset。(按本 PR 既定发布口径,桌面端功能说明由 code-app 承担,core 不另列 CLI changeset。)gen-docsskill,或本 PR 无需文档更新。(server-api.md、config-files.md、data-locations.md已做中英文同步更新。)