dsh-claude-design 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 CHANGED
@@ -1,4 +1,4 @@
1
- // dsh-claude-design 2.9.1: built from baoyu-design.
1
+ // dsh-claude-design 2.9.2: built from baoyu-design.
2
2
  window.__ModuleLoader__.load({
3
3
  id: "dsh-claude-design",
4
4
  factory: (require) => {
package/lib/index.js CHANGED
@@ -1,11 +1,11 @@
1
- // dsh-claude-design 2.9.1: built from baoyu-design.
1
+ // dsh-claude-design 2.9.2: built from baoyu-design.
2
2
  var define_PLUGIN_default = { name: "claude-design", provider: "dsh-claude-design", skills: [{ name: "claude-design", description: "Make and revise designs in the Design (canvas) artifact format (project/canvas.json plus one .dc.html Design Component file per artboard) as local files, then open them in a local canvas editor where the user can view the artboards side by side, retype copy and adjust tweaks. Use when the user asks for an editable canvas of artboards in this format, names claude-design or the Design (canvas) type, or wants to revise a folder that holds project/canvas.json. Not for a one-off HTML prototype or a design exploration outside this format.", comments: 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 runtimeSection(skill, skillDir, node) {
513
- const script = join2(skillDir, "scripts", "artifact.mjs");
514
- const run = (...args) => [node.env, shellQuote(node.path), shellQuote(script), ...args].filter(Boolean).join(" ");
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
- run("<command> …"),
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-design",
3
- "version": "2.9.1",
3
+ "version": "2.9.2",
4
4
  "description": "DeepSeek Harness plugin: the claude-design skill from baoyu-design. The agent writes canvases of artboards as files and opens them in a local canvas editor.",
5
5
  "keywords": [
6
6
  "dsh",