inkmap-mcp 0.3.0 → 0.3.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/README.md +7 -2
- package/dist/bundles/antigravity/sidecars/inkmap/main.mjs +1 -1
- package/dist/bundles/codex/inkmap-codex/.codex-plugin/plugin.json +1 -1
- package/dist/bundles/codex/inkmap-codex/plugin.json +1 -1
- package/dist/bundles/harness/README.md +20 -0
- package/dist/bundles/harness/README.zh.md +20 -0
- package/dist/bundles/harness/client.js +229 -0
- package/dist/bundles/harness/cordis.patch.yml +3 -0
- package/dist/bundles/harness/host.js +1411 -0
- package/dist/bundles/harness/icon.svg +24 -0
- package/dist/bundles/harness/locale/en.json +7 -0
- package/dist/bundles/harness/locale/zh.json +7 -0
- package/dist/bundles/harness/package.json +75 -0
- package/dist/bundles/vscode/dist/extension.js +47 -1
- package/dist/bundles/vscode/package.json +1 -1
- package/dist/cli.cjs +142 -5
- package/dist/codex.html +136 -136
- package/dist/web/app.js +7430 -7423
- package/package.json +4 -1
- package/server.json +2 -2
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#4f8cff"/>
|
|
5
|
+
<stop offset="1" stop-color="#2848c8"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect x="8" y="8" width="240" height="240" rx="52" fill="url(#bg)"/>
|
|
9
|
+
<g fill="none" stroke="#fff" stroke-width="10" stroke-linecap="round" opacity="0.9">
|
|
10
|
+
<path d="M128 128 C 160 128, 160 74, 192 74"/>
|
|
11
|
+
<path d="M128 128 L 192 128"/>
|
|
12
|
+
<path d="M128 128 C 160 128, 160 182, 192 182"/>
|
|
13
|
+
<path d="M128 128 C 96 128, 96 92, 64 92"/>
|
|
14
|
+
<path d="M128 128 C 96 128, 96 164, 64 164"/>
|
|
15
|
+
</g>
|
|
16
|
+
<g fill="#fff">
|
|
17
|
+
<rect x="178" y="62" width="44" height="24" rx="12"/>
|
|
18
|
+
<rect x="178" y="116" width="44" height="24" rx="12"/>
|
|
19
|
+
<rect x="178" y="170" width="44" height="24" rx="12"/>
|
|
20
|
+
<rect x="34" y="80" width="44" height="24" rx="12"/>
|
|
21
|
+
<rect x="34" y="152" width="44" height="24" rx="12"/>
|
|
22
|
+
</g>
|
|
23
|
+
<path d="M128 92 C 128 92, 102 122, 102 140 A 26 26 0 0 0 154 140 C 154 122, 128 92, 128 92 Z" fill="#ffd166" stroke="#fff" stroke-width="6" stroke-linejoin="round"/>
|
|
24
|
+
</svg>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-inkmap",
|
|
3
|
+
"version": "0.3.2",
|
|
4
|
+
"description": "Inkmap 思维导图 — 在 DeepSeek Harness 中将本地 Markdown 实时渲染为可双向编辑的思维导图 (Markmap) 与 Mermaid 流程图 / Interactive two-way Markdown mind map & Mermaid flowchart editor for DeepSeek Harness.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"icon": "./icon.svg",
|
|
7
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
8
|
+
"homepage": "https://zhiyuanv.com/software.html",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/zhiyuanvision-lang/InkMap.git",
|
|
12
|
+
"directory": "packages/harness"
|
|
13
|
+
},
|
|
14
|
+
"author": "Zhiyuan Vision <support@zhiyuanv.com>",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"deepseek-harness",
|
|
17
|
+
"dsh",
|
|
18
|
+
"dsh-plugin",
|
|
19
|
+
"dsh-bundle",
|
|
20
|
+
"inkmap",
|
|
21
|
+
"mindmap",
|
|
22
|
+
"mind-map",
|
|
23
|
+
"mind map",
|
|
24
|
+
"markmap",
|
|
25
|
+
"mermaid",
|
|
26
|
+
"markdown",
|
|
27
|
+
"outline",
|
|
28
|
+
"flowchart",
|
|
29
|
+
"diagram",
|
|
30
|
+
"katex",
|
|
31
|
+
"latex",
|
|
32
|
+
"思维导图",
|
|
33
|
+
"脑图",
|
|
34
|
+
"大纲",
|
|
35
|
+
"流程图",
|
|
36
|
+
"双向同步",
|
|
37
|
+
"可视化"
|
|
38
|
+
],
|
|
39
|
+
"engines": {
|
|
40
|
+
"dsh": ">=0.2.0-0 <1.0.0"
|
|
41
|
+
},
|
|
42
|
+
"exports": {
|
|
43
|
+
".": "./host.js",
|
|
44
|
+
"./client": "./client.js",
|
|
45
|
+
"./package.json": "./package.json",
|
|
46
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
47
|
+
"./locale/*.json": "./locale/*.json",
|
|
48
|
+
"./icon": "./icon.svg"
|
|
49
|
+
},
|
|
50
|
+
"files": [
|
|
51
|
+
"host.js",
|
|
52
|
+
"client.js",
|
|
53
|
+
"web",
|
|
54
|
+
"cordis.patch.yml",
|
|
55
|
+
"icon.svg",
|
|
56
|
+
"locale/*.json",
|
|
57
|
+
"README.md",
|
|
58
|
+
"README.zh.md",
|
|
59
|
+
"LICENSE.md",
|
|
60
|
+
"THIRD_PARTY_NOTICES.md"
|
|
61
|
+
],
|
|
62
|
+
"dsh": {
|
|
63
|
+
"bundle": {
|
|
64
|
+
"patch": "./cordis.patch.yml"
|
|
65
|
+
},
|
|
66
|
+
"client": {
|
|
67
|
+
"platform": "web",
|
|
68
|
+
"inject": [
|
|
69
|
+
"@deepseek-ai/dsh-client-ui-renderer",
|
|
70
|
+
"@deepseek-ai/dsh-client-ui-sidebar-documentpreview",
|
|
71
|
+
"@deepseek-ai/dsh-client-ui-sidebar-right"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -103,6 +103,7 @@ function sanitizeViewState(raw) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// packages/vscode/src/extension.ts
|
|
106
|
+
var import_node_child_process2 = require("node:child_process");
|
|
106
107
|
var import_node_fs2 = require("node:fs");
|
|
107
108
|
var import_promises4 = require("node:fs/promises");
|
|
108
109
|
var import_node_os3 = require("node:os");
|
|
@@ -630,7 +631,7 @@ function licenseService(storage, getOrigin, { loginOnly = false, host: defaultHo
|
|
|
630
631
|
installId: id,
|
|
631
632
|
host: hostName,
|
|
632
633
|
os,
|
|
633
|
-
version: "0.3.
|
|
634
|
+
version: "0.3.2",
|
|
634
635
|
locale: clientLocale(),
|
|
635
636
|
tier,
|
|
636
637
|
events
|
|
@@ -1837,7 +1838,52 @@ function startMcpTargetBridge() {
|
|
|
1837
1838
|
} };
|
|
1838
1839
|
}
|
|
1839
1840
|
}
|
|
1841
|
+
async function syncDeepSeekHarnessIfInstalled() {
|
|
1842
|
+
try {
|
|
1843
|
+
const dshHome = process.env.DSH_HOME || (0, import_node_path3.join)((0, import_node_os3.homedir)(), ".dsh");
|
|
1844
|
+
const profileDir = (0, import_node_path3.join)(dshHome, "profiles", "desktop");
|
|
1845
|
+
if (!(0, import_node_fs2.existsSync)(profileDir)) return;
|
|
1846
|
+
const indexUrl = "https://zhiyuanv.com/dsh-index.json";
|
|
1847
|
+
const patchPath = (0, import_node_path3.join)(profileDir, "cordis.patch.yml");
|
|
1848
|
+
const existingPatch = (0, import_node_fs2.existsSync)(patchPath) ? await (0, import_promises4.readFile)(patchPath, "utf8").catch(() => "") : "";
|
|
1849
|
+
if (!existingPatch.includes(indexUrl)) {
|
|
1850
|
+
const snippet = `
|
|
1851
|
+
- id: plugin-market
|
|
1852
|
+
name: "@deepseek-ai/dsh-plugin-market"
|
|
1853
|
+
config:
|
|
1854
|
+
indexes:
|
|
1855
|
+
- ${indexUrl}
|
|
1856
|
+
`;
|
|
1857
|
+
await (0, import_promises4.writeFile)(patchPath, existingPatch.replace(/\n*$/, "") + snippet, "utf8").catch(() => {
|
|
1858
|
+
});
|
|
1859
|
+
}
|
|
1860
|
+
const pkgPath = (0, import_node_path3.join)(profileDir, "package.json");
|
|
1861
|
+
if (!(0, import_node_fs2.existsSync)(pkgPath)) return;
|
|
1862
|
+
const pkg = JSON.parse(await (0, import_promises4.readFile)(pkgPath, "utf8"));
|
|
1863
|
+
const bundles = pkg.dsh?.profile?.bundles;
|
|
1864
|
+
if (Array.isArray(bundles) && !bundles.includes("@deepseek-ai/dsh-experimental-plugin-market-bundle")) {
|
|
1865
|
+
bundles.push("@deepseek-ai/dsh-experimental-plugin-market-bundle");
|
|
1866
|
+
await (0, import_promises4.writeFile)(pkgPath, JSON.stringify(pkg, null, 2) + "\n", "utf8").catch(() => {
|
|
1867
|
+
});
|
|
1868
|
+
}
|
|
1869
|
+
if (pkg.dependencies?.["dsh-inkmap"]) return;
|
|
1870
|
+
const stagedDsh = (0, import_node_path3.join)(process.env.INKMAP_HOME || (0, import_node_path3.join)((0, import_node_os3.homedir)(), ".inkmap"), "dsh-inkmap");
|
|
1871
|
+
const spec = (0, import_node_fs2.existsSync)((0, import_node_path3.join)(stagedDsh, "package.json")) ? stagedDsh : "dsh-inkmap";
|
|
1872
|
+
const candidates = [
|
|
1873
|
+
process.platform === "darwin" ? "/Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh" : "",
|
|
1874
|
+
process.platform === "darwin" ? (0, import_node_path3.join)((0, import_node_os3.homedir)(), "Applications/DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh") : "",
|
|
1875
|
+
process.platform === "win32" ? (0, import_node_path3.join)(process.env.LOCALAPPDATA || (0, import_node_path3.join)((0, import_node_os3.homedir)(), "AppData", "Local"), "Programs", "DeepSeek Harness", "resources", "runtime", "cli", "bin", "dsh.cmd") : ""
|
|
1876
|
+
].filter(Boolean);
|
|
1877
|
+
const dshBin = candidates.find((c) => (0, import_node_fs2.existsSync)(c));
|
|
1878
|
+
if (dshBin) {
|
|
1879
|
+
const child = (0, import_node_child_process2.spawn)(dshBin, ["plugin", "--profile", "desktop", "add", spec], { stdio: "ignore", detached: true });
|
|
1880
|
+
child.unref();
|
|
1881
|
+
}
|
|
1882
|
+
} catch {
|
|
1883
|
+
}
|
|
1884
|
+
}
|
|
1840
1885
|
function activate(context) {
|
|
1886
|
+
void syncDeepSeekHarnessIfInstalled();
|
|
1841
1887
|
const log = vscode6.window.createOutputChannel("Inkmap");
|
|
1842
1888
|
const license = extensionLicense(context);
|
|
1843
1889
|
const ads = adFeed(PRODUCT.adFeedUrl);
|
package/dist/cli.cjs
CHANGED
|
@@ -687,7 +687,7 @@ function licenseService(storage, getOrigin, { loginOnly = false, host: defaultHo
|
|
|
687
687
|
installId: id,
|
|
688
688
|
host: hostName,
|
|
689
689
|
os,
|
|
690
|
-
version: "0.3.
|
|
690
|
+
version: "0.3.2",
|
|
691
691
|
locale: clientLocale(),
|
|
692
692
|
tier,
|
|
693
693
|
events
|
|
@@ -39793,7 +39793,7 @@ async function createInkmapMcpServer(options = {}) {
|
|
|
39793
39793
|
const fallbackEditors = /* @__PURE__ */ new Map();
|
|
39794
39794
|
const ads = adFeed(PRODUCT.adFeedUrl);
|
|
39795
39795
|
const workspaces = createMcpWorkspaceManager();
|
|
39796
|
-
const server = new McpServer({ name: "inkmap", version: "0.3.
|
|
39796
|
+
const server = new McpServer({ name: "inkmap", version: "0.3.2" });
|
|
39797
39797
|
function isAntigravityHost() {
|
|
39798
39798
|
const clientName = server.server.getClientVersion()?.name ?? "";
|
|
39799
39799
|
if (/antigravity/i.test(clientName))
|
|
@@ -40222,6 +40222,8 @@ function normalizeTarget(raw) {
|
|
|
40222
40222
|
return "antigravity";
|
|
40223
40223
|
if (key === "codex" || key === "chatgpt")
|
|
40224
40224
|
return "codex";
|
|
40225
|
+
if (key === "deepseek" || key === "deepseek-harness" || key === "dsh" || key === "harness")
|
|
40226
|
+
return "deepseek";
|
|
40225
40227
|
return null;
|
|
40226
40228
|
}
|
|
40227
40229
|
function isChineseTerminalLocale() {
|
|
@@ -40325,6 +40327,31 @@ function findCodexCommand() {
|
|
|
40325
40327
|
}
|
|
40326
40328
|
return null;
|
|
40327
40329
|
}
|
|
40330
|
+
function getDshHome() {
|
|
40331
|
+
return process.env.DSH_HOME || (0, import_node_path5.join)((0, import_node_os5.homedir)(), ".dsh");
|
|
40332
|
+
}
|
|
40333
|
+
function findDshCommand() {
|
|
40334
|
+
if (process.env.INKMAP_DSH_BIN) {
|
|
40335
|
+
return (0, import_node_fs3.existsSync)(process.env.INKMAP_DSH_BIN) ? process.env.INKMAP_DSH_BIN : null;
|
|
40336
|
+
}
|
|
40337
|
+
if (process.env.INKMAP_ISOLATED_DETECT)
|
|
40338
|
+
return null;
|
|
40339
|
+
if ((0, import_node_child_process2.spawnSync)("dsh", ["--version"], { stdio: "ignore" }).status === 0)
|
|
40340
|
+
return "dsh";
|
|
40341
|
+
if (process.platform === "darwin") {
|
|
40342
|
+
for (const dir of ["/Applications", (0, import_node_path5.join)((0, import_node_os5.homedir)(), "Applications")]) {
|
|
40343
|
+
const cmd = (0, import_node_path5.join)(dir, "DeepSeek Harness.app/Contents/Resources/runtime/cli/bin/dsh");
|
|
40344
|
+
if ((0, import_node_fs3.existsSync)(cmd))
|
|
40345
|
+
return cmd;
|
|
40346
|
+
}
|
|
40347
|
+
} else if (process.platform === "win32") {
|
|
40348
|
+
const localApp = process.env.LOCALAPPDATA || (0, import_node_path5.join)((0, import_node_os5.homedir)(), "AppData", "Local");
|
|
40349
|
+
const cmd = (0, import_node_path5.join)(localApp, "Programs", "DeepSeek Harness", "resources", "runtime", "cli", "bin", "dsh.cmd");
|
|
40350
|
+
if ((0, import_node_fs3.existsSync)(cmd))
|
|
40351
|
+
return cmd;
|
|
40352
|
+
}
|
|
40353
|
+
return null;
|
|
40354
|
+
}
|
|
40328
40355
|
function detectInstalledTargets() {
|
|
40329
40356
|
const found = [];
|
|
40330
40357
|
const claudeDir = getClaudeDesktopDir();
|
|
@@ -40347,6 +40374,9 @@ function detectInstalledTargets() {
|
|
|
40347
40374
|
} else if (process.env.INKMAP_CODEX_BIN && (0, import_node_fs3.existsSync)(process.env.INKMAP_CODEX_BIN)) {
|
|
40348
40375
|
found.push("codex");
|
|
40349
40376
|
}
|
|
40377
|
+
if (!process.env.INKMAP_ISOLATED_DETECT && (findDshCommand() || (0, import_node_fs3.existsSync)((0, import_node_path5.join)(getDshHome(), "profiles", "desktop"))) || process.env.INKMAP_DSH_BIN && (0, import_node_fs3.existsSync)(process.env.INKMAP_DSH_BIN)) {
|
|
40378
|
+
found.push("deepseek");
|
|
40379
|
+
}
|
|
40350
40380
|
return found;
|
|
40351
40381
|
}
|
|
40352
40382
|
function readJsonObject(filePath) {
|
|
@@ -40422,7 +40452,7 @@ function installIdeExtension(editorDir, cliCmd) {
|
|
|
40422
40452
|
return null;
|
|
40423
40453
|
}
|
|
40424
40454
|
const extPkg = JSON.parse((0, import_node_fs3.readFileSync)((0, import_node_path5.join)(vscodeBundle, "package.json"), "utf8"));
|
|
40425
|
-
const version2 = extPkg.version || "0.3.
|
|
40455
|
+
const version2 = extPkg.version || "0.3.2";
|
|
40426
40456
|
const staging = (0, import_node_fs3.mkdtempSync)((0, import_node_path5.join)((0, import_node_os5.tmpdir)(), "inkmap-vsix-"));
|
|
40427
40457
|
try {
|
|
40428
40458
|
const extStaging = (0, import_node_path5.join)(staging, "extension");
|
|
@@ -40625,6 +40655,85 @@ function installCodexPlugin() {
|
|
|
40625
40655
|
note: "\u91CD\u542F ChatGPT Desktop \u540E\uFF0C\u5728 Codex \u6A21\u5F0F\u70B9\u51FB .md \u6587\u4EF6\u6253\u5F00\u83DC\u5355\u9009\u62E9 Inkmap Mind Map"
|
|
40626
40656
|
};
|
|
40627
40657
|
}
|
|
40658
|
+
function configureDshMarketIndex(profileDir) {
|
|
40659
|
+
const pkgPath = (0, import_node_path5.join)(profileDir, "package.json");
|
|
40660
|
+
if ((0, import_node_fs3.existsSync)(pkgPath)) {
|
|
40661
|
+
try {
|
|
40662
|
+
const pkg = JSON.parse((0, import_node_fs3.readFileSync)(pkgPath, "utf8"));
|
|
40663
|
+
const bundles = pkg.dsh?.profile?.bundles;
|
|
40664
|
+
if (Array.isArray(bundles)) {
|
|
40665
|
+
let changed = false;
|
|
40666
|
+
for (const name of ["@deepseek-ai/dsh-experimental-plugin-market-bundle", "dsh-inkmap"]) {
|
|
40667
|
+
if (!bundles.includes(name)) {
|
|
40668
|
+
bundles.push(name);
|
|
40669
|
+
changed = true;
|
|
40670
|
+
}
|
|
40671
|
+
}
|
|
40672
|
+
if (changed) {
|
|
40673
|
+
(0, import_node_fs3.writeFileSync)(pkgPath, JSON.stringify(pkg, null, 2) + "\n", "utf8");
|
|
40674
|
+
}
|
|
40675
|
+
}
|
|
40676
|
+
} catch {
|
|
40677
|
+
}
|
|
40678
|
+
}
|
|
40679
|
+
const patchPath = (0, import_node_path5.join)(profileDir, "cordis.patch.yml");
|
|
40680
|
+
const indexUrl = "https://zhiyuanv.com/dsh-index.json";
|
|
40681
|
+
try {
|
|
40682
|
+
const existing = (0, import_node_fs3.existsSync)(patchPath) ? (0, import_node_fs3.readFileSync)(patchPath, "utf8") : "";
|
|
40683
|
+
if (!existing.includes(indexUrl)) {
|
|
40684
|
+
const snippet = `
|
|
40685
|
+
- id: plugin-market
|
|
40686
|
+
name: "@deepseek-ai/dsh-plugin-market"
|
|
40687
|
+
config:
|
|
40688
|
+
indexes:
|
|
40689
|
+
- ${indexUrl}
|
|
40690
|
+
`;
|
|
40691
|
+
(0, import_node_fs3.writeFileSync)(patchPath, existing.replace(/\n*$/, "") + snippet, "utf8");
|
|
40692
|
+
}
|
|
40693
|
+
} catch {
|
|
40694
|
+
}
|
|
40695
|
+
}
|
|
40696
|
+
function installDeepSeekHarnessPlugin() {
|
|
40697
|
+
const bundledHarness = (0, import_node_path5.join)(DIST_DIR, "bundles", "harness");
|
|
40698
|
+
const bundledWeb = (0, import_node_path5.join)(DIST_DIR, "web");
|
|
40699
|
+
const monorepoHarness = (0, import_node_path5.resolve)(PKG_ROOT, "..", "..", "dist", "sidebars", "dsh-inkmap");
|
|
40700
|
+
const stagedDir = (0, import_node_path5.join)(getInkmapHome(), "dsh-inkmap");
|
|
40701
|
+
(0, import_node_fs3.rmSync)(stagedDir, { recursive: true, force: true });
|
|
40702
|
+
(0, import_node_fs3.mkdirSync)(stagedDir, { recursive: true });
|
|
40703
|
+
if ((0, import_node_fs3.existsSync)((0, import_node_path5.join)(bundledHarness, "package.json")) && (0, import_node_fs3.existsSync)(bundledWeb)) {
|
|
40704
|
+
(0, import_node_fs3.cpSync)(bundledHarness, stagedDir, { recursive: true });
|
|
40705
|
+
(0, import_node_fs3.cpSync)(bundledWeb, (0, import_node_path5.join)(stagedDir, "web"), { recursive: true });
|
|
40706
|
+
for (const doc of ["LICENSE.md", "THIRD_PARTY_NOTICES.md"]) {
|
|
40707
|
+
const src = (0, import_node_path5.join)(PKG_ROOT, doc);
|
|
40708
|
+
if ((0, import_node_fs3.existsSync)(src))
|
|
40709
|
+
(0, import_node_fs3.cpSync)(src, (0, import_node_path5.join)(stagedDir, doc));
|
|
40710
|
+
}
|
|
40711
|
+
} else if ((0, import_node_fs3.existsSync)((0, import_node_path5.join)(monorepoHarness, "package.json"))) {
|
|
40712
|
+
(0, import_node_fs3.cpSync)(monorepoHarness, stagedDir, { recursive: true });
|
|
40713
|
+
} else {
|
|
40714
|
+
throw new Error("\u672A\u627E\u5230 DeepSeek Harness \u63D2\u4EF6\u8D44\u6E90 / DeepSeek Harness plugin bundle not found.");
|
|
40715
|
+
}
|
|
40716
|
+
const realStaged = (0, import_node_fs3.realpathSync)(stagedDir);
|
|
40717
|
+
const dshCmd = findDshCommand();
|
|
40718
|
+
const profileDir = (0, import_node_path5.join)(getDshHome(), "profiles", "desktop");
|
|
40719
|
+
if (dshCmd) {
|
|
40720
|
+
(0, import_node_child_process2.execFileSync)(dshCmd, ["plugin", "--profile", "desktop", "add", realStaged], { stdio: "pipe" });
|
|
40721
|
+
} else if ((0, import_node_fs3.existsSync)(profileDir)) {
|
|
40722
|
+
const nodeModulesTarget = (0, import_node_path5.join)(profileDir, "node_modules", "dsh-inkmap");
|
|
40723
|
+
(0, import_node_fs3.rmSync)(nodeModulesTarget, { recursive: true, force: true });
|
|
40724
|
+
(0, import_node_fs3.mkdirSync)((0, import_node_path5.join)(profileDir, "node_modules"), { recursive: true });
|
|
40725
|
+
(0, import_node_fs3.cpSync)(realStaged, nodeModulesTarget, { recursive: true });
|
|
40726
|
+
} else {
|
|
40727
|
+
throw new Error("\u672A\u68C0\u6D4B\u5230 DeepSeek Harness \u5BA2\u6237\u7AEF / DeepSeek Harness not found.");
|
|
40728
|
+
}
|
|
40729
|
+
if ((0, import_node_fs3.existsSync)(profileDir)) {
|
|
40730
|
+
configureDshMarketIndex(profileDir);
|
|
40731
|
+
}
|
|
40732
|
+
return {
|
|
40733
|
+
location: (0, import_node_fs3.existsSync)(profileDir) ? profileDir : realStaged,
|
|
40734
|
+
note: "\u5DF2\u5728 DeepSeek Harness\u300C\u63D2\u4EF6\u300D\u9875\u542F\u7528 Inkmap \u601D\u7EF4\u5BFC\u56FE\u4E0E\u63D2\u4EF6\u7D22\u5F15\uFF08\u9884\u89C8 .md \u6587\u4EF6\u70B9\u51FB\u53F3\u4E0A\u89D2 Inkmap \u5373\u53EF\u6253\u5F00\uFF09"
|
|
40735
|
+
};
|
|
40736
|
+
}
|
|
40628
40737
|
async function runInstall(options = {}) {
|
|
40629
40738
|
const log = options.log ?? ((msg) => console.log(msg));
|
|
40630
40739
|
const workspaces = options.workspaces ?? [];
|
|
@@ -40632,7 +40741,7 @@ async function runInstall(options = {}) {
|
|
|
40632
40741
|
const targets = explicitTargets ?? detectInstalledTargets();
|
|
40633
40742
|
const result = { installed: [], removed: [] };
|
|
40634
40743
|
if (options.uninstall) {
|
|
40635
|
-
const toRemove = explicitTargets ?? ["claude", "claude-code", "cursor", "vscode", "antigravity", "codex"];
|
|
40744
|
+
const toRemove = explicitTargets ?? ["claude", "claude-code", "cursor", "vscode", "antigravity", "codex", "deepseek"];
|
|
40636
40745
|
for (const target of toRemove) {
|
|
40637
40746
|
if (target === "claude") {
|
|
40638
40747
|
const cfg = (0, import_node_path5.join)(getClaudeDesktopDir(), "claude_desktop_config.json");
|
|
@@ -40665,6 +40774,20 @@ async function runInstall(options = {}) {
|
|
|
40665
40774
|
(0, import_node_fs3.rmSync)(dir, { recursive: true, force: true });
|
|
40666
40775
|
result.removed.push({ target, location: dir });
|
|
40667
40776
|
}
|
|
40777
|
+
} else if (target === "deepseek") {
|
|
40778
|
+
const dshCmd = findDshCommand();
|
|
40779
|
+
const profileDir = (0, import_node_path5.join)(getDshHome(), "profiles", "desktop");
|
|
40780
|
+
if (dshCmd && (0, import_node_fs3.existsSync)(profileDir)) {
|
|
40781
|
+
try {
|
|
40782
|
+
(0, import_node_child_process2.execFileSync)(dshCmd, ["plugin", "--profile", "desktop", "remove", "dsh-inkmap"], { stdio: "pipe" });
|
|
40783
|
+
} catch {
|
|
40784
|
+
}
|
|
40785
|
+
}
|
|
40786
|
+
const dir = (0, import_node_path5.join)(getInkmapHome(), "dsh-inkmap");
|
|
40787
|
+
if ((0, import_node_fs3.existsSync)(dir)) {
|
|
40788
|
+
(0, import_node_fs3.rmSync)(dir, { recursive: true, force: true });
|
|
40789
|
+
result.removed.push({ target, location: profileDir });
|
|
40790
|
+
}
|
|
40668
40791
|
}
|
|
40669
40792
|
}
|
|
40670
40793
|
if (!explicitTargets) {
|
|
@@ -40753,6 +40876,19 @@ async function runInstall(options = {}) {
|
|
|
40753
40876
|
throw err;
|
|
40754
40877
|
log(`[inkmap] \u8DF3\u8FC7 codex \u81EA\u52A8\u6CE8\u518C: ${err.message}`);
|
|
40755
40878
|
}
|
|
40879
|
+
} else if (target === "deepseek") {
|
|
40880
|
+
try {
|
|
40881
|
+
const installedDsh = installDeepSeekHarnessPlugin();
|
|
40882
|
+
result.installed.push({
|
|
40883
|
+
target,
|
|
40884
|
+
location: installedDsh.location,
|
|
40885
|
+
note: installedDsh.note
|
|
40886
|
+
});
|
|
40887
|
+
} catch (err) {
|
|
40888
|
+
if (explicitTargets)
|
|
40889
|
+
throw err;
|
|
40890
|
+
log(`[inkmap] \u8DF3\u8FC7 deepseek \u81EA\u52A8\u6CE8\u518C: ${err.message}`);
|
|
40891
|
+
}
|
|
40756
40892
|
}
|
|
40757
40893
|
}
|
|
40758
40894
|
const zhLocale = isChineseTerminalLocale();
|
|
@@ -40811,6 +40947,7 @@ async function runInstallCli(argv, uninstall = false) {
|
|
|
40811
40947
|
vscode VS Code (\u539F\u751F\u5BFC\u56FE\u7F16\u8F91\u5668\u6269\u5C55)
|
|
40812
40948
|
antigravity Google Antigravity (~/.gemini/config/plugins/inkmap)
|
|
40813
40949
|
codex OpenAI Codex Desktop
|
|
40950
|
+
deepseek DeepSeek Harness (~/.dsh/profiles/desktop)
|
|
40814
40951
|
|
|
40815
40952
|
\u9009\u9879 / Options:
|
|
40816
40953
|
-w, --workspace <dir> \u9884\u8BBE\u5141\u8BB8 Inkmap \u8BBF\u95EE\u7684\u5DE5\u4F5C\u533A\u76EE\u5F55\uFF08\u53EF\u591A\u6B21\u4F20\u5165\uFF09`);
|
|
@@ -40889,7 +41026,7 @@ var import_node_url4 = require("node:url");
|
|
|
40889
41026
|
init_dist();
|
|
40890
41027
|
init_license();
|
|
40891
41028
|
init_server();
|
|
40892
|
-
var INKMAP_VERSION = "0.3.
|
|
41029
|
+
var INKMAP_VERSION = "0.3.2";
|
|
40893
41030
|
var WEB_ROOT2 = (0, import_node_url4.fileURLToPath)(new URL("./web/", inkmapModuleUrl));
|
|
40894
41031
|
var USAGE = `Inkmap v${INKMAP_VERSION} \u2014 Markdown \u4EA4\u4E92\u601D\u7EF4\u5BFC\u56FE\u7F16\u8F91\u5668 & MCP App
|
|
40895
41032
|
|