dsh-remotion 0.1.0 → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 stardustlc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md CHANGED
@@ -2,8 +2,14 @@
2
2
 
3
3
  # dsh-remotion
4
4
 
5
+ [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)
6
+
5
7
  DSH (DeepSeek Harness) video-creation skill plugin: installing it registers the official Remotion skill into DSH (programmatic video with React: animation, audio, captions, 3D, charts, fonts, and 38 rule files).
6
8
 
9
+ ## Compatibility
10
+
11
+ Verified against `@deepseek-ai/dsh@0.1.1-rc.2` on 2026-08-26. Built for the cordis patch-bundle plugin model (`cordis.patch.yml` + `dsh.bundle.patch`). No runtime imports of `@deepseek-ai/*` internals.
12
+
7
13
  ## Installation
8
14
 
9
15
  ```bash
@@ -12,6 +18,15 @@ dsh plugin --profile web add dsh-remotion
12
18
 
13
19
  After restarting, say "make a video with Remotion" to trigger it.
14
20
 
21
+ ## Uninstall
22
+
23
+ ```bash
24
+ dsh plugin --profile web remove dsh-remotion
25
+ ```
26
+
27
+ Then restart the web service. To clean up fully, also remove the plugin entry from your profile `cordis.patch.yml` if you overrode it.
28
+
29
+
15
30
  ## Contents
16
31
 
17
32
  - **remotion**: Remotion best practices plus `rules/` with 38 rule files (animation/audio/captions/3D/charts/fonts/GIFs/Lottie/maps/transitions...)
@@ -24,6 +39,20 @@ Node.js ≥ 20 + npx (npm registry); rendering needs ffmpeg (guided by the skill
24
39
 
25
40
  Ported from the official OpenAI Codex Remotion plugin cache: frontmatter converted to the DSH format, Codex-only `agents/` stripped, and rule references verified.
26
41
 
42
+ ## Multi-harness
43
+
44
+ Skills use the open Agent Skills (SKILL.md) format — **not just DSH**. Copy the directories under `skills/` into another agent's skills directory:
45
+
46
+ | Agent | Skills directory |
47
+ | :-- | :-- |
48
+ | Claude Code | `~/.claude/skills/` |
49
+ | Cursor | `.cursor/skills/` (or project-local `skills/`) |
50
+ | Gemini CLI | `~/.gemini/skills/` |
51
+ | OpenAI Codex | `~/.codex/skills/` |
52
+
53
+ Port once, use everywhere.
54
+
55
+
27
56
  ## License
28
57
 
29
- MIT for the porting arrangement; skill content copyright remains with Remotion.
58
+ MIT for the porting arrangement; skill content copyright remains with Remotion.
package/README.md CHANGED
@@ -2,8 +2,19 @@
2
2
 
3
3
  # dsh-remotion
4
4
 
5
+ > **在 20+ 个 agent 里写视频**:Remotion 官方技能,React 编程式视频。
6
+
7
+ ![npm version](https://img.shields.io/npm/v/dsh-remotion?label=npm&color=blue) ![npm downloads](https://img.shields.io/npm/dm/dsh-remotion) ![license](https://img.shields.io/npm/l/dsh-remotion) ![stars](https://img.shields.io/github/stars/STARDUSTLC666/dsh-remotion?style=social)
8
+
9
+ [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)
10
+
11
+
5
12
  DSH(DeepSeek Harness)视频创作技能插件:**安装即把 Remotion 官方移植技能注册进 DSH**(React 编程式视频:动画、音频、字幕、3D、图表、字体等,38 个规则文件)。
6
13
 
14
+ ## 兼容性
15
+
16
+ 在 `@deepseek-ai/dsh@0.1.1-rc.2` 上验证(2026-08-26)。遵循 cordis 组合包补丁模型(`cordis.patch.yml` + `dsh.bundle.patch`),运行时不 import 任何 `@deepseek-ai/*` 内部模块。
17
+
7
18
  ## 安装
8
19
 
9
20
  ```bash
@@ -12,6 +23,15 @@ dsh plugin --profile web add dsh-remotion
12
23
 
13
24
  重启后说「用 Remotion 做个视频」即可触发。
14
25
 
26
+ ## 卸载
27
+
28
+ ```bash
29
+ dsh plugin --profile web remove dsh-remotion
30
+ ```
31
+
32
+ 卸载后重启 Web 服务。如需彻底清理,可再手动删除自己 profile `cordis.patch.yml` 中覆盖的插件行。
33
+
34
+
15
35
  ## 技能内容
16
36
 
17
37
  - **remotion**:Remotion 最佳实践 + `rules/` 38 个规则文件(动画/音频/字幕/3D/图表/字体/GIF/Lottie/地图/转场…)
@@ -24,6 +44,20 @@ Node.js ≥ 20 + npx(npm registry);渲染需 ffmpeg(Remotion 自带指
24
44
 
25
45
  技能移植自 OpenAI Codex 官方 Remotion 插件缓存:frontmatter 已转换为 DSH 格式,codex 专属 `agents/` 已剔除,规则引用逐一校验。
26
46
 
47
+ ## 跨平台使用
48
+
49
+ 技能采用开放的 Agent Skills(SKILL.md)格式,**不止 DSH 能用**——把 `skills/` 下的目录复制到其他 agent 的技能目录即可:
50
+
51
+ | Agent | 技能目录 |
52
+ | :-- | :-- |
53
+ | Claude Code | `~/.claude/skills/` |
54
+ | Cursor | `.cursor/skills/`(或项目内 `skills/`)|
55
+ | Gemini CLI | `~/.gemini/skills/` |
56
+ | OpenAI Codex | `~/.codex/skills/` |
57
+
58
+ 一次移植,处处可用。
59
+
60
+
27
61
  ## License
28
62
 
29
63
  MIT(移植编排);技能内容版权归 Remotion。
package/lib/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  /** cordis 服务注入:apply 里要用 ctx.skills,必须显式声明。 */
2
+ export declare const name = "remotion-skills";
2
3
  export declare const inject: string[];
3
4
  /** 技能注册定义(最小面)。 */
4
5
  export interface SkillRegistration {
@@ -16,12 +17,21 @@ export interface SkillsPluginContext {
16
17
  skills: {
17
18
  register(definition: SkillRegistration): () => void;
18
19
  };
20
+ tools?: {
21
+ register(definition: Record<string, unknown>): () => void;
22
+ };
19
23
  on?(event: string, listener: () => void): () => void;
20
24
  }
21
25
  /** 随包分发的技能清单。 */
22
26
  export declare const SKILL_NAMES: readonly ["remotion"];
23
27
  /** 打包技能目录的绝对路径。 */
24
28
  export declare function bundledSkillsDir(): string;
29
+ /** 检查随包技能资源完整性:每个技能的 SKILL.md 是否存在。 */
30
+ export declare function checkBundledSkills(): Array<{
31
+ name: string;
32
+ ok: boolean;
33
+ detail: string;
34
+ }>;
25
35
  /** 拆分 SKILL.md 的 frontmatter 与正文。 */
26
36
  export declare function parseSkillFile(text: string): {
27
37
  name: string;
package/lib/index.js CHANGED
@@ -6,18 +6,27 @@
6
6
  *
7
7
  * @module dsh-remotion
8
8
  */
9
- import { readFileSync } from 'node:fs';
9
+ import { existsSync, readFileSync } from 'node:fs';
10
10
  import { fileURLToPath } from 'node:url';
11
11
  import { join } from 'node:path';
12
12
  import YAML from 'yaml';
13
13
  /** cordis 服务注入:apply 里要用 ctx.skills,必须显式声明。 */
14
- export const inject = ['skills'];
14
+ export const name = 'remotion-skills';
15
+ export const inject = ['skills', 'tools'];
15
16
  /** 随包分发的技能清单。 */
16
17
  export const SKILL_NAMES = ["remotion"];
17
18
  /** 打包技能目录的绝对路径。 */
18
19
  export function bundledSkillsDir() {
19
20
  return fileURLToPath(new URL('../skills/', import.meta.url));
20
21
  }
22
+ /** 检查随包技能资源完整性:每个技能的 SKILL.md 是否存在。 */
23
+ export function checkBundledSkills() {
24
+ return SKILL_NAMES.map((skillName) => {
25
+ const file = join(bundledSkillsDir(), skillName, 'SKILL.md');
26
+ const ok = existsSync(file);
27
+ return { name: skillName, ok, detail: ok ? file : 'SKILL.md 缺失:' + file };
28
+ });
29
+ }
21
30
  /** 拆分 SKILL.md 的 frontmatter 与正文。 */
22
31
  export function parseSkillFile(text) {
23
32
  const match = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?/.exec(text);
@@ -65,6 +74,30 @@ export function apply(ctx) {
65
74
  console.warn('[dsh-remotion] 技能 ' + skillName + ' 加载失败:' + (error instanceof Error ? error.message : String(error)));
66
75
  }
67
76
  }
77
+ if (typeof ctx.tools?.register === 'function') {
78
+ disposers.push(ctx.tools.register({
79
+ name: 'remotion_health',
80
+ description: 'dsh-remotion 自检:检查随包技能资源(SKILL.md)是否完整。遇到问题时先运行本工具定位。',
81
+ parameters: { type: 'object', properties: {} },
82
+ output: {
83
+ schema: { type: 'object', additionalProperties: true },
84
+ render(_args, value) {
85
+ const rec = (value ?? {});
86
+ const skills = Array.isArray(rec.skills) ? rec.skills : [];
87
+ const lines = ['dsh-remotion 自检' + (rec.ok === true ? ':技能资源完整。' : ':发现缺失。')];
88
+ for (const item of skills) {
89
+ const s = (item ?? {});
90
+ lines.push('- ' + String(s.name) + ':' + (s.ok === true ? '✅' : '❌ ' + String(s.detail ?? '')));
91
+ }
92
+ return [{ type: 'text', text: lines.join('\n') }];
93
+ },
94
+ },
95
+ async execute() {
96
+ const skills = checkBundledSkills();
97
+ return { ok: skills.every((s) => s.ok), plugin: 'dsh-remotion', skills };
98
+ },
99
+ }));
100
+ }
68
101
  if (typeof ctx.on === 'function') {
69
102
  ctx.on('dispose', () => {
70
103
  for (const dispose of disposers)
package/package.json CHANGED
@@ -1,63 +1,63 @@
1
- {
2
- "name": "dsh-remotion",
3
- "version": "0.1.0",
4
- "description": "DSH 视频创作技能插件:注册 Remotion 官方移植技能(React 编程式视频:动画/音频/字幕/3D/图表/字体,38 个规则文件),安装即用。",
5
- "type": "module",
6
- "main": "lib/index.js",
7
- "types": "lib/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./lib/index.d.ts",
11
- "default": "./lib/index.js"
12
- },
13
- "./cordis.patch.yml": "./cordis.patch.yml",
14
- "./package.json": "./package.json"
15
- },
16
- "files": [
17
- "lib",
18
- "skills",
19
- "cordis.patch.yml",
20
- "README.md",
21
- "README.en.md"
22
- ],
23
- "scripts": {
24
- "build": "tsc -p tsconfig.json",
25
- "prepare": "tsc -p tsconfig.json",
26
- "typecheck": "tsc -p tsconfig.json --noEmit",
27
- "test": "pnpm run build && node --test \"test/*.test.mjs\"",
28
- "prepublishOnly": "pnpm run build"
29
- },
30
- "dsh": {
31
- "bundle": {
32
- "patch": "./cordis.patch.yml"
33
- }
34
- },
35
- "keywords": [
36
- "dsh",
37
- "deepseek-harness",
38
- "plugin",
39
- "skills",
40
- "video"
41
- ],
42
- "license": "MIT",
43
- "engines": {
44
- "node": ">=20"
45
- },
46
- "dependencies": {
47
- "yaml": "^2.9.0"
48
- },
49
- "devDependencies": {
50
- "@types/node": "^24.0.0",
51
- "typescript": "^5.6.0"
52
- },
53
- "repository": {
54
- "type": "git",
55
- "url": "https://github.com/STARDUSTLC666/dsh-remotion"
56
- },
57
- "bugs": {
58
- "url": "https://github.com/STARDUSTLC666/dsh-remotion/issues"
59
- },
60
- "homepage": "https://github.com/STARDUSTLC666/dsh-remotion#readme",
61
- "author": "stardustlc",
62
- "packageManager": "pnpm@11.7.0"
63
- }
1
+ {
2
+ "name": "dsh-remotion",
3
+ "version": "0.2.0",
4
+ "description": "DSH 视频创作技能插件:注册 Remotion 官方移植技能(React 编程式视频:动画/音频/字幕/3D/图表/字体,38 个规则文件),安装即用。",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "types": "lib/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/index.d.ts",
11
+ "default": "./lib/index.js"
12
+ },
13
+ "./cordis.patch.yml": "./cordis.patch.yml",
14
+ "./package.json": "./package.json"
15
+ },
16
+ "files": [
17
+ "lib",
18
+ "skills",
19
+ "cordis.patch.yml",
20
+ "README.md",
21
+ "README.en.md"
22
+ ],
23
+ "scripts": {
24
+ "build": "tsc -p tsconfig.json",
25
+ "typecheck": "tsc -p tsconfig.json --noEmit",
26
+ "test": "pnpm run build && node --test \"test/*.test.mjs\"",
27
+ "prepublishOnly": "pnpm run build"
28
+ },
29
+ "dsh": {
30
+ "bundle": {
31
+ "patch": "./cordis.patch.yml"
32
+ }
33
+ },
34
+ "keywords": [
35
+ "dsh",
36
+ "deepseek-harness",
37
+ "plugin",
38
+ "skills",
39
+ "video",
40
+ "dsh-plugin"
41
+ ],
42
+ "license": "MIT",
43
+ "engines": {
44
+ "node": ">=22"
45
+ },
46
+ "dependencies": {
47
+ "yaml": "^2.9.0"
48
+ },
49
+ "devDependencies": {
50
+ "@types/node": "^24.0.0",
51
+ "typescript": "^5.6.0"
52
+ },
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "git+https://github.com/STARDUSTLC666/dsh-remotion.git"
56
+ },
57
+ "bugs": {
58
+ "url": "https://github.com/STARDUSTLC666/dsh-remotion/issues"
59
+ },
60
+ "homepage": "https://github.com/STARDUSTLC666/dsh-remotion#readme",
61
+ "author": "stardustlc",
62
+ "packageManager": "pnpm@11.7.0"
63
+ }