inkmap-mcp 0.3.2 → 0.3.3
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/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/client.js +4 -2
- package/dist/bundles/harness/host.js +6 -4
- package/dist/bundles/harness/package.json +1 -1
- package/dist/bundles/vscode/dist/extension.js +1 -1
- package/dist/bundles/vscode/package.json +1 -1
- package/dist/cli.cjs +4 -4
- package/dist/codex.html +1 -1
- package/dist/web/app.js +457 -457
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -155,9 +155,11 @@ function apply(ctx) {
|
|
|
155
155
|
if (!source || source !== frame.current?.contentWindow || event.origin !== origin || data?.type !== "inkmap:open-account" || typeof data.id !== "string" || tab.signal.aborted) return;
|
|
156
156
|
let ok = false;
|
|
157
157
|
try {
|
|
158
|
-
const
|
|
158
|
+
const mode = data.mode === "buy" ? "buy" : "restore";
|
|
159
|
+
const action = mode === "buy" ? "buy" : "sign-in";
|
|
160
|
+
const response = await request("POST", { lease: view.lease, action });
|
|
159
161
|
if (!response.ok) throw new Error("Inkmap sign-in is unavailable");
|
|
160
|
-
const url = billingFlowUrl((await response.json()).url, YUNFAN_BILLING_ORIGIN,
|
|
162
|
+
const url = billingFlowUrl((await response.json()).url, YUNFAN_BILLING_ORIGIN, mode);
|
|
161
163
|
if (!mounted || tab.signal.aborted) return;
|
|
162
164
|
window.open(url, "_blank", "noopener,noreferrer");
|
|
163
165
|
ok = true;
|
|
@@ -631,7 +631,7 @@ function licenseService(storage, getOrigin, { loginOnly = false, host: defaultHo
|
|
|
631
631
|
installId: id,
|
|
632
632
|
host: hostName,
|
|
633
633
|
os,
|
|
634
|
-
version: "0.3.
|
|
634
|
+
version: "0.3.3",
|
|
635
635
|
locale: clientLocale(),
|
|
636
636
|
tier,
|
|
637
637
|
events
|
|
@@ -1311,7 +1311,7 @@ async function readBody(req) {
|
|
|
1311
1311
|
}
|
|
1312
1312
|
}
|
|
1313
1313
|
function apply(ctx) {
|
|
1314
|
-
const license = licenseService(fileSessionStorage(), () => YUNFAN_BILLING_ORIGIN
|
|
1314
|
+
const license = licenseService(fileSessionStorage(), () => YUNFAN_BILLING_ORIGIN);
|
|
1315
1315
|
const editors = /* @__PURE__ */ new Map();
|
|
1316
1316
|
const leases = /* @__PURE__ */ new Map();
|
|
1317
1317
|
let disposed = false;
|
|
@@ -1342,10 +1342,11 @@ function apply(ctx) {
|
|
|
1342
1342
|
if (editor && --editor.users === 0) await closeEditor(path, editor);
|
|
1343
1343
|
return json(res, 200, {});
|
|
1344
1344
|
}
|
|
1345
|
-
if (body.action === "sign-in") {
|
|
1345
|
+
if (body.action === "sign-in" || body.action === "buy") {
|
|
1346
1346
|
if (disposed || !leases.has(body.lease)) return json(res, 404, {});
|
|
1347
1347
|
try {
|
|
1348
|
-
|
|
1348
|
+
const mode = body.action === "buy" ? "buy" : "restore";
|
|
1349
|
+
return json(res, 200, { url: await license.connect(mode) });
|
|
1349
1350
|
} catch {
|
|
1350
1351
|
return json(res, 502, {});
|
|
1351
1352
|
}
|
|
@@ -1374,6 +1375,7 @@ function apply(ctx) {
|
|
|
1374
1375
|
license,
|
|
1375
1376
|
port: 0,
|
|
1376
1377
|
sidebar: true,
|
|
1378
|
+
sidebarPurchase: true,
|
|
1377
1379
|
sidebarAccountNavigation: true,
|
|
1378
1380
|
workspaceRoots: [root]
|
|
1379
1381
|
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-inkmap",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
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",
|
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.3",
|
|
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.3" });
|
|
39797
39797
|
function isAntigravityHost() {
|
|
39798
39798
|
const clientName = server.server.getClientVersion()?.name ?? "";
|
|
39799
39799
|
if (/antigravity/i.test(clientName))
|
|
@@ -40452,7 +40452,7 @@ function installIdeExtension(editorDir, cliCmd) {
|
|
|
40452
40452
|
return null;
|
|
40453
40453
|
}
|
|
40454
40454
|
const extPkg = JSON.parse((0, import_node_fs3.readFileSync)((0, import_node_path5.join)(vscodeBundle, "package.json"), "utf8"));
|
|
40455
|
-
const version2 = extPkg.version || "0.3.
|
|
40455
|
+
const version2 = extPkg.version || "0.3.3";
|
|
40456
40456
|
const staging = (0, import_node_fs3.mkdtempSync)((0, import_node_path5.join)((0, import_node_os5.tmpdir)(), "inkmap-vsix-"));
|
|
40457
40457
|
try {
|
|
40458
40458
|
const extStaging = (0, import_node_path5.join)(staging, "extension");
|
|
@@ -41026,7 +41026,7 @@ var import_node_url4 = require("node:url");
|
|
|
41026
41026
|
init_dist();
|
|
41027
41027
|
init_license();
|
|
41028
41028
|
init_server();
|
|
41029
|
-
var INKMAP_VERSION = "0.3.
|
|
41029
|
+
var INKMAP_VERSION = "0.3.3";
|
|
41030
41030
|
var WEB_ROOT2 = (0, import_node_url4.fileURLToPath)(new URL("./web/", inkmapModuleUrl));
|
|
41031
41031
|
var USAGE = `Inkmap v${INKMAP_VERSION} \u2014 Markdown \u4EA4\u4E92\u601D\u7EF4\u5BFC\u56FE\u7F16\u8F91\u5668 & MCP App
|
|
41032
41032
|
|
package/dist/codex.html
CHANGED
|
@@ -816,7 +816,7 @@ ${Tn}`}async function Ir($e){var fr;if(en(),!ge.allow("export"))return;(fr=n.tra
|
|
|
816
816
|
`),u=`来自 \`${this.currentFile}\`(第 ${s+1}–${a+1} 行):
|
|
817
817
|
\`\`\`markdown
|
|
818
818
|
${o}
|
|
819
|
-
\`\`\``,A=this.app.getHostCapabilities();A!=null&&A.updateModelContext?this.app.updateModelContext({content:[{type:"text",text:u}]}).catch(()=>{}):A!=null&&A.message&&this.app.sendMessage({role:"user",content:[{type:"text",text:u}]}).catch(()=>{})}license(){return this.licenseCheck??(this.licenseCheck=this.callTool("inkmap_access").then(e=>{const r=Ygn(e);return this.currentLicense=r,r}).finally(()=>{this.licenseCheck=void 0}))}async checkout(e){if(e!=="restore")throw new Error("Only account restoration is supported.");const{url:r}=await this.callTool("inkmap_restore_access");if(typeof r!="string"||new URL(r).protocol!=="https:")throw new Error("Invalid account link.");if((await this.app.openLink({url:r})).isError)throw new Error("Unable to open account login.")}async signOut(){await this.callTool("inkmap_disconnect_access"),this.currentLicense={pro:!1}}onLicenseChange(e){const r=()=>void this.license().then(e).catch(()=>{}),s=window.setInterval(r,4500);window.addEventListener("focus",r),window.addEventListener("pagehide",()=>{window.clearInterval(s),window.removeEventListener("focus",r)},{once:!0})}async ads(){return[]}async saveFile(e,r){var a;const s=/^data:(image\/(?:png|svg\+xml));base64,([\s\S]+)$/.exec(r);if(s&&((a=this.app.getHostCapabilities())!=null&&a.downloadFile)){const{isError:o}=await this.app.downloadFile({contents:[{type:"resource",resource:{uri:"file:///"+encodeURIComponent(e),mimeType:s[1],blob:s[2]}}]});if(!o)return!0}return H8r(e,r)}}const _M=cft(Ac("正在连接 Inkmap 思维导图面板…","Connecting to Inkmap mind map panel…")),Vp=new i8r({name:"Inkmap",version:"0.3.
|
|
819
|
+
\`\`\``,A=this.app.getHostCapabilities();A!=null&&A.updateModelContext?this.app.updateModelContext({content:[{type:"text",text:u}]}).catch(()=>{}):A!=null&&A.message&&this.app.sendMessage({role:"user",content:[{type:"text",text:u}]}).catch(()=>{})}license(){return this.licenseCheck??(this.licenseCheck=this.callTool("inkmap_access").then(e=>{const r=Ygn(e);return this.currentLicense=r,r}).finally(()=>{this.licenseCheck=void 0}))}async checkout(e){if(e!=="restore")throw new Error("Only account restoration is supported.");const{url:r}=await this.callTool("inkmap_restore_access");if(typeof r!="string"||new URL(r).protocol!=="https:")throw new Error("Invalid account link.");if((await this.app.openLink({url:r})).isError)throw new Error("Unable to open account login.")}async signOut(){await this.callTool("inkmap_disconnect_access"),this.currentLicense={pro:!1}}onLicenseChange(e){const r=()=>void this.license().then(e).catch(()=>{}),s=window.setInterval(r,4500);window.addEventListener("focus",r),window.addEventListener("pagehide",()=>{window.clearInterval(s),window.removeEventListener("focus",r)},{once:!0})}async ads(){return[]}async saveFile(e,r){var a;const s=/^data:(image\/(?:png|svg\+xml));base64,([\s\S]+)$/.exec(r);if(s&&((a=this.app.getHostCapabilities())!=null&&a.downloadFile)){const{isError:o}=await this.app.downloadFile({contents:[{type:"resource",resource:{uri:"file:///"+encodeURIComponent(e),mimeType:s[1],blob:s[2]}}]});if(!o)return!0}return H8r(e,r)}}const _M=cft(Ac("正在连接 Inkmap 思维导图面板…","Connecting to Inkmap mind map panel…")),Vp=new i8r({name:"Inkmap",version:"0.3.3"},{},{autoResize:!1}),lce=new N8r(Vp);let mP=!1;function $ft(n){var a;if(lce.resources||mP)return;const e=((a=Vp.getHostVersion())==null?void 0:a.name)??"";if(/antigravity/i.test(e)||(n==null?void 0:n.displayMode)==="fullscreen")return;const r=n!=null&&n.containerDimensions&&"maxHeight"in n.containerDimensions&&typeof n.containerDimensions.maxHeight=="number"?n.containerDimensions.maxHeight:void 0,s=r?Math.min(Math.max(420,r),640):560;document.documentElement.style.minHeight=`${s}px`,document.body.style.minHeight=`${s}px`,Vp.sendSizeChanged({height:s}).catch(()=>{})}function ETn(n){var e;$ft(n),n&&((n.theme==="light"||n.theme==="dark")&&VMn(n.theme),(e=n.styles)!=null&&e.variables&&KMn(n.styles.variables))}let b3=!1,edt,mH,yoe,Gke;function IOr(n){if(!(!n||typeof n!="object"))return{...typeof n.path=="string"&&{path:n.path},...typeof n.workspace=="string"&&{workspace:n.workspace}}}function MOr(n){b3=!0,mP=!0,_M.close();const e=n.currentFile?n.currentFile.split(/[\\/]/).pop()||n.currentFile:"Markdown",r=document.createElement("div");r.id="inkmap-delegated-banner",r.innerHTML=`
|
|
820
820
|
<style id="inkmap-delegated-style">
|
|
821
821
|
:root.ink-banner-collapsed, :root.ink-banner-collapsed body {
|
|
822
822
|
margin: 0 !important; padding: 0 !important;
|