@dsh-cc/settings-cascade 0.6.1 → 0.6.2
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 +3 -3
- package/README.zh.md +1 -0
- package/package.json +1 -1
package/README.i18n.yaml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
|
-
# pnpm
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
4
|
+
# pnpm check:readme --write
|
|
5
|
+
README.md: 24cc8c5d872531f122e17d528bdeef9557c8da63
|
|
6
|
+
README.zh.md: b3e4572bb7983756371c9bf70ee53d15dfe9a73d
|
package/README.zh.md
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
- **坏配置加载期明确报错。** 存在但非法的设置文档(不可解析的 JSON,或非对象根)使插件加载失败;来源文件缺失不算错误,不贡献任何内容。
|
|
32
32
|
- **提供方经用户层可写。** `writable` 为 `true`,seam 的进程内 `update()`/`replace()`/`mutate()` 路径被接受。写入以 surgical delta(外科手术式增量)应用到用户层设置文件(默认 `$DSH_HOME/settings.json`):只有调用方实际改动的键才落入用户文件。写入未触及的值——即使源自更高层——也不会被带进来。校验、修订号与更新事件仍由 seam 负责;project/local/flag/policy 来源仍是只读侧贡献者。
|
|
33
33
|
- **本地设置文件路径按 git 语义上提。** 启动目录位于 git worktree 或 git 仓库子目录时,`.claude/settings.local.json` 改从 git **主检出根**(worktree)或**顶层目录**(子目录启动)读取,与 Claude Code 一致。项目 `settings.json` 仍留在启动目录,会话 cwd 与 git 操作不受影响,文件内部的路径仍相对启动目录解析。以下情形回退到启动目录本身:非 git 仓库、Windows(`win32`)、仓库根为 `$HOME`、上提目标缺少 `.git` 的裸主仓库、git 探测失败,或仓库根 / `.git` / `.claude` 的属主未确认为当前用户(fail-closed)。worktree 本地的 `settings.local.json` 不会被读取(两者合并的行为在 Claude Code 中未确认)。上提解析本身仅在启动时进行:会话中途进入 worktree 不会重新解析本地路径(文件内容仍会热重载——见下)。
|
|
34
|
+
- **CC 驼峰键别名映射到 kebab namespace。** 五层合并之后(发布之前),一份固定的 Claude Code 驼峰顶层键白名单(`statusLine` → `statusline`)会被复制到其 dsh 原生的 kebab namespace 上。仅当 CC 键的值为普通对象且 kebab 键在合并文档中不存在时才注入别名——已存在的 dsh 原生键原样胜出,非对象的 CC 值被忽略。不做模糊匹配:白名单映射即契约,未知的驼峰键绝不别名化。
|
|
34
35
|
- **文件来源在运行中的会话里热重载。** 提供方用 chokidar 监听已解析的设置文件路径——user、project、git 上提的本地文件、`--settings` flag 文件、以及基于文件的 managed-policy 路径——并经由 `SettingsProvider` seam 重新发布,因此每个注册消费方(permission rules、model aliases、statusline、output styles、plugin loader)都实时重新解析;会话中途编辑 `permissions` 在下一次 `decide()` 即生效。监听路径经 realpath 规范化(符号链接替换式的更新也能捕获),尚不存在的路径同样被监听(启动后创建的文件照样生效),快速连续写入会被合并。写入中途产生的非法文档保留 last-good 状态并告警,修复后自动恢复。不属于热重载范围的:内联 flag 设置、远程 policy、`hooks.json`(走 hooks bridge 的独立 seam)、以及上文所述启动时一次性完成的 git 上提解析。
|
|
35
36
|
- **`env` 分两阶段应用。** 顶层 `env` 分节从合并文档中拆出,经 `getEnv()` 暴露,所有值已强制转为字符串。`applyEnv()` 赋值普通变量;`applyTrustedEnv()` 另赋值改变环境的变量(`LD_PRELOAD`、`PATH`、`DYLD_INSERT_LIBRARIES` 及其余 `DANGEROUS_ENV_VARS`),仅在用户授予信任后运行。
|
|
36
37
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dsh-cc/settings-cascade",
|
|
3
3
|
"description": "Claude Code-style five-level settings cascade provider (ctx.settings) for the DeepSeek Harness",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.2",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/dsh-cc/dsh-cc.git",
|