inkmap-mcp 0.3.14 → 0.3.15

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "inkmap",
3
3
  "displayName": "Inkmap — Markdown Mind Map & Mermaid 思维导图",
4
- "version": "0.3.14",
4
+ "version": "0.3.15",
5
5
  "description": "Interactive two-way Markdown (.md, .markmap.md) mind map, mindmap, markmap, Mermaid flowchart, diagram, XMind outline & KaTeX editor: auto-opens in the Antigravity side pane with live file write-back. 在右侧面板实时双向编辑 Markdown 思维导图、脑图、流程图、大纲、架构图、组织结构图与鱼骨图。",
6
6
  "logo": "assets/logo.svg",
7
7
  "homepage": "https://zhiyuanv.com/software.html",
@@ -62,7 +62,7 @@ import { homedir, tmpdir } from "node:os";
62
62
  import { dirname, join, sep } from "node:path";
63
63
 
64
64
  // packages/cli/dist/version.js
65
- var INKMAP_VERSION = "0.3.14";
65
+ var INKMAP_VERSION = "0.3.15";
66
66
 
67
67
  // packages/cli/dist/license.js
68
68
  var ZH_LOCALE_RE = /^zh(?:[-_.]|$)/i;
@@ -1398,7 +1398,7 @@ async function fileSource(file, log = () => {
1398
1398
  writeView: (state) => writeDiskViewState(path, state)
1399
1399
  };
1400
1400
  }
1401
- function within(root, rel) {
1401
+ function within(root, rel, allowAbsoluteInRoot = false) {
1402
1402
  let decoded;
1403
1403
  try {
1404
1404
  decoded = decodeURIComponent(rel);
@@ -1407,7 +1407,7 @@ function within(root, rel) {
1407
1407
  }
1408
1408
  const resolvedRoot = resolve2(root);
1409
1409
  const base = resolvedRoot.endsWith(sep3) ? resolvedRoot : resolvedRoot + sep3;
1410
- const full = normalize(join3(resolvedRoot, decoded));
1410
+ const full = allowAbsoluteInRoot && /^(?:[\\/]|[A-Za-z]:[\\/])/.test(decoded) ? normalize(decoded) : normalize(join3(resolvedRoot, decoded));
1411
1411
  return full.startsWith(base) ? full : null;
1412
1412
  }
1413
1413
  async function openBrowserWindow(url) {
@@ -1805,7 +1805,7 @@ data: ${JSON.stringify(data)}
1805
1805
  if (url.pathname === "/favicon.ico")
1806
1806
  return void res.writeHead(204).end();
1807
1807
  if (url.pathname.startsWith("/doc-assets/")) {
1808
- let asset = within(activeSource.dir, url.pathname.slice("/doc-assets/".length));
1808
+ let asset = within(activeSource.dir, url.pathname.slice("/doc-assets/".length), true);
1809
1809
  if (asset) {
1810
1810
  const root = await realpath2(activeSource.dir).catch(() => null);
1811
1811
  asset = await realpath2(asset).catch(() => null);
@@ -2215,7 +2215,8 @@ function createAntigravitySidecar({
2215
2215
  if (!file || !rel) return notFound();
2216
2216
  try {
2217
2217
  const dir = await realpath3(dirname4(file));
2218
- const candidate = normalize2(join4(dir, decodeURIComponent(rel)));
2218
+ const decoded = decodeURIComponent(rel);
2219
+ const candidate = /^(?:[\\/]|[A-Za-z]:[\\/])/.test(decoded) ? normalize2(decoded) : normalize2(join4(dir, decoded));
2219
2220
  if (!insideOrEqual(dir, candidate) || candidate === dir) return notFound();
2220
2221
  const realAsset = await realpath3(candidate);
2221
2222
  if (!insideOrEqual(dir, realAsset) || !/\.(?:png|jpe?g|gif|webp|avif|bmp|ico|svg)$/i.test(realAsset)) return notFound();
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "inkmap-codex",
3
- "version": "0.3.14",
3
+ "version": "0.3.15",
4
4
  "description": "Interactive two-way Markdown mind map (markmap), Mermaid flowchart & XMind outline editor | 双向编辑 Markdown 思维导图、脑图、流程图与大纲",
5
5
  "homepage": "https://zhiyuanv.com/software.html",
6
6
  "repository": "https://github.com/zhiyuanvision-lang/InkMap",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "inkmap-codex",
4
- "version": "0.3.14",
4
+ "version": "0.3.15",
5
5
  "description": "Interactive two-way Markdown mind map (markmap), Mermaid flowchart & XMind outline editor | 双向编辑 Markdown 思维导图、脑图、流程图与大纲",
6
6
  "homepage": "https://zhiyuanv.com/software.html",
7
7
  "repository": "https://github.com/zhiyuanvision-lang/InkMap",
@@ -59,7 +59,7 @@ import { homedir, tmpdir } from "node:os";
59
59
  import { dirname, join, sep } from "node:path";
60
60
 
61
61
  // packages/cli/dist/version.js
62
- var INKMAP_VERSION = "0.3.14";
62
+ var INKMAP_VERSION = "0.3.15";
63
63
 
64
64
  // packages/cli/dist/license.js
65
65
  var ZH_LOCALE_RE = /^zh(?:[-_.]|$)/i;
@@ -1217,7 +1217,7 @@ async function fileSource(file, log = () => {
1217
1217
  writeView: (state) => writeDiskViewState(path, state)
1218
1218
  };
1219
1219
  }
1220
- function within(root, rel) {
1220
+ function within(root, rel, allowAbsoluteInRoot = false) {
1221
1221
  let decoded;
1222
1222
  try {
1223
1223
  decoded = decodeURIComponent(rel);
@@ -1226,7 +1226,7 @@ function within(root, rel) {
1226
1226
  }
1227
1227
  const resolvedRoot = resolve2(root);
1228
1228
  const base = resolvedRoot.endsWith(sep3) ? resolvedRoot : resolvedRoot + sep3;
1229
- const full = normalize(join3(resolvedRoot, decoded));
1229
+ const full = allowAbsoluteInRoot && /^(?:[\\/]|[A-Za-z]:[\\/])/.test(decoded) ? normalize(decoded) : normalize(join3(resolvedRoot, decoded));
1230
1230
  return full.startsWith(base) ? full : null;
1231
1231
  }
1232
1232
  async function openBrowserWindow(url) {
@@ -1624,7 +1624,7 @@ data: ${JSON.stringify(data)}
1624
1624
  if (url.pathname === "/favicon.ico")
1625
1625
  return void res.writeHead(204).end();
1626
1626
  if (url.pathname.startsWith("/doc-assets/")) {
1627
- let asset = within(activeSource.dir, url.pathname.slice("/doc-assets/".length));
1627
+ let asset = within(activeSource.dir, url.pathname.slice("/doc-assets/".length), true);
1628
1628
  if (asset) {
1629
1629
  const root = await realpath2(activeSource.dir).catch(() => null);
1630
1630
  asset = await realpath2(asset).catch(() => null);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-inkmap",
3
- "version": "0.3.14",
3
+ "version": "0.3.15",
4
4
  "description": "Inkmap 思维导图 — 在 DeepSeek Harness 中将本地 Markdown 实时渲染为可双向编辑的思维导图 (Markmap) 与 Mermaid 流程图 / Interactive two-way Markdown mind map & Mermaid flowchart editor for DeepSeek Harness.",
5
5
  "type": "module",
6
6
  "icon": "./icon.svg",
@@ -111,7 +111,7 @@ var import_node_os = require("node:os");
111
111
  var import_node_path = require("node:path");
112
112
 
113
113
  // packages/cli/src/version.ts
114
- var INKMAP_VERSION = "0.3.14";
114
+ var INKMAP_VERSION = "0.3.15";
115
115
 
116
116
  // packages/cli/src/license.ts
117
117
  var ZH_LOCALE_RE = /^zh(?:[-_.]|$)/i;
@@ -1141,7 +1141,7 @@ async function fileSource(file, log = () => {
1141
1141
  writeView: (state) => writeDiskViewState(path2, state)
1142
1142
  };
1143
1143
  }
1144
- function within(root, rel) {
1144
+ function within(root, rel, allowAbsoluteInRoot = false) {
1145
1145
  let decoded;
1146
1146
  try {
1147
1147
  decoded = decodeURIComponent(rel);
@@ -1150,7 +1150,7 @@ function within(root, rel) {
1150
1150
  }
1151
1151
  const resolvedRoot = (0, import_node_path3.resolve)(root);
1152
1152
  const base = resolvedRoot.endsWith(import_node_path3.sep) ? resolvedRoot : resolvedRoot + import_node_path3.sep;
1153
- const full = (0, import_node_path3.normalize)((0, import_node_path3.join)(resolvedRoot, decoded));
1153
+ const full = allowAbsoluteInRoot && /^(?:[\\/]|[A-Za-z]:[\\/])/.test(decoded) ? (0, import_node_path3.normalize)(decoded) : (0, import_node_path3.normalize)((0, import_node_path3.join)(resolvedRoot, decoded));
1154
1154
  return full.startsWith(base) ? full : null;
1155
1155
  }
1156
1156
  async function openBrowserWindow(url) {
@@ -1526,7 +1526,7 @@ data: ${JSON.stringify(data)}
1526
1526
  }
1527
1527
  if (url.pathname === "/favicon.ico") return void res.writeHead(204).end();
1528
1528
  if (url.pathname.startsWith("/doc-assets/")) {
1529
- let asset = within(activeSource.dir, url.pathname.slice("/doc-assets/".length));
1529
+ let asset = within(activeSource.dir, url.pathname.slice("/doc-assets/".length), true);
1530
1530
  if (asset) {
1531
1531
  const root = await (0, import_promises3.realpath)(activeSource.dir).catch(() => null);
1532
1532
  asset = await (0, import_promises3.realpath)(asset).catch(() => null);
@@ -2,7 +2,7 @@
2
2
  "name": "inkmap-vscode",
3
3
  "displayName": "%displayName%",
4
4
  "description": "%description%",
5
- "version": "0.3.14",
5
+ "version": "0.3.15",
6
6
  "publisher": "inkmap",
7
7
  "homepage": "https://zhiyuanv.com/software.html",
8
8
  "repository": {
package/dist/cli.cjs CHANGED
@@ -466,7 +466,7 @@ var INKMAP_VERSION;
466
466
  var init_version = __esm({
467
467
  "packages/cli/dist/version.js"() {
468
468
  "use strict";
469
- INKMAP_VERSION = "0.3.14";
469
+ INKMAP_VERSION = "0.3.15";
470
470
  }
471
471
  });
472
472
 
@@ -1794,7 +1794,7 @@ async function fileSource(file2, log = () => {
1794
1794
  writeView: (state) => writeDiskViewState(path, state)
1795
1795
  };
1796
1796
  }
1797
- function within(root, rel) {
1797
+ function within(root, rel, allowAbsoluteInRoot = false) {
1798
1798
  let decoded;
1799
1799
  try {
1800
1800
  decoded = decodeURIComponent(rel);
@@ -1803,7 +1803,7 @@ function within(root, rel) {
1803
1803
  }
1804
1804
  const resolvedRoot = (0, import_node_path3.resolve)(root);
1805
1805
  const base = resolvedRoot.endsWith(import_node_path3.sep) ? resolvedRoot : resolvedRoot + import_node_path3.sep;
1806
- const full = (0, import_node_path3.normalize)((0, import_node_path3.join)(resolvedRoot, decoded));
1806
+ const full = allowAbsoluteInRoot && /^(?:[\\/]|[A-Za-z]:[\\/])/.test(decoded) ? (0, import_node_path3.normalize)(decoded) : (0, import_node_path3.normalize)((0, import_node_path3.join)(resolvedRoot, decoded));
1807
1807
  return full.startsWith(base) ? full : null;
1808
1808
  }
1809
1809
  async function openBrowserWindow(url2) {
@@ -2201,7 +2201,7 @@ data: ${JSON.stringify(data)}
2201
2201
  if (url2.pathname === "/favicon.ico")
2202
2202
  return void res.writeHead(204).end();
2203
2203
  if (url2.pathname.startsWith("/doc-assets/")) {
2204
- let asset = within(activeSource.dir, url2.pathname.slice("/doc-assets/".length));
2204
+ let asset = within(activeSource.dir, url2.pathname.slice("/doc-assets/".length), true);
2205
2205
  if (asset) {
2206
2206
  const root = await (0, import_promises3.realpath)(activeSource.dir).catch(() => null);
2207
2207
  asset = await (0, import_promises3.realpath)(asset).catch(() => null);