feat(storage): add built-in centralized workspace isolation - #216
Merged
Conversation
28 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要 / Summary
新增内置
storageScope: workspaces:所有本地记忆区域集中存放在固定根目录下,同时按工作区隔离。根包 Host 统一解析布局和工作区标识,Core 保持操作范围与 View 权限边界,Source 继续管理自身数据;无需新的存储插件或 SDK API。Adds built-in centralized workspace storage. Settings exposes the optional central root beside the scope selector; Sidebar inspection, Builtin and Headless use the same workspace-aware routing, with optional global USER.md. Also fixes long-path overflow in the existing Memory Spaces view and keeps the workspace picker visible alongside alignment notices.
关联 Issue 或背景 / Related Issue or Context
Closes #189. Supersedes #215.
按维护者要求放弃独立 storage-plugin 方案,从最新 main 的
820b0b0创建独立 worktree 重新实现,保留已合入的 Runtime 容量与归档改进。旧分支保留作为历史记录。Reimplemented from current main in a separate worktree instead of carrying the conflicting plugin branch forward. No new package, dependency, SDK export, CI workflow or release-intent workaround is introduced.
涉及区域 / Affected Areas
PR 类型 / PR Type
最新代码确认 / Latest Codebase Confirmation
main分支开发,或在提交前已 rebase 或合并最新main。 / I developed from the latestmain, or rebased or merged the latestmainbefore submitting.同步命令 / Sync command:
提交前结果为
0 3:包含最新 main,新增三个提交,无待解决冲突。 / Final result:0 3, current with main and three new commits; no unresolved conflicts.AI 编码披露 / AI Coding Disclosure
使用的 AI 模型 / AI model used:
GPT-6
使用的编码 Agent 工具 / Coding Agent tool used:
Codex。代码已由 Agent 自检并完成下述验证;维护者最终审阅待完成。 / Codex. Agent self-review and the checks below are complete; final maintainer review is pending.
仓库规范检查 / Repository Rules
@deepseek-ai/*NPM 契约。 / I did not modify DSH source or point tsconfig at a DSH source checkout, and used only published@deepseek-ai/*NPM contracts.src/host/protocol.ts为准,没有在两侧重复定义 wire DTO。 / The Client and Host boundary still uses browser-safesrc/host/protocol.tsas the source for wire DTOs.lib/文件。 / I did not commit tokens, credentials, private memory, unredacted logs, or generatedlib/files.兼容性与数据安全 / Compatibility and Data Safety
global/workspace/custom和旧dataDir配置保持原语义;新模式使用<dataDir or global root>/workspaces/<SHA-256 of canonical workspace path>/,统一承载runtime、data、documents、state。 / Existing scopes and legacy configuration retain their semantics; all four local areas share the selected workspace subtree.runtimeUserScope: global时共享;远端 Provider 保留自身命名空间语义。未改变格式、写入事务或 Provider SDK。 / Global USER.md remains opt-in; remote namespace semantics and persistence formats remain unchanged.本地验证 / Local Validation
执行的命令 / Commands run:
结果摘要 / Result summary:
用户可见变更证据 / Local Feature Evidence
证据 / Evidence:
完整验证与 9 张截图 / Full report and nine screenshots · 中文记录
功能版本
2314d6a,最终布局与自动化版本51446b5。截图全部来自新 Core/Host 分支,具体 revision 映射见报告。 / All evidence was captured from the new built-in implementation; the report identifies each tested revision.