@moon16u/dsh-plugin-mcp-console 0.2.0 → 0.2.1

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.
@@ -343,9 +343,18 @@ export async function ingestProfileMcpEntries({ store, yamlPath }) {
343
343
  if (removedRanges.has(index)) continue;
344
344
  kept.push(lines[index]);
345
345
  }
346
- // trim: collapse the blank-line runs left by removals inside the document
347
- const cleaned = kept.join("\n").replace(/\n{3,}/g, "\n\n");
348
- writeFileSync(targetPath, cleaned.endsWith("\n") ? cleaned : cleaned + "\n", "utf8");
346
+ // trim: collapse the blank-line runs left by removals inside the document.
347
+ // A patch layer must remain a top-level YAML array: when the trim removes
348
+ // the last list item (comment-only remainder), append an explicit `[]` so
349
+ // dsh-app-boot's parsePatchList (which rejects a non-array document) does
350
+ // not crash the next boot. Only a column-0 `- ` counts: nested lines and
351
+ // indented scalars are not top-level items.
352
+ const hasTopLevelItem = kept.some((line) => /^-\s/.test(line));
353
+ const cleaned = kept.join("\n").replace(/\n{3,}/g, "\n\n").trimEnd();
354
+ const output = hasTopLevelItem
355
+ ? cleaned + "\n"
356
+ : (cleaned.length > 0 ? cleaned + "\n\n" : "") + "[]\n";
357
+ writeFileSync(targetPath, output, "utf8");
349
358
 
350
359
  return { ingested, skipped, cleanedYaml: true };
351
360
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moon16u/dsh-plugin-mcp-console",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Web GUI console for MCP servers: manages the official @deepseek-ai/dsh-mcp-client at runtime — add/edit/enable/disable/reconnect/delete servers, live status, mcpServers JSON import. No MCP protocol code: connection and tool registration are 100% the official client, resolved from the running DSH profile.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -36,10 +36,10 @@
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@deepseek-ai/cordis": "^4.0.2",
39
- "@deepseek-ai/dsh-mcp-client": "^0.1.2-rc.1",
40
- "@deepseek-ai/dsh-host-webserver": "^0.1.2-rc.1",
41
- "@deepseek-ai/dsh-settings": "^0.1.2-rc.1",
42
- "@deepseek-ai/dsh-tools": "^0.1.2-rc.1",
39
+ "@deepseek-ai/dsh-mcp-client": "^0.1.5-rc.1",
40
+ "@deepseek-ai/dsh-host-webserver": "^0.1.5-rc.1",
41
+ "@deepseek-ai/dsh-settings": "^0.1.5-rc.1",
42
+ "@deepseek-ai/dsh-tools": "^0.1.5-rc.1",
43
43
  "@deepseek-ai/schemastery": "^3.18.2"
44
44
  },
45
45
  "peerDependenciesMeta": {
@@ -64,6 +64,10 @@
64
64
  "access": "public",
65
65
  "registry": "https://registry.npmjs.org/"
66
66
  },
67
+ "devDependencies": {
68
+ "react": "18.2.0",
69
+ "react-dom": "18.2.0"
70
+ },
67
71
  "scripts": {
68
72
  "test": "node --test test/*.test.mjs",
69
73
  "sync-root-client": "node scripts/sync-root-client.mjs"