bridgerator 1.1.4 → 1.1.6

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,16 +1,16 @@
1
1
  {
2
2
  "name": "bridgerator",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "bridgerator",
9
- "version": "1.1.4",
9
+ "version": "1.1.6",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@modelcontextprotocol/sdk": "^1.29.0",
13
- "@wonderwhy-er/desktop-commander": "0.2.52",
13
+ "bridgerator-engine": "npm:@wonderwhy-er/desktop-commander@0.2.52",
14
14
  "ws": "^8.20.0"
15
15
  },
16
16
  "bin": {
@@ -1477,69 +1477,6 @@
1477
1477
  "win32"
1478
1478
  ]
1479
1479
  },
1480
- "node_modules/@wonderwhy-er/desktop-commander": {
1481
- "version": "0.2.52",
1482
- "resolved": "https://registry.npmjs.org/@wonderwhy-er/desktop-commander/-/desktop-commander-0.2.52.tgz",
1483
- "integrity": "sha512-VNeKfaBR6TN/8MlP/ziTpjNEeHrGOFmmzQjrwzr52kQalBJoNNISWwaSQElPFc6+I17NOOM354KbSdS/aDrqGA==",
1484
- "hasInstallScript": true,
1485
- "license": "MIT",
1486
- "dependencies": {
1487
- "@modelcontextprotocol/sdk": "^1.9.0",
1488
- "@opendocsg/pdf2md": "^0.2.2",
1489
- "@supabase/supabase-js": "^2.89.0",
1490
- "@tiptap/core": "^3.22.3",
1491
- "@tiptap/extension-image": "^3.22.3",
1492
- "@tiptap/extension-table": "^3.22.4",
1493
- "@tiptap/extension-table-cell": "^3.22.4",
1494
- "@tiptap/extension-table-header": "^3.22.4",
1495
- "@tiptap/extension-table-row": "^3.22.4",
1496
- "@tiptap/pm": "^3.22.3",
1497
- "@tiptap/starter-kit": "^3.22.3",
1498
- "@vscode/ripgrep": "^1.15.9",
1499
- "cross-fetch": "^4.1.0",
1500
- "exceljs": "^4.4.0",
1501
- "fastest-levenshtein": "^1.0.16",
1502
- "file-type": "^21.1.1",
1503
- "glob": "^10.3.10",
1504
- "highlight.js": "^11.11.1",
1505
- "isbinaryfile": "^5.0.4",
1506
- "markdown-it": "^14.1.0",
1507
- "md-to-pdf": "^5.2.5",
1508
- "open": "^10.2.0",
1509
- "pdf-lib": "^1.17.1",
1510
- "pizzip": "^3.2.0",
1511
- "proper-lockfile": "^4.1.2",
1512
- "remark": "^15.0.1",
1513
- "remark-gfm": "^4.0.1",
1514
- "remark-parse": "^11.0.0",
1515
- "sharp": "^0.34.5",
1516
- "tiptap-markdown": "^0.9.0",
1517
- "unified": "^11.0.5",
1518
- "unpdf": "^1.4.0",
1519
- "zod": "^3.24.1",
1520
- "zod-to-json-schema": "^3.23.5"
1521
- },
1522
- "bin": {
1523
- "desktop-commander": "dist/index.js",
1524
- "remove": "dist/uninstall-claude-server.js",
1525
- "setup": "dist/setup-claude-server.js"
1526
- },
1527
- "engines": {
1528
- "node": ">=18.0.0"
1529
- },
1530
- "optionalDependencies": {
1531
- "caffeinate": "^1.0.1"
1532
- }
1533
- },
1534
- "node_modules/@wonderwhy-er/desktop-commander/node_modules/zod": {
1535
- "version": "3.25.76",
1536
- "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
1537
- "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
1538
- "license": "MIT",
1539
- "funding": {
1540
- "url": "https://github.com/sponsors/colinhacks"
1541
- }
1542
- },
1543
1480
  "node_modules/accepts": {
1544
1481
  "version": "2.0.0",
1545
1482
  "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
@@ -1986,6 +1923,70 @@
1986
1923
  "node": ">=8"
1987
1924
  }
1988
1925
  },
1926
+ "node_modules/bridgerator-engine": {
1927
+ "name": "@wonderwhy-er/desktop-commander",
1928
+ "version": "0.2.52",
1929
+ "resolved": "https://registry.npmjs.org/@wonderwhy-er/desktop-commander/-/desktop-commander-0.2.52.tgz",
1930
+ "integrity": "sha512-VNeKfaBR6TN/8MlP/ziTpjNEeHrGOFmmzQjrwzr52kQalBJoNNISWwaSQElPFc6+I17NOOM354KbSdS/aDrqGA==",
1931
+ "hasInstallScript": true,
1932
+ "license": "MIT",
1933
+ "dependencies": {
1934
+ "@modelcontextprotocol/sdk": "^1.9.0",
1935
+ "@opendocsg/pdf2md": "^0.2.2",
1936
+ "@supabase/supabase-js": "^2.89.0",
1937
+ "@tiptap/core": "^3.22.3",
1938
+ "@tiptap/extension-image": "^3.22.3",
1939
+ "@tiptap/extension-table": "^3.22.4",
1940
+ "@tiptap/extension-table-cell": "^3.22.4",
1941
+ "@tiptap/extension-table-header": "^3.22.4",
1942
+ "@tiptap/extension-table-row": "^3.22.4",
1943
+ "@tiptap/pm": "^3.22.3",
1944
+ "@tiptap/starter-kit": "^3.22.3",
1945
+ "@vscode/ripgrep": "^1.15.9",
1946
+ "cross-fetch": "^4.1.0",
1947
+ "exceljs": "^4.4.0",
1948
+ "fastest-levenshtein": "^1.0.16",
1949
+ "file-type": "^21.1.1",
1950
+ "glob": "^10.3.10",
1951
+ "highlight.js": "^11.11.1",
1952
+ "isbinaryfile": "^5.0.4",
1953
+ "markdown-it": "^14.1.0",
1954
+ "md-to-pdf": "^5.2.5",
1955
+ "open": "^10.2.0",
1956
+ "pdf-lib": "^1.17.1",
1957
+ "pizzip": "^3.2.0",
1958
+ "proper-lockfile": "^4.1.2",
1959
+ "remark": "^15.0.1",
1960
+ "remark-gfm": "^4.0.1",
1961
+ "remark-parse": "^11.0.0",
1962
+ "sharp": "^0.34.5",
1963
+ "tiptap-markdown": "^0.9.0",
1964
+ "unified": "^11.0.5",
1965
+ "unpdf": "^1.4.0",
1966
+ "zod": "^3.24.1",
1967
+ "zod-to-json-schema": "^3.23.5"
1968
+ },
1969
+ "bin": {
1970
+ "desktop-commander": "dist/index.js",
1971
+ "remove": "dist/uninstall-claude-server.js",
1972
+ "setup": "dist/setup-claude-server.js"
1973
+ },
1974
+ "engines": {
1975
+ "node": ">=18.0.0"
1976
+ },
1977
+ "optionalDependencies": {
1978
+ "caffeinate": "^1.0.1"
1979
+ }
1980
+ },
1981
+ "node_modules/bridgerator-engine/node_modules/zod": {
1982
+ "version": "3.25.76",
1983
+ "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
1984
+ "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
1985
+ "license": "MIT",
1986
+ "funding": {
1987
+ "url": "https://github.com/sponsors/colinhacks"
1988
+ }
1989
+ },
1989
1990
  "node_modules/buffer": {
1990
1991
  "version": "5.7.1",
1991
1992
  "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bridgerator",
3
- "version": "1.1.4",
3
+ "version": "1.1.6",
4
4
  "description": "Connect ChatGPT to your Windows PC: files, search and terminal through an outbound-only bridge with folder limits. No inbound ports, no admin rights.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@modelcontextprotocol/sdk": "^1.29.0",
31
- "@wonderwhy-er/desktop-commander": "0.2.52",
31
+ "bridgerator-engine": "npm:@wonderwhy-er/desktop-commander@0.2.52",
32
32
  "ws": "^8.20.0"
33
33
  },
34
34
  "homepage": "https://bridgerator.recondeck.com",
package/src/bridge.mjs CHANGED
@@ -9,7 +9,7 @@ import { createRequire } from 'node:module';
9
9
  import WebSocket from 'ws';
10
10
  import { Client } from '@modelcontextprotocol/sdk/client/index.js';
11
11
  import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
12
- import { createPolicy, debrand, debrandResult, TERMINAL_TOOLS, ALWAYS_HIDDEN } from './policy.mjs';
12
+ import { createPolicy, debrand, debrandResult, ourUi, engineUi, TERMINAL_TOOLS, ALWAYS_HIDDEN } from './policy.mjs';
13
13
  import { showNotice } from './notice.mjs';
14
14
  import { usage } from './telemetry.mjs';
15
15
  import { createGate, askOnPc, CONFIRM_TOOL_DEFS } from './confirm.mjs';
@@ -59,7 +59,7 @@ export function createLimiter(max, waitMs) {
59
59
  };
60
60
  }
61
61
  const BUSY_WAIT_MS = 30000;
62
- const DC_ENTRY = createRequire(import.meta.url).resolve('@wonderwhy-er/desktop-commander/dist/index.js');
62
+ const DC_ENTRY = createRequire(import.meta.url).resolve('bridgerator-engine/dist/index.js');
63
63
  const ISOLATE = new URL('./dc-isolate.mjs', import.meta.url).href;
64
64
 
65
65
  /** Drive roots of this PC (C:\\ … Z:\\): what the Read only preset makes read-only when there is no folder list. */
@@ -152,7 +152,7 @@ export async function startDesktopCommander(cfg, log = console.log, { ask: askAr
152
152
  // Snapshots + Undo (on by default) in %LOCALAPPDATA%\Bridgerator\snapshots (given by the CLI).
153
153
  const snapCfg = () => ({ ...SNAP_DEFAULTS, ...(cfg.snapshots || {}) });
154
154
  const snapshots = cfg.snapshotsDir ? createSnapshots(cfg.snapshotsDir, { limits: snapCfg, log }) : null;
155
- const visible = [...tools.filter(listed).map(debrand), ...CONFIRM_TOOL_DEFS, SETUP_TOOL_DEF, ...(cfg.configFile ? [SETTINGS_TOOL_DEF] : []), ...(cfg.configDir ? QUEUE_TOOL_DEFS : []), ...(snapshots ? [UNDO_TOOL_DEF] : []), ...extra.defs.filter(policy.visible)].map(shorten);
155
+ const visible = [...tools.filter(listed).map(debrand), ...CONFIRM_TOOL_DEFS, SETUP_TOOL_DEF, ...(cfg.configFile ? [SETTINGS_TOOL_DEF] : []), ...(cfg.configDir ? QUEUE_TOOL_DEFS : []), ...(snapshots ? [UNDO_TOOL_DEF] : []), ...extra.defs.filter(policy.visible)].map(shorten).map(ourUi);
156
156
  const virtual = new Set(CONFIRM_TOOL_DEFS.map((t) => t.name));
157
157
  // namePending: a computer name given on this PC not yet accepted by the relay — kept in config.json too,
158
158
  // so a restart before the next link does not lose it; cleared by nameSent() (welcome / live mode message).
@@ -197,7 +197,7 @@ export async function startDesktopCommander(cfg, log = console.log, { ask: askAr
197
197
  return gate.accept(s ? { enabled: s.enabled } : {});
198
198
  };
199
199
  // MCP Apps widgets (file preview, config view) — served to ChatGPT through the relay as-is.
200
- const resources = ((await client.listResources().catch(() => ({ resources: [] }))).resources || []).map(debrand);
200
+ const resources = ourUi(((await client.listResources().catch(() => ({ resources: [] }))).resources || []).map(debrand));
201
201
  const resourceUris = new Set(resources.map((r) => r.uri));
202
202
  log(`[bridgerator] engine up: ${visible.length} tools; allowed=${JSON.stringify(cfg.allowedDirectories || [])} excluded=${JSON.stringify(cfg.deniedDirectories || [])} read-only=${JSON.stringify(cfg.readOnlyDirectories || [])} confirm=${gate.mode()}`);
203
203
  if (!(cfg.allowedDirectories || []).length) log('[bridgerator] folders: all (no list), except the always-blocked ones');
@@ -492,8 +492,9 @@ export async function startDesktopCommander(cfg, log = console.log, { ask: askAr
492
492
  return { ...rest, confirm: { enabled: confirm.enabled, ...confirm.ask, timeoutSeconds: confirm.timeoutSec }, telemetryEnabled: telemetry };
493
493
  };
494
494
  async function readResource(uri) {
495
- if (!resourceUris.has(uri)) return { error: 'unknown resource' };
496
- try { return { result: debrand(await client.readResource({ uri })) }; } catch (e) { return { error: String(e?.message || e) }; }
495
+ // The old ui://desktop-commander/… still works: ChatGPT and the relay's offline list may have cached it.
496
+ if (!resourceUris.has(ourUi(String(uri)))) return { error: 'unknown resource' };
497
+ try { return { result: ourUi(debrand(await client.readResource({ uri: engineUi(uri) }))) }; } catch (e) { return { error: String(e?.message || e) }; }
497
498
  }
498
499
  // Requests of the Bridgerator window (tray helper). Made by the person at the PC: no extra prompt.
499
500
  // Theme for our pop-ups = the window's theme (Settings → Appearance); sound / style from Notifications.
@@ -25,7 +25,7 @@ const PATCHES = [
25
25
  { file: /[\\/]dist[\\/]terminal-manager\.js$/, from: "args: ['-Command', command],", to: "args: ['-Command', '[Console]::OutputEncoding=[Text.Encoding]::UTF8;' + command]," },
26
26
  { file: /[\\/]dist[\\/]index\.js$/, from: ' ensureChromeAvailable();\n', to: ' // bridgerator: no Chrome pre-download\n' },
27
27
  ];
28
- const ENGINE = /[\\/]@wonderwhy-er[\\/]desktop-commander[\\/]dist[\\/]/;
28
+ const ENGINE = /[\\/]bridgerator-engine[\\/]dist[\\/]/; // the bundled engine (Desktop Commander, MIT) installed under our own name (npm alias, owner 26.10)
29
29
 
30
30
  export async function load(url, context, nextLoad) {
31
31
  const r = await nextLoad(url, context);