dsh-ntr 0.1.6 → 0.2.1

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.en.md CHANGED
@@ -70,12 +70,12 @@ To upgrade later: `git pull` → `npm run build` → restart `dsh web`. `add .`
70
70
 
71
71
  ---
72
72
 
73
- ## Getting started
73
+ ## Quick start
74
74
 
75
75
  ### What you need
76
76
 
77
77
  1. A working DSH install (web or desktop).
78
- 2. At least one ACP agent CLI. The plugin ships presets for common ones, and accepts any stdio-capable ACP agent.
78
+ 2. At least one ACP-capable agent, using its terminal build (CLI / TUI). For example Qoder CLI (`qodercli`), CodeBuddy Code (`codebuddy`), Claude Code, or OpenCode — presets for these ship with the plugin; any other agent that starts from the command line in the same `xxx --acp` style can be filled in directly.
79
79
 
80
80
  ### Three steps
81
81
 
@@ -113,7 +113,7 @@ DSH's own `/model`, `/permission`, `/export`, etc. are **not** intercepted by th
113
113
 
114
114
  ### Approvals and the agent's own permission modes
115
115
 
116
- When the agent wants to touch something sensitive, it asks you. The approval card shows up right in the chat composer; you click Allow or Deny, and it obeys.
116
+ When the agent wants to touch something sensitive, it asks you. The ask appears in the conversation on a card just above the composer (the plugin's own card); the options are exactly the agent's, and what you click is what it receives. The Settings page's "Pending Permission Requests" card is the cross-session mirror — answer there when the conversation isn't open.
117
117
 
118
118
  Every agent asks differently: some offer a set of options, some only allow/deny, some attach the exact command they are about to run. The plugin presents these as-is, and never pre-decides for you.
119
119
 
@@ -267,11 +267,14 @@ These servers are handed to the agent when a session is created; the agent launc
267
267
 
268
268
  ```bash
269
269
  npm install # dependencies
270
+ git config core.hooksPath .githooks # enable the commit-msg check (rejects AI attribution)
270
271
  npm run build # host TS declarations + browser bundle
271
272
  npm test # test suite
272
273
  dsh plugin --profile web add ./ # mount into the Web profile
273
274
  ```
274
275
 
276
+ `.githooks/commit-msg` only inspects the commit message: it rejects AI-tool attribution in `Co-Authored-By` / `Generated with` lines, while ordinary prose and human attribution pass. `core.hooksPath` is local config — run this once after cloning.
277
+
275
278
  ### Implementation notes
276
279
 
277
280
  Each item below corresponds to a real past failure; read the linked doc before changing code. The browser half talks to the host half via `/acp` RPC and `/api/acp/stream` SSE; the host half runs one `AgentBridge` per conversation, driving the agent child process over stdio JSON-RPC.
package/README.md CHANGED
@@ -70,12 +70,12 @@ dsh plugin --profile web add ./
70
70
 
71
71
  ---
72
72
 
73
- ## 上手
73
+ ## 快速开始
74
74
 
75
75
  ### 你需要什么
76
76
 
77
77
  1. 一个已经装好的 DSH(Web 或桌面版)。
78
- 2. 至少一个 ACP agent 的命令行程序。插件内置了几个常见预设,也可以填任何支持 stdio 的 ACP agent。
78
+ 2. 至少一个支持 ACP 协议的 agent,用它的终端版本(CLI / TUI)即可。例如 Qoder CLI(`qodercli`)、CodeBuddy Code(`codebuddy`)、Claude Code、OpenCode——插件内置了这些常见预设;其他 agent 只要能以类似 `xxx --acp` 的方式从命令行启动,也可以直接填。
79
79
 
80
80
  ### 三步接入
81
81
 
@@ -113,7 +113,7 @@ DSH 自己的 `/model`、`/permission`、`/export` 等在这一模式下**不会
113
113
 
114
114
  ### 审批与 agent 自己的权限模式
115
115
 
116
- agent 要动敏感的东西时会问你。审批卡直接出现在聊天输入框里,你点允许或拒绝,它照着做。
116
+ agent 要动敏感的东西时会问你。询问卡出现在对话里、聊天输入框上方(插件自己的卡片),选项就是 agent 给的那些,你点哪个它照着做;设置页的「待处理权限请求」是跨会话镜像,对话没打开时在那里回答。
117
117
 
118
118
  每个 agent 问法不一样:有的给一组选项,有的只给允许/拒绝,有的会附上它要执行的具体命令。插件把这些原样呈现给你,不预先替你决定。
119
119
 
@@ -267,11 +267,14 @@ agent 要动敏感的东西时会问你。审批卡直接出现在聊天输入
267
267
 
268
268
  ```bash
269
269
  npm install # 依赖
270
+ git config core.hooksPath .githooks # 启用 commit-msg 校验(拒绝 AI 署名)
270
271
  npm run build # 宿主 TS 声明 + 浏览器 Bundle
271
272
  npm test # 测试套件
272
273
  dsh plugin --profile web add ./ # 挂载到 Web Profile
273
274
  ```
274
275
 
276
+ `.githooks/commit-msg` 只校验提交信息:拒绝把 AI 工具写进 `Co-Authored-By` / `Generated with` 之类署名,普通正文与人类署名不受影响。`core.hooksPath` 是本地配置,clone 后执行一次即可。
277
+
275
278
  ### 实现要点
276
279
 
277
280
  以下每条都对应一处真实故障,改代码前先读对应文档。浏览器半区经 `/acp` RPC 与 `/api/acp/stream` SSE 和宿主半区通信;宿主半区每会话一个 `AgentBridge`,经 stdio JSON-RPC 驱动 agent 子进程。
package/cordis.patch.yml CHANGED
@@ -31,25 +31,25 @@
31
31
  # startupTimeoutMs: 60000 # budget for initialize / session/new / session/load
32
32
  # permissionTimeoutMs: 300000
33
33
  # How long a permission ask may sit unanswered
34
- # before the deadline fires. ONE window for both
35
- # places an ask can live — the conversation's
36
- # approval card and the settings panel's ledger
37
- # ("待处理权限请求"): they ask the same question,
38
- # so they get the same answer.
34
+ # before the deadline fires. ONE window for every
35
+ # ask, wherever it is answered — the conversation
36
+ # card above the composer (`PermissionDock`) or
37
+ # the Settings page's cross-session mirror
38
+ # ("待处理权限请求"): one question, one answer.
39
39
  # 0 = 不等待: the ask is settled the moment it
40
- # arrives, nobody is asked (no composer card, no
41
- # ledger entry). That rung belongs to the
42
- # `auto` mode ONLY — it ANSWERS the ask, so the
43
- # agent continues. Under `abort` the same zero
44
- # would refuse every ask on arrival (the agent
45
- # stops at every gate), so `abort` starts at the
46
- # shortest real wait. "Never expires" is NOT
47
- # this key's business — that is `wait` mode
48
- # below.
49
- # When the deadline fires, the ask is
50
- # settled WHERE IT WAS ASKED — it is not handed to
51
- # the settings panel. What happens is
52
- # `permissionTimeoutMode`'s business.
40
+ # arrives, nobody is asked (no conversation card,
41
+ # no pending entry on the Settings page). That
42
+ # rung belongs to the `auto` mode ONLY — it
43
+ # ANSWERS the ask, so the agent continues. Under
44
+ # `abort` the same zero would refuse every ask on
45
+ # arrival (the agent stops at every gate), so
46
+ # `abort` starts at the shortest real wait. "Never
47
+ # expires" is NOT this key's business — that is
48
+ # `wait` mode below.
49
+ # When the deadline fires, the ask is settled IN
50
+ # PLACE: the card goes away and `permission/expired`
51
+ # records the outcome in the conversation. What
52
+ # happens is `permissionTimeoutMode`'s business.
53
53
  # LEGACY: `nativeApprovalTimeoutMs` and
54
54
  # `permissionFallbackTimeoutMs` are still accepted
55
55
  # and folded into this key (this key wins when it