@kirkchinese/dsh-citeciter 0.2.0 → 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.md CHANGED
@@ -4,14 +4,14 @@
4
4
 
5
5
  [中文说明](https://github.com/kirkchinese/CiteCiter/blob/main/packages/citeciter/README.zh.md) · [GitHub](https://github.com/kirkchinese/CiteCiter) · [Issues](https://github.com/kirkchinese/CiteCiter/issues)
6
6
 
7
- > **Early development:** v0.2.0 is the first positioning release of the durable Host+Client architecture. APIs, compatibility, and installation details may still change. Issues and pull requests are welcome.
7
+ > **Early development:** v0.2.0 introduced the durable Host+Client architecture; v0.2.1 fixes later-turn preparation when DSH treats an already-effective read-only switch as an idempotent no-op. APIs, compatibility, and installation details may still change. Issues and pull requests are welcome.
8
8
 
9
9
  ## Install
10
10
 
11
11
  CiteCiter requires Node.js `^22.19.0 || >=24.0.0`, DSH Web, and a configured model provider.
12
12
 
13
13
  ```sh
14
- dsh plugin --profile web add @kirkchinese/dsh-citeciter@0.2.0
14
+ dsh plugin --profile web add @kirkchinese/dsh-citeciter@0.2.1
15
15
  ```
16
16
 
17
17
  Restart the corresponding DSH Web process and refresh the page. A restart is required after installation or upgrade because the Host and Typert manifests are loaded at process startup.
package/README.zh.md CHANGED
@@ -4,14 +4,14 @@
4
4
 
5
5
  [English](README.md) · [GitHub](https://github.com/kirkchinese/CiteCiter) · [问题反馈](https://github.com/kirkchinese/CiteCiter/issues)
6
6
 
7
- > **开发状态:** v0.2.0 是持久化 Host+Client 架构的第一版定位发布,当前仍处于早期开发阶段。API、兼容范围和安装方式仍可能变化,欢迎提 Issue 或提交 PR。
7
+ > **开发状态:** v0.2.0 引入持久化 Host+Client 架构;v0.2.1 修复了 DSH 将已生效的 read-only 重复切换视为幂等 no-op 时,后续追问准备失败的问题。当前仍处于早期开发阶段,API、兼容范围和安装方式仍可能变化。
8
8
 
9
9
  ## 安装
10
10
 
11
11
  需要 Node.js `^22.19.0 || >=24.0.0`、DSH Web 和已配置的模型提供方。
12
12
 
13
13
  ```sh
14
- dsh plugin --profile web add @kirkchinese/dsh-citeciter@0.2.0
14
+ dsh plugin --profile web add @kirkchinese/dsh-citeciter@0.2.1
15
15
  ```
16
16
 
17
17
  安装或升级后,请重启对应的 DSH Web 进程并刷新页面。Host 与 Typert 清单在进程启动时加载,因此不能只替换浏览器 bundle。
package/lib/index.js CHANGED
@@ -40,6 +40,8 @@ function readOnlyCommandStatus(agent) {
40
40
  const childEvents = events.slice(seedLength);
41
41
  const latestPreset = childEvents.findLast((event) => event.type === "permission/preset");
42
42
  const latestSandbox = childEvents.findLast((event) => event.type === "sandbox/mode");
43
+ const currentPreset = latestPreset?.type === "permission/preset" ? latestPreset.data.preset : void 0;
44
+ const currentSandbox = latestSandbox?.type === "sandbox/mode" ? latestSandbox.data.mode : void 0;
43
45
  for (let index = events.length - 1; index >= seedLength; index--) {
44
46
  const run = events[index];
45
47
  if (run?.type !== "command/run" || run.data.name !== "permission") continue;
@@ -50,13 +52,11 @@ function readOnlyCommandStatus(agent) {
50
52
  kind: "error",
51
53
  message: done.data.text ?? "permission command failed without an outcome message"
52
54
  };
53
- if (!events.slice(index + 1, done.seq).some((event) => event.type === "permission/preset" && event.data.preset === "read-only")) return {
55
+ if (currentPreset === "read-only" && currentSandbox === "read-only") return { kind: "ready" };
56
+ return events.slice(index + 1, done.seq).some((event) => event.type === "permission/preset" && event.data.preset === "read-only") ? { kind: "pending" } : {
54
57
  kind: "error",
55
58
  message: "permission command succeeded without applying read-only"
56
59
  };
57
- const currentPreset = latestPreset?.type === "permission/preset" ? latestPreset.data.preset : void 0;
58
- const currentSandbox = latestSandbox?.type === "sandbox/mode" ? latestSandbox.data.mode : void 0;
59
- return currentPreset === "read-only" && currentSandbox === "read-only" ? { kind: "ready" } : { kind: "pending" };
60
60
  }
61
61
  return { kind: "pending" };
62
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kirkchinese/dsh-citeciter",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Durable citation-thread learning companion for DeepSeek Harness conversations",
5
5
  "keywords": [
6
6
  "deepseek-harness",