virlow-mcp 3.85.0 → 3.86.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/dist/cli.js +39 -9
- package/package.json +4 -4
package/dist/cli.js
CHANGED
|
@@ -4328,8 +4328,8 @@ function requireLocalAbsolutePath(p, label, platform = currentPlatform()) {
|
|
|
4328
4328
|
|
|
4329
4329
|
// ../../packages/mcp-core/dist/widgets.js
|
|
4330
4330
|
var WIDGET_MIME_TYPE = "text/html;profile=mcp-app";
|
|
4331
|
-
var SAVED_MEMORY_URI = "ui://widget/saved-memory.html";
|
|
4332
|
-
var MEMORY_CONTEXT_URI = "ui://widget/memory-context.html";
|
|
4331
|
+
var SAVED_MEMORY_URI = "ui://widget/saved-memory-v2.html";
|
|
4332
|
+
var MEMORY_CONTEXT_URI = "ui://widget/memory-context-v2.html";
|
|
4333
4333
|
var VIRLOW_APP_URL = "https://app.virlow.com";
|
|
4334
4334
|
var KIND_COLORS = {
|
|
4335
4335
|
person: { light: "#4F6D8F", dark: "#8FB0D0" },
|
|
@@ -4362,7 +4362,8 @@ function widgetToolMeta(tool) {
|
|
|
4362
4362
|
return void 0;
|
|
4363
4363
|
const uri = VIEW_URI[view];
|
|
4364
4364
|
return {
|
|
4365
|
-
ui: { resourceUri: uri },
|
|
4365
|
+
ui: { resourceUri: uri, visibility: ["model", "app"] },
|
|
4366
|
+
"ui/resourceUri": uri,
|
|
4366
4367
|
"openai/outputTemplate": uri,
|
|
4367
4368
|
...tool === "add_memory" && { "openai/widgetAccessible": true }
|
|
4368
4369
|
};
|
|
@@ -4518,17 +4519,19 @@ var SCRIPT = `
|
|
|
4518
4519
|
return b;
|
|
4519
4520
|
}
|
|
4520
4521
|
|
|
4522
|
+
// The standard bridge first once it is up, window.openai while it is not
|
|
4523
|
+
// (or in a ChatGPT that never answers ui/initialize).
|
|
4521
4524
|
function openApp() {
|
|
4525
|
+
if (bridge && bridge.ready) { bridge.request('ui/open-link', { url: APP_URL }).catch(function () {}); return; }
|
|
4522
4526
|
var host = openai();
|
|
4523
4527
|
if (host && typeof host.openExternal === 'function') { host.openExternal({ href: APP_URL }); return; }
|
|
4524
|
-
if (bridge) { bridge.request('ui/open-link', { url: APP_URL }).catch(function () {}); return; }
|
|
4525
4528
|
window.open(APP_URL, '_blank', 'noopener');
|
|
4526
4529
|
}
|
|
4527
4530
|
|
|
4528
4531
|
function callTool(name, args) {
|
|
4532
|
+
if (bridge && bridge.ready) return bridge.request('tools/call', { name: name, arguments: args });
|
|
4529
4533
|
var host = openai();
|
|
4530
4534
|
if (host && typeof host.callTool === 'function') return Promise.resolve(host.callTool(name, args));
|
|
4531
|
-
if (bridge) return bridge.request('tools/call', { name: name, arguments: args });
|
|
4532
4535
|
return Promise.reject(new Error('This host cannot run tools from a card.'));
|
|
4533
4536
|
}
|
|
4534
4537
|
|
|
@@ -4639,7 +4642,11 @@ var SCRIPT = `
|
|
|
4639
4642
|
});
|
|
4640
4643
|
},
|
|
4641
4644
|
notify: function (method, params) { post({ jsonrpc: '2.0', method: method, params: params || {} }); },
|
|
4645
|
+
// Set once the host answers ui/initialize. Nothing but that request
|
|
4646
|
+
// goes to the host before then, as the MCP Apps lifecycle requires.
|
|
4647
|
+
ready: false,
|
|
4642
4648
|
resized: function () {
|
|
4649
|
+
if (!bridge.ready) return;
|
|
4643
4650
|
var h = Math.ceil(document.documentElement.getBoundingClientRect().height);
|
|
4644
4651
|
if (h && h !== lastHeight) { lastHeight = h; bridge.notify('ui/notifications/size-changed', { height: h }); }
|
|
4645
4652
|
}
|
|
@@ -4659,8 +4666,10 @@ var SCRIPT = `
|
|
|
4659
4666
|
if (params.structuredContent) { state.data = params.structuredContent; render(); }
|
|
4660
4667
|
} else if (m.method === 'ui/notifications/host-context-changed') {
|
|
4661
4668
|
applyTheme(params.theme);
|
|
4662
|
-
} else if (m.method === 'ui/resource-teardown' && m.id != null) {
|
|
4669
|
+
} else if ((m.method === 'ui/resource-teardown' || m.method === 'ping') && m.id != null) {
|
|
4663
4670
|
post({ jsonrpc: '2.0', id: m.id, result: {} });
|
|
4671
|
+
} else if (m.id != null) {
|
|
4672
|
+
post({ jsonrpc: '2.0', id: m.id, error: { code: -32601, message: 'Method not found' } });
|
|
4664
4673
|
}
|
|
4665
4674
|
});
|
|
4666
4675
|
bridge.request('ui/initialize', {
|
|
@@ -4669,14 +4678,28 @@ var SCRIPT = `
|
|
|
4669
4678
|
protocolVersion: '2026-01-26'
|
|
4670
4679
|
}).then(function (result) {
|
|
4671
4680
|
if (result && result.hostContext) applyTheme(result.hostContext.theme);
|
|
4681
|
+
bridge.ready = true;
|
|
4672
4682
|
bridge.notify('ui/notifications/initialized');
|
|
4683
|
+
// The host sizes the frame from these reports alone: without one an
|
|
4684
|
+
// inline card can stay at zero height.
|
|
4685
|
+
bridge.resized();
|
|
4686
|
+
if (typeof ResizeObserver === 'function') {
|
|
4687
|
+
new ResizeObserver(function () { bridge.resized(); }).observe(document.documentElement);
|
|
4688
|
+
}
|
|
4673
4689
|
}).catch(function () {});
|
|
4674
4690
|
}
|
|
4675
4691
|
|
|
4692
|
+
// Both, not either. ChatGPT injects window.openai into an MCP Apps
|
|
4693
|
+
// (text/html;profile=mcp-app) frame too, but as an extension: the tool
|
|
4694
|
+
// result reaches the card over the bridge, and only after the card has
|
|
4695
|
+
// sent ui/initialize. A card that saw window.openai and skipped the
|
|
4696
|
+
// bridge never initialized, never received its data and never reported a
|
|
4697
|
+
// height, so ChatGPT showed nothing at all.
|
|
4676
4698
|
if (openai()) {
|
|
4677
4699
|
window.addEventListener('openai:set_globals', fromOpenai);
|
|
4678
4700
|
fromOpenai();
|
|
4679
|
-
}
|
|
4701
|
+
}
|
|
4702
|
+
if (window.parent && window.parent !== window) {
|
|
4680
4703
|
startBridge();
|
|
4681
4704
|
}
|
|
4682
4705
|
})();
|
|
@@ -5114,7 +5137,14 @@ kinds saved: ${changed.join(", ")}` : "";
|
|
|
5114
5137
|
};
|
|
5115
5138
|
if (opts.memoriesEnabled !== false) {
|
|
5116
5139
|
for (const widget of WIDGET_RESOURCES) {
|
|
5117
|
-
server.registerResource(widget.name, widget.uri, {
|
|
5140
|
+
server.registerResource(widget.name, widget.uri, {
|
|
5141
|
+
title: widget.title,
|
|
5142
|
+
description: widget.description,
|
|
5143
|
+
mimeType: WIDGET_MIME_TYPE,
|
|
5144
|
+
// The same `_meta` as the read result, so a host can see the CSP
|
|
5145
|
+
// and border hint from resources/list before it fetches the page.
|
|
5146
|
+
_meta: resourceMeta(widget.view)
|
|
5147
|
+
}, async () => readWidget(widget.view));
|
|
5118
5148
|
}
|
|
5119
5149
|
server.registerTool("add_memory", {
|
|
5120
5150
|
...toolConfig("add_memory"),
|
|
@@ -6069,7 +6099,7 @@ function startUnlockServer(api, vault, opts = {}) {
|
|
|
6069
6099
|
}
|
|
6070
6100
|
|
|
6071
6101
|
// src/version.ts
|
|
6072
|
-
var VERSION = true ? "3.
|
|
6102
|
+
var VERSION = true ? "3.86.0" : "dev";
|
|
6073
6103
|
|
|
6074
6104
|
// src/server.ts
|
|
6075
6105
|
function defaultEmbeddingCacheDir() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "virlow-mcp",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.86.0",
|
|
4
4
|
"description": "Local MCP server for Virlow Secure Notes: end-to-end-encrypted AI memories and notes for Cursor, Claude, Codex, and any MCP client.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"esbuild": "^0.25.0",
|
|
35
35
|
"typescript": "^5.8.0",
|
|
36
36
|
"vitest": "^4.1.11",
|
|
37
|
-
"@batalabs/virlow-crypto": "3.
|
|
38
|
-
"@batalabs/virlow-memory": "3.
|
|
39
|
-
"@batalabs/virlow-mcp-core": "3.
|
|
37
|
+
"@batalabs/virlow-crypto": "3.86.0",
|
|
38
|
+
"@batalabs/virlow-memory": "3.86.0",
|
|
39
|
+
"@batalabs/virlow-mcp-core": "3.86.0"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "node build.mjs",
|