dsh-claude-motion 2.9.1 → 2.9.2
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/client.js +1 -1
- package/lib/index.js +22 -8
- package/package.json +1 -1
package/lib/client.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// dsh-claude-motion 2.9.
|
|
1
|
+
// dsh-claude-motion 2.9.2: 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 { spawn as spawn2 } from "node:child_process";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
import { statSync as statSync2 } from "node:fs";
|
|
7
7
|
import { readFile } from "node:fs/promises";
|
|
8
|
-
import { basename as basename2, delimiter, dirname as dirname2, isAbsolute, join as join2, sep } from "node:path";
|
|
8
|
+
import { basename as basename2, delimiter, dirname as dirname2, isAbsolute, join as join2, posix, sep, win32 } from "node:path";
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
|
10
10
|
|
|
11
11
|
import { spawn } from "node:child_process";
|
|
@@ -509,9 +509,18 @@ function resolveNode(config = {}) {
|
|
|
509
509
|
function shellQuote(path) {
|
|
510
510
|
return `"${path.replace(/(["\\$`])/g, "\\$1")}"`;
|
|
511
511
|
}
|
|
512
|
-
function
|
|
513
|
-
|
|
514
|
-
|
|
512
|
+
function powerShellQuote(path) {
|
|
513
|
+
return `'${path.replace(/['\u2018-\u201b]/g, "$&$&")}'`;
|
|
514
|
+
}
|
|
515
|
+
function scriptCommand(node, script, args, platform) {
|
|
516
|
+
if (platform !== "win32") return [node.env, shellQuote(node.path), shellQuote(script), ...args].filter(Boolean).join(" ");
|
|
517
|
+
const [name2, value] = node.env?.split("=") ?? [];
|
|
518
|
+
const env = name2 ? `$env:${name2} = ${powerShellQuote(value ?? "")};` : "";
|
|
519
|
+
return [env, "&", powerShellQuote(node.path), powerShellQuote(script), ...args].filter(Boolean).join(" ");
|
|
520
|
+
}
|
|
521
|
+
function runtimeSection(skill, skillDir, node, platform = process.platform) {
|
|
522
|
+
const windows = platform === "win32";
|
|
523
|
+
const script = (windows ? win32 : posix).join(skillDir, "scripts", "artifact.mjs");
|
|
515
524
|
const written = skill.scriptAlias === void 0 ? "`node <this skill's folder>/scripts/artifact.mjs <command>`" : `\`node $${skill.scriptAlias} <command>\` (\`${skill.scriptAlias}\` being \`<this skill's folder>/scripts/artifact.mjs\`)`;
|
|
516
525
|
const lines = [
|
|
517
526
|
"",
|
|
@@ -519,12 +528,17 @@ function runtimeSection(skill, skillDir, node) {
|
|
|
519
528
|
"## Running the calls in DeepSeek Harness",
|
|
520
529
|
"",
|
|
521
530
|
"Wherever these pages, or the script's own output (its `stop`, `next` and other hints), say",
|
|
522
|
-
`${written}, run this in the shell instead, with the quotes (the paths can contain spaces):`,
|
|
531
|
+
`${written}, run this in the shell instead, with the ${windows ? "`&` and the " : ""}quotes (the paths can contain spaces):`,
|
|
523
532
|
"",
|
|
524
|
-
"```sh",
|
|
525
|
-
|
|
533
|
+
windows ? "```powershell" : "```sh",
|
|
534
|
+
scriptCommand(node, script, ["<command> …"], platform),
|
|
526
535
|
"```",
|
|
527
536
|
"",
|
|
537
|
+
...windows ? [
|
|
538
|
+
"The shell here is PowerShell. PowerShell has no heredoc (`<<'EOF'`): where a page offers one, write the text to",
|
|
539
|
+
"a file and pass its path.",
|
|
540
|
+
""
|
|
541
|
+
] : [],
|
|
528
542
|
"`open` prints the editor's `url` (on 127.0.0.1): give it to the user as a Markdown link. In the DeepSeek Harness",
|
|
529
543
|
"app a chat link opens in the right sidebar's Browser, next to this conversation."
|
|
530
544
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-claude-motion",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.2",
|
|
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",
|