dsh-convo-paper-plugin 0.1.0 → 0.1.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
@@ -18,10 +18,17 @@ DeepSeek Harness 插件版:把对话整理成论文,并用确定性检索核
18
18
  插件需要装进 profile(不是拷文件夹):
19
19
 
20
20
  ```bash
21
- dsh plugin --profile desktop add github:LiShaozheli/dsh-convo-paper#path:/plugin
21
+ dsh plugin --profile desktop add dsh-convo-paper-plugin@0.1.1 # 从 npm 装(推荐;0.1.0 有激活缺陷)
22
+ # 或直接从仓库装:dsh plugin --profile desktop add github:LiShaozheli/dsh-convo-paper#path:/plugin
23
+ # 本地开发:dsh plugin --profile desktop add link:C:/path/to/dsh-convo-paper/plugin
22
24
  ```
23
25
 
24
- 装完重启 DSH,`设置 → 插件` 里会出现 **convo-paper**,输入框输入 `/paper` 可用。
26
+ 装完在侧栏 **插件 → 已安装插件** 里出现 **convo-paper · 对话转论文**(有 HMR 的 profile 会直接热加载,没有则重启 DSH),输入框输入 `/paper` 可用。
27
+
28
+ > **0.1.0 的激活缺陷**:插件曾用 `ctx.commands` 读取未在 `inject` 中声明的服务,Cordis 4 会抛
29
+ > `cannot get property "commands" without inject`,导致整条 entry 回滚、5 个工具一个都没注册 ——
30
+ > 表现就是「插件装了但像没装」。0.1.1 改用 `ctx.reflect.get('commands', false)`,并加了
31
+ > 一个「宿主没有 commands 服务」的回归用例。
25
32
 
26
33
  也可以只在某个 profile 里试用:
27
34
 
@@ -29,6 +36,7 @@ dsh plugin --profile desktop add github:LiShaozheli/dsh-convo-paper#path:/plugin
29
36
  dsh plugin --profile web add github:LiShaozheli/dsh-convo-paper#path:/plugin
30
37
  ```
31
38
 
39
+
32
40
  ## 与技能版的取舍
33
41
 
34
42
  | | 插件版 | 技能版 |
package/dsh/index.js CHANGED
@@ -175,10 +175,15 @@ export function apply(ctx) {
175
175
  presentCall: (args = {}) => ({ card: 'generic', title: '对话转论文', kind: 'edit', rawInput: String(args.session || 'latest') }),
176
176
  });
177
177
 
178
- if (ctx.commands && typeof ctx.commands.register === 'function') {
178
+ // Cordis 4 refuses to read an undeclared service through `ctx.commands`
179
+ // ("cannot get property ... without inject") and that throw would roll back
180
+ // the whole entry — tools included. Read the service reflectively instead,
181
+ // which needs no inject and stays undefined on hosts without commands.
182
+ const commands = ctx.reflect && typeof ctx.reflect.get === 'function' ? ctx.reflect.get('commands', false) : undefined;
183
+ if (commands && typeof commands.register === 'function') {
179
184
  ctx.effect(
180
185
  () =>
181
- ctx.commands.register({
186
+ commands.register({
182
187
  name: 'paper',
183
188
  description: '把当前(或指定)会话整理成论文骨架',
184
189
  input: { hint: '[latest|<会话id>] [--out <目录>]' },
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "convo-paper",
4
+ "description": "Turn a DSH conversation into a paper draft: speaker-aware transcript, claims with provenance, a section skeleton, and references verified against Crossref / DataCite / OpenAlex / arXiv."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "convo-paper · 对话转论文",
4
+ "description": "把一段 DSH 对话整理成论文:按说话人还原上下文,提炼带出处的论点,生成章节骨架,并用 Crossref / DataCite / OpenAlex / arXiv 逐条核验参考文献。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "dsh-convo-paper-plugin",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "DeepSeek Harness 插件:把对话整理成论文。按说话人还原上下文、提炼带出处的论点、生成论文骨架,并用 Crossref/DataCite/OpenAlex/arXiv 逐条核验引用。",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": "./dsh/index.js",
8
- "./package.json": "./package.json"
8
+ "./package.json": "./package.json",
9
+ "./locale/*.json": "./locale/*.json"
9
10
  },
10
11
  "dsh": {
11
12
  "bundle": {
@@ -17,6 +18,7 @@
17
18
  },
18
19
  "files": [
19
20
  "dsh",
21
+ "locale",
20
22
  "cordis.patch.yml",
21
23
  "README.md"
22
24
  ],