dsh-claude-motion 2.12.1 → 2.12.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.
- package/lib/index.js +1 -1
- package/package.json +14 -14
- package/skills/claude-motion/scripts/artifact.mjs +22 -6
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// dsh-claude-motion 2.12.
|
|
1
|
+
// dsh-claude-motion 2.12.3: built from baoyu-design.
|
|
2
2
|
var define_PLUGIN_default = { name: "claude-motion", provider: "dsh-claude-motion", skills: [{ name: "claude-motion", description: "Use this for a local Motion film: a short animated video (10–30 s unless asked for more, 900 s at most), such as an explainer, product walkthrough or UI demo, launch teaser, logo sting, social clip, animated chart or title sequence, that plays in the bundled Motion player and exports from there to MP4 or GIF. A narrated one carries a voice track: a take a scene, made here with a speech provider of the user's or recorded by them, spoken and captioned by the player, the motion timed to its words. Everything on screen is code, a pure function of time, written scene by scene into the film's own store with this skill's script while the user watches it fill in. Read it when creating, continuing, finalizing or revising one. Not for editing real footage, subtitles or audio (that is a video editor), a still picture, a slide deck or a static HTML page.", scriptAlias: "A", comments: true, requests: true }] };
|
|
3
3
|
|
|
4
4
|
import { readFile } from "node:fs/promises";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-claude-motion",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.3",
|
|
4
4
|
"description": "DeepSeek Harness plugin: the claude-motion skill from baoyu-design. The agent writes short animated films as code, scene by scene, and plays them in a local Motion player that exports MP4 or GIF.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|
|
@@ -24,6 +24,18 @@
|
|
|
24
24
|
"icon": "./icon.svg",
|
|
25
25
|
"baoyuDesign": {
|
|
26
26
|
"releaseNotes": [
|
|
27
|
+
{
|
|
28
|
+
"version": "2.12.3",
|
|
29
|
+
"date": "2026-11-10",
|
|
30
|
+
"en": "### Fixes\n- **`claude-design`: `check` now catches a canvas title placed too close above its row.** An artboard's name strip keeps its size on screen while a title (`title1`) scales with the canvas, so a title 140 px above its row looked fine at 100% but covered the artboards' names once zoomed out below about 50%. `SKILL.md` already asked for at least 223 px. `check` now reports a title of 72 px or more that is closer than that to the artboards under it, or that sits over one: one issue per title, with the `y` to move it to. Text the user adds with the editor's text tool is left alone, wherever it is (contributed by @congee949, [#38](https://github.com/JimLiu/baoyu-design/pull/38)).",
|
|
31
|
+
"zh": "### 修复\n- **`claude-design`:`check` 现在会查出离画板太近的画布标题。** 画板的名称条在屏幕上大小不变,标题(`title1`)却跟着画布缩放,所以标题放在一行画板上方 140 px,100% 时看着没问题,缩到 50% 以下就压住了画板的名字。`SKILL.md` 本来就要求至少 223 px;现在 72 px 及以上的标题离下面的画板不到这个距离,或者压在画板上,`check` 都会报出来,每个标题一条,并给出要挪到的 `y`。用户用编辑器文字工具加的文字,放在哪里都不查(@congee949 贡献,[#38](https://github.com/JimLiu/baoyu-design/pull/38))。"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"version": "2.12.2",
|
|
35
|
+
"date": "2026-11-09",
|
|
36
|
+
"en": "### Features\n- **`claude-design`: Export → HTML for Figma.** Capturing the canvas, or the Standalone web page, with Figma's Chrome extension brought the artboards in as empty boxes, because each artboard is drawn inside a frame the extension does not look into. **HTML for Figma** (in the toolbar's Export, an artboard's Export and the Share panel's Export tab) saves `<title>.figma.html`: every artboard's rendered layers, placed where they are on the canvas, with their styles, fonts and images inside the file, and no frames and no scripts. Open it in Chrome and capture it with Figma's extension (**Capture page**, or **Select element** for one artboard). In an artboard's own Export it is that artboard alone. `SKILL.md` tells the agent how to answer when asked to bring a design into Figma (reported by @mufanmu, [#36](https://github.com/JimLiu/baoyu-design/issues/36)).\n\n### Fixes\n- **`claude-design`: PNG export no longer draws some icons as black or solid blocks.** An SVG icon drawn with `<use>` lost the `fill: none` and `stroke: currentColor` its class gave it, and came out filled in black; it now takes the colour of the `<use>`. An icon cut out with a CSS `mask-image` (on an element or on `::before` and `::after`) was drawn as a solid block because the mask's file was not in the exported image; masks are now embedded like background images (reported by @hh0592821, [#35](https://github.com/JimLiu/baoyu-design/issues/35)).\n- **`share` gives out the Wi-Fi's address first on a computer with a VPN, a proxy or a hotspot.** On Windows the links could start with the address of a proxy's virtual adapter (a sing-box TUN named `falemon-tun`, `172.19.0.1`), which nobody else on the network can reach. Addresses of adapters named like a tunnel (`falemon-tun`, OpenVPN's TAP, Wintun, anything with `vpn` in its name), of point-to-point links, and of networks this computer makes itself (the Mobile Hotspot's `192.168.137.1`, a virtual machine's or container's network) now come after the local network's. When a computer is on more than one network, `share` says that a link that does not open can be tried with another of the listed addresses (reported by @Bistard, [#37](https://github.com/JimLiu/baoyu-design/issues/37)).\n- **`open` no longer says the port is in use when a firewall or proxy filters `::1`.** A probe refused with `EACCES` or `EPERM` counted as an answer from something on the port, so `open` gave up on all 100 ports it tries.\n- A page whose skill folder was moved, renamed or removed while its server ran now says so, and names the folder to the owner, instead of telling them to reinstall the skill. A guest is told to ask whoever shared it.",
|
|
37
|
+
"zh": "### 新功能\n- **`claude-design`:新增 Export → HTML for Figma。** 以前用 Figma 的 Chrome 扩展捕捉画布,或捕捉导出的 Standalone web page,画板进到 Figma 里都是空框,因为每个画板都画在一个框架(iframe)里,扩展看不进去。现在工具栏的 Export、画板自己的 Export 和 Share 面板的 Export 标签里都有 **HTML for Figma**,保存成 `<标题>.figma.html`:每个画板渲染出来的图层,摆在它们在画布上的位置,样式、字体和图片都在文件里,没有框架,也没有脚本。用 Chrome 打开这个文件,再用 Figma 的扩展捕捉(**Capture page**,只要一个画板就用 **Select element**)。画板自己的 Export 里,导出的只是这一个画板。`SKILL.md` 也写了用户要把设计带进 Figma 时 Agent 该怎么答(@mufanmu 报告,[#36](https://github.com/JimLiu/baoyu-design/issues/36))。\n\n### 修复\n- **`claude-design`:PNG 导出不再把一部分图标画成黑色或实心块。** 用 `<use>` 画的 SVG 图标,会丢掉 class 给它的 `fill: none` 和 `stroke: currentColor`,导出来被涂成黑色,现在按 `<use>` 的颜色走。用 CSS `mask-image` 抠出来的图标(元素上的,或 `::before`、`::after` 上的)因为遮罩文件没进导出的图片,被画成一整块实心,现在遮罩像背景图一样嵌进去(@hh0592821 报告,[#35](https://github.com/JimLiu/baoyu-design/issues/35))。\n- **装了 VPN、代理或开了热点的电脑上,`share` 先给出 Wi-Fi 的地址。** 在 Windows 上,链接可能以代理虚拟网卡的地址开头(sing-box 的 TUN,叫 `falemon-tun`,`172.19.0.1`),网络上的其他人连不上。现在名字像隧道的网卡(`falemon-tun`、OpenVPN 的 TAP、Wintun、名字里带 `vpn` 的),点对点链路,以及这台电脑自己建的网络(移动热点的 `192.168.137.1`、虚拟机或容器的网络),地址都排在本地网络后面。电脑在多个网络上时,`share` 会提示:链接打不开,可以把地址换成列出的另一个再试(@Bistard 报告,[#37](https://github.com/JimLiu/baoyu-design/issues/37))。\n- **防火墙或代理拦着 `::1` 时,`open` 不再报端口被占用。** 探测被 `EACCES` 或 `EPERM` 拒绝,以前算成端口上有东西应答,`open` 试的 100 个端口全部放弃。\n- 技能文件夹在服务器运行期间被移动、改名或删除,页面现在会说明这一点,并把文件夹告诉主人,而不是让他重装技能;访客看到的是请分享的人重新打开。"
|
|
38
|
+
},
|
|
27
39
|
{
|
|
28
40
|
"version": "2.12.1",
|
|
29
41
|
"date": "2026-11-07",
|
|
@@ -59,18 +71,6 @@
|
|
|
59
71
|
"date": "2026-11-05",
|
|
60
72
|
"en": "### Features\n- **The DeepSeek Harness plugins update in one click.** When a new version is out, the app offers it: a card at the bottom right, a line at the top of the **Artifacts** page, and an **Update** button on each plugin's page. One click updates the plugins together, with nothing to uninstall, and most updates need no restart. If an update fails, the plugin stays on the version it was. A plugin added from a folder isn't offered one. This starts with 2.10.0, so 2.9.2 and earlier need [one last update by hand](dsh-plugins/README.md#update).\n- **DeepSeek Harness: a skill can be kept to one agent preset.** Turn off the plugin's own row and declare the plugin in the preset, and `/` lists the skill only in that preset's sessions. The **Artifacts** page and comments keep working, through a new package, `dsh-claude-artifacts`, that each plugin installs with it. See [how to set it up](dsh-plugins/README.md#keep-a-skill-to-one-preset).\n\n### Fixes\n- `archive` and the **Whole folder** export zipped `.git`, including the remote's address and any token in it, and that zip is what gets sent to other people. `.git` now stays out, at any depth.\n- An artifact folder's default `.gitignore` took `exports/` (a film's MP4 too) and two of the three temp file shapes into git, and its `history/` rule also matched a project's own folder of that name, which git then dropped. `history/` and `exports/` now match only at the top of the folder.\n- `share` could give out a TUN proxy's address, such as sing-box's `172.19.0.1`, first when the system lists it first. It now skips an address that answers at every port, and lists tunnels after the local network.\n- Design's Standalone export: a `#id` link did nothing when the file was opened directly, and over `http://` it also scrolled the page around the frame. A click now scrolls inside the frame only, as Play does.",
|
|
61
73
|
"zh": "### 新功能\n- **DeepSeek Harness 插件可以一键更新。** 出了新版本,应用会提示你:右下角弹出卡片,**Artifacts** 页(中文界面是「作品」)顶部和每个插件的详情页也有 **Update**(更新)按钮。点一下,这些插件一起更新,不用卸载,多数情况也不用重启。更新失败时插件还是原来的版本。从文件夹安装的插件不会收到提示。这个功能从 2.10.0 开始,所以 2.9.2 和更早的版本要[最后手动更新一次](dsh-plugins/README.zh-CN.md#更新)。\n- **DeepSeek Harness:技能可以只留给某个 Agent 预设。** 关掉插件自己那一行,再在预设里声明这个插件,`/` 就只在这个预设的会话里列出这个技能。作品页和评论照常工作,它们现在由新包 `dsh-claude-artifacts` 负责,每个插件都会带上它。[设置方法](dsh-plugins/README.zh-CN.md#只让某个预设用某个技能)。\n\n### 修复\n- `archive` 和导出的 **Whole folder**(整个文件夹)会把 `.git` 打进 zip,里面有远程仓库地址和可能带着的 token,而这个 zip 正是要发给别人的。现在任何层级的 `.git` 都不会打进去。\n- 作品文件夹默认的 `.gitignore` 会把 `exports/`(包括影片的 MP4)和三种临时文件里的两种提交进 git;它的 `history/` 规则还会匹配项目自己的同名文件夹,导致 git 把那个文件夹漏掉。现在 `history/` 和 `exports/` 只匹配文件夹顶层。\n- 系统把 TUN 代理的网卡排在前面时,`share` 可能先给出代理的地址,比如 sing-box 的 `172.19.0.1`。现在会跳过在所有端口都有应答的地址,并把隧道网卡排在局域网后面。\n- 设计稿的 Standalone 导出:直接打开文件时,`#id` 链接点了没反应;通过 `http://` 打开时,还会连带滚动框架外的页面。现在点击只在框架内滚动,和 Play 一样。"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"version": "2.9.2",
|
|
65
|
-
"date": "2026-11-04",
|
|
66
|
-
"en": "### Fixes\n- DeepSeek Harness on Windows: the command the skills told the agent to run was written for a POSIX shell, and PowerShell reads a quoted path at the start of a line as a string, not a command. On Windows they now give `& '<node>' '<script>' <command>`, and say that PowerShell has no heredoc.",
|
|
67
|
-
"zh": "### 修复\n- Windows 上的 DeepSeek Harness:技能告诉 agent 运行的命令是按 POSIX shell 写的,而 PowerShell 会把行首带引号的路径当成字符串,不当成命令。现在 Windows 上给的是 `& '<node>' '<script>' <command>`,并说明 PowerShell 没有 heredoc。"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"version": "2.9.1",
|
|
71
|
-
"date": "2026-11-04",
|
|
72
|
-
"en": "### Fixes\n- DeepSeek Harness on Windows: the plugins only recognized a shell tool named `bash`, and on Windows it is named `pwsh`, so they never noticed an `open`. The folder stayed off the **Artifacts** page, **Send to Agent** never appeared, and comments did not reach the agent. They now recognize both names (by @leil894-collab, [#31](https://github.com/JimLiu/baoyu-design/pull/31); reported by @EmotionTowel, [#30](https://github.com/JimLiu/baoyu-design/issues/30)).",
|
|
73
|
-
"zh": "### 修复\n- Windows 上的 DeepSeek Harness:插件只认名叫 `bash` 的 shell 工具,而它在 Windows 上叫 `pwsh`,所以一直注意不到 `open`。文件夹不会出现在作品页,**Send to Agent** 不出现,评论也到不了 Agent。现在两个名字都认(by @leil894-collab,[#31](https://github.com/JimLiu/baoyu-design/pull/31);@EmotionTowel 报告,[#30](https://github.com/JimLiu/baoyu-design/issues/30))。"
|
|
74
74
|
}
|
|
75
75
|
]
|
|
76
76
|
},
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"dsh": ">=0.2.0-0"
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
|
-
"dsh-claude-artifacts": "^2.12.
|
|
99
|
+
"dsh-claude-artifacts": "^2.12.3"
|
|
100
100
|
},
|
|
101
101
|
"dsh": {
|
|
102
102
|
"bundle": {
|
|
@@ -104,13 +104,21 @@ function isTailnet(address) {
|
|
|
104
104
|
const m = /^100\.(\d{1,3})\./.exec(address);
|
|
105
105
|
return !!m && Number(m[1]) >= 64 && Number(m[1]) <= 127;
|
|
106
106
|
}
|
|
107
|
-
var isTunnel = (name) =>
|
|
107
|
+
var isTunnel = (name) => /(^|[^a-z0-9])(utun|tun|tap|wg|ppp|ipsec)\d*($|[^a-z0-9])/i.test(name) || /vpn|wintun|tunnel/i.test(name);
|
|
108
|
+
var ipv4Number = (address) => address.split(".").reduce((n, part) => n * 256 + Number(part), 0);
|
|
109
|
+
function isOwnNetwork(entry) {
|
|
110
|
+
if (!/^\d+\.\d+\.\d+\.\d+$/.test(entry.netmask)) return false;
|
|
111
|
+
const mask = ipv4Number(entry.netmask);
|
|
112
|
+
if (mask >= ipv4Number("255.255.255.252")) return true;
|
|
113
|
+
const address = ipv4Number(entry.address);
|
|
114
|
+
return ((address & mask) >>> 0) + 1 === address;
|
|
115
|
+
}
|
|
108
116
|
function lanAddresses() {
|
|
109
117
|
const out = /* @__PURE__ */ new Map();
|
|
110
118
|
for (const [name, list] of Object.entries(os.networkInterfaces())) {
|
|
111
119
|
for (const entry of list ?? []) {
|
|
112
120
|
if (entry.family !== "IPv4" || entry.internal || entry.address.startsWith("169.254.") || isBenchmarkRange(entry.address)) continue;
|
|
113
|
-
const rank = isTailnet(entry.address) ? 2 : isTunnel(name) ? 1 : 0;
|
|
121
|
+
const rank = isTailnet(entry.address) ? 2 : isTunnel(name) || isOwnNetwork(entry) ? 1 : 0;
|
|
114
122
|
out.set(entry.address, Math.min(rank, out.get(entry.address) ?? rank));
|
|
115
123
|
}
|
|
116
124
|
}
|
|
@@ -125,7 +133,10 @@ function answers(host, port) {
|
|
|
125
133
|
};
|
|
126
134
|
socket.setTimeout(300, () => done(false));
|
|
127
135
|
socket.once("connect", () => done(true));
|
|
128
|
-
socket.once(
|
|
136
|
+
socket.once(
|
|
137
|
+
"error",
|
|
138
|
+
(error) => done(!["ECONNREFUSED", "EADDRNOTAVAIL", "EAFNOSUPPORT", "ENETUNREACH", "EHOSTUNREACH", "EACCES", "EPERM"].includes(error.code ?? ""))
|
|
139
|
+
);
|
|
129
140
|
});
|
|
130
141
|
}
|
|
131
142
|
async function answersAnyPort(address) {
|
|
@@ -171,6 +182,7 @@ function serverOrigin(host, port) {
|
|
|
171
182
|
return `http://${shown2}:${port}`;
|
|
172
183
|
}
|
|
173
184
|
var pagePathOf = (kind, root) => `/${kind}/${createHash("sha256").update(path.resolve(root)).digest("base64url").slice(0, 22)}/`;
|
|
185
|
+
var pageGone = (dir, owner) => owner ? `This page's files are no longer in ${dir}: the skill was moved, renamed or removed while its server ran. Stop the server and open the artifact again (the agent that opened it can do both).` : "This page's files are gone from the computer that shares it. Ask whoever shared it to open it again.";
|
|
174
186
|
function sendJson(response, status, body, headers = {}) {
|
|
175
187
|
const text = JSON.stringify(body);
|
|
176
188
|
response.writeHead(status, {
|
|
@@ -2958,9 +2970,12 @@ async function shareCommand(o) {
|
|
|
2958
2970
|
const links = view.links;
|
|
2959
2971
|
const shown2 = (list) => Object.fromEntries(Object.entries(list).map(([role, link]) => [role, link.on ? link.url : "off"]));
|
|
2960
2972
|
const tailnet = view.lan ? view.tailnet : void 0;
|
|
2973
|
+
const addresses = view.lan ? lanUrls(view) : [];
|
|
2974
|
+
const local = view.lan && Array.isArray(view.addresses) ? view.addresses.filter((a) => !isTailnet(String(a))) : [];
|
|
2975
|
+
const others = local.length > 1 ? " This computer is on more than one network (addresses): if a link does not open for someone on the same Wi-Fi or LAN, give them the same link with another of those addresses." : "";
|
|
2961
2976
|
return {
|
|
2962
2977
|
lan: view.lan,
|
|
2963
|
-
...view.lan ? { addresses
|
|
2978
|
+
...view.lan ? { addresses } : {},
|
|
2964
2979
|
links: shown2(links),
|
|
2965
2980
|
...tailnet ? {
|
|
2966
2981
|
tailscale: shown2(tailnet.links),
|
|
@@ -2968,7 +2983,7 @@ async function shareCommand(o) {
|
|
|
2968
2983
|
} : {},
|
|
2969
2984
|
guests: view.guests,
|
|
2970
2985
|
...view.lan ? {
|
|
2971
|
-
note:
|
|
2986
|
+
note: `Send the link for the role you want to give: editor edits, commenter comments, viewer reads. Anyone on this network with a link joins under a name they type. The owner (this computer) shares from the Share button too.${others}`,
|
|
2972
2987
|
security: "It is plain http: others on the network can read what passes. A link is the permission: whoever has it gets its role, so send it only to the people meant to have it, and reset a role's link if it went further.",
|
|
2973
2988
|
stop: o.offCommand
|
|
2974
2989
|
} : { note: `Not shared on the network: the links work on this computer only. ${NOT_SHARED_HINT}` }
|
|
@@ -7792,7 +7807,8 @@ data: ${JSON.stringify(data)}
|
|
|
7792
7807
|
try {
|
|
7793
7808
|
html = fs19.readFileSync(path18.join(EDITOR_DIR, "index.html"), "utf8");
|
|
7794
7809
|
} catch {
|
|
7795
|
-
|
|
7810
|
+
log3(`the player's files are gone from ${EDITOR_DIR}: the skill was moved, renamed or removed while this server ran`);
|
|
7811
|
+
return json(res, 404, { code: "not_found", message: pageGone(EDITOR_DIR, viewer.role === "owner") });
|
|
7796
7812
|
}
|
|
7797
7813
|
const body = Buffer.from(share2.injectHead(html, viewer, at === void 0 ? "" : `?at=${at}`) ?? html);
|
|
7798
7814
|
res.writeHead(200, { "Content-Type": "text/html; charset=utf-8", "Content-Length": body.length, "Cache-Control": "no-store", "X-Content-Type-Options": "nosniff" });
|