bridgerator 1.1.8 → 1.1.9

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,12 +1,12 @@
1
1
  {
2
2
  "name": "bridgerator",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "bridgerator",
9
- "version": "1.1.8",
9
+ "version": "1.1.9",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@modelcontextprotocol/sdk": "^1.29.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bridgerator",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
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",
package/src/cli.mjs CHANGED
@@ -39,6 +39,8 @@ const INI = path.join(DIR, 'confirm.ini'); // on-PC confirmation settings (confi
39
39
  const SNAP_DIR = DIR === path.join(APPDATA, 'Bridgerator') ? path.join(LOCALAPPDATA, 'Bridgerator', 'snapshots') : path.join(DIR, 'snapshots');
40
40
  // Automations (scheduled scripts, automations.mjs): inside the always-excluded %LOCALAPPDATA%\Bridgerator.
41
41
  const SCRIPTS_DIR = DIR === path.join(APPDATA, 'Bridgerator') ? path.join(LOCALAPPDATA, 'Bridgerator', 'scripts') : path.join(DIR, 'scripts');
42
+ // The window's WebView2 data: a second bridge (--home) gets its own, or its window stays black (one data folder = one browser process).
43
+ const WEBVIEW_DIR = DIR === path.join(APPDATA, 'Bridgerator') ? path.join(LOCALAPPDATA, 'Bridgerator', 'webview') : path.join(DIR, 'webview');
42
44
  const SELF = fileURLToPath(import.meta.url);
43
45
  const PKG_DIR = path.dirname(path.dirname(SELF)); // …\node_modules\bridgerator
44
46
  // Private Node.js the installer puts in when there is none (or < 22) — see install.ps1.
@@ -447,7 +449,7 @@ async function main() {
447
449
  showNotice({ kind: 'offline' }, log); return true;
448
450
  });
449
451
  const tray = startTray({
450
- log, account: accountUrlOf(cfg),
452
+ log, account: accountUrlOf(cfg), webview: WEBVIEW_DIR,
451
453
  onMenu: (a, m) => {
452
454
  if (a === 'quit') { log('[bridgerator] quit from the tray (starts again at the next sign-in)'); tray?.close(); process.exit(0); }
453
455
  if (a === 'pause') dc?.setPaused(true, m.minutes);
package/src/notice.mjs CHANGED
@@ -34,7 +34,7 @@ export function noticeText(n) {
34
34
  const title = typeof n.title === 'string' ? n.title.replace(/[\u0000-\u001f\u007f-\u009f]/g, ' ').trim().slice(0, 120) : '';
35
35
  if (!title) return undefined;
36
36
  const more = int(n.more) || 0;
37
- t = ['ChatGPT may be waiting for you', `No activity on the queue task "${title}"${more ? ` and ${more} more` : ''} for 10 minutes. Open the ChatGPT chat: it may be asking you to allow an action.`];
37
+ t = ['ChatGPT may be waiting for you', `No activity on the queue task "${title}"${more ? ` and ${more} more` : ''} for 10 minutes. Open the ChatGPT chat: it may be asking you to allow an action, or show an error such as "model is at capacity" — press Retry there or pick another model.`];
38
38
  } else if (kind === 'protection_off') {
39
39
  // Internal list only (the bridge's own labels), never relay text.
40
40
  const ok = new Set(['confirmations', 'your own patterns', ...Object.values(LABEL).map((l) => `confirmations for ${l}`)]);
package/src/tray.mjs CHANGED
@@ -56,13 +56,13 @@ export function createLink(write, { onMenu = () => {}, onRpc = async () => null,
56
56
  }
57
57
 
58
58
  /** Starts the helper (Windows only) and keeps it running while the bridge runs. → link-like object. */
59
- export function startTray({ log = console.log, onMenu, onRpc, onPower, spawn = nodeSpawn, stderr = 'ignore', testEnv = {}, account = '' } = {}) {
59
+ export function startTray({ log = console.log, onMenu, onRpc, onPower, spawn = nodeSpawn, stderr = 'ignore', testEnv = {}, account = '', webview = '' } = {}) {
60
60
  if (process.platform !== 'win32') return null;
61
61
  let child = null, link = null, closing = false, restartTimer = null;
62
62
  // Our own variables only: BR_* / BRIDGERATOR_* from the environment are ignored (a test harness
63
63
  // passes its hooks explicitly as testEnv).
64
64
  // BR_ACCOUNT: the account page of the site this PC is linked to (a staging install opens staging; V-5).
65
- const env = { ...stripOurs(process.env), ...testEnv, BR_PARENT: String(process.pid), BR_PKG: PKG_DIR, ...(/^https:\/\/[a-z0-9.-]+(:\d+)?\/app$/i.test(account) ? { BR_ACCOUNT: account } : {}) };
65
+ const env = { ...stripOurs(process.env), ...testEnv, BR_PARENT: String(process.pid), BR_PKG: PKG_DIR, ...(webview ? { BR_WEBVIEW: webview } : {}), ...(/^https:\/\/[a-z0-9.-]+(:\d+)?\/app$/i.test(account) ? { BR_ACCOUNT: account } : {}) };
66
66
  const start = () => {
67
67
  // Plain -Command (not encoded): its command line names the package folder, so the one process
68
68
  // matcher (stop / update / uninstall) finds the helper too.
package/src/tray.ps1 CHANGED
@@ -230,7 +230,7 @@ function Open-Window([string]$page = 'home', [switch]$Prewarm) {
230
230
  $f.MinimumSize = New-Object Drawing.Size([int](760 * $k), [int](520 * $k))
231
231
  $wv = New-Object Microsoft.Web.WebView2.WinForms.WebView2; $wv.Dock = 'Fill'; $wv.DefaultBackgroundColor = $bg
232
232
  $cp = New-Object Microsoft.Web.WebView2.WinForms.CoreWebView2CreationProperties
233
- $cp.UserDataFolder = Join-Path $env:LOCALAPPDATA 'Bridgerator\webview'; $wv.CreationProperties = $cp
233
+ $cp.UserDataFolder = if ($env:BR_WEBVIEW) { $env:BR_WEBVIEW } else { Join-Path $env:LOCALAPPDATA 'Bridgerator\webview' }; $wv.CreationProperties = $cp
234
234
  if ($env:BR_ZOOM) { $wv.ZoomFactor = [double]$env:BR_ZOOM }
235
235
  $f.Controls.Add($wv)
236
236
  $post = { param($o) if ($wv.CoreWebView2) { $wv.CoreWebView2.PostWebMessageAsJson(($o | ConvertTo-Json -Compress -Depth 4)) } }.GetNewClosure()
package/ui/i18n/en.json CHANGED
@@ -276,7 +276,7 @@
276
276
  "sound": "Play a sound",
277
277
  "offline": "When the PC goes offline",
278
278
  "queueDone": "When a queue task is done",
279
- "queueStalled": "When a queue task stalls (ChatGPT may be waiting for your OK in the chat)",
279
+ "queueStalled": "When a queue task stalls (ChatGPT may be waiting for your OK or show an error in the chat)",
280
280
  "limit": "Monthly limit warnings",
281
281
  "preview": "Preview",
282
282
  "light": "Light",
@@ -368,7 +368,7 @@
368
368
  "Attach files or folders to a task so ChatGPT knows where to look.",
369
369
  "In ChatGPT, say “Work through my Bridgerator queue”. Watch the ticks appear here.",
370
370
  "Edit, reorder or delete tasks any time. A failed task shows why it failed.",
371
- "ChatGPT may ask you to allow an action in the chat; the task waits for your answer. If a task stalls, Bridgerator shows a notice."
371
+ "ChatGPT may ask you to allow an action in the chat; the task waits for your answer. If a task stalls, Bridgerator shows a notice. \"Selected model is at capacity\" is ChatGPT's own error: press Retry in the chat or pick another model; the queue keeps its place."
372
372
  ],
373
373
  "tipLabel": "say",
374
374
  "tip": "Work through my Bridgerator queue"
package/ui/i18n/ru.json CHANGED
@@ -276,7 +276,7 @@
276
276
  "sound": "Звук",
277
277
  "offline": "Когда ПК уходит из сети",
278
278
  "queueDone": "Когда задача из очереди готова",
279
- "queueStalled": "Когда задача из очереди зависла (ChatGPT может ждать вашего «Разрешить» в чате)",
279
+ "queueStalled": "Когда задача из очереди зависла (ChatGPT может ждать вашего «Разрешить» или показать ошибку в чате)",
280
280
  "limit": "Предупреждения о лимите",
281
281
  "preview": "Пример",
282
282
  "light": "Светлая",
@@ -368,7 +368,7 @@
368
368
  "Прикрепите к задаче файлы или папки, чтобы ChatGPT знал, где искать.",
369
369
  "Скажите в ChatGPT «Work through my Bridgerator queue» и смотрите, как появляются галочки.",
370
370
  "Меняйте, переставляйте и удаляйте задачи когда угодно. У невыполненной задачи видно, почему.",
371
- "ChatGPT может попросить в чате разрешить действие — задача ждёт вашего ответа. Если задача зависла, Bridgerator покажет уведомление."
371
+ "ChatGPT может попросить в чате разрешить действие — задача ждёт вашего ответа. Если задача зависла, Bridgerator покажет уведомление. «Selected model is at capacity» — ошибка самого ChatGPT: нажмите в чате «Повторить» или выберите другую модель; очередь сохранит место."
372
372
  ],
373
373
  "tipLabel": "say",
374
374
  "tip": "Work through my Bridgerator queue"