@gavinc-cn/dsh-plugins-runtime 0.1.1 → 0.1.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.md CHANGED
@@ -15,15 +15,16 @@
15
15
 
16
16
  ## 归属判据
17
17
 
18
- 包内组件都是**宿主(node)侧的运行支撑**:记忆、提交/文件/git 守卫、只读闸门、沙箱白名单、
18
+ 包内组件都是**宿主(node)侧的运行支撑**:记忆、提交/文件/git 守卫、只读闸门、路径规则闸门、
19
19
  沙箱升权等 —— 它们的 package.json 里**没有** `dsh.client` 声明。
20
20
 
21
21
  面向 Web GUI 的组件(含纯浏览器组件,以及 2026-10-15 从本包移出的 `dsh-patch-ask-expand`)在
22
22
  [@gavinc-cn/dsh-plugins-ui](../dsh-plugins-ui/README.md)。归属判据自 2026-10-15 起是
23
23
  **「面向谁」而不是「代码跑在哪」**:`dsh-patch-ask-expand` 的运行体确实在宿主侧(启动时对官方
24
24
  `dsh-client-ui-tool` 的 client bundle 打文本补丁),但它是纯 GUI 观感功能 ⇒ 归 UI 包,
25
- 免得「只想装 UI 包」的人发现不了它。两个包合起来 = 拆分前 `@gavinc-cn/dsh-plugins` 的 13 个
26
- 组件里的 12 个(`kanban-board` 不随任何 bundle 下发)。
25
+ 免得「只想装 UI 包」的人发现不了它。两个包合起来 = **12 行**(UI 5 + 本包 7)。
26
+ `kanban-board` 与 `sandbox-path-allowlist` 不随任何 bundle 下发(后者 2026-10-17 由
27
+ `dsh-path-rules` 合并退役,白名单能力由它的 `approval/request` 监听承接)。
27
28
 
28
29
  ## 安装
29
30
 
@@ -48,7 +49,7 @@ dsh plugin --profile web add @gavinc-cn/dsh-plugins-runtime
48
49
  | `dsh-autocommit` | `@gavinc-cn/dsh-autocommit` | 回合收尾时若本会话还有未提交改动,挡下并提示模型先提交 |
49
50
  | `dsh-git-guard` | `@gavinc-cn/dsh-git-guard` | git 操作归属守卫(按提交前缀/分支命名判定,拦下越权 git 写操作) |
50
51
  | `dsh-file-guard` | `@gavinc-cn/dsh-file-guard` | 回合收尾比对「本会话写下的文件」与磁盘漂移,只报告不自动改回 |
51
- | `sandbox-path-allowlist` | `@gavinc-cn/sandbox-path-allowlist` | 沙箱升权白名单:配置目录内的 write/edit 升权请求自动放行(默认 `paths` 为空 = 空转,靠 profile 覆盖行给本机路径) |
52
+ | `dsh-path-rules` | `@gavinc-cn/dsh-path-rules` | 第五权限模式「路径规则」的逐调用闸门:项目内可读写 / 项目外读允许·写审批 / 白名单直通 / 黑名单读写都审批 / bash·pwsh 只读放行。**只在预设身份为 `path-rules` 时介入**,其余四档完全空转(2026-10-17 起,承接退役的 `sandbox-path-allowlist` 白名单能力) |
52
53
  | `dsh-readonly-guard` | `@gavinc-cn/dsh-readonly-guard` | bash 只读闸门:只读命令放行,可能改系统的转 DSH 原生审批。包内默认 `disabled: true` |
53
54
 
54
55
  行 id 的约定是**包名去掉 scope**(`@gavinc-cn/dsh-memory` → `dsh-memory`):profile 覆盖行按它命中,
@@ -72,7 +73,7 @@ dsh plugin --profile web add @gavinc-cn/dsh-plugins-runtime
72
73
  |---|---|---|
73
74
  | `dsh-superpowers-priming` | `skillPath`(或 env `SUPERPOWERS_SKILL_PATH`) | `~/superpowers/skills/using-superpowers/SKILL.md`(文件不存在只记日志、不注入) |
74
75
  | `dsh-file-guard` | `stateRoot`(或 env `FILE_GUARD_ROOT`) | `~/.orca/file-guard` |
75
- | `sandbox-path-allowlist` | `paths`(数组,绝对路径)/ `allowShell` | `paths: []` = 不生效(**必须**由覆盖行给本机路径才有作用) |
76
+ | `dsh-path-rules` | `whitelist` / `blacklist`(绝对路径数组)、`activationPreset`、`unanalyzable`、`failMode`、`dryRun`、`logPath` | 白/黑名单默认 `[]`(只按项目内/外判定);`activationPreset: path-rules`、`unanalyzable: deny`、`failMode: closed`、`allowTempRoots: true` |
76
77
  | `dsh-readonly-guard` | `enabled` / `dryRun` / `askMode` / `whitelistPath` / `pendingPath` / `logPath` | 行默认 `disabled: true`;`whitelistPath`/`pendingPath` 缺省与 kimi 共用 `~/.kimi-code/readonly_whitelist.json` / `readonly_pending.jsonl` |
77
78
  | 各组件 | `logPath` / `enabled` / `dryRun` | 日志在 `~/.kimi-code/hooks/logs/`,默认启用 |
78
79
 
package/cordis.patch.yml CHANGED
@@ -53,11 +53,11 @@
53
53
  - id: dsh-file-guard
54
54
  name: "@gavinc-cn/dsh-file-guard"
55
55
 
56
- # sandbox-path-allowlist:沙箱升权白名单。包内默认 paths 为空 = 不生效(安全的空转默认值),
57
- # 实际路径由 profile 覆盖行给(容器 web 与宿主 desktop 各自给各自的绝对路径)。
58
- - insert:
59
- - id: sandbox-path-allowlist
60
- name: "@gavinc-cn/sandbox-path-allowlist"
56
+ # sandbox-path-allowlist:2026-10-17 由 dsh-path-rules **合并退役**,行与依赖已移除(白名单能力由
57
+ # dsh-path-rules 的 approval/request 监听等价承接,见该包的 spec §2.6 / §4.4)。
58
+ # 组件包本体仍留在仓库 packages/runtime/sandbox-path-allowlist/(回滚时把本 insert 行 + 依赖 +
59
+ # profile 覆盖行挂回即可,spec §8 回滚 3);「有包、没进 bundle」由 scripts/check-bundles.mjs 的
60
+ # UNBUNDLED 显式登记。
61
61
 
62
62
  # dsh-readonly-guard:bash 只读闸门(非只读命令转到 DSH 原生审批)。默认**停用**:
63
63
  # 容器 web 侧刻意不挂(与既有 sandbox/approval 分层重叠),宿主 desktop 侧由覆盖行
@@ -66,3 +66,11 @@
66
66
  - id: dsh-readonly-guard
67
67
  disabled: true
68
68
  name: "@gavinc-cn/dsh-readonly-guard"
69
+
70
+ # dsh-path-rules:第五权限模式「路径规则」的逐调用闸门(项目内可读写 / 项目外写需审批 /
71
+ # 白名单直通 / 黑名单读写都审批 / bash·pwsh 只读放行)。包内默认无白/黑名单 = 安全空转,
72
+ # 且只在预设身份为 `path-rules` 时介入 ⇒ 不选中该档时对既有四档零影响。
73
+ # 白/黑名单等机器相关配置由各 profile 的覆盖行给。
74
+ - insert:
75
+ - id: dsh-path-rules
76
+ name: "@gavinc-cn/dsh-path-rules"
package/locale/en.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "meta": {
3
- "description": "Seven host-side components: memory, git and file guards, read-only gate, sandbox allowlist, session priming, and commit nagging. Each row is a separate switch."
3
+ "description": "Seven host-side components: memory, git and file guards, read-only gate, path-rules gate, session priming, and commit nagging. Each row is a separate switch."
4
4
  }
5
5
  }
package/locale/zh.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "meta": {
3
- "description": "7 个宿主(node)侧组件:记忆注入与回顾、git/文件守卫、只读闸门、沙箱白名单、重开会话再注入、提交提示等。每行一个独立开关。"
3
+ "description": "7 个宿主(node)侧组件:记忆注入与回顾、git/文件守卫、只读闸门、路径规则闸门、重开会话再注入、提交提示等。每行一个独立开关。"
4
4
  }
5
5
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gavinc-cn/dsh-plugins-runtime",
3
- "version": "0.1.1",
4
- "description": "DSH 插件组合包(runtime bundle):7 个宿主(node)侧组件(记忆、git/文件守卫、只读闸门、沙箱白名单、重开会话再注入等),每个是一行独立开关;面向 Web GUI 的组件见 @gavinc-cn/dsh-plugins-ui。",
3
+ "version": "0.1.2",
4
+ "description": "DSH 插件组合包(runtime bundle):7 个宿主(node)侧组件(记忆、git/文件守卫、只读闸门、路径规则闸门、重开会话再注入等),每个是一行独立开关;面向 Web GUI 的组件见 @gavinc-cn/dsh-plugins-ui。",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -47,7 +47,7 @@
47
47
  "@gavinc-cn/dsh-autocommit": "^0.1.1",
48
48
  "@gavinc-cn/dsh-git-guard": "^0.1.0",
49
49
  "@gavinc-cn/dsh-file-guard": "^0.1.0",
50
- "@gavinc-cn/sandbox-path-allowlist": "^0.1.1",
51
- "@gavinc-cn/dsh-readonly-guard": "^0.1.0"
50
+ "@gavinc-cn/dsh-readonly-guard": "^0.1.0",
51
+ "@gavinc-cn/dsh-path-rules": "^0.1.0"
52
52
  }
53
53
  }