relay-dsh-plugin-claude 0.1.4 → 0.2.0-rc.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
@@ -1,12 +1,19 @@
1
1
  # Claude Code Conversations for DeepSeek Harness
2
2
 
3
+ > **Now supports the latest DSH `0.1.2-alpha.2`.** The same plugin release is verified on DSH `0.1.2-alpha.2` and `0.1.1-rc.2`. [Install it and try the latest DSH](https://www.npmjs.com/package/relay-dsh-plugin-claude) · [Compatibility details](docs/dsh-0.1.2-alpha.2.md).
4
+
5
+ ```bash
6
+ npx @deepseek-ai/dsh@0.1.2-alpha.2 plugin --profile web add relay-dsh-plugin-claude@0.2.0-rc.1
7
+ npx @deepseek-ai/dsh@0.1.2-alpha.2 web
8
+ ```
9
+
3
10
  [![npm version](https://img.shields.io/npm/v/relay-dsh-plugin-claude?label=npm)](https://www.npmjs.com/package/relay-dsh-plugin-claude)
4
11
  [![CI](https://github.com/yangbobo2021/relay-dsh-plugin-claude/actions/workflows/ci.yml/badge.svg)](https://github.com/yangbobo2021/relay-dsh-plugin-claude/actions/workflows/ci.yml)
5
12
  [![npm downloads](https://img.shields.io/npm/dm/relay-dsh-plugin-claude?label=downloads)](https://www.npmjs.com/package/relay-dsh-plugin-claude)
6
13
  [![GitHub stars](https://img.shields.io/github/stars/yangbobo2021/relay-dsh-plugin-claude?style=flat)](https://github.com/yangbobo2021/relay-dsh-plugin-claude/stargazers)
7
14
  [![MIT license](https://img.shields.io/github/license/yangbobo2021/relay-dsh-plugin-claude)](LICENSE)
8
- [![DSH compatibility](https://img.shields.io/badge/DSH-0.1.1--rc.2-2f7d68)](https://github.com/deepseek-ai/deepseek-harness)
9
- [![npm provenance](https://img.shields.io/badge/npm_provenance-verified-2f9e44)](https://www.npmjs.com/package/relay-dsh-plugin-claude/v/0.1.4)
15
+ [![DSH compatibility](https://img.shields.io/badge/DSH-0.1.1--rc.2%20%7C%200.1.2--alpha.2-2f7d68)](https://github.com/deepseek-ai/deepseek-harness)
16
+ [![npm provenance](https://img.shields.io/badge/npm_provenance-verified-2f9e44)](https://www.npmjs.com/package/relay-dsh-plugin-claude/v/0.1.5)
10
17
 
11
18
  English | [中文](README.zh.md)
12
19
 
@@ -109,7 +116,7 @@ Use `@latest` to install the current stable release:
109
116
  npx @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add relay-dsh-plugin-claude@latest
110
117
  ```
111
118
 
112
- At the time of writing, `latest` resolves to stable version `0.1.4`. The linked
119
+ At the time of writing, `latest` resolves to stable version `0.1.5`. The linked
113
120
  npm page is the source of truth for the current version.
114
121
 
115
122
  #### npm prerelease (recommended during DSH preview)
@@ -122,7 +129,7 @@ contains the latest model-selection synchronization fix:
122
129
  npx @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add relay-dsh-plugin-claude@next
123
130
  ```
124
131
 
125
- At the time of writing, `next` resolves to `0.1.4`.
132
+ At the time of writing, `next` resolves to `0.1.5`.
126
133
 
127
134
  #### GitHub development build
128
135
 
@@ -136,7 +143,7 @@ npx @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add github:yangbobo2021/rel
136
143
  full Commit SHA instead. For example:
137
144
 
138
145
  ```bash
139
- npx @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add github:yangbobo2021/relay-dsh-plugin-claude#v0.1.4
146
+ npx @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add github:yangbobo2021/relay-dsh-plugin-claude#v0.1.5
140
147
  ```
141
148
 
142
149
  The official DSH CLI initializes the `web` Profile if it does not exist, asks
@@ -173,8 +180,11 @@ activates the bundle and registers the managed **Claude Code** mode automaticall
173
180
 
174
181
  ### 5. Import an existing Claude terminal Session
175
182
 
176
- 1. Open the target Workspace or one of its Sessions in DSH.
177
- 2. Select **Import Claude Sessions** below the Workspace list.
183
+ 1. Select **Import sessions...** below the Workspace list, then choose **Import
184
+ from Claude**.
185
+ 2. In the dialog, confirm or change the visible **Target Workspace**, then select
186
+ **Scan Sessions**. The current Session owner or recent Workspace is only the
187
+ initial selection; scanning never starts before this confirmation.
178
188
  3. Review the full Session IDs, titles, source paths, activity times, and import
179
189
  status. Select one, several, or all Sessions.
180
190
  4. Select **Import selected**, then open the imported DSH Session.
@@ -183,7 +193,7 @@ activates the bundle and registers the managed **Claude Code** mode automaticall
183
193
 
184
194
  The selector uses the Claude Agent SDK's public Session APIs and matches the
185
195
  terminal `/resume` scope. It excludes worktrees, SDK/headless Sessions,
186
- already-bound Sessions, and Sessions outside the exact registered Workspace.
196
+ already-bound Sessions, and Sessions outside the explicitly selected Workspace.
187
197
  The imported history is a one-time presentation snapshot of user text, visible
188
198
  assistant text and thinking, and completed textual tool activity. Unknown or
189
199
  private blocks are skipped; Claude's source transcript is never modified.
@@ -271,12 +281,13 @@ This repository was designed and compatibility-tested in
271
281
  long-running agent work, external-event delivery, reusable DSH workbench views,
272
282
  and multiple conversation backends.
273
283
 
274
- The plugin is independently installable. It has no runtime dependency on the
275
- Relay application, Relay Events, or another Relay plugin. It does not replace the
276
- official DSH layout or install Files and Terminal views. This separation lets a
277
- user install only Claude while the broader Relay project can compose Codex,
278
- Claude, events, waits, monitors, and workbench extensions when those capabilities
279
- are needed.
284
+ The plugin is independently installable. Its only Relay package dependency is
285
+ the provider-neutral session import hub, which the package manager installs
286
+ automatically. It has no runtime dependency on the Relay application, Relay
287
+ Events, or another feature plugin. It does not replace the official DSH layout
288
+ or install Files and Terminal views. This separation lets a user install only
289
+ Claude while the broader Relay project can compose Codex, Claude, events, waits,
290
+ monitors, and workbench extensions when those capabilities are needed.
280
291
 
281
292
  Explore or star Relay to follow that broader work:
282
293
  <https://github.com/yangbobo2021/Relay>.
@@ -345,3 +356,13 @@ tests reject accidental runtime dependencies on Relay or another feature plugin.
345
356
 
346
357
  Report bugs and feature requests in this repository's
347
358
  [issue tracker](https://github.com/yangbobo2021/relay-dsh-plugin-claude/issues).
359
+
360
+ ### New candidate installation (available only after publication)
361
+
362
+ The same candidate targets DSH `0.1.1-rc.2` and `0.1.2-alpha.2`; this version and Git tag are not published yet.
363
+
364
+ ```sh
365
+ npx @deepseek-ai/dsh@0.1.2-alpha.2 plugin --profile web add relay-dsh-plugin-claude@next
366
+ # Git tag alternative, after publication:
367
+ npx @deepseek-ai/dsh@0.1.2-alpha.2 plugin --profile web add github:yangbobo2021/relay-dsh-plugin-claude#v0.2.0-rc.1
368
+ ```
package/README.zh.md CHANGED
@@ -1,12 +1,19 @@
1
1
  # 在 DeepSeek Harness 中使用 Claude Code 对话
2
2
 
3
+ > **现已支持最新 DSH `0.1.2-alpha.2`。** 同一插件版本已在 DSH `0.1.2-alpha.2` 与 `0.1.1-rc.2` 上完成兼容验证。[安装插件,立即体验最新版 DSH](https://www.npmjs.com/package/relay-dsh-plugin-claude) · [兼容性详情](docs/dsh-0.1.2-alpha.2.md)。
4
+
5
+ ```bash
6
+ npx @deepseek-ai/dsh@0.1.2-alpha.2 plugin --profile web add relay-dsh-plugin-claude@0.2.0-rc.1
7
+ npx @deepseek-ai/dsh@0.1.2-alpha.2 web
8
+ ```
9
+
3
10
  [![npm 版本](https://img.shields.io/npm/v/relay-dsh-plugin-claude?label=npm)](https://www.npmjs.com/package/relay-dsh-plugin-claude)
4
11
  [![CI](https://github.com/yangbobo2021/relay-dsh-plugin-claude/actions/workflows/ci.yml/badge.svg)](https://github.com/yangbobo2021/relay-dsh-plugin-claude/actions/workflows/ci.yml)
5
12
  [![npm 月下载量](https://img.shields.io/npm/dm/relay-dsh-plugin-claude?label=downloads)](https://www.npmjs.com/package/relay-dsh-plugin-claude)
6
13
  [![GitHub Stars](https://img.shields.io/github/stars/yangbobo2021/relay-dsh-plugin-claude?style=flat)](https://github.com/yangbobo2021/relay-dsh-plugin-claude/stargazers)
7
14
  [![MIT 许可证](https://img.shields.io/github/license/yangbobo2021/relay-dsh-plugin-claude)](LICENSE)
8
- [![DSH 兼容版本](https://img.shields.io/badge/DSH-0.1.1--rc.2-2f7d68)](https://github.com/deepseek-ai/deepseek-harness)
9
- [![npm 来源证明](https://img.shields.io/badge/npm_provenance-verified-2f9e44)](https://www.npmjs.com/package/relay-dsh-plugin-claude/v/0.1.4)
15
+ [![DSH 兼容版本](https://img.shields.io/badge/DSH-0.1.1--rc.2%20%7C%200.1.2--alpha.2-2f7d68)](https://github.com/deepseek-ai/deepseek-harness)
16
+ [![npm 来源证明](https://img.shields.io/badge/npm_provenance-verified-2f9e44)](https://www.npmjs.com/package/relay-dsh-plugin-claude/v/0.1.5)
10
17
 
11
18
  [English](README.md) | 中文
12
19
 
@@ -104,7 +111,7 @@ claude
104
111
  npx @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add relay-dsh-plugin-claude@latest
105
112
  ```
106
113
 
107
- 本文更新时,`latest` 指向稳定版 `0.1.4`。最新版本请以链接中的 npm 页面
114
+ 本文更新时,`latest` 指向稳定版 `0.1.5`。最新版本请以链接中的 npm 页面
108
115
  为准。
109
116
 
110
117
  #### npm 预发布版(DSH 预览阶段推荐)
@@ -116,7 +123,7 @@ npx @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add relay-dsh-plugin-claude
116
123
  npx @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add relay-dsh-plugin-claude@next
117
124
  ```
118
125
 
119
- 本文更新时,`next` 指向 `0.1.4`。
126
+ 本文更新时,`next` 指向 `0.1.5`。
120
127
 
121
128
  #### GitHub 开发版
122
129
 
@@ -130,7 +137,7 @@ npx @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add github:yangbobo2021/rel
130
137
  SHA。例如:
131
138
 
132
139
  ```bash
133
- npx @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add github:yangbobo2021/relay-dsh-plugin-claude#v0.1.4
140
+ npx @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add github:yangbobo2021/relay-dsh-plugin-claude#v0.1.5
134
141
  ```
135
142
 
136
143
  官方 DSH CLI 会在需要时初始化 `web` Profile,通过 `pnpm` 安装所选软件包和
@@ -164,15 +171,16 @@ npx @deepseek-ai/dsh@0.1.1-rc.2 web
164
171
 
165
172
  ### 5. 导入已有的 Claude 终端会话
166
173
 
167
- 1. 在 DSH 中打开目标工作区或其中一个 Session。
168
- 2. 点击工作区列表下方的 **导入 Claude 会话**。
174
+ 1. 点击工作区列表下方的 **导入会话...**,然后选择 **从 Claude 导入**。
175
+ 2. 在弹窗中确认或切换可见的 **目标 Workspace**,然后点击 **扫描会话**。
176
+ 当前 Session 所属 Workspace 或最近 Workspace 只作为初始选项;确认前不会开始扫描。
169
177
  3. 检查完整 Session ID、标题、源路径、活动时间和导入状态,然后选择一个、
170
178
  多个或全部会话。
171
179
  4. 点击 **导入所选会话**,再打开导入后的 DSH Session。
172
180
  5. 发送下一条消息,确认它继续的是同一个原生 Claude Session。
173
181
 
174
182
  选择器只使用 Claude Agent SDK 的公开 Session API,其范围与终端 `/resume`
175
- 一致。它会排除 worktree、SDK/headless、已经绑定以及不属于当前精确注册工作区
183
+ 一致。它会排除 worktree、SDK/headless、已经绑定以及不属于用户所选精确工作区
176
184
  的 Session。导入历史是一次性的展示快照,包含用户文本、可见的助手文本与
177
185
  thinking,以及已有结果的文本工具活动。未知或私有块会被跳过,Claude 源转录
178
186
  不会被修改。
@@ -244,10 +252,11 @@ PNG;工作区中不会产生同名 PNG,也不会加载外部资源或执行
244
252
  兼容性验证。Relay 是面向长时间运行 Agent、外部事件投递、可复用 DSH
245
253
  工作台视图和多种对话后端的开源项目。
246
254
 
247
- 本插件可以独立安装。运行时不依赖 Relay 应用、Relay Events 或其他 Relay
248
- 插件,也不会替换 DSH 官方布局或安装 Files、Terminal 视图。用户可以只安装
249
- Claude;需要时,Relay 项目则可以进一步组合 Codex、Claude、事件、Wait、
250
- Monitor 和工作台扩展。
255
+ 本插件可以独立安装。唯一依赖的 Relay 包是由包管理器自动安装的中立“会话
256
+ 导入中心”;运行时不依赖 Relay 应用、Relay Events 或其他功能插件,也不会
257
+ 替换 DSH 官方布局或安装 Files、Terminal 视图。用户可以只安装 Claude;需要
258
+ 时,Relay 项目则可以进一步组合 Codex、Claude、事件、Wait、Monitor 和工作台
259
+ 扩展。
251
260
 
252
261
  可以访问或 Star Relay 仓库,关注这些更完整的工作:
253
262
  <https://github.com/yangbobo2021/Relay>。
@@ -309,11 +318,21 @@ DSH_ROOT=/path/to/deepseek-harness npm run verify
309
318
  npm pack
310
319
  ```
311
320
 
312
- `npm run verify` 会执行类型检查、测试和生产构建。边界测试会阻止插件意外
313
- 增加对 Relay 或其他功能插件的运行时依赖。
321
+ `npm run verify` 会执行类型检查、测试和生产构建。边界测试仅允许中立的会话
322
+ 导入中心依赖,并会阻止插件意外增加对 Relay 应用或其他功能插件的运行时依赖。
314
323
 
315
324
  ## 反馈
316
325
 
317
326
  请通过本仓库的
318
327
  [Issue Tracker](https://github.com/yangbobo2021/relay-dsh-plugin-claude/issues)
319
328
  报告错误或提出功能建议。
329
+
330
+ ### 新候选版安装(发布后才可用)
331
+
332
+ 同一候选面向 DSH `0.1.1-rc.2` 和 `0.1.2-alpha.2`;此版本和 Git Tag 目前尚未发布。
333
+
334
+ ```sh
335
+ npx @deepseek-ai/dsh@0.1.2-alpha.2 plugin --profile web add relay-dsh-plugin-claude@next
336
+ # Git tag alternative, after publication:
337
+ npx @deepseek-ai/dsh@0.1.2-alpha.2 plugin --profile web add github:yangbobo2021/relay-dsh-plugin-claude#v0.2.0-rc.1
338
+ ```
package/cordis.patch.yml CHANGED
@@ -1,3 +1,5 @@
1
1
  - insert:
2
+ - id: relay-session-import-for-claude
3
+ name: 'relay-dsh-plugin-session-import'
2
4
  - id: relay-claude-host
3
5
  name: 'relay-dsh-plugin-claude'
@@ -0,0 +1,34 @@
1
+ # DSH 双版本兼容候选(未发布)
2
+
3
+ 同一个 `0.2.0-rc.1` 候选包的兼容目标:
4
+
5
+ | DSH | 官方提交 |
6
+ | --- | --- |
7
+ | `0.1.1-rc.2` | `b150a551b8d465e31e418e1b2eaf5e79bbb7d28e` |
8
+ | `0.1.2-alpha.2` | `0a53fb55bea101816fa226bb964ae2bed71c343b` |
9
+
10
+ 不按 DSH 版本分别发包;不要求旧用户先升级管理器。没有自定义精确版本白名单。
11
+ DSH 可选 peer 使用版本范围表达声明,不把它当成旧宿主必然执行的安装拦截。
12
+ 当前没有发布、创建远端标签或改变 npm `latest` / `next`。预发布沿用普通 `next` 通道。
13
+
14
+ ## 本插件变更
15
+
16
+ 导入历史的工具调用 ID 兼容两种 Host 导出;前端事件服务及会话预设读取兼容两种接口;模型切换保持取消和过期结果隔离。真实 Claude 图片识别与 fork 上下文继承按用户要求暂缓,没有标为通过。
17
+
18
+ ## 验收方式与边界
19
+
20
+ 开发类型检查及构建使用准备好的官方 `0.1.2-alpha.2` 源码。构建一次后,将相同 tarball
21
+ 分别安装到两版官方 DSH 的独立临时 profile,检查 Host 启动、浏览器装配、功能注册及
22
+ 适用的受控功能;不修改官方源码或日常运行环境。
23
+ 跨插件结果在 Relay 的 `dsh-lab/dual-compatibility-20260831/` 中记录;插件独立测试命令:
24
+
25
+ ```sh
26
+ npm ci --ignore-scripts
27
+ # 非管理器插件需要准备好的官方 DSH 源码;管理器使用锁定的 npm 开发依赖。
28
+ export DSH_ROOT=/path/to/prepared/official/deepseek-harness
29
+ npm run verify
30
+ ```
31
+
32
+ 两版核心回归不等于所有外部服务、平台或未来 DSH 版本均已验证。
33
+ Claude 真实识图/fork 仍暂缓;Codex Default 模式原生提问限制、Workbench 刷新后尺寸不保留
34
+ 均不在本次兼容修复中关闭。所有公开 npm/GitHub 发布后的完整升级路径也需要发布后再验收。
@@ -26,6 +26,14 @@ promise that another Claude client is no longer writing it.
26
26
 
27
27
  ## Inventory and selection
28
28
 
29
+ The provider-neutral session import hub owns one sidebar footer action. Claude
30
+ registers one renderless provider descriptor with the localized label **Import
31
+ from Claude**, the Claude mark, order `20`, and an `open` callback. Selecting
32
+ that menu row closes the hub menu and presents Claude's visible Workspace
33
+ selector. The current Session owner, then the recent Workspace, is only an
34
+ initial choice. The user may change it, and the plugin must not scan until the
35
+ user invokes **Scan Sessions**.
36
+
29
37
  Each candidate exposes the full native Session ID, deterministic title, source
30
38
  path, source `lastModified`, and either `ready` or `recoverable` status. The
31
39
  ordering is descending source activity time with Session ID as a deterministic
@@ -104,11 +112,16 @@ Delivery requires all of the following evidence:
104
112
  Workspace isolation, deterministic ordering, selection atomicity, source
105
113
  revalidation, projection, one-to-one durability, concurrency, retry, and the
106
114
  no-replacement resume rule.
107
- 3. Client tests cover Workspace choice, selection, request payloads, chunked
108
- NDJSON progress, error handling, disabled empty submission, and refresh order.
115
+ 3. Client tests cover provider registration and disposal, explicit menu-driven
116
+ opening, visible Workspace choice, no automatic scan, exact selected path,
117
+ candidate selection, request payloads, chunked NDJSON progress, error
118
+ handling, disabled empty submission, and refresh order.
109
119
  4. A real installed SDK lists and reads a native terminal Session using only the
110
120
  public APIs.
111
121
  5. Official DSH imports that Session, displays the projected history and title,
112
122
  and sends the next turn to the same complete native Session ID.
113
- 6. Typecheck, the full repository test suite, build, package-content inspection,
123
+ 6. A combined Claude + Codex browser check and screenshots prove one hub action
124
+ presents both explicit provider rows in expanded and collapsed sidebars and
125
+ that the selector dialog is readable.
126
+ 7. Typecheck, the full repository test suite, build, package-content inspection,
114
127
  and remote CI all pass.
@@ -0,0 +1,4 @@
1
+ import type { Context } from '@deepseek-ai/cordis'
2
+ import type {} from '@deepseek-ai/dsh-client-ui-model-selection/client'
3
+ export function sessionPreset(session: { agentPreset?: string | null; projectionValues?: { agentPreset?: string | null } } | undefined): string | null | undefined
4
+ export function modelDirectory(ctx: unknown, sessionId: string): Pick<ReturnType<Context['modelDirectories']['directoryFor']>, 'load' | 'select'>
@@ -0,0 +1,26 @@
1
+ // Public interface adapters shared by both supported DSH generations.
2
+ export function sessionPreset(session) {
3
+ if (session?.projectionValues && Object.hasOwn(session.projectionValues, 'agentPreset')) {
4
+ return session.projectionValues.agentPreset;
5
+ }
6
+ return session?.agentPreset;
7
+ }
8
+
9
+ const service = (ctx, name) => typeof ctx.get === 'function' ? ctx.get(name) : ctx[name];
10
+ export function modelDirectory(ctx, sessionId) {
11
+ const directories = service(ctx, 'modelDirectories');
12
+ if (directories) return directories.directoryFor(sessionId);
13
+ const sessions = service(ctx, 'connection')?.api?.sessions;
14
+ if (!sessions) throw new Error('DSH model selection interface is unavailable');
15
+ return {
16
+ async load() {
17
+ const response = await sessions.models({ sessionId });
18
+ if (!response.result.ok) throw new Error('DSH model discovery failed');
19
+ return response.result.value;
20
+ },
21
+ async select(selection) {
22
+ const response = await sessions.selectModel({ sessionId, ...selection });
23
+ if (!response.result.ok) throw new Error('DSH model selection failed');
24
+ },
25
+ };
26
+ }
package/dsh-compat.mjs ADDED
@@ -0,0 +1,9 @@
1
+ import * as llm from '@deepseek-ai/dsh-llm';
2
+
3
+ // Keep namespace access: a named import fails before this adapter can run on
4
+ // the other official DSH generation. Both constructors have the same contract.
5
+ export function toolCallId(value) {
6
+ const create = Reflect.get(llm, 'ToolCallId') ?? Reflect.get(llm, 'CallId');
7
+ if (typeof create !== 'function') throw new Error('DSH does not provide a tool call ID constructor');
8
+ return create(value);
9
+ }