@dsh-cc/plugin-dsh-cc-shunt 0.6.1 → 0.6.3-rc.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.
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "dsh-cc-shunt",
3
3
  "description": "Official dsh-cc plugin: hard PreToolUse gates redirect bulk reads/boilerplate generation to cheap-lane shunt-worker subagents to save main-context tokens.",
4
- "version": "0.6.1"
4
+ "version": "0.6.3-rc.2"
5
5
  }
@@ -0,0 +1,6 @@
1
+ # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
2
+ # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
+ # after editing either side, bring the other along and re-record with:
4
+ # pnpm check:readme --write
5
+ README.md: 937a8f850b1d498a61ab12b61ee36ed5503b1058
6
+ README.zh.md: 2d68014bcbde12df912085cc4639b446a460a23b
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # dsh-cc-shunt
2
2
 
3
+ English | [中文](README.zh.md)
4
+
3
5
  Official dsh-cc plugin that keeps bulk file content out of the main context.
4
6
 
5
7
  **How it works**: two hard PreToolUse gates (Read and Bash) block whole-file
package/README.zh.md ADDED
@@ -0,0 +1,40 @@
1
+ # dsh-cc-shunt
2
+
3
+ [English](README.md) | 中文
4
+
5
+ 官方 dsh-cc 插件,把大块文件内容挡在主上下文之外。
6
+
7
+ **工作方式**:两个硬性 PreToolUse 门(Read 和 Bash)拦截对大文件的整体读取,拦截消息重定向到 `bulk-reader` / `code-writer` 技能,后者委托给插件的廉价通道 worker 子代理(`shunt-reader`、`shunt-writer`)。文件内容由 worker 读取——或写入——返回主上下文的只有一份紧凑摘要或一行确认。
8
+
9
+ - `shunt-reader` — 跨大文件 / 多文件 / 大 diff 回答问题,返回以 `file:line` 引用开头的结构化摘要。
10
+ - `shunt-writer` — 依照一份强制性参考文件的模式在磁盘上生成测试/配置/桩代码;从不返回生成的代码正文。
11
+
12
+ ## 安装 / 启用
13
+
14
+ `dsh-cc` marketplace 附带本插件。在 settings.json 中启用:
15
+
16
+ ```json
17
+ {
18
+ "enabledPlugins": { "dsh-cc-shunt@dsh-cc": true }
19
+ }
20
+ ```
21
+
22
+ ## 配置
23
+
24
+ 通过 settings.json 顶层的 `"env"` 对象设置:
25
+
26
+ | 变量 | 默认值 | 含义 |
27
+ | ------------------ | -------- | ------------------------------------------------------------------ |
28
+ | `SHUNT_MIN_LINES` | `350` | 行数阈值;超过它的整体文件读取会被拦截 |
29
+ | `SHUNT_MAX_BYTES` | `100000` | 字节阈值;无论行数多少都会拦截压缩成单行的文件 |
30
+ | `SHUNT_DISABLED` | 未设置 | 设为 `1`/`true`/`yes` 可完全关闭两个门 |
31
+
32
+ ## 模型别名要求
33
+
34
+ **shunt-worker 子代理固定 `model: haiku`。** 如果你的部署未配置 haiku 别名,worker 会静默继承父级的模型路由——一切照常工作,但**节省的 token 为零**。要真正省钱,请配置 haiku 别名。
35
+
36
+ ## 已知限制
37
+
38
+ - 摘要中的行号引用在编辑后可能失效——在引用位置编辑前,请先用带 offset/limit 的定向读取确认。
39
+ - 调试与架构方面的工作不会被委托——只有大块读取和样板代码生成会。
40
+ - worker 调用是一次性前台调用;要跟进只能重新拉起。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsh-cc/plugin-dsh-cc-shunt",
3
- "version": "0.6.1",
3
+ "version": "0.6.3-rc.2",
4
4
  "description": "Official dsh-cc plugin: hard PreToolUse gates redirect bulk reads and boilerplate generation to cheap-lane shunt-worker subagents to save main-context tokens.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",