@gavinc-cn/dsh-plugins-runtime 0.1.4 → 0.1.5

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
@@ -22,14 +22,14 @@
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 包」的人发现不了它。两个包合起来 = **12 行**(UI 5 + 本包 7)。
25
+ 免得「只想装 UI 包」的人发现不了它。两个包合起来 = **13 行**(UI 5 + 本包 8)。
26
26
  `kanban-board` 与 `sandbox-path-allowlist` 不随任何 bundle 下发(后者 2026-10-17 由
27
27
  `dsh-path-rules` 合并退役,白名单能力由它的 `approval/request` 监听承接)。
28
28
 
29
29
  ## 安装
30
30
 
31
31
  ```bash
32
- # 装进某个 profile(pnpm 会把依赖里的 7 个组件包一并装上)
32
+ # 装进某个 profile(pnpm 会把依赖里的 8 个组件包一并装上)
33
33
  dsh plugin --profile web add @gavinc-cn/dsh-plugins-runtime
34
34
  ```
35
35
 
@@ -40,7 +40,7 @@ dsh plugin --profile web add @gavinc-cn/dsh-plugins-runtime
40
40
  - 改了 `dsh.profile.bundles` 要**重启宿主**才生效(启动时读);profile patch 层是 live 热重载,
41
41
  行级开关不需要重启。
42
42
 
43
- ## 组件(7 个)
43
+ ## 组件(8 个)
44
44
 
45
45
  | 行 id | 包 | 做什么 |
46
46
  |---|---|---|
@@ -50,6 +50,7 @@ dsh plugin --profile web add @gavinc-cn/dsh-plugins-runtime
50
50
  | `dsh-git-guard` | `@gavinc-cn/dsh-git-guard` | git 操作归属守卫(按提交前缀/分支命名判定,拦下越权 git 写操作) |
51
51
  | `dsh-file-guard` | `@gavinc-cn/dsh-file-guard` | 回合收尾比对「本会话写下的文件」与磁盘漂移,只报告不自动改回 |
52
52
  | `dsh-path-rules` | `@gavinc-cn/dsh-path-rules` | 第五权限模式「路径规则」的逐调用闸门:项目内可读写 / 项目外读允许·写审批 / 白名单直通 / 黑名单读写都审批 / bash·pwsh 只读放行。**只在预设身份为 `path-rules` 时介入**,其余四档完全空转(2026-10-17 起,承接退役的 `sandbox-path-allowlist` 白名单能力;2026-10-18 起 `autoWhitelist` 可把用户批准的升权写入目录自动记入白名单)。**v2(0.1.2)起本档是 `workspace-write` 的超集**:判不出读写的命令不再命令级拒绝(`unanalyzable: pass`,交给沙箱在运行时拦写)、白名单写预置升权一次成功(`preemptiveWhitelistEscalation`)、判不出的命令做黑名单文本粗检(`opaqueBlacklistScan`) |
53
+ | `dsh-write-guard` | `@gavinc-cn/dsh-write-guard` | 第六权限模式「完全权限(拦截)」的逐调用写入闸门:读任意文件 / 项目内 / 白名单写直通,越界写弹框并自动学习白名单,判不出的 `bash`·`pwsh` 交当前会话模型判定。**只在预设身份为 `write-guard` 时介入**,其余档位完全空转;插件停用 = 完全不拦截 |
53
54
  | `dsh-readonly-guard` | `@gavinc-cn/dsh-readonly-guard` | bash 只读闸门:只读命令放行,可能改系统的转 DSH 原生审批。包内默认 `disabled: true` |
54
55
 
55
56
  行 id 的约定是**包名去掉 scope**(`@gavinc-cn/dsh-memory` → `dsh-memory`):profile 覆盖行按它命中,
@@ -74,6 +75,7 @@ dsh plugin --profile web add @gavinc-cn/dsh-plugins-runtime
74
75
  | `dsh-superpowers-priming` | `skillPath`(或 env `SUPERPOWERS_SKILL_PATH`) | `~/superpowers/skills/using-superpowers/SKILL.md`(文件不存在只记日志、不注入) |
75
76
  | `dsh-file-guard` | `stateRoot`(或 env `FILE_GUARD_ROOT`) | `~/.orca/file-guard` |
76
77
  | `dsh-path-rules` | `whitelist` / `blacklist`(绝对路径数组)、`activationPreset`、`unanalyzable`、`failMode`、`dryRun`、`autoWhitelist` / `autoWhitelistFile`、`preemptiveWhitelistEscalation`、`opaqueBlacklistScan`、`logPath` | 白/黑名单默认 `[]`(只按项目内/外判定);`activationPreset: path-rules`、`unanalyzable: pass`(v2 默认;`deny` / `ask` 可改回严格)、`failMode: closed`、`allowTempRoots: true`、`autoWhitelist: false`(状态文件缺省 `<dsh home>/path-rules/auto-whitelist.json`)、`preemptiveWhitelistEscalation: true`、`opaqueBlacklistScan: true` |
78
+ | `dsh-write-guard` | `enabled` / `activationPreset` / `whitelist` / `allowTempRoots` / `judge` / `judgeTimeoutMs` / `judgeCacheSize` / `autoWhitelist` / `autoWhitelistFile` / `failMode` / `dryRun` / `logPath` | `activationPreset: write-guard`、`whitelist: []`、`allowTempRoots: true`、`judge: true`、`judgeTimeoutMs: 20000`、`autoWhitelist: true`、`failMode: ask`;`autoWhitelistFile` 缺省 `<dsh home>/write-guard/auto-whitelist.json`、`judgeCacheSize: 200`、`dryRun: false`、`logPath` 缺省 `~/.kimi-code/hooks/logs/write_guard.dsh.log` |
77
79
  | `dsh-readonly-guard` | `enabled` / `dryRun` / `askMode` / `whitelistPath` / `pendingPath` / `logPath` | 行默认 `disabled: true`;`whitelistPath`/`pendingPath` 缺省与 kimi 共用 `~/.kimi-code/readonly_whitelist.json` / `readonly_pending.jsonl` |
78
80
  | 各组件 | `logPath` / `enabled` / `dryRun` | 日志在 `~/.kimi-code/hooks/logs/`,默认启用 |
79
81
 
package/cordis.patch.yml CHANGED
@@ -25,8 +25,10 @@
25
25
  # 机器相关配置(本机检出路径、状态目录、日志路径)**不进本文件**:写在各 profile 的覆盖行里,
26
26
  # 例如 `- id: dsh-superpowers-priming` + `config: { skillPath: ... }`。
27
27
  #
28
- # 依赖:本包在 package.json 的 dependencies 里声明下述 7 个组件包 —— 装本包即把它们一并装上。
29
- # 发布顺序:**7 个组件包先发(其中 @gavinc-cn/dsh-readonly-guard 必须先于本包上 registry),本包最后发**。
28
+ # 依赖:本包在 package.json 的 dependencies 里声明下述 8 个组件包 —— 装本包即把它们一并装上。
29
+ # 发布顺序:**8 个组件包先发,本包最后发**。组件之间也有顺序:@gavinc-cn/dsh-readonly-guard
30
+ # 必须先于本包上 registry;@gavinc-cn/dsh-write-guard 依赖 @gavinc-cn/dsh-path-rules 的 subpath
31
+ # exports,故 path-rules(0.1.3)→ write-guard(0.1.0)→ 本包(dsh-plugins-runtime)依次发。
30
32
  #
31
33
  # 改组件集合 = 改本文件(patch 层 live 热重载,不需要重装/重启);改完把仓库真源铺到共享活副本
32
34
  # (在仓库根执行:bash scripts/deploy-to-dsh.sh dsh-plugins-runtime)。
@@ -74,3 +76,10 @@
74
76
  - insert:
75
77
  - id: dsh-path-rules
76
78
  name: "@gavinc-cn/dsh-path-rules"
79
+
80
+ # dsh-write-guard:第六权限模式「完全权限(拦截)」的逐调用写入闸门(只在预设身份
81
+ # write-guard 时介入;读/项目内/白名单写直通,越界写弹框并自动学习白名单,判不出的 shell
82
+ # 交当前会话模型判定)。未选中该档时对既有档位零影响;插件停用 = 完全不拦截。
83
+ - insert:
84
+ - id: dsh-write-guard
85
+ name: "@gavinc-cn/dsh-write-guard"
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, path-rules gate, session priming, and commit nagging. Each row is a separate switch."
3
+ "description": "Eight host-side components: memory, git/file/write 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": "8 个宿主(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.4",
4
- "description": "DSH 插件组合包(runtime bundle):7 个宿主(node)侧组件(记忆、git/文件守卫、只读闸门、路径规则闸门、重开会话再注入等),每个是一行独立开关;面向 Web GUI 的组件见 @gavinc-cn/dsh-plugins-ui。",
3
+ "version": "0.1.5",
4
+ "description": "DSH 插件组合包(runtime bundle):8 个宿主(node)侧组件(记忆、git/文件守卫、只读闸门、路径规则闸门、写入守卫、重开会话再注入等),每个是一行独立开关;面向 Web GUI 的组件见 @gavinc-cn/dsh-plugins-ui。",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -48,6 +48,7 @@
48
48
  "@gavinc-cn/dsh-git-guard": "^0.1.0",
49
49
  "@gavinc-cn/dsh-file-guard": "^0.1.0",
50
50
  "@gavinc-cn/dsh-readonly-guard": "^0.1.0",
51
- "@gavinc-cn/dsh-path-rules": "^0.1.2"
51
+ "@gavinc-cn/dsh-path-rules": "^0.1.3",
52
+ "@gavinc-cn/dsh-write-guard": "^0.1.0"
52
53
  }
53
54
  }