@mokuyoaxis/dsh-iris 0.2.2 → 0.2.3

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 (63) hide show
  1. package/.dsh/skills/iris-compose-media/SKILL.md +23 -73
  2. package/.dsh/skills/iris-compose-media/agents/openai.yaml +1 -1
  3. package/.dsh/skills/iris-compose-media/references/task-v2-recovery.md +23 -22
  4. package/.dsh/skills/iris-compose-media/references/workflows.md +25 -30
  5. package/.dsh/skills/iris-use/SKILL.md +41 -0
  6. package/.dsh/skills/iris-use/agents/openai.yaml +4 -0
  7. package/.dsh/skills/iris-use/references/media-contract.md +73 -0
  8. package/.dsh/skills/iris-verify-ui/SKILL.md +9 -7
  9. package/.dsh/skills/iris-verify-ui/agents/openai.yaml +1 -1
  10. package/.dsh/skills/iris-verify-ui/references/verdict-and-degradation.md +3 -0
  11. package/CHANGELOG.md +26 -2
  12. package/README.en.md +39 -32
  13. package/README.md +37 -31
  14. package/bin/dsh-iris.js +27 -6
  15. package/docs/AGENT_QUICKSTART.md +9 -9
  16. package/docs/ARCHITECTURE.md +1 -1
  17. package/docs/CORE_RUNTIME_CONTRACT.md +3 -1
  18. package/docs/DSH_CORE_MIGRATION.md +6 -2
  19. package/docs/FAULT_INJECTION.md +1 -0
  20. package/docs/HEADLESS_CLI.md +8 -4
  21. package/docs/HOST_DOCTOR.md +3 -3
  22. package/docs/MODEL_PORT_CONTRACT.md +6 -2
  23. package/docs/MUSIC.md +77 -0
  24. package/docs/PROMPT_OPTIMIZER.md +48 -10
  25. package/docs/PROVIDER_ADAPTER_CONTRACT.md +2 -0
  26. package/docs/ROADMAP.md +14 -25
  27. package/docs/SECURITY.md +3 -2
  28. package/docs/SYNC_DELIVERY_RECOVERY.md +39 -0
  29. package/docs/TASK_SEMANTICS.md +4 -4
  30. package/docs/releases/0.2.3.md +54 -0
  31. package/lib/actions.js +40 -3
  32. package/lib/adapters.js +1 -0
  33. package/lib/api.js +14 -5
  34. package/lib/bundled-skills.js +1 -1
  35. package/lib/capability.js +2 -0
  36. package/lib/client.js +111 -26
  37. package/lib/command-service.js +12 -3
  38. package/lib/config.js +26 -2
  39. package/lib/core-artifact-store.js +44 -6
  40. package/lib/core-delivery-cache.js +145 -0
  41. package/lib/core-maintenance.js +12 -1
  42. package/lib/core-tasks.js +19 -5
  43. package/lib/core-user-projection.js +2 -2
  44. package/lib/dsh-core-adapter.js +14 -4
  45. package/lib/dsh-text-model-adapter.js +15 -2
  46. package/lib/generation-input.js +10 -0
  47. package/lib/host-runtime.js +4 -2
  48. package/lib/index.js +23 -4
  49. package/lib/models.js +4 -1
  50. package/lib/music-generation.js +21 -0
  51. package/lib/music-options.js +18 -0
  52. package/lib/music-transport.js +46 -0
  53. package/lib/prompt-optimizer-config.js +92 -21
  54. package/lib/prompt-optimizer-core.js +51 -6
  55. package/lib/prompt-optimizer.js +20 -14
  56. package/lib/provider-adapter.js +1 -0
  57. package/lib/provider-adapters.js +24 -1
  58. package/lib/provider-catalog.js +18 -7
  59. package/lib/provider-config-service.js +13 -1
  60. package/lib/provider-protocol.js +12 -0
  61. package/lib/provider-task-runner.js +80 -5
  62. package/package.json +4 -2
  63. package/user_guide.md +30 -16
package/README.en.md CHANGED
@@ -18,7 +18,9 @@
18
18
  <a href="LICENSE"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-1689FF.svg?style=flat-square"></a>
19
19
  </p>
20
20
 
21
- dsh-iris gives agents, the Iris workbench and a standalone CLI image, video, speech and visual understanding capabilities. Each image model can use DashScope, OpenAI Images, chat image generation or Responses. Shared Core Artifacts connect generation, vision, OCR and chat editing. The DSH workbench provides configuration and task management, while the 🫧 bubble offers draft optimization in the composer.
21
+ dsh-iris gives agents, the Iris workbench and a standalone CLI image, video, music, speech and visual understanding capabilities. Each image model can use DashScope, OpenAI Images, chat image generation or Responses. Shared Core Artifacts connect generation, vision, OCR and chat editing. The DSH workbench provides configuration and task management, while the 🫧 bubble offers draft optimization in the composer.
22
+
23
+ Music uses a Chat Completions interface with inline audio, explicit model assignment, configurable 502 retries, and playback/export. See [Music setup and usage](docs/MUSIC.md) (Chinese).
22
24
 
23
25
  ## A real generation example
24
26
 
@@ -44,23 +46,23 @@ These captures come from an Android browser connected to DSH under Termux/PRoot
44
46
 
45
47
  The project is at an early stage; interfaces and configuration formats may still change between releases.
46
48
 
47
- Iris 0.2.2 provides a DSH plugin and a headless CLI sharing tasks, artifacts and model routing, adding controlled prompt editing and reliable media execution while retaining the OpenAI-compatible image and vision workflow. Core internals have not been frozen as a public SDK.
49
+ Iris 0.2.3 provides a DSH plugin and a headless CLI sharing tasks, artifacts and model routing, adding music generation, three agent skills, synchronous delivery recovery, and prompt editor improvements. Core internals have not been frozen as a public SDK.
48
50
 
49
51
  > Version support: Iris `0.2.x` requires Node.js `>=22.0.0` and its DSH plugin supports only the exact host version `0.2.0-rc.2`. Older DSH hosts should pin `@mokuyoaxis/dsh-iris@0.1.4` as described below instead of following npm latest. Iris and DSH have independent version numbers.
50
52
 
51
- ## What's new in 0.2.2
53
+ ## What's new in 0.2.3
52
54
 
53
- **Controlled prompt editing and reliable media execution**, building on the existing OpenAI-compatible image and vision workflow.
55
+ **Music creation, agent guidance, and media delivery recovery.**
54
56
 
55
- - **General prompt editor:** five collapsible targets and editable comparisons; faithful grouping by default, explicit rewriting and separately requested/adopted suggestions.
56
- - **Explicit function pools:** capabilities come from configuration or trusted metadata; bare accounts and model names do not grant capabilities. Ordered candidates and explicit labels remain.
57
- - **Core recovery and delivery:** retain writer intent and interrupted recovery evidence; use file adoption and chunked hashes for non-image media without automatic lease takeover or regeneration.
58
- - **Image diagnostics:** normalize size separators, accept valid long edges and identify local rejection before HTTP; distinguish network/body failures, cancellation/timeouts and complete HTTP errors.
59
- - **Portable regressions:** match interruption checkpoints using physical root paths and native filename handling.
57
+ - **Music generation:** assign music models independently and generate MP3/WAV through the agent, workbench, or CLI, with playback, download, export, and bounded 502 retries.
58
+ - **Three agent skills:** guidance for single media operations, creative workflows, and UI acceptance; music remains optional.
59
+ - **Delivery recovery:** redeliver cached synchronous results through the original task without generating again.
60
+ - **Prompt editing:** retain previews after errors or cancellation, skip model calls for single-part faithful grouping, and reset instructions separately from model settings.
61
+ - **Routing and format feedback:** explain text model selection and check rewrite output while retaining custom v1 configuration.
60
62
 
61
- See the [0.2.2 release notes](docs/releases/0.2.2.md) and [CHANGELOG](CHANGELOG.md) for scope and validation boundaries.
63
+ See the [0.2.3 release notes](docs/releases/0.2.3.md) and [CHANGELOG](CHANGELOG.md) for scope and validation boundaries.
62
64
 
63
- Future work includes additional protocol adapters and **music generation**; see the [roadmap](docs/ROADMAP.md#后续功能方向).
65
+ Future work includes additional protocol adapters and creative workflows; see the [roadmap](docs/ROADMAP.md#后续功能方向).
64
66
 
65
67
  ## Two ways to use Iris
66
68
 
@@ -76,11 +78,11 @@ Both paths read and write the same Core Task/Artifact facts: point the CLI at th
76
78
 
77
79
  > Install size note: image processing depends on `sharp` and its prebuilt binaries (~27 MB). On uncommon platforms (e.g. some ARM proot environments) a failed sharp install is detected by `dsh-iris doctor`; image actions become unavailable while everything else keeps working.
78
80
 
79
- ## Relationship with ai-paint
81
+ ## Optional legacy configuration import
80
82
 
81
- `ai-paint` is the maintainer's local, unpublished predecessor of Iris. It is not a public dependency, and users never need to download, install, or create it. Without that project, simply configure providers in the Iris workbench as described below.
83
+ For a new installation, add providers in the Iris workbench. Iris uses its own configuration and does not scan other projects by default.
82
84
 
83
- Early versions read models and credentials from the maintainer's local ai-paint configuration — partly to migrate the predecessor project, and partly so the host process could reuse an existing API key locally instead of pasting keys into agent sessions, command-line arguments, or documents. Version 0.1.1 separates the two configurations completely: Iris uses only its own configuration. The old one can be imported exactly once, and only by explicitly setting `IRIS_IMPORT_WORKBENCH_CONFIG` to the absolute path of the local config file. Iris never scans for ai-paint by default and never syncs the two sides. The variable carries a file path, not an API key, and the source file is left untouched. See the [user guide](user_guide.md) for details.
85
+ If you already have an ai-paint configuration, set `IRIS_IMPORT_WORKBENCH_CONFIG` to its absolute file path for a one-time provider import. Iris leaves the source untouched and does not keep configurations synchronized. The variable holds a file path, not an API key. See the [user guide](user_guide.md) for details.
84
86
 
85
87
  ## Quickest start
86
88
 
@@ -88,7 +90,7 @@ Check the host with `dsh --version` and ensure `pnpm` is on your PATH. Iris and
88
90
 
89
91
  | Your DSH | Iris choice | Source |
90
92
  |---|---|---|
91
- | `0.2.0-rc.2` | `0.2.2` | Pinned npm release |
93
+ | `0.2.0-rc.2` | `0.2.3` | Pinned npm release |
92
94
  | `>=0.1.2-rc.1 <0.1.3-0` or `0.1.5-rc.1` | Stable `0.1.4` | Pinned npm release |
93
95
  | Other versions | No current support claim | Check host adaptation before installing |
94
96
 
@@ -109,29 +111,29 @@ npm pack @mokuyoaxis/dsh-iris@0.1.4
109
111
 
110
112
  This writes a `.tgz` to the current directory. Use `npm install @mokuyoaxis/dsh-iris@0.1.4` if you only want a regular npm dependency; that does not add a DSH profile layer. Pinning `@0.1.4` keeps selecting the old stable release after latest changes. See [npm pack](https://docs.npmjs.com/cli/v11/commands/npm-pack/). Version 0.1.4 does not contain the 0.2.0 Core media CLI or the later DSH rc.2 adaptation.
111
113
 
112
- ### DSH 0.2.0-rc.2: install 0.2.2
114
+ ### DSH 0.2.0-rc.2: install 0.2.3
113
115
 
114
116
  Install the pinned release into your Web profile:
115
117
 
116
118
  ```bash
117
- dsh plugin --profile web add @mokuyoaxis/dsh-iris@0.2.2
119
+ dsh plugin --profile web add @mokuyoaxis/dsh-iris@0.2.3
118
120
  dsh web
119
121
  ```
120
122
 
121
123
  The plugin loads on the next DSH start. The web UI defaults to `http://127.0.0.1:3080`; open the complete URL if startup output includes authentication parameters. Reload the backend and refresh the web client after updating.
122
124
 
123
- ### Standalone CLI: install 0.2.2
125
+ ### Standalone CLI: install 0.2.3
124
126
 
125
127
  Install in your own project without DSH:
126
128
 
127
129
  ```bash
128
- npm install @mokuyoaxis/dsh-iris@0.2.2
130
+ npm install @mokuyoaxis/dsh-iris@0.2.3
129
131
  npx dsh-iris --help
130
132
  ```
131
133
 
132
134
  ### Choosing a version in dsh-market
133
135
 
134
- The marketplace entry should resolve to the full package name `@mokuyoaxis/dsh-iris`. Check both its displayed Iris version and your local `dsh --version` before installing: 0.2.2 is for DSH rc.2; older hosts should use the pinned `@0.1.4` commands above. Catalog and npm information may be cached. The actual npm package's `dsh.engines.dsh` and Node engines determine its declared requirements; a visible listing does not imply support for every DSH release.
136
+ The marketplace entry should resolve to the full package name `@mokuyoaxis/dsh-iris`. Check both its displayed Iris version and your local `dsh --version` before installing: Iris 0.2.x is for DSH rc.2; older hosts should use the pinned `@0.1.4` commands above. Catalog and npm information may be cached. The actual npm package's `dsh.engines.dsh` and Node engines determine its declared requirements; a visible listing does not imply support for every DSH release.
135
137
 
136
138
  > The unscoped `dsh-iris` on npm belongs to a different plugin. Always keep the fully scoped name `@mokuyoaxis/dsh-iris` when installing or updating Iris Media.
137
139
 
@@ -154,7 +156,7 @@ For a copyable installation and usage prompt, see [Agent quickstart prompt](docs
154
156
  ![Iris architecture overview](docs/assets/diagrams/iris-architecture.png)
155
157
 
156
158
  - Image generation, text-to-video, image-to-video, and S2V digital-human video
157
- - Text-to-speech and audio transcription
159
+ - Music generation, text-to-speech, and audio transcription
158
160
  - Visual question answering, long-image OCR, target grounding, cropping, and pixel-diff analysis
159
161
  - Video frame extraction and multimodal video summarization
160
162
  - Asynchronous task tracking, restart recovery, and token-authorized media playback
@@ -165,7 +167,7 @@ For a copyable installation and usage prompt, see [Agent quickstart prompt](docs
165
167
 
166
168
  ## Prerequisites
167
169
 
168
- - A Node.js version that satisfies your DeepSeek Harness release's requirement; Iris 0.2.2 requires at least 22.0.0, while the published npm 0.1.4 historically requires 20.10.0
170
+ - A Node.js version that satisfies your DeepSeek Harness release's requirement; Iris 0.2.x requires at least 22.0.0, while the published npm 0.1.4 historically requires 20.10.0
169
171
  - A working DeepSeek Harness environment with `pnpm` on the PATH
170
172
  - At least one supported media or vision provider
171
173
  - `ffmpeg` and `ffprobe` for extracting frames or summarizing a video file; summaries of existing Core frames need neither
@@ -174,7 +176,7 @@ After installing the plugin, add a provider in the Iris workbench and assign mod
174
176
 
175
177
  ## DeepSeek Harness adaptation
176
178
 
177
- dsh-iris remains a native DSH plugin. Iris 0.2.2 server registers 15 agent tools, including image editing, and uses host-provided routing, attachment, model, and lifecycle services. The web client contributes settings, composer, and global-overlay UI. Iris does not start another service or listen on an extra port.
179
+ dsh-iris remains a native DSH plugin. Iris 0.2.3 server registers 16 agent tools, including image editing and music, and uses host-provided routing, attachment, model, and lifecycle services. The web client contributes settings, composer, and global-overlay UI. Iris does not start another service or listen on an extra port.
178
180
 
179
181
  | Iris version | DSH range | Verification |
180
182
  |---|---|---|
@@ -182,6 +184,7 @@ dsh-iris remains a native DSH plugin. Iris 0.2.2 server registers 15 agent tools
182
184
  | Published stable `0.1.4` | `0.1.5-rc.1` | Historical daily Android/Linux profile checks |
183
185
  | `0.2.0` | Only `0.2.0-rc.2` | Installed-service isolation checks, Core diff, and SlotRegistry; user demonstration reported successful, with detailed browser actions and asynchronous restart/rollback verification continuing |
184
186
  | `0.2.2` | Only `0.2.0-rc.2` | Installed-service checks cover 15 tools and 31 boundaries; complete browser/mobile and real asynchronous restart acceptance remain pending |
187
+ | `0.2.3` | Only `0.2.0-rc.2` | Adds music and a third skill; check actual loading with Host Doctor after upgrading |
185
188
 
186
189
  See the [rc.2 adaptation notes](docs/DSH_RC2_ADAPTATION.md) for scope. The published npm 0.1.4 package does not contain these later changes.
187
190
 
@@ -198,6 +201,7 @@ Core and the DSH Adapter are being separated: DSH keeps loading the same npm pac
198
201
  | `iris_draw_image` | Generate images from a prompt |
199
202
  | `iris_edit_image` | Edit a source Artifact into a new image with a chat image model, preserving provenance |
200
203
  | `iris_generate_video` | Text-to-video, image-to-video, or S2V digital-human video |
204
+ | `iris_generate_music` | Generate music from a description and save playable, downloadable audio |
201
205
  | `iris_speak_text` | Synthesize speech from text |
202
206
  | `iris_transcribe_audio` | Transcribe audio to text |
203
207
  | `iris_task_status` | Check the status and outputs of one task or the recent tasks |
@@ -251,7 +255,7 @@ Iris organizes ordered model candidates by function. Capability assignments iden
251
255
 
252
256
  Version 0.2.2 uses explicit function labels, legacy capability bindings, or provider capability metadata. Bare accounts and model names no longer grant capabilities. Discovery retains unlabelled models; assign their functions in the workbench or with CLI `models caps`. Existing explicit labels, assignment order and safe failover are preserved. Earlier 0.2.1 inference no longer grants capabilities to bare accounts or model names.
253
257
 
254
- Generation capabilities accept multiple candidate models. Every request starts at the head of the ordered list; this is safe failover, not round-robin. Iris tries the next candidate only when the provider explicitly proves that the request was not accepted. A 500 response, timeout, disconnect, missing response, polling failure, or local persistence failure never authorizes automatic resubmission. Once accepted, Iris may only resume observation or delivery.
258
+ Generation capabilities accept multiple candidate models. Every request starts at the head of the ordered list; this is safe failover, not round-robin. Iris tries the next candidate only when the provider explicitly proves that the request was not accepted. A 500 response, timeout, disconnect, missing response, polling failure, or local persistence failure never authorizes automatic resubmission. Once accepted, Core may only resume observation or delivery. The music entry point separately supports configured, bounded HTTP 502 retries as linked new tasks; these may consume extra quota and can be disabled with `retry_502: 0`. See [Music](docs/MUSIC.md).
255
259
 
256
260
  The workbench lists paused observation, unknown acceptance/outcome, and successful generation with failed delivery under “Needs attention.” Re-observe never submits; re-deliver never regenerates; acknowledge/restore only changes the local reminder queue; only an explicitly confirmed informed retry creates a linked new task and may incur duplicate charges. Creating that task archives the original reminder while preserving its unknown facts and audit link. See [Task semantics](docs/TASK_SEMANTICS.md), [Architecture](docs/ARCHITECTURE.md), [Security](docs/SECURITY.md), and the [Fault-injection matrix](docs/FAULT_INJECTION.md).
257
261
 
@@ -276,11 +280,11 @@ npx @mokuyoaxis/dsh-iris doctor --json
276
280
 
277
281
  The installed binary is `dsh-iris`. Exit code `0` is healthy, `1` means warnings, and `2` means hard errors. Offline Doctor checks Node.js, sharp, ffmpeg/ffprobe, a real but cleaned-up storage write probe, configuration, models/assignments, task semantics, temporary files, and orphaned or missing artifacts.
278
282
 
279
- A running DSH instance also provides a “Host diagnostics” card in the Iris workbench and exposes the authenticated `/iris/api/doctor` JSON. It checks the DSH version, plugin, current tools, two Skills, four route groups, Browser/attachment/model capabilities, client version, and four UI Slots. It reads only safe snapshots and registration evidence; it never calls Browser, models, or providers. See [Host Doctor](docs/HOST_DOCTOR.md).
283
+ A running DSH instance also provides a “Host diagnostics” card and the authenticated `/iris/api/doctor` JSON. It checks the DSH version, plugin, current tools and bundled skills, four route groups, host capabilities, client version, and four UI Slots. Version 0.2.3 checks 16 tools and three skills. It reads safe registration evidence without calling Browser, models, or providers. See [Host Doctor](docs/HOST_DOCTOR.md).
280
284
 
281
285
  ## Composed workflow example
282
286
 
283
- Iris ships two agent skills (`iris-verify-ui` and `iris-compose-media`) that chain multiple tools into bounded, reviewable media workflows. The example below is "look → redraw → self-check": understand the source image first, then generate, review against concrete mismatches, and only deliver once the review passes.
287
+ Three bundled skills guide single media operations, creative workflows, and UI acceptance. The existing "look → redraw → self-check" example below is one optional route: review follows the requested goal, useful outputs remain available, and music is an optional asset step.
284
288
 
285
289
  ![Composed workflow example](docs/assets/diagrams/iris-workflow-compose.png)
286
290
 
@@ -329,24 +333,27 @@ Legacy media links carry random capability tokens. Core media uses random Artifa
329
333
 
330
334
  ## Agent Skills
331
335
 
332
- When the plugin is enabled, it automatically registers the two bundled skills through the DSH skill registry:
336
+ The DSH skill registry receives three bundled skills:
333
337
 
334
338
  | Skill | When to use |
335
339
  |---|---|
336
- | [`iris-verify-ui`](.dsh/skills/iris-verify-ui/SKILL.md) | Combine screenshots, semantic inspection, element grounding, cropping, and pixel comparison into evidence-based UI acceptance |
337
- | [`iris-compose-media`](.dsh/skills/iris-compose-media/SKILL.md) | Chain two or more Iris tools into media workflows: inspect-then-draw, image-to-video, video summary with narration, S2V, and more |
340
+ | [`iris-use`](.dsh/skills/iris-use/SKILL.md) | Single generation/editing, vision/OCR, speech, music, task queries, and artifact delivery |
341
+ | [`iris-compose-media`](.dsh/skills/iris-compose-media/SKILL.md) | Image revisions, video assets, narration, S2V, and optional music |
342
+ | [`iris-verify-ui`](.dsh/skills/iris-verify-ui/SKILL.md) | Interface reproduction and screenshot acceptance, including confirmed failure |
338
343
 
339
- From 0.1.2, as long as the host provides the DSH skill registry, regular npm installs can discover and load both skills from any project directory — no need to clone this repository or configure a skill search path. When the project directory contains same-name skills, DSH's native precedence keeps using the project versions; if the skill registry is unavailable, the Iris tools still load on their own.
344
+ Skills work independently of the session working directory. Project skills retain precedence, and tools still load when the registry is unavailable. All three use the [shared capability and artifact contract](.dsh/skills/iris-use/references/media-contract.md).
340
345
 
341
- For deterministic selection, invoke either skill with DSH's `/name` form:
346
+ To select a skill explicitly, use DSH's `/name` form:
342
347
 
343
348
  ```text
349
+ /iris-use Generate a rock soundtrack and return its audio artifact and playback link
350
+
344
351
  /iris-compose-media Inspect my uploaded product photo, create a matching poster, then verify the requested constraints
345
352
 
346
353
  /iris-verify-ui Compare the current screenshot with the reference, locate regressions, and return an evidence-based verdict
347
354
  ```
348
355
 
349
- Natural-language discovery remains available. Do not force the composition skill for a single draw, OCR, or transcription action; ask directly or name the matching Iris tool. Skills plan tool use but never bypass Iris task, cost-confirmation, or safety boundaries.
356
+ Natural-language requests and direct tool calls remain available. `iris-use` guides single operations; composition guides multi-step work, with music added only when requested. Skills do not replace tool loading or model assignment, or alter task and cost-confirmation boundaries.
350
357
 
351
358
  ## Development and verification
352
359
 
package/README.md CHANGED
@@ -18,7 +18,7 @@
18
18
  <a href="LICENSE"><img alt="MIT License" src="https://img.shields.io/badge/license-MIT-1689FF.svg?style=flat-square"></a>
19
19
  </p>
20
20
 
21
- dsh-iris 为 Agent、Iris 工作台和独立 CLI 提供图像、视频、语音与视觉理解能力。图片模型可分别连接 DashScope、OpenAI Images、聊天生图或 Responses 接口;生成作品由共享 Core 管理,可按 Artifact ID 看图、OCR 和聊天改图。DSH 工作台集中配置与任务管理,🫧 泡泡提供对话草稿优化入口。
21
+ dsh-iris 为 Agent、Iris 工作台和独立 CLI 提供图像、视频、音乐、语音与视觉理解能力。图片模型可分别连接 DashScope、OpenAI Images、聊天生图或 Responses 接口;音乐支持 Chat Completions 内嵌音频接口。生成作品由共享 Core 管理,可按 Artifact ID 看图、OCR、聊天改图或导出。DSH 工作台集中配置与任务管理,🫧 泡泡提供对话草稿优化入口。
22
22
 
23
23
  ## 实际生成示例
24
24
 
@@ -44,23 +44,23 @@ dsh-iris 为 Agent、Iris 工作台和独立 CLI 提供图像、视频、语音
44
44
 
45
45
  项目目前处于早期版本,接口和配置格式仍可能随版本迭代调整。
46
46
 
47
- Iris 0.2.2 同时提供 DSH 插件与无 DSH 的 CLI,共用任务、产物和模型路由,升级可控提示词编辑与媒体运行可靠性,保留 OpenAI 兼容图片与视觉工作流。Core 内部接口尚未冻结为公共 SDK。
47
+ Iris 0.2.3 同时提供 DSH 插件与无 DSH 的 CLI,共用任务、产物和模型路由,加入音乐生成、三项 Agent Skills 和同步媒体交付恢复,并完善提示词编辑。Core 内部接口尚未冻结为公共 SDK。
48
48
 
49
49
  > 版本支持:Iris `0.2.x` 要求 Node.js `>=22.0.0`,DSH 插件仅支持准确版本 `0.2.0-rc.2`。旧 DSH 使用下文列出的 `@mokuyoaxis/dsh-iris@0.1.4`,不要直接跟随 npm latest 更新。Iris 与 DSH 的版本号独立。
50
50
 
51
- ## 0.2.2 更新重点
51
+ ## 0.2.3 更新重点
52
52
 
53
- **可控提示词编辑与媒体运行可靠性**,在既有 OpenAI 兼容图片与视觉工作流上继续完善。
53
+ **音乐创作、Agent 使用引导与媒体交付恢复**。
54
54
 
55
- - **提示词一般功能**:折叠五用途、原稿与改动预览;默认忠实整理,明确改写与独立建议需用户选择。
56
- - **明确功能模型池**:能力来自配置或可信元数据,裸账号与名称不自动赋能;保留功能入口、有序候选和既有明确标签。
57
- - **Core 恢复与交付**:保留 writer 创建/释放/恢复中断证据,非图片产物使用文件接收与分块哈希;不自动抢占租约或重新生成。
58
- - **生图诊断**:尺寸分隔符归一、合法长边和本地未受理校验;区分网络/正文故障、取消/超时与完整 HTTP 业务错误。
59
- - **跨平台回归**:修复中断夹具的根路径别名与分隔符假设,保留实际检查点验证。
55
+ - **音乐生成**:独立分配音乐模型,通过 Agent、工作台或 CLI 生成 MP3/WAV,可试听、下载和导出;支持配置有限的 502 重试。
56
+ - **三项 Agent Skills**:分别指导单步媒体操作、多步骤创作与界面验收;配乐按需加入。
57
+ - **交付恢复**:完整同步结果已缓存时,可沿原任务重新交付,无需重新生成。
58
+ - **提示词编辑**:失败和取消保留已有预览,单片段忠实整理无需模型调用,配置恢复可只重置默认指令。
59
+ - **路由与格式说明**:显示文本模型选择原因,检查改写正文格式,保留自定义 v1 配置。
60
60
 
61
- 完整变化和待验边界见 [0.2.2 发布说明](docs/releases/0.2.2.md) 与 [CHANGELOG](CHANGELOG.md)。
61
+ 完整变化和升级说明见 [0.2.3 发布说明](docs/releases/0.2.3.md) 与 [CHANGELOG](CHANGELOG.md)。
62
62
 
63
- 后续计划继续适配其他协议,并增加 **Music 音乐生成**功能,详见 [路线图](docs/ROADMAP.md#后续功能方向)。
63
+ 音乐的接口格式、模型分配与使用示例见 [Music](docs/MUSIC.md)。其他协议与后续能力见 [路线图](docs/ROADMAP.md#后续功能方向)。
64
64
 
65
65
  ## 两条使用路径
66
66
 
@@ -76,11 +76,11 @@ Iris 0.2.2 同时提供 DSH 插件与无 DSH 的 CLI,共用任务、产物和
76
76
 
77
77
  > 安装体积提示:图像处理依赖 `sharp` 及其预编译二进制(约 27MB)。冷门平台(如部分 ARM proot 环境)安装失败时 `dsh-iris doctor` 可检出,图像类动作不可用,其余能力不受影响。
78
78
 
79
- ## 与 ai-paint 的关系
79
+ ## 可选的旧配置导入
80
80
 
81
- `ai-paint` 是 Iris 维护者本机未公开的前身项目,不是 Iris 的公开依赖,也不是用户需要下载、安装或自行创建的目录。没有该项目的用户直接按下文在 Iris 工作台配置供应商即可。
81
+ 首次使用时,直接在 Iris 工作台添加供应商。Iris 使用自己的配置,不会默认扫描其他项目。
82
82
 
83
- 早期版本从维护者本机的 ai-paint 配置读取模型与凭据,既用于迁移前身项目,也让宿主进程可以在本地复用已有 API Key,避免为迁移而把密钥粘贴到 Agent 会话、命令行参数或文档中。0.1.1 将两者的配置彻底分离:Iris 只使用自己的配置;旧配置仅可通过把 `IRIS_IMPORT_WORKBENCH_CONFIG` 显式设为本地配置文件的绝对路径进行一次性导入,不会默认扫描 ai-paint,也不会在两边同步。该变量保存的是文件路径而不是 API Key,来源文件不会被修改;具体操作见[用户指南](user_guide.md#从旧工作台显式导入)。
83
+ 已有旧 ai-paint 配置时,可通过 `IRIS_IMPORT_WORKBENCH_CONFIG` 显式指定来源文件的绝对路径,一次性导入供应商;不修改来源文件、不持续同步。该变量保存文件路径,不包含 API Key。具体操作见[用户指南](user_guide.md#从旧工作台显式导入)。
84
84
 
85
85
  ## 最快开始
86
86
 
@@ -88,7 +88,7 @@ Iris 0.2.2 同时提供 DSH 插件与无 DSH 的 CLI,共用任务、产物和
88
88
 
89
89
  | 你的 DSH | Iris 选择 | 安装来源 |
90
90
  |---|---|---|
91
- | `0.2.0-rc.2` | `0.2.2` | 固定 npm 版本 |
91
+ | `0.2.0-rc.2` | `0.2.3` | 固定 npm 版本 |
92
92
  | `>=0.1.2-rc.1 <0.1.3-0` 或 `0.1.5-rc.1` | 稳定版 `0.1.4` | 固定 npm 版本 |
93
93
  | 其他版本 | 暂无当前支持声明 | 先核对宿主适配,不能按相邻版本推定兼容 |
94
94
 
@@ -109,29 +109,29 @@ npm pack @mokuyoaxis/dsh-iris@0.1.4
109
109
 
110
110
  命令会在当前目录生成 `.tgz`。只需安装为普通 npm 依赖时可使用 `npm install @mokuyoaxis/dsh-iris@0.1.4`;这不会自动把插件加入 DSH profile。固定 `@0.1.4` 可在 latest 更新后继续取得旧稳定版本,见 [npm pack 文档](https://docs.npmjs.com/cli/v11/commands/npm-pack/)。0.1.4 不包含 0.2.0 的 Core 媒体 CLI,也不包含 DSH rc.2 的后续适配。
111
111
 
112
- ### DSH 0.2.0-rc.2:安装 0.2.2
112
+ ### DSH 0.2.0-rc.2:安装 0.2.3
113
113
 
114
114
  安装固定版本到 Web profile:
115
115
 
116
116
  ```bash
117
- dsh plugin --profile web add @mokuyoaxis/dsh-iris@0.2.2
117
+ dsh plugin --profile web add @mokuyoaxis/dsh-iris@0.2.3
118
118
  dsh web
119
119
  ```
120
120
 
121
121
  插件在下一次 DSH 启动时装载。Web UI 默认位于 `http://127.0.0.1:3080`;启动输出带认证参数时请打开完整 URL。更新后需重新加载后端并刷新客户端。
122
122
 
123
- ### 独立 CLI:安装 0.2.2
123
+ ### 独立 CLI:安装 0.2.3
124
124
 
125
125
  在自己的项目中安装,无需 DSH:
126
126
 
127
127
  ```bash
128
- npm install @mokuyoaxis/dsh-iris@0.2.2
128
+ npm install @mokuyoaxis/dsh-iris@0.2.3
129
129
  npx dsh-iris --help
130
130
  ```
131
131
 
132
132
  ### dsh-market 安装时的版本选择
133
133
 
134
- 市场条目应对应完整包名 `@mokuyoaxis/dsh-iris`。安装前同时核对市场显示的 Iris 版本与本机 `dsh --version`:0.2.2 仅用于 DSH rc.2;旧宿主使用上面的固定 `@0.1.4` 命令。市场目录与 npm 信息可能有缓存,以实际 npm 包的 `dsh.engines.dsh` 和 Node engines 为准;市场中可见不代表任意 DSH 版本兼容。
134
+ 市场条目应对应完整包名 `@mokuyoaxis/dsh-iris`。安装前同时核对市场显示的 Iris 版本与本机 `dsh --version`:Iris 0.2.x 仅用于 DSH rc.2;旧宿主使用上面的固定 `@0.1.4` 命令。市场目录与 npm 信息可能有缓存,以实际 npm 包的 `dsh.engines.dsh` 和 Node engines 为准;市场中可见不代表任意 DSH 版本兼容。
135
135
 
136
136
  > npm 上无 scope 的 `dsh-iris` 属于另一款插件。安装和更新 Iris Media 时必须保留完整包名 `@mokuyoaxis/dsh-iris`。
137
137
 
@@ -142,6 +142,7 @@ npx dsh-iris --help
142
142
  ```text
143
143
  使用 iris_draw_image:画一只坐在蓝色窗边的白猫。
144
144
  总结我刚上传的这张图片。
145
+ 用 Iris 生成一首复古摇滚配乐,保存为音频作品。
145
146
  用 Iris 总结 /absolute/path/demo.mp4,再把摘要合成为语音。
146
147
  ```
147
148
 
@@ -154,7 +155,7 @@ DSH 的 profile 与插件命令由[官方安装说明](https://github.com/deepse
154
155
  ![Iris 架构总览](docs/assets/diagrams/iris-architecture.png)
155
156
 
156
157
  - 图像生成、文生视频、图生视频和 S2V 数字人视频
157
- - 文本转语音与音频转写
158
+ - 音乐生成、文本转语音与音频转写
158
159
  - 看图问答、长图 OCR、目标定位、裁剪和像素差异分析
159
160
  - 视频抽帧与多模态内容摘要
160
161
  - 异步任务跟踪、重启恢复和带授权令牌的媒体播放
@@ -165,7 +166,7 @@ DSH 的 profile 与插件命令由[官方安装说明](https://github.com/deepse
165
166
 
166
167
  ## 使用前准备
167
168
 
168
- - 满足所用 DeepSeek Harness 版本要求的 Node.js;Iris 0.2.2 最低为 22.0.0,旧 npm 0.1.4 的历史要求为 20.10.0
169
+ - 满足所用 DeepSeek Harness 版本要求的 Node.js;Iris 0.2.x 最低为 22.0.0,旧 npm 0.1.4 的历史要求为 20.10.0
169
170
  - 一个可用的 DeepSeek Harness 环境,以及 PATH 中的 `pnpm`
170
171
  - 至少一个受支持的媒体或视觉服务供应商
171
172
  - 从视频文件抽帧或摘要时,需要系统提供 `ffmpeg` 与 `ffprobe`;复用 Core 帧摘要无需这两个工具
@@ -174,7 +175,7 @@ DSH 的 profile 与插件命令由[官方安装说明](https://github.com/deepse
174
175
 
175
176
  ## DeepSeek Harness 适配
176
177
 
177
- dsh-iris 仍按 DSH 原生插件装载。0.2.2 服务端注册 15 个 Agent 工具(含改图),并使用宿主提供的路由、附件、模型和生命周期能力;Web 客户端接入设置页、会话输入区与全局悬浮层。插件不会启动额外服务或监听端口。
178
+ dsh-iris 仍按 DSH 原生插件装载。0.2.3 服务端注册 16 个 Agent 工具(含改图与音乐),并使用宿主提供的路由、附件、模型和生命周期能力;Web 客户端接入设置页、会话输入区与全局悬浮层。插件不会启动额外服务或监听端口。
178
179
 
179
180
  | Iris 范围 | DSH 范围 | 验证记录 |
180
181
  |---|---|---|
@@ -182,6 +183,7 @@ dsh-iris 仍按 DSH 原生插件装载。0.2.2 服务端注册 15 个 Agent 工
182
183
  | 已发布稳定版 `0.1.4` | `0.1.5-rc.1` | 历史 Android/Linux 日常 profile 验收 |
183
184
  | `0.2.0` | 仅 `0.2.0-rc.2` | 真实安装服务隔离验收、Core diff 与 SlotRegistry;已有用户实机演示反馈,逐项浏览器操作与异步重启/回退继续验收 |
184
185
  | `0.2.2` | 仅 `0.2.0-rc.2` | 真实安装服务隔离检查覆盖 15 个工具与 31 项边界;完整浏览器/移动端及真实异步重启验收仍待完成 |
186
+ | `0.2.3` | 仅 `0.2.0-rc.2` | 增加音乐工具和第三项 Skill;升级后用宿主诊断检查实际装载 |
185
187
 
186
188
  rc.2 修正与验证范围见[适配说明](docs/DSH_RC2_ADAPTATION.md);已发布 npm 0.1.4 包不包含这项后续适配。
187
189
 
@@ -198,6 +200,7 @@ Core 与 DSH Adapter 正在分离,DSH 继续加载同一个 npm 包,Adapter
198
200
  | `iris_draw_image` | 根据提示词生成图片 |
199
201
  | `iris_edit_image` | 按原图 Artifact ID 和修改指令创建关联来源的新图片(聊天生图模型) |
200
202
  | `iris_generate_video` | 生成文生视频、图生视频或 S2V 数字人视频 |
203
+ | `iris_generate_music` | 根据描述生成音乐,保存为可试听、下载的音频作品 |
201
204
  | `iris_speak_text` | 将文本合成为语音 |
202
205
  | `iris_transcribe_audio` | 将音频转写为文本 |
203
206
  | `iris_task_status` | 查询单个任务或最近任务的状态和产物 |
@@ -251,7 +254,7 @@ Iris 按功能组织有序模型候选池,能力分配使用 `providerId::mode
251
254
 
252
255
  0.2.2 只采用明确功能标签、旧能力字段绑定或供应商能力元数据,裸账号和名称不再自动赋能。发现保留未标注模型,可在工作台“设置功能”或 CLI `models caps` 中明确用途;已有明确标签优先,分配顺序和安全切换保持。旧 0.2.1 的裸账号与模型名称推断不再用于功能赋能。
253
256
 
254
- 生成类能力可以配置多个候选模型。每次请求都从有序列表首项开始,并非 round-robin;Iris 只有在供应商明确证明未受理时才会尝试下一个候选;500、超时、断网、响应缺失、轮询失败和本地落盘失败都不会授权自动重提。远端服务一旦受理任务,Iris 只会恢复观察或交付,以免产生重复任务或重复计费。
257
+ 生成类能力可以配置多个候选模型。每次请求都从有序列表首项开始,并非 round-robin;Iris 只有在供应商明确证明未受理时才会尝试下一个候选;500、超时、断网、响应缺失、轮询失败和本地落盘失败都不会授权自动重提。远端服务一旦受理任务,Iris 只会恢复观察或交付,以免产生重复任务或重复计费。音乐入口另外支持按本次参数执行有限的 502 重试,每次重发建立新任务,可能消耗额外额度;可设置 `retry_502: 0` 关闭,见 [Music](docs/MUSIC.md)。
255
258
 
256
259
  工作台把观察暂停、受理/结果未知和生成成功但交付失败单列为“需要处理”。“重新观察”不会提交;“重新交付”不会重新生成;“标为已读/恢复提醒”只改变本地提醒队列;只有“知情重试”会创建新任务,并要求用户逐次确认潜在重复费用。新任务创建后,原提醒自动归档但保留未知事实和新旧任务关联。任务语义、架构、安全边界与故障证据分别见 [`TASK_SEMANTICS.md`](docs/TASK_SEMANTICS.md)、[`ARCHITECTURE.md`](docs/ARCHITECTURE.md)、[`SECURITY.md`](docs/SECURITY.md) 和 [`FAULT_INJECTION.md`](docs/FAULT_INJECTION.md)。
257
260
 
@@ -276,11 +279,11 @@ npx @mokuyoaxis/dsh-iris doctor --json
276
279
 
277
280
  安装后的二进制名是 `dsh-iris`。退出码 `0` 表示正常、`1` 表示有警告、`2` 表示有硬错误。离线 Doctor 检查 Node、sharp、ffmpeg/ffprobe、数据目录真实写入、配置、模型/分配、任务语义、临时文件和孤儿/缺失产物。
278
281
 
279
- 运行中的 DSH 另在 Iris 工作台提供“宿主诊断”卡片,并公开已认证的 `/iris/api/doctor` JSON:检查 DSH 版本、插件、当前工具、两项 Skill、四组路由、Browser/附件/模型能力、客户端版本和四个 UI Slot。它只读取安全快照与注册证据,不调用 Browser、模型或 Provider;详见 [Host Doctor](docs/HOST_DOCTOR.md)。
282
+ 运行中的 DSH 另在 Iris 工作台提供“宿主诊断”卡片,并公开已认证的 `/iris/api/doctor` JSON:检查 DSH 版本、插件、当前工具与随包 Skill、四组路由、Browser/附件/模型能力、客户端版本和四个 UI Slot。0.2.3 检查 16 个工具和三项 Skill。它只读取安全快照与注册证据,不调用 Browser、模型或 Provider;详见 [Host Doctor](docs/HOST_DOCTOR.md)。
280
283
 
281
284
  ## 组合工作流示例
282
285
 
283
- Iris 自带两个 Agent Skills(`iris-verify-ui` 与 `iris-compose-media`),把多个工具编排成有界、可复核的媒体工作流。下例是「看图 → 重绘 → 自检」:先理解原图,再生成,复核针对具体偏差,只有复核通过才交付。
286
+ 三项 Agent Skills 分别指导单步媒体操作、多步骤创作与界面验收。下图是既有「看图 → 重绘 → 自检」示例;检查按用户目标加入,已有作品和部分结果保留,音乐作为可选素材步骤。
284
287
 
285
288
  ![组合工作流示例](docs/assets/diagrams/iris-workflow-compose.png)
286
289
 
@@ -329,24 +332,27 @@ Iris 自带两个 Agent Skills(`iris-verify-ui` 与 `iris-compose-media`),
329
332
 
330
333
  ## Agent Skills
331
334
 
332
- 插件启用时会通过 DSH Skill registry 自动注册两个随包 Skill:
335
+ 插件通过 DSH Skill registry 注册三项随包 Skill:
333
336
 
334
337
  | Skill | 适用场景 |
335
338
  |---|---|
336
- | [`iris-verify-ui`](.dsh/skills/iris-verify-ui/SKILL.md) | 组合截图、语义检查、元素定位、裁剪和像素比较,完成有证据的 UI 验收 |
337
- | [`iris-compose-media`](.dsh/skills/iris-compose-media/SKILL.md) | 组合两个以上 Iris 工具,完成看图后绘图、图片转视频、视频总结配旁白或 S2V 等媒体工作流 |
339
+ | [`iris-use`](.dsh/skills/iris-use/SKILL.md) | 单步生成、改图、看图/OCR、语音、音乐、查询与作品交付 |
340
+ | [`iris-compose-media`](.dsh/skills/iris-compose-media/SKILL.md) | 图片版本、视频素材、旁白、S2V和可选配乐等多步骤创作 |
341
+ | [`iris-verify-ui`](.dsh/skills/iris-verify-ui/SKILL.md) | 界面还原与截图验收,区分通过、部分通过、失败和证据不足 |
338
342
 
339
- 从 0.1.2 起,只要宿主提供 DSH Skill registry,普通 npm 安装用户在任意项目目录中都能发现并加载它们,不需要克隆本仓库或另外配置 Skill 搜索目录。项目目录中存在同名 Skill 时,仍按 DSH 原生优先级使用项目版本;Skill registry 不可用时,Iris 工具仍可独立装载。
343
+ Skill 不依赖会话工作目录,项目中的同名 Skill 仍优先;宿主未提供 registry 时,工具仍可独立使用。三项共享[能力与产物说明](.dsh/skills/iris-use/references/media-contract.md),区分Core ID、附件、播放链接和文件输入;TTS用于后续文件处理时先导出。
340
344
 
341
345
  用户想稳定指定方法时,可直接用 DSH 的 `/name` 形式:
342
346
 
343
347
  ```text
348
+ /iris-use 生成一首摇滚配乐,返回音频作品和播放链接
349
+
344
350
  /iris-compose-media 分析我上传的产品照,生成同构图海报,再检查是否符合要求
345
351
 
346
352
  /iris-verify-ui 对比当前截图和参考图,定位偏差并给出有证据的结论
347
353
  ```
348
354
 
349
- 也可以继续用自然语言让 Agent 自动发现。单步绘图、OCR、转写等无需强行唤起组合 Skill,直接说需求或指定对应 Iris 工具即可。Skill 只规划工具链,不会绕过 Iris 的任务、费用确认和安全边界。
355
+ 也可以自然语言请求或直接指定工具。单步操作由iris-use指导,多步骤由编排Skill指导;音乐仅在用户要求时加入。Skill不能替代工具装载或模型分配,也不改变任务、费用确认和安全边界。
350
356
 
351
357
  ## 开发与验证
352
358
 
package/bin/dsh-iris.js CHANGED
@@ -5,11 +5,12 @@ import { createCommandService } from '../lib/command-service.js';
5
5
  import { createCoreRuntime } from '../lib/core-runtime.js';
6
6
  import { recoverCoreWriterLease } from '../lib/core-lease-recovery.js';
7
7
  import { doctor, formatDoctorReport } from '../lib/doctor.js';
8
- import { loadProviderCatalog, providerCatalogSnapshot, catalogCapabilitySnapshot, imageCandidatesFromCatalog, providerForTaskFromCatalog, providerTaskBinding, transcribeCandidatesFromCatalog, ttsCandidatesFromCatalog, videoCandidatesFromCatalog } from '../lib/provider-catalog.js';
8
+ import { loadProviderCatalog, providerCatalogSnapshot, catalogCapabilitySnapshot, imageCandidatesFromCatalog, musicCandidatesFromCatalog, providerForTaskFromCatalog, providerTaskBinding, transcribeCandidatesFromCatalog, ttsCandidatesFromCatalog, videoCandidatesFromCatalog } from '../lib/provider-catalog.js';
9
9
  import { createConfiguredProviderAdapter } from '../lib/provider-adapters.js';
10
10
  import { providerForImageModel } from '../lib/provider-protocol.js';
11
11
  import { prepareProviderInput } from '../lib/provider-adapter.js';
12
12
  import { createProviderTaskRunner } from '../lib/provider-task-runner.js';
13
+ import { generateMusicTask } from '../lib/music-generation.js';
13
14
  import { GenerationInputError, normalizeGenerationInput } from '../lib/generation-input.js';
14
15
  import { executeVisionCommand, normalizeVisionInput } from '../lib/headless-vision.js';
15
16
  import { videoTaskCandidates } from '../lib/video-input.js';
@@ -47,7 +48,7 @@ function usage() {
47
48
  ' dsh-iris providers <add|set> --provider-config <absolute-path> --input <provider-json>',
48
49
  ' dsh-iris providers remove <provider-id> --provider-config <absolute-path>',
49
50
  ' dsh-iris models list --provider-config <absolute-path>',
50
- ' dsh-iris models <add|remove|caps|protocol|vision-input> <providerId::modelId> --provider-config <absolute-path> [--input <json>]',
51
+ ' dsh-iris models <add|remove|caps|protocol|music-protocol|vision-input> <providerId::modelId> --provider-config <absolute-path> [--input <json>]',
51
52
  ' dsh-iris models discover <provider-id> --provider-config <absolute-path> [--apply <true|false>]',
52
53
  ' dsh-iris models test <providerId::modelId> --capability <vision|tts|image-gen|video-gen|transcribe> --provider-config <absolute-path> [--data-root <absolute-path>]',
53
54
  ' dsh-iris assignments <list|set|clear> --provider-config <absolute-path> [--input <json>]',
@@ -60,6 +61,7 @@ function usage() {
60
61
  ' dsh-iris run image --data-root <absolute-path> --provider-config <absolute-path> --input <json>',
61
62
  ' dsh-iris run video --data-root <absolute-path> --provider-config <absolute-path> --input <json>',
62
63
  ' dsh-iris run tts --data-root <absolute-path> --provider-config <absolute-path> --input <json>',
64
+ ' dsh-iris run music --data-root <absolute-path> --provider-config <absolute-path> --input <json>',
63
65
  ' dsh-iris run transcribe --data-root <absolute-path> --provider-config <absolute-path> --input <json>',
64
66
  ' dsh-iris task inspect <id> --data-root <absolute-path>',
65
67
  ' dsh-iris task list --data-root <absolute-path>',
@@ -67,7 +69,7 @@ function usage() {
67
69
  ' dsh-iris <task|artifact> inspect-many --data-root <absolute-path> --input <json>',
68
70
  ' dsh-iris task observe <id> --data-root <absolute-path> --provider-config <absolute-path>',
69
71
  ' dsh-iris task wait <id> --data-root <absolute-path> [--provider-config <absolute-path>] [--timeout-ms <1..1200000>] [--poll-interval-ms <50..60000>]',
70
- ' dsh-iris task redeliver <id> --data-root <absolute-path> --provider-config <absolute-path>',
72
+ ' dsh-iris task redeliver <id> --data-root <absolute-path> [--provider-config <absolute-path>]',
71
73
  ' dsh-iris task cancel <id> --data-root <absolute-path> --provider-config <absolute-path>',
72
74
  ' dsh-iris task retry <id> --data-root <absolute-path> --provider-config <absolute-path> --input <json> --confirm-billing [--model-ref <providerId::modelId>]',
73
75
  ' dsh-iris artifact inspect <id> --data-root <absolute-path>',
@@ -231,7 +233,7 @@ async function main(args) {
231
233
 
232
234
  if (['config', 'providers', 'models', 'assignments'].includes(args[0])) {
233
235
  const [group, verb] = args;
234
- const verbs = { config: ['init', 'show', 'check'], providers: ['add', 'set', 'remove'], models: ['list', 'add', 'remove', 'caps', 'protocol', 'vision-input', 'discover', 'test'], assignments: ['list', 'set', 'clear'] };
236
+ const verbs = { config: ['init', 'show', 'check'], providers: ['add', 'set', 'remove'], models: ['list', 'add', 'remove', 'caps', 'protocol', 'music-protocol', 'vision-input', 'discover', 'test'], assignments: ['list', 'set', 'clear'] };
235
237
  if (!verbs[group].includes(verb)) throw new CliUsageError('未知配置命令');
236
238
  const positional = (group === 'providers' && verb === 'remove') || (group === 'models' && verb !== 'list');
237
239
  const id = positional ? required(args[2], group === 'providers' || verb === 'discover' ? 'provider-id' : 'model-ref') : undefined;
@@ -250,6 +252,7 @@ async function main(args) {
250
252
  const result = await executeConfigCommand(required(options['provider-config'], 'provider-config'), group === 'config' ? verb : group + '.' + verb, input, {
251
253
  signal: cliAbortController.signal,
252
254
  probe: async ({ provider, modelId, capability, signal }) => {
255
+ if (capability === 'music-gen') return { skipped: true, ok: false, reason: 'Music 不发起小样本探测;请使用 run music 提交创作要求' };
253
256
  if (capability === 'vision') return probeVisionModel(provider, modelId, { bytes: Buffer.from(RED_TEST_IMAGE.split(',')[1], 'base64'), mediaType: 'image/png' }, { signal });
254
257
  if (['video-gen', 'transcribe'].includes(capability) && !options.input) return {
255
258
  skipped: true, ok: false, reason: '请用 models test --input 提供与 run video/transcribe 相同的真实素材;未发起请求'
@@ -398,6 +401,22 @@ async function main(args) {
398
401
  }
399
402
 
400
403
  // 语音合成输入冻结(E2 Profile):同步完成型,一次命令内完成 Task → Artifact。
404
+ if (args[0] === 'run' && args[1] === 'music') {
405
+ const options = flags(args.slice(2), ['data-root', 'provider-config', 'input']);
406
+ const normalized = generationInput('music', jsonInput(options.input));
407
+ const catalog = loadProviderCatalog(required(options['provider-config'], 'provider-config'));
408
+ const routes = musicCandidatesFromCatalog(catalog, normalized.modelRef);
409
+ let result;
410
+ await withRawRuntime('writer', options['data-root'], async runtime => {
411
+ result = await generateMusicTask({ runner: createProviderTaskRunner(runtime),
412
+ candidates: routes.map(route => ({ adapter: trackedProviderAdapter(route.provider, options), model: route.modelRef,
413
+ selectionReason: route.selectionReason, providerBinding: providerTaskBinding(route.provider) })),
414
+ providerInput: normalized.providerInput, options: normalized.musicOptions, signal: cliAbortController.signal });
415
+ console.log(JSON.stringify(result, null, 2));
416
+ });
417
+ return result.task.outcome === 'succeeded' && result.task.deliveryState === 'ready' ? 0 : 1;
418
+ }
419
+
401
420
  if (args[0] === 'run' && args[1] === 'tts') {
402
421
  const options = flags(args.slice(2), ['data-root', 'provider-config', 'input']);
403
422
  const { providerInput, modelRef } = generationInput('tts', jsonInput(options.input));
@@ -473,10 +492,10 @@ async function main(args) {
473
492
 
474
493
  if (args[0] === 'task' && args[1] === 'redeliver' && args[2]) {
475
494
  const options = flags(args.slice(3), ['data-root', 'provider-config']);
476
- const catalog = loadProviderCatalog(required(options['provider-config'], 'provider-config'));
495
+ const catalog = options['provider-config'] ? loadProviderCatalog(options['provider-config']) : null;
477
496
  await withRuntime('reader', options['data-root'], (commands) => commands.execute('task.inspect', { task_id: args[2] }));
478
497
  const result = await withRuntime('writer', options['data-root'], (commands) => commands.execute('task.redeliver', { task_id: args[2] }), {
479
- resolveTaskAdapter: (task) => trackedProviderAdapter(providerForTaskFromCatalog(catalog, task), options, task)
498
+ ...(catalog ? { resolveTaskAdapter: (task) => trackedProviderAdapter(providerForTaskFromCatalog(catalog, task), options, task) } : {})
480
499
  });
481
500
  console.log(JSON.stringify(result, null, 2));
482
501
  return 0;
@@ -512,6 +531,8 @@ async function main(args) {
512
531
  ? videoCandidatesFromCatalog(catalog, modelRef || undefined)
513
532
  : capability === 'tts'
514
533
  ? ttsCandidatesFromCatalog(catalog, modelRef || undefined)
534
+ : capability === 'music'
535
+ ? musicCandidatesFromCatalog(catalog, modelRef || undefined)
515
536
  : capability === 'transcribe'
516
537
  ? transcribeCandidatesFromCatalog(catalog, modelRef || undefined)
517
538
  : imageCandidatesFromCatalog(catalog, modelRef || undefined)
@@ -2,22 +2,22 @@
2
2
 
3
3
  把下面一段交给负责安装或使用 Iris 的 Agent。版本与发布状态以当前 [README](../README.md) 为准;Iris 和 DSH 的版本号独立。
4
4
 
5
- 当前安装版本为 Iris 0.2.2。先核对宿主与实际安装版本,再使用新视觉命令或 Artifact 改图;旧宿主仍固定安装 0.1.4。
5
+ 本文对应 Iris 0.2.3。使用时先核对实际版本、可用工具和功能分配;旧宿主仍固定安装 0.1.4。
6
6
 
7
7
  ## 中文
8
8
 
9
9
  ```text
10
10
  请根据本仓库 README,帮我安装并使用 Iris(@mokuyoaxis/dsh-iris)。
11
11
  先确认运行环境、目标 DSH profile,并用 dsh --version 核对宿主;Iris 0.2.x 要求 Node.js >=22.0.0(旧 npm 0.1.4 的历史要求为 >=20.10.0):
12
- - DSH 0.2.0-rc.2:固定安装 dsh plugin --profile web add @mokuyoaxis/dsh-iris@0.2.2。
12
+ - DSH 0.2.0-rc.2:固定安装 dsh plugin --profile web add @mokuyoaxis/dsh-iris@0.2.3。
13
13
  - DSH >=0.1.2-rc.1 <0.1.3-0 或 0.1.5-rc.1:固定安装 dsh plugin --profile web add @mokuyoaxis/dsh-iris@0.1.4;只下载用 npm pack @mokuyoaxis/dsh-iris@0.1.4。
14
14
  - 其他 DSH 版本:先报告没有支持声明,不自行升级宿主或跳过版本检查。
15
- 没有 DSH、希望用 CLI 时,按 docs/HEADLESS_CLI.md 使用 npm 0.2.2;npm 0.1.4 不含新的 Core 媒体 CLI。
16
- 先用 --help 和 Doctor 核对实际版本与命令。Iris 0.2.2 支持 OpenAI 兼容图片与视觉工作流;其他协议与 music 是后续计划。
15
+ 没有 DSH、希望用 CLI 时,按 docs/HEADLESS_CLI.md 使用 npm 0.2.3;npm 0.1.4 不含新的 Core 媒体 CLI。
16
+ 先用 --help 和 Doctor 核对实际版本与命令。Iris 0.2.3 支持图片、视频、语音、视觉与音乐入口。音乐需明确分配模型并选择 Chat Completions(内嵌音频)协议,详见 docs/MUSIC.md;使用 iris_generate_music。
17
17
  从 dsh-market 安装也要核对实际包名、版本和兼容范围;市场缓存不代表支持旧宿主,不对旧 DSH 安装 latest。
18
18
  若使用其他 profile,把示例中的 web 换成已确认的目标。保留完整 scoped 包名,不把 dsh-iris 当作同一 npm 包。
19
19
  安装后检查 Doctor 和工具可达性,再执行我指定的媒体任务;不要输出 API Key,重启宿主前说明影响。
20
- 查询、观察和重新取回不等于重新生成;任务已受理或受理未知时,不自动重新提交。
20
+ 查询、观察和重新取回不等于重新生成;任务已受理或受理未知时,不自行重新提交。音乐入口内部执行本次配置的有限502重试,不再由Agent包外层循环;配乐仅按用户要求加入流程。
21
21
  最后报告所用 Iris/DSH 版本、安装来源和实际验证结果。
22
22
  ```
23
23
 
@@ -26,14 +26,14 @@
26
26
  ```text
27
27
  Help me install and use Iris (@mokuyoaxis/dsh-iris) according to this repository's README.
28
28
  Check the environment, target DSH profile, and dsh --version first; Iris 0.2.x requires Node.js >=22.0.0 (the published npm 0.1.4 historically requires >=20.10.0):
29
- - DSH 0.2.0-rc.2: pin dsh plugin --profile web add @mokuyoaxis/dsh-iris@0.2.2.
29
+ - DSH 0.2.0-rc.2: pin dsh plugin --profile web add @mokuyoaxis/dsh-iris@0.2.3.
30
30
  - DSH >=0.1.2-rc.1 <0.1.3-0 or 0.1.5-rc.1: pin dsh plugin --profile web add @mokuyoaxis/dsh-iris@0.1.4; download only with npm pack @mokuyoaxis/dsh-iris@0.1.4.
31
31
  - Other DSH versions: report the missing support claim; do not upgrade the host or bypass its version checks automatically.
32
- For CLI use without DSH, follow docs/HEADLESS_CLI.md using npm 0.2.2; npm 0.1.4 does not include the new Core media CLI.
33
- Check --help, Doctor and the actual installed version before using commands. Iris 0.2.2 supports the OpenAI-compatible image and vision workflow; additional protocols and music remain future work.
32
+ For CLI use without DSH, follow docs/HEADLESS_CLI.md using npm 0.2.3; npm 0.1.4 does not include the new Core media CLI.
33
+ Check --help, Doctor and the actual installed version before using commands. Iris 0.2.3 offers image, video, speech, vision, and music operations. Music requires explicit model assignment and the Chat Completions inline-audio protocol described in docs/MUSIC.md; use iris_generate_music for music generation.
34
34
  For dsh-market, check the actual package name, version, and compatibility range too. Cached listings do not establish older-host support; do not install latest on an old DSH host.
35
35
  Replace web with the confirmed profile when needed. Keep the scoped package name; unscoped dsh-iris is a different npm package.
36
36
  Check Doctor and tool availability after installation, then carry out my requested media task. Do not expose API keys; explain the impact before restarting the host.
37
- Inspect, observe, and redeliver do not create a new generation. Never resubmit automatically after accepted or unknown acceptance.
37
+ Inspect, observe, and redeliver do not generate again. Do not add an agent retry loop after accepted or unknown acceptance; music handles its configured bounded 502 retries internally. Add music to workflows only when requested.
38
38
  Report the Iris/DSH versions, installation source, and actual validation results.
39
39
  ```
@@ -64,7 +64,7 @@ DSH Host / Cordis Headless CLI
64
64
  ## Task、Attempt 与 Artifact
65
65
 
66
66
  - 一个用户意图对应一个 Core Task;每次候选供应商调用对应一个稳定 Attempt。Attempt 必须在可能发送计费请求前落盘。
67
- - 只有明确 `not_accepted` 才允许自动切换候选;`accepted` 或 `unknown` 后禁止自动重提。重试会创建新 Task,并要求用户再次提供未持久化的输入和明确确认潜在费用。
67
+ - Core只有明确 `not_accepted` 才自动切换候选;`accepted` 或 `unknown` 后通用Runner停止重提。人工重试会创建新Task,要求重新提供输入并确认潜在费用。Music功能层另按本次配置对明确HTTP502进行有限重发,保留原Task的未知事实和新旧任务关系,详见 [音乐生成](MUSIC.md)。
68
68
  - 生成结果与本地交付是两类事实。远端成功后下载失败仍保持 `outcome=succeeded / deliveryState=failed`,可显式重新交付而不重新生成。
69
69
  - 新 Attempt 可选保存阶段时间戳与模型选择来源;旧记录缺少这些字段仍可读取。
70
70
  - Artifact Manifest v0 保存内容哈希、媒体类型、中性元数据和关系边;不保存 Prompt、API Key、签名 URL、Provider 端点或宿主绝对路径。