dsh-claude-slides 2.9.2 → 2.10.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-claude-slides",
3
- "version": "2.9.2",
3
+ "version": "2.10.0",
4
4
  "description": "DeepSeek Harness plugin: the claude-slides skill from baoyu-design. The agent writes editable slide decks as files and opens them in a local slide editor.",
5
5
  "keywords": [
6
6
  "dsh",
@@ -23,7 +23,6 @@
23
23
  "icon": "./icon.svg",
24
24
  "exports": {
25
25
  ".": "./lib/index.js",
26
- "./client": "./lib/client.js",
27
26
  "./cordis.patch.yml": "./cordis.patch.yml",
28
27
  "./locale/*.json": "./locale/*.json",
29
28
  "./package.json": "./package.json"
@@ -43,25 +42,12 @@
43
42
  "node": ">=20",
44
43
  "dsh": ">=0.2.0-0"
45
44
  },
45
+ "dependencies": {
46
+ "dsh-claude-artifacts": "^2.10.0"
47
+ },
46
48
  "dsh": {
47
49
  "bundle": {
48
50
  "patch": "./cordis.patch.yml"
49
- },
50
- "client": {
51
- "platform": "web",
52
- "inject": [
53
- "@deepseek-ai/dsh-api-session-controller",
54
- "@deepseek-ai/dsh-api-workspace-controller",
55
- "@deepseek-ai/dsh-client-connection",
56
- "@deepseek-ai/dsh-client-locale",
57
- "@deepseek-ai/dsh-client-ui-chat",
58
- "@deepseek-ai/dsh-client-ui-conversation",
59
- "@deepseek-ai/dsh-client-ui-layout",
60
- "@deepseek-ai/dsh-client-ui-renderer",
61
- "@deepseek-ai/dsh-client-ui-sidebar",
62
- "@deepseek-ai/dsh-client-ui-sidebar-right",
63
- "@deepseek-ai/dsh-client-ui-workspace"
64
- ]
65
51
  }
66
52
  }
67
53
  }
@@ -83,7 +83,7 @@ leave alone stays as it is, and removing a slide is deleting its file. The rest
83
83
  - `open <root>` → `{url, pid, stop, …}`: starts the editor page on this machine in the background (once; later calls reuse it, `reused: true`) and prints its address, `http://127.0.0.1:4710/slides/<id>/`. All the decks open on this computer share one server and port (4710, the next free port up when that is taken; `--port n` looks for it at n and starts from n, `--port 0` runs a server of its own on any port), each at its own path, which stays the same from one start to the next. `stop <root>` takes this one off, and the server ends with the last (`serve <root>` runs it in the foreground instead). The page saves the user's edits into the same files, and shows yours as soon as you write them. `.artifact-server.json` and `.artifact-server.log` beside `project/` are its own: leave them; so is `comments.json` (the comments, see Comments), which only the comment commands below change.
84
84
  `NETWORK_BLOCKED` from `open` means your commands run in a sandbox without local network. Run `open`, `share` and `comments <root> --wait` with local network allowed, outside the sandbox, asking for that permission if your commands need approval; in the sandbox `comments --wait` says `NO_SERVER` even while the page is open. Commands that only read and write files work in the sandbox.
85
85
  - `share <root>` (or `open <root> --lan`): opens the page to the local network and prints a link per role (Sharing, below).
86
- - `archive <root> [--out file.zip|dir]` → `{file, files, bytes, open}`: the whole folder, history and comments too, as one zip beside it (`--out`: another file or folder), to back it up, move it to another computer or send it to someone; unzipped anywhere, `open` carries on. The owner's Download folder button in the page (between History and Share) does the same. The server's own files and the share links stay out.
86
+ - `archive <root> [--out file.zip|dir]` → `{file, files, bytes, open}`: the whole folder, history and comments too, as one zip beside it (`--out`: another file or folder), to back it up, move it to another computer or send it to someone; unzipped anywhere, `open` carries on. The owner's Download folder button in the page (between History and Share) does the same. The server's own files, the share links, `exports/` and `.git` stay out.
87
87
  - The Theme tab links to a read-only page of the system in use, `<editor>/__ds/<folder>/`: the copy under `project/ds/<folder>/` as this deck carries it (its tokens, its components with their `README.md` and types, its `README.md`). Anyone who can open the deck can open it, and it changes only when the copy does.
88
88
 
89
89
  ## The slide format
@@ -200,10 +200,10 @@ The server keeps the deck's versions in `<root>/history/` (leave it): who change
200
200
 
201
201
  `open` writes `<root>/.gitignore` when the folder has none. It leaves out what only this computer's server needs:
202
202
  `.artifact-server.json`, `.artifact-server.log`, `.sharing.json` (the share links), `history/` (the versions; git
203
- keeps its own), save temp files and `.DS_Store`. Everything else, `project/` and `comments.json` included, is the
203
+ keeps its own), `exports/` (saved downloads and renders), save temp files and `.DS_Store`. Everything else, `project/` and `comments.json` included, is the
204
204
  deck and goes in git. A `.gitignore` already there is the person's: leave it. Moving or backing up the deck is
205
205
  copying or cloning the folder (`archive` puts it,
206
- history included, in one zip); `open` there starts it again.
206
+ history included and `.git` not, in one zip); `open` there starts it again.
207
207
 
208
208
  Commit, push or set up git only when asked. Asked to check the deck before each commit: write
209
209
  `.git/hooks/pre-commit` (and `chmod +x` it) in the repository that holds `<root>`, with this skill's folder as an
@@ -2748,7 +2748,7 @@ import { promisify } from "node:util";
2748
2748
  import zlib from "node:zlib";
2749
2749
  var LOCAL_FILES = /* @__PURE__ */ new Set([STATE_FILE, LOG_FILE, SHARING_FILE]);
2750
2750
  var LOCAL_DIRS = /* @__PURE__ */ new Set([EXPORTS_DIR]);
2751
- var JUNK_FILES = /* @__PURE__ */ new Set([".DS_Store", "Thumbs.db", "desktop.ini"]);
2751
+ var JUNK_FILES = /* @__PURE__ */ new Set([".DS_Store", "Thumbs.db", "desktop.ini", ".git"]);
2752
2752
  var isTemp = (name) => name.endsWith(".tmp") || name.startsWith(".tmp-");
2753
2753
  var STORED = /* @__PURE__ */ new Set([".png", ".jpg", ".jpeg", ".gif", ".webp", ".avif", ".heic", ".mp4", ".m4v", ".mov", ".webm", ".mp3", ".m4a", ".aac", ".ogg", ".opus", ".flac", ".woff", ".woff2", ".zip", ".gz", ".br", ".zst", ".7z"]);
2754
2754
  var MAX_ENTRIES = 65535;
@@ -811,7 +811,7 @@ function removeState(root) {
811
811
  fs3.rmSync(path2.join(root, STATE_FILE), { force: true });
812
812
  }
813
813
  var GITIGNORE_FILE = ".gitignore";
814
- var gitignoreLines = (kind) => [STATE_FILE, LOG_FILE, ".sharing.json", ...kind === "docs" ? [] : ["history/"], ".*.tmp", ".DS_Store"];
814
+ var gitignoreLines = (kind) => [STATE_FILE, LOG_FILE, ".sharing.json", ...kind === "docs" ? [] : ["/history/"], `/${EXPORTS_DIR}/`, "*.tmp", ".tmp-*", ".DS_Store"];
815
815
  function writeGitignore(root, kind) {
816
816
  const file = path2.join(root, GITIGNORE_FILE);
817
817
  try {
@@ -864,15 +864,17 @@ function isTailnet(address) {
864
864
  const m = /^100\.(\d{1,3})\./.exec(address);
865
865
  return !!m && Number(m[1]) >= 64 && Number(m[1]) <= 127;
866
866
  }
867
+ var isTunnel = (name) => /^(utun|tun|tap|wg|ppp|ipsec)\d/i.test(name);
867
868
  function lanAddresses() {
868
- const out = [];
869
- for (const list of Object.values(os2.networkInterfaces())) {
869
+ const out = /* @__PURE__ */ new Map();
870
+ for (const [name, list] of Object.entries(os2.networkInterfaces())) {
870
871
  for (const entry of list ?? []) {
871
872
  if (entry.family !== "IPv4" || entry.internal || entry.address.startsWith("169.254.") || isBenchmarkRange(entry.address)) continue;
872
- out.push(entry.address);
873
+ const rank = isTailnet(entry.address) ? 2 : isTunnel(name) ? 1 : 0;
874
+ out.set(entry.address, Math.min(rank, out.get(entry.address) ?? rank));
873
875
  }
874
876
  }
875
- return [...new Set(out)].sort((a, b) => Number(isTailnet(a)) - Number(isTailnet(b)));
877
+ return [...out.keys()].sort((a, b) => out.get(a) - out.get(b));
876
878
  }
877
879
  function answers(host, port) {
878
880
  return new Promise((resolve) => {
@@ -1981,8 +1983,9 @@ var Hub = class {
1981
1983
  }
1982
1984
  // ---- the network side ------------------------------------------------------------------------------------------
1983
1985
  async openLan() {
1984
- for (const address of lanAddresses()) {
1985
- if (this.lanServers.has(address)) continue;
1986
+ const addresses = lanAddresses().filter((address) => !this.lanServers.has(address));
1987
+ const answering = await Promise.all(addresses.map(answersAnyPort));
1988
+ for (const address of addresses.filter((_, i) => !answering[i])) {
1986
1989
  const server2 = this.createServer();
1987
1990
  try {
1988
1991
  await listen(server2, this.port, address);
@@ -2843,7 +2846,7 @@ import { promisify } from "node:util";
2843
2846
  import zlib from "node:zlib";
2844
2847
  var LOCAL_FILES = /* @__PURE__ */ new Set([STATE_FILE, LOG_FILE, SHARING_FILE]);
2845
2848
  var LOCAL_DIRS = /* @__PURE__ */ new Set([EXPORTS_DIR]);
2846
- var JUNK_FILES = /* @__PURE__ */ new Set([".DS_Store", "Thumbs.db", "desktop.ini"]);
2849
+ var JUNK_FILES = /* @__PURE__ */ new Set([".DS_Store", "Thumbs.db", "desktop.ini", ".git"]);
2847
2850
  var isTemp = (name) => name.endsWith(".tmp") || name.startsWith(".tmp-");
2848
2851
  var STORED = /* @__PURE__ */ new Set([".png", ".jpg", ".jpeg", ".gif", ".webp", ".avif", ".heic", ".mp4", ".m4v", ".mov", ".webm", ".mp3", ".m4a", ".aac", ".ogg", ".opus", ".flac", ".woff", ".woff2", ".zip", ".gz", ".br", ".zst", ".7z"]);
2849
2852
  var MAX_ENTRIES = 65535;