@kirkchinese/dsh-citeciter 0.4.2 → 0.5.0

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.
Files changed (44) hide show
  1. package/README.md +37 -28
  2. package/README.zh.md +37 -28
  3. package/lib/client.js +32133 -2518
  4. package/lib/index.js +1304 -126
  5. package/lib/{typert-common-4_cbghYz.js → typert-common-DKqYKnRO.js} +23 -3
  6. package/lib/typert.host.js +7 -3
  7. package/lib/typert.remote-client.js +2 -2
  8. package/lib/types/assistant-content.d.ts +7 -0
  9. package/lib/types/board.d.ts +237 -0
  10. package/lib/types/client/answer.d.ts +1 -1
  11. package/lib/types/client/companion-controller.d.ts +10 -4
  12. package/lib/types/client/components/BlackboardWorkspace.d.ts +16 -0
  13. package/lib/types/client/components/BoardView.d.ts +12 -0
  14. package/lib/types/client/components/CiteCiterSettings.d.ts +3 -1
  15. package/lib/types/client/components/CitePanel.d.ts +5 -1
  16. package/lib/types/client/components/DocumentReader.d.ts +5 -0
  17. package/lib/types/client/components/SelectionMenu.d.ts +5 -1
  18. package/lib/types/client/components/UpdateNotice.d.ts +11 -0
  19. package/lib/types/client/conversation-dom.d.ts +19 -4
  20. package/lib/types/client/entries.d.ts +60 -0
  21. package/lib/types/client/entry-ids.d.ts +3 -0
  22. package/lib/types/client/hotkeys.d.ts +19 -0
  23. package/lib/types/client/reader-controller.d.ts +33 -0
  24. package/lib/types/client/reader-selection.d.ts +12 -0
  25. package/lib/types/client/request-guard.d.ts +24 -1
  26. package/lib/types/client/rich-content.d.ts +6 -0
  27. package/lib/types/client/selection.d.ts +4 -2
  28. package/lib/types/client/topic-presentation.d.ts +15 -0
  29. package/lib/types/client/types.d.ts +36 -1
  30. package/lib/types/client/update-controller.d.ts +57 -0
  31. package/lib/types/documents.d.ts +45 -0
  32. package/lib/types/evidence-text.d.ts +29 -0
  33. package/lib/types/index.d.ts +13 -14
  34. package/lib/types/observer.d.ts +27 -2
  35. package/lib/types/service.d.ts +81 -0
  36. package/lib/types/topic-runtime.d.ts +302 -4
  37. package/lib/types/topic.d.ts +604 -43
  38. package/lib/types/typert-common.d.ts +278 -11
  39. package/lib/types/typert.host.d.ts +669 -34
  40. package/lib/types/typert.remote-client.d.ts +3 -0
  41. package/lib/types/update.d.ts +68 -0
  42. package/lib/update-u9-6c_qp.js +1072 -0
  43. package/package.json +7 -4
  44. package/lib/topic-BVNCaVbJ.js +0 -307
package/README.md CHANGED
@@ -11,31 +11,38 @@ Investigate any line in a DSH response—without stopping the Agent or changing
11
11
  ## Highlights
12
12
 
13
13
  - **Exact source binding.** CiteCiter rechecks the visible selection against the committed response before creating a Topic.
14
- - **No need to wait.** A committed model response can be investigated while the surrounding Agent turn continues.
14
+ - **No need to wait.** A committed intermediate model call can be investigated while the surrounding Agent turn continues, including its reasoning or a selection spanning reasoning and answer text.
15
15
  - **Durable investigations.** Private Topics support natural follow-up questions and reopen after a refresh or restart.
16
16
  - **Evidence with no write access.** CiteCiter can inspect committed source events and search or read project files, but cannot change the source Session or workspace.
17
17
  - **Inspectable work.** Questions, answers, source reads, and project-file checks remain together in the investigation panel.
18
+ - **Presenter Topics.** A read-only teacher can build a durable formula, diagram, table, or animation board through atomic tool commits while it explains.
18
19
  - **Side-by-side workflow.** The conversation concedes space whenever the panel and a usable conversation fit; tighter layouts fall back to an overlay.
20
+ - **Web update notices.** CiteCiter checks npm's stable version and offers a copyable upgrade command without granting the browser package-management access.
19
21
 
20
22
  ## Use
21
23
 
22
- 1. Select text inside a committed assistant model call. The surrounding Agent turn may still be running.
23
- 2. Right-click the selection, enter your first question, and choose `Citer!`.
24
+ 1. Select answer or reasoning inside a committed assistant model call. When reasoning is collapsed, begin the selection on its disclosure row; the row represents the complete model call. The surrounding Agent turn may still be running.
25
+ 2. Right-click the selection, enter your first question, and choose `开始提问` or `开始讲解`.
24
26
  3. CiteCiter creates a new Topic in the investigation panel.
25
27
  4. Continue asking questions there, or reopen an earlier Topic from CiteCiter's Topic rail.
26
28
  5. Change the Topic model, reasoning effort, title, archive state, or panel width without changing the source Session.
27
29
 
28
- ## Install v0.4.2
30
+ ## Install v0.5.0
29
31
 
30
- CiteCiter 0.4.2 requires Node.js `^22.19.0 || >=24.0.0` and DSH `>=0.1.1-rc.1 <0.1.1-rc.3`.
32
+ CiteCiter 0.5.0 requires Node.js `^22.19.0 || >=24.0.0` and DSH `>=0.1.1-rc.1 <0.1.1-rc.3`.
31
33
 
32
34
  For DSH Web:
33
35
 
34
36
  ```sh
35
- dsh plugin --profile web add @kirkchinese/dsh-citeciter@0.4.2
37
+ dsh plugin --profile web add @kirkchinese/dsh-citeciter@0.5.0
38
+ dsh plugin --profile web list --depth 0
36
39
  ```
37
40
 
38
- Restart DSH Web and refresh the page. Packaged Desktop adaptation is deferred; CiteCiter 0.4.2 does not provide a supported Desktop installation path.
41
+ Confirm that the list shows `@kirkchinese/dsh-citeciter@0.5.0`, then restart DSH Web and refresh the page.
42
+
43
+ CiteCiter 0.5.0 is Web-only.
44
+ Upgrading from v0.3 does not migrate or rewrite existing Topics, settings, or source Sessions.
45
+ Users remaining on DSH `0.1.0-rc.7` should keep CiteCiter 0.3.2.
39
46
 
40
47
  ## Context modes
41
48
 
@@ -43,41 +50,43 @@ Observer is the default. It creates an independent Topic and reads committed sou
43
50
 
44
51
  Exact Fork is an advanced mode for a source turn that has already ended. `exact-when-available` uses Exact Fork when a stable boundary exists and otherwise falls back to Observer.
45
52
 
46
- ## Compatibility and verification
53
+ ## Presenter board
47
54
 
48
- | Host | CiteCiter version | Status |
49
- |---|---|---|
50
- | DSH Web `0.1.1-rc.2` | `0.4.2` | Linux package, regression tests, and real-browser selection checks passed; real-provider acceptance was not run |
51
- | [DSH Desktop 2.0.2](https://github.com/anywhere-labs/deepseek-harness-desktop) with bundled DSH `0.1.1-rc.2` | Future target | Adaptation and native acceptance are deferred; no packaged-Desktop compatibility claim |
52
- | [dataelement DSH Desktop](https://github.com/dataelement/dsh-desktop) development shell with DSH `0.1.1-rc.1` | `0.4.0` only | Historical conditional Linux source-shell evidence |
53
- | DSH Web `0.1.0-rc.7` | `0.3.2` | Previous stable line |
54
- | DSH TUI | — | Not supported yet |
55
+ Presenter Topics use the standard Agent loop plus a scoped `blackboard_apply` tool. A board batch becomes visible only after its paired tool result succeeds; a failed or interrupted batch leaves the previous board intact. Refresh and restart project the final board from the private Topic Session rather than storing a second mutable copy.
55
56
 
56
- The demo uses a deterministic fixture to show the workflow; it is not real-provider or packaged-Desktop acceptance evidence.
57
+ ## Web update notices
57
58
 
58
- ## Upgrade from an earlier version
59
+ The Web client checks npm's `latest` stable version without blocking startup. A newer version appears in a persistent upper-right card with `更新`, `下次一定`, and `不再提示`: the first action copies the standard Web Profile install command, the second hides that version for the current tab session, and the third disables future checks until the CiteCiter settings page enables them again. CiteCiter never runs the install command; execute it in a terminal and restart DSH Web.
59
60
 
60
- To install or upgrade v0.4.2 in Web:
61
+ The first release containing the checker still needs one manual upgrade because an older installed build cannot run code it does not contain. Custom Web Profiles must replace `web` in the copied command. Check the newer release's DSH requirement before installing; the notice compares package versions and does not assert host compatibility. Desktop updates are outside this feature.
61
62
 
62
- ```sh
63
- dsh plugin --profile web add @kirkchinese/dsh-citeciter@0.4.2
64
- dsh plugin --profile web list --depth 0
65
- ```
63
+ ## Host developer API
64
+
65
+ 0.5.0 provides the v1 Host service `ctx.citeciterRuntime` (`create`, `ask`, `get`, `list`, and `delete`) and the `citeciter/topic-created`, `citeciter/topic-updated`, and `citeciter/topic-deleted` events. Browser entry registration, presets, and a separate client face remain planned for M4/M5, so frontend extension APIs are not stable yet.
66
+
67
+ ## Supported hosts
66
68
 
67
- Packaged Desktop adaptation is deferred and is not part of the supported 0.4.2 upgrade path.
69
+ | Host | CiteCiter version | Notes |
70
+ |---|---|---|
71
+ | DSH Web `0.1.1-rc.1` and `0.1.1-rc.2` | `0.5.0` | Fresh-profile Linux package, assembled browser smokes, and a real DeepSeek provider run passed |
72
+ | [DSH Desktop 2.0.2](https://github.com/anywhere-labs/deepseek-harness-desktop) with bundled DSH `0.1.1-rc.2` | Future target | Packaged Desktop installers have not been accepted yet |
73
+ | [dataelement DSH Desktop](https://github.com/dataelement/dsh-desktop) development shell with DSH `0.1.1-rc.1` | `0.4.0` only | Historical Linux source-shell record |
74
+ | DSH Web `0.1.0-rc.7` | `0.3.2` | Previous stable line |
75
+ | DSH TUI | — | Not supported yet |
68
76
 
69
- Upgrading from v0.3 does not migrate or rewrite existing Topics, settings, or source Sessions. Users remaining on DSH `0.1.0-rc.7` should keep CiteCiter 0.3.2.
77
+ The demo is only a workflow illustration. It is not packaged-Desktop acceptance evidence.
70
78
 
71
79
  ## Limitations
72
80
 
73
- - A selection must include at least one committed assistant model call. User-only ranges, tool-only ranges, and still-streaming fragments cannot anchor a Citation.
81
+ - A selection must include at least one committed assistant model call. User-only ranges, tool-only ranges, and still-streaming fragments cannot anchor a Citation. A committed model call's reasoning disclosure row may represent that complete call.
74
82
  - Renderer-generated KaTeX layout and footnote numbers cannot be cited directly because they lack stable source coordinates.
75
83
  - Exact Fork cannot start from an open source turn.
76
84
  - Source-file access depends on the running DSH filesystem service and remains read-only.
77
- - Read Frog translated selections are a best-effort compatibility path on DSH rc.1/rc.2 and activate only when its complete private marker set is present; ordinary DSH selection does not depend on Read Frog.
78
- - DSH does not yet expose a public additive right-dock contribution point. CiteCiter therefore uses a reversible private AppFrame grid adapter whenever the panel and conversation fit; it preserves the layout's details preference but temporarily hides that column while the investigation panel is open, and it must be retested for every supported DSH release.
85
+ - Read Frog translated selections are only a compatibility fallback for DSH rc.1/rc.2 and only activate when the full private marker set is present.
86
+ - DSH still has no public right-dock extension point. When side-by-side layout fits, CiteCiter temporarily adjusts the layout; every new DSH version needs that path retested.
79
87
  - Topics are Host-durable. When Desktop restarts on a different loopback port, CiteCiter falls back to the most recently updated Topic because browser local storage is origin-scoped; configure a fixed Desktop port to restore the exact last-viewed Topic.
80
- - CiteCiter 0.4.2 makes no packaged-Desktop compatibility claim; native Windows and macOS adaptation continues separately.
88
+ - Permanent Topic deletion is owner maintenance over CiteCiter's fixed private JSONL root because DSH rc.2 has no Session deletion API. One active CiteCiter process must own a DSH home; sharing that home between live processes is unsupported.
89
+ - CiteCiter 0.5.0 is Web-only; packaged Desktop support is still pending.
81
90
  - There is currently no TUI interaction adapter.
82
91
  - DSH is prerelease software; later DSH API versions may require a CiteCiter update.
83
92
 
package/README.zh.md CHANGED
@@ -11,31 +11,38 @@
11
11
  ## 核心能力
12
12
 
13
13
  - **精确绑定来源。** 创建 Topic 前,CiteCiter 会把可见选区与已经提交的回答重新核对。
14
- - **不用等待主任务。** 一次模型回答提交后即可开始调查,外层 Agent 轮次可以继续运行。
14
+ - **不用等待主任务。** 一次中间模型调用提交后即可开始调查,外层 Agent 轮次可以继续运行;思考内容和跨越“思考+回答”的选区也可以使用。
15
15
  - **调查可以持续。** 私有 Topic 支持自然续问,刷新或重启后仍能重新打开。
16
16
  - **有证据、无写权限。** CiteCiter 能检查来源中已提交的事件,也能搜索和阅读项目文件,但不能改变来源 Session 或工作区。
17
17
  - **过程可检查。** 问题、回答、来源读取和项目文件核查都留在调查面板中。
18
+ - **讲解 Topic。** 只读老师可以在讲解时通过原子工具提交构建持久的公式、图形、表格或动画黑板。
18
19
  - **并排工作流。** 面板和可用主对话能同时容纳时,主对话会自动让出空间;更紧的布局才回退为覆盖模式。
20
+ - **Web 更新提醒。** CiteCiter 检查 npm 中的稳定版本,并提供可复制的升级命令,无需给浏览器包管理权限。
19
21
 
20
22
  ## 使用
21
23
 
22
- 1. 在一次已经提交的助手模型调用中选择文字;外层 Agent 轮次可以仍在运行。
23
- 2. 右键选区,输入第一个问题,然后点击 `Citer!`。
24
+ 1. 在一次已经提交的助手模型调用中选择回答或思考内容;思考正文未展开时,可以从折叠行开始选择,该行代表该次完整模型调用。外层 Agent 轮次可以仍在运行。
25
+ 2. 右键选区,输入第一个问题,然后点击“开始提问”或“开始讲解”。
24
26
  3. CiteCiter 在调查面板中创建一个新 Topic。
25
27
  4. 在 Topic 中继续追问,或从 CiteCiter 的 Topic 栏恢复旧讨论。
26
28
  5. 独立调整模型、思考强度、标题、归档状态和面板宽度,不改变来源 Session。
27
29
 
28
- ## 安装 v0.4.2
30
+ ## 安装 v0.5.0
29
31
 
30
- CiteCiter 0.4.2 需要 Node.js `^22.19.0 || >=24.0.0` 与 DSH `>=0.1.1-rc.1 <0.1.1-rc.3`。
32
+ CiteCiter 0.5.0 需要 Node.js `^22.19.0 || >=24.0.0` 与 DSH `>=0.1.1-rc.1 <0.1.1-rc.3`。
31
33
 
32
34
  DSH Web 使用:
33
35
 
34
36
  ```sh
35
- dsh plugin --profile web add @kirkchinese/dsh-citeciter@0.4.2
37
+ dsh plugin --profile web add @kirkchinese/dsh-citeciter@0.5.0
38
+ dsh plugin --profile web list --depth 0
36
39
  ```
37
40
 
38
- 安装后重启 DSH Web 并刷新页面。正式 Desktop 适配已经暂缓;CiteCiter 0.4.2 不提供受支持的 Desktop 安装路径。
41
+ 请确认列表显示 `@kirkchinese/dsh-citeciter@0.5.0`,然后重启 DSH Web 并刷新页面。
42
+
43
+ CiteCiter 0.5.0 只提供 Web 安装路径。
44
+ 从 v0.3 升级不会迁移或重写现有 Topic、设置或来源 Session。
45
+ 仍在 DSH `0.1.0-rc.7` 上运行的用户应继续使用 CiteCiter 0.3.2。
39
46
 
40
47
  ## 上下文模式
41
48
 
@@ -43,41 +50,43 @@ Observer 是默认模式。它创建独立 Topic,并按需读取已经提交
43
50
 
44
51
  Exact Fork 是面向已结束来源轮次的高级模式。`exact-when-available` 在存在稳定边界时使用 Exact Fork,否则回退到 Observer。
45
52
 
46
- ## 兼容性与验证
53
+ ## 讲解黑板
47
54
 
48
- | 宿主 | CiteCiter 版本 | 状态 |
49
- |---|---|---|
50
- | DSH Web `0.1.1-rc.2` | `0.4.2` | Linux 包、回归测试与真实浏览器选区检查通过;真实提供方验收未运行 |
51
- | [DSH Desktop 2.0.2](https://github.com/anywhere-labs/deepseek-harness-desktop)(内置 DSH `0.1.1-rc.2`) | 后续目标 | 适配与原生验收暂缓;不声明正式 Desktop 安装包兼容性 |
52
- | [dataelement DSH Desktop](https://github.com/dataelement/dsh-desktop) 源码开发壳(内置 DSH `0.1.1-rc.1`) | 仅 `0.4.0` | 历史上的有条件 Linux 源码壳证据 |
53
- | DSH Web `0.1.0-rc.7` | `0.3.2` | 旧版稳定线 |
54
- | DSH TUI | — | 暂不支持 |
55
+ 讲解 Topic 使用标准 Agent loop 和 scoped `blackboard_apply` 工具。黑板批次只在配对工具结果成功后显示;失败或中断批次保留此前画面。刷新和重启从私有 Topic Session 投影最终黑板,不存储第二份可变副本。
55
56
 
56
- 动图使用确定性测试场景展示交互,不作为真实提供方或正式 Desktop 安装包验收证据。
57
+ ## Web 更新提醒
57
58
 
58
- ## 从旧版本升级
59
+ Web 客户端在不阻塞启动的情况下检查 npm `latest` 稳定版本。发现新版本后,右上角持久卡片提供 `更新`、`下次一定` 和 `不再提示`:第一个操作复制标准 Web Profile 安装命令,第二个操作在当前标签页会话内隐藏该版本,第三个操作关闭后续检查,直到在 CiteCiter 设置页重新开启。CiteCiter 不会执行安装命令;请在终端执行并重启 DSH Web。
59
60
 
60
- 在 Web 安装或升级 v0.4.2:
61
+ 首次包含检查器的版本仍需手动升级一次,因为已经安装的旧构建无法运行尚未包含的代码。使用自定义 Web Profile 时需替换复制命令中的 `web`。安装前请核对新版对 DSH 的要求;提醒只比较包版本,不声明宿主兼容性。此功能不包含 Desktop 更新。
61
62
 
62
- ```sh
63
- dsh plugin --profile web add @kirkchinese/dsh-citeciter@0.4.2
64
- dsh plugin --profile web list --depth 0
65
- ```
63
+ ## Host 开发接口
64
+
65
+ 0.5.0 提供 Host 侧 v1 服务 `ctx.citeciterRuntime`(`create`、`ask`、`get`、`list`、`delete`)和 `citeciter/topic-created`、`citeciter/topic-updated`、`citeciter/topic-deleted` 事件。浏览器入口注册、preset 和独立客户端 face 仍在 M4/M5 计划内,因此前端扩展接口尚未稳定。
66
+
67
+ ## 支持范围
66
68
 
67
- 正式 Desktop 适配已经暂缓,不属于 0.4.2 的受支持升级路径。
69
+ | 宿主 | CiteCiter 版本 | 说明 |
70
+ |---|---|---|
71
+ | DSH Web `0.1.1-rc.1` 与 `0.1.1-rc.2` | `0.5.0` | 全新 profile Linux 包、组装浏览器冒烟与真实 DeepSeek 提供方验收通过 |
72
+ | [DSH Desktop 2.0.2](https://github.com/anywhere-labs/deepseek-harness-desktop)(内置 DSH `0.1.1-rc.2`) | 后续目标 | 正式 Desktop 安装包仍未验收 |
73
+ | [dataelement DSH Desktop](https://github.com/dataelement/dsh-desktop) 源码开发壳(内置 DSH `0.1.1-rc.1`) | 仅 `0.4.0` | 历史上的 Linux 源码壳记录 |
74
+ | DSH Web `0.1.0-rc.7` | `0.3.2` | 旧版稳定线 |
75
+ | DSH TUI | — | 暂不支持 |
68
76
 
69
- 从 v0.3 升级不会迁移或重写现有 Topic、设置或来源 Session。仍在 DSH `0.1.0-rc.7` 上运行的用户应继续使用 CiteCiter 0.3.2。
77
+ 动图只是流程演示,不代表 Desktop 安装包验收结果。
70
78
 
71
79
  ## 已知限制
72
80
 
73
- - 选区中必须至少包含一个已经提交的助手模型回答;纯用户消息、纯工具行和仍在流式输出的片段不能作为引用锚点。
81
+ - 选区中必须至少包含一个已经提交的助手模型调用;纯用户消息、纯工具行和仍在流式输出的片段不能作为引用锚点。已提交模型调用的思考折叠行可以代表该次完整调用。
74
82
  - 渲染器生成的 KaTeX 排版和脚注编号没有稳定原文坐标,不能直接引用。
75
83
  - Exact Fork 不能从仍在运行的来源轮次开始。
76
84
  - 来源文件访问依赖当前 DSH 文件系统服务,并始终保持只读。
77
- - Read Frog 翻译选区是 DSH rc.1/rc.2 上的 best-effort 兼容路径,仅在其完整私有标记同时存在时启用;普通 DSH 选区不依赖 Read Frog。
78
- - DSH 尚未提供公开的增量右侧 dock 布局扩展点。CiteCiter 因此在面板与主对话能够同时容纳时使用可逆的私有 AppFrame grid 适配器;它保留布局的 details 偏好,但在调查面板打开期间临时隐藏该列,并且每个受支持的 DSH 版本都必须重新验证。
85
+ - Read Frog 翻译选区只是 DSH rc.1/rc.2 的兼容补丁,只有完整私有标记都在时才会启用。
86
+ - DSH 还没有公开的右侧 dock 扩展点。能并排显示时,CiteCiter 会临时调整布局;换到新的 DSH 版本后需要重新确认这一块。
79
87
  - Topic 由 Host 持久保存。Desktop 重启到不同 loopback 端口时,浏览器 localStorage 会因 origin 改变而失去精确指针,CiteCiter 将回退到最近更新的 Topic;需要精确恢复“上次查看”时应配置固定 Desktop 端口。
80
- - CiteCiter 0.4.2 不声明正式 Desktop 安装包兼容性;Windows 与 macOS 原生适配将另行继续。
88
+ - DSH rc.2 没有 Session 删除 API,因此 Topic 永久删除是对 CiteCiter 固定私有 JSONL 根目录执行的所有者维护。一个 DSH home 只能由一个活动 CiteCiter 进程占用,不支持多个活动进程共享。
89
+ - CiteCiter 0.5.0 只提供 Web 安装路径;Desktop 的正式安装包还没跟上。
81
90
  - 当前没有 TUI 交互适配器。
82
91
  - DSH 仍处于预发布阶段,后续 API 版本可能要求同步更新 CiteCiter。
83
92