Merge upstream v4.5.0 (xmanrui/main) into fix/non-vision-model-image-file-fallback

- CHANGELOG: keep the image-fallback entry under Unreleased alongside the new 4.5.0 section
- harness-client: upstream renameSession coexists with the image-rejection fallback retry path
- lib/index.js rebuilt from merged sources
This commit is contained in:
GoldJohnKing 2026-09-01 23:18:00 +08:00
commit 994df6e1e3
21 changed files with 557 additions and 235 deletions

View file

@ -10,6 +10,23 @@ This file records the notable changes in each dsh-im release. Its format follows
- 非视觉模型收到图片时不再直接报错丢图:宿主以 `MODEL_DOES_NOT_SUPPORT_IMAGES` 拒绝带图片的 prompt 后,自动把同一批图片字节按入站文件管线落盘到 Session 工作区,并以"原文本 + 工具分析指引 + `<dsh_im_files>` 清单"的纯文本 prompt 复用同一 rpcId 重试一次,使非视觉模型仍可通过 run_code/pwsh 等工具识图;视觉模型与文件消息行为不变,其余图片错误仍按原样提示。
Sending an image to a non-vision model no longer fails outright: when the Host rejects an image-bearing prompt with `MODEL_DOES_NOT_SUPPORT_IMAGES`, the same image bytes are automatically staged into the Session workspace through the inbound-file pipeline and retried once as a text-only prompt (original text plus tool-analysis guidance and the `<dsh_im_files>` manifest) under the same rpcId, so non-vision models can still inspect images via tools such as run_code/pwsh. Vision models and file messages are unchanged, and other image errors keep their existing messages.
## [4.5.0] - 2026-09-01
### Added / 新增
- `/workspace` 现在支持使用 `/workspacelist` 中的工作区序号切换,并在执行命令时按最新列表解析;原有绝对路径用法保持不变。
`/workspace` now accepts a workspace number from `/workspacelist`, resolved against the latest list when the command runs; the existing absolute-path form remains supported.
- 上下文增强新增可选的 `conversationTitle` 来源字段;渠道入站事件提供会话标题时可将其写入 `<dsh_im_source>`,无需额外的平台 API 请求。
Context enhancement now offers an optional `conversationTitle` source field. When an inbound channel event provides a conversation title, it can be included in `<dsh_im_source>` without an additional platform API request.
### Fixed / 修复
- 新建 Harness Session 的标题现在始终基于未经上下文增强的首条用户消息:启用增强时会移除注入块后安全设置标题,未启用增强时继续保留 Harness 的原生自动标题;标题会清理控制字符并按 UTF-8 字节安全截断。
New Harness Session titles now consistently reflect the unenhanced first user message. With enhancement enabled, dsh-im safely sets a title without injected context blocks; without enhancement, the Harness-native automatic title is preserved. Titles are sanitized and truncated safely by UTF-8 byte length.
- 飞书流式回复在同一轮出现 Harness 问题或审批交互时,会先结束当前卡片并在交互完成后创建新卡片,使最终回答显示在交互卡片之后;卡片轮换失败时保持可用的降级投递。
When a Feishu streaming turn presents an in-turn Harness question or approval, dsh-im now finalizes the current card and starts a new one after the interaction so the final answer appears below the interaction card, with usable fallback delivery if card rotation fails.
## [4.4.0] - 2026-09-01
@ -554,7 +571,8 @@ This file records the notable changes in each dsh-im release. Its format follows
- 改进 npm 发布包结构,保留 CLI 入口并避免安装脚本拦截。
Improved npm package contents to preserve the CLI entry point and avoid install-script blocking.
[Unreleased]: https://github.com/xmanrui/dsh-im/compare/v4.4.0...HEAD
[Unreleased]: https://github.com/xmanrui/dsh-im/compare/v4.5.0...HEAD
[4.5.0]: https://github.com/xmanrui/dsh-im/compare/v4.4.0...v4.5.0
[4.4.0]: https://github.com/xmanrui/dsh-im/compare/v4.3.0...v4.4.0
[4.3.0]: https://github.com/xmanrui/dsh-im/compare/v4.2.1...v4.3.0
[4.2.1]: https://github.com/xmanrui/dsh-im/compare/v4.2.0...v4.2.1