@tmmk/media-suite 0.0.0-stage → 0.1.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.
- package/README.md +55 -2
- package/client.js +25 -0
- package/cordis.patch.yml +10 -0
- package/icon.svg +21 -0
- package/index.js +29 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +41 -4
package/README.md
CHANGED
|
@@ -1,3 +1,56 @@
|
|
|
1
|
-
#
|
|
1
|
+
# media-suite · 媒体工具
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
媒体插件家族的一键安装入口。
|
|
4
|
+
|
|
5
|
+
## 它做什么
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
media-suite
|
|
9
|
+
├─ 挂载自己的一行
|
|
10
|
+
├─ 依赖 media-qwen
|
|
11
|
+
└─ 依赖 media-runninghub
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
装一个 `media-suite`,得到:
|
|
15
|
+
|
|
16
|
+
- `media-qwen` 的 `qwen_omni` / `qwen_tts` / `qwen_audio`
|
|
17
|
+
- `media-runninghub` 的 `runninghub_image`
|
|
18
|
+
- 两个 provider 各自的设置页
|
|
19
|
+
|
|
20
|
+
## 它不做什么
|
|
21
|
+
|
|
22
|
+
- 不调用任何 provider API
|
|
23
|
+
- 不保存任何 API Key
|
|
24
|
+
- 不注册任何模型工具
|
|
25
|
+
- **没有自己的配置页**:输出位置不是 profile 设置
|
|
26
|
+
|
|
27
|
+
## 输出位置
|
|
28
|
+
|
|
29
|
+
默认固定为:
|
|
30
|
+
|
|
31
|
+
```text
|
|
32
|
+
<当前工作目录>/output/media/qwen/...
|
|
33
|
+
<当前工作目录>/output/media/runninghub/...
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
需要写到别处时,**在每次调用里传 `output`**:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{ "prompt": "...", "output": "D:/projects/ep01/stills" }
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
相对路径按当前工作目录解析,目录会自动创建。这样同一个会话里不同任务可以各自落到各自的目录,不需要改插件配置。
|
|
43
|
+
|
|
44
|
+
## 挂载方式
|
|
45
|
+
|
|
46
|
+
`cordis.patch.yml` **只插入 `media-suite` 自己这一行**。
|
|
47
|
+
|
|
48
|
+
provider 是独立的 bundle,各自带 `dsh.bundle.patch`。它们在 suite 的 `dependencies` 里声明,由插件管理器一起装进 profile,再由各自的 patch 插入各自的 row。
|
|
49
|
+
|
|
50
|
+
> 不要在 suite 的 patch 里再插入 `media-qwen` / `media-runninghub`:那会和它们自己的 patch 撞同一个 id,导致两个插件都激活失败。
|
|
51
|
+
|
|
52
|
+
## 安装
|
|
53
|
+
|
|
54
|
+
```powershell
|
|
55
|
+
plugin_manager install_bundle .\packages\media-suite
|
|
56
|
+
```
|
package/client.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client half of the media-suite bundle.
|
|
3
|
+
*
|
|
4
|
+
* The suite has no settings of its own: provider keys live on each provider's
|
|
5
|
+
* page, and the output location is a per-call argument rather than a profile
|
|
6
|
+
* setting. This module deliberately registers nothing, and exists only because a
|
|
7
|
+
* bundle's client entry is declared in `package.json`.
|
|
8
|
+
*/
|
|
9
|
+
window.__ModuleLoader__.load({
|
|
10
|
+
id: 'media-suite',
|
|
11
|
+
factory(require) {
|
|
12
|
+
const module = { exports: {} }
|
|
13
|
+
const exports = module.exports
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* No slots, no locale, no Remote contribution. The suite is a composition
|
|
17
|
+
* layer: installing it mounts the provider bundles, and each of those owns
|
|
18
|
+
* its own settings page.
|
|
19
|
+
*/
|
|
20
|
+
exports.inject = []
|
|
21
|
+
exports.apply = function apply() {}
|
|
22
|
+
|
|
23
|
+
return module.exports
|
|
24
|
+
},
|
|
25
|
+
})
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# media-suite mounts only its own row. The provider packages are separate
|
|
2
|
+
# bundles with their own patches: the plugin manager installs them alongside this
|
|
3
|
+
# suite, and their bundle patches insert their rows. Re-inserting the same ids
|
|
4
|
+
# here would collide with those patches, so this file deliberately does not.
|
|
5
|
+
#
|
|
6
|
+
# The suite has no config: where files land is a per-call choice, not a profile
|
|
7
|
+
# setting.
|
|
8
|
+
- insert:
|
|
9
|
+
- id: media-suite
|
|
10
|
+
name: '@tmmk/media-suite'
|
package/icon.svg
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="120" height="120">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#7c3aed"/>
|
|
5
|
+
<stop offset="1" stop-color="#2563eb"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect x="4" y="4" width="112" height="112" rx="24" fill="url(#bg)"/>
|
|
9
|
+
<!-- film-strip sprocket holes, left -->
|
|
10
|
+
<g fill="#ffffff" opacity="0.85">
|
|
11
|
+
<rect x="16" y="22" width="5" height="6" rx="1"/>
|
|
12
|
+
<rect x="16" y="48" width="5" height="6" rx="1"/>
|
|
13
|
+
<rect x="16" y="74" width="5" height="6" rx="1"/>
|
|
14
|
+
<!-- film-strip sprocket holes, right -->
|
|
15
|
+
<rect x="99" y="22" width="5" height="6" rx="1"/>
|
|
16
|
+
<rect x="99" y="48" width="5" height="6" rx="1"/>
|
|
17
|
+
<rect x="99" y="74" width="5" height="6" rx="1"/>
|
|
18
|
+
</g>
|
|
19
|
+
<rect x="26" y="26" width="68" height="68" rx="12" fill="#ffffff"/>
|
|
20
|
+
<polygon points="54,50 54,70 68,62" fill="#2563eb"/>
|
|
21
|
+
</svg>
|
package/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host half of the media-suite bundle.
|
|
3
|
+
*
|
|
4
|
+
* The suite is a distribution shell: its bundle patch mounts the provider
|
|
5
|
+
* packages, so installing the suite once gives the whole family.
|
|
6
|
+
*
|
|
7
|
+
* It deliberately has no Config, no Settings page, and no shared output setting.
|
|
8
|
+
* Generated files always land under the Session directory's `output` folder, and
|
|
9
|
+
* a tool call that needs a different destination passes an `output` argument for
|
|
10
|
+
* that one call. Nothing about where a file goes belongs in profile
|
|
11
|
+
* configuration.
|
|
12
|
+
*
|
|
13
|
+
* It performs no provider API calls, holds no API keys, and registers no model
|
|
14
|
+
* tools.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export const name = 'media-suite'
|
|
18
|
+
export const inject = []
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Mount the suite.
|
|
22
|
+
*
|
|
23
|
+
* The provider packages are separate bundles with their own patches; their rows
|
|
24
|
+
* come from those patches, not from this one. Re-inserting the same ids here
|
|
25
|
+
* would collide with them and stop both providers from activating.
|
|
26
|
+
*/
|
|
27
|
+
export function apply() {
|
|
28
|
+
// Nothing to register: composition is the suite's whole contribution.
|
|
29
|
+
}
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tmmk/media-suite",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": "^22.19.0 || >=24.0.0"
|
|
8
|
+
},
|
|
9
|
+
"packageManager": "pnpm@11.7.0",
|
|
10
|
+
"description": "媒体插件家族:一次安装 Qwen 与 RunningHub 媒体能力,并提供跨 provider 的全局设置。",
|
|
11
|
+
"license": "Apache-2.0",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./index.js",
|
|
14
|
+
"./client": "./client.js",
|
|
15
|
+
"./locale/*.json": "./locale/*.json",
|
|
16
|
+
"./icon": "./icon.svg",
|
|
17
|
+
"./package.json": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"index.js",
|
|
21
|
+
"client.js",
|
|
22
|
+
"cordis.patch.yml",
|
|
23
|
+
"locale/*.json",
|
|
24
|
+
"icon.svg",
|
|
25
|
+
"README.md"
|
|
26
|
+
],
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@tmmk/media-qwen": "^0.1.0",
|
|
29
|
+
"@tmmk/media-runninghub": "^0.1.0"
|
|
30
|
+
},
|
|
31
|
+
"dsh": {
|
|
32
|
+
"bundle": {
|
|
33
|
+
"patch": "./cordis.patch.yml"
|
|
34
|
+
},
|
|
35
|
+
"client": {
|
|
36
|
+
"platform": "web",
|
|
37
|
+
"inject": [
|
|
38
|
+
"@deepseek-ai/dsh-client-ui-slots",
|
|
39
|
+
"@deepseek-ai/dsh-client-locale"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|