bridgerator 1.0.8 → 1.1.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.
Files changed (76) hide show
  1. package/README.md +76 -14
  2. package/assets/bridgerator.ico +0 -0
  3. package/assets/icon-16.png +0 -0
  4. package/assets/icon-20.png +0 -0
  5. package/assets/icon-24.png +0 -0
  6. package/assets/icon-256.png +0 -0
  7. package/assets/icon-32.png +0 -0
  8. package/assets/icon-48.png +0 -0
  9. package/assets/icon-64.png +0 -0
  10. package/assets/logo.svg +1 -0
  11. package/install.ps1 +455 -56
  12. package/npm-shrinkwrap.json +8621 -0
  13. package/package.json +55 -49
  14. package/recipes/backup-folder.json +31 -0
  15. package/recipes/clean-downloads.json +48 -0
  16. package/recipes/disk-report.json +66 -0
  17. package/recipes/sort-folder.json +49 -0
  18. package/recipes/update-apps.json +25 -0
  19. package/src/ask-lib.ps1 +230 -0
  20. package/src/ask.mjs +51 -0
  21. package/src/ask.ps1 +17 -0
  22. package/src/automations.mjs +673 -0
  23. package/src/batch.mjs +221 -0
  24. package/src/bridge.mjs +720 -29
  25. package/src/cli.mjs +529 -74
  26. package/src/confirm.mjs +418 -0
  27. package/src/dc-config-hooks.mjs +18 -8
  28. package/src/dc-isolate.mjs +5 -0
  29. package/src/delegate.mjs +555 -0
  30. package/src/docs-tool.mjs +494 -0
  31. package/src/doctor.mjs +200 -0
  32. package/src/events.mjs +21 -0
  33. package/src/extra-tools.mjs +122 -0
  34. package/src/guard.mjs +34 -0
  35. package/src/notice.mjs +84 -23
  36. package/src/pair.mjs +27 -4
  37. package/src/pc-check.mjs +112 -0
  38. package/src/pc-check.ps1 +103 -0
  39. package/src/pc-text.mjs +94 -0
  40. package/src/pdf-font.mjs +245 -0
  41. package/src/photos-tool.mjs +187 -0
  42. package/src/photos.ps1 +145 -0
  43. package/src/plan.mjs +90 -0
  44. package/src/policy.mjs +293 -124
  45. package/src/queue.mjs +194 -0
  46. package/src/recent.mjs +48 -0
  47. package/src/recipes.mjs +108 -0
  48. package/src/recycle.mjs +185 -0
  49. package/src/recycle.ps1 +110 -0
  50. package/src/screen-tool.mjs +185 -0
  51. package/src/screen.ps1 +285 -0
  52. package/src/search-tool.mjs +189 -0
  53. package/src/search.ps1 +129 -0
  54. package/src/settings-tool.mjs +186 -0
  55. package/src/setup-tool.mjs +129 -0
  56. package/src/software-tool.mjs +185 -0
  57. package/src/telemetry.mjs +86 -0
  58. package/src/tool-lib.mjs +177 -0
  59. package/src/tool-text.mjs +45 -0
  60. package/src/tray.mjs +97 -0
  61. package/src/tray.ps1 +359 -0
  62. package/src/undo.mjs +313 -0
  63. package/src/win.mjs +17 -0
  64. package/ui/app.css +388 -0
  65. package/ui/app.js +868 -0
  66. package/ui/i18n/en.json +598 -0
  67. package/ui/i18n/ru.json +598 -0
  68. package/ui/index.html +26 -0
  69. package/vendor/webview2/LICENSE.txt +27 -0
  70. package/vendor/webview2/Microsoft.Web.WebView2.Core.dll +0 -0
  71. package/vendor/webview2/Microsoft.Web.WebView2.WinForms.dll +0 -0
  72. package/vendor/webview2/NOTICE.txt +85 -0
  73. package/vendor/webview2/SHA256SUMS.txt +4 -0
  74. package/vendor/webview2/SOURCE.txt +1 -0
  75. package/vendor/webview2/arm64/WebView2Loader.dll +0 -0
  76. package/vendor/webview2/x64/WebView2Loader.dll +0 -0
package/README.md CHANGED
@@ -34,35 +34,46 @@ Details: https://bridgerator.recondeck.com/pricing
34
34
  ```powershell
35
35
  & ([scriptblock]::Create((irm https://bridgerator.recondeck.com/install.ps1)))
36
36
  ```
37
- It downloads portable Node.js LTS if missing (checksum-verified, no admin), installs this package and runs `bridgerator.cmd setup`.
37
+ It downloads the signed Bridgerator app for Windows (`bridgerator.exe` with Node.js inside — nothing else to install; x64 and ARM64), checks it (SHA256 of the download and of every file), puts it into `%LOCALAPPDATA%\Bridgerator\app` and runs `bridgerator.cmd setup`. An older npm install is replaced, its key and settings kept. `-UseNpm` installs this npm package instead (your Node.js 22+, or a portable Node.js 24 LTS, checksum-verified; the package SHA256-checked, `--ignore-scripts`). Works under the default Restricted execution policy. `-NoTelemetry` turns off the usage counts (see Privacy).
38
38
  3. A browser tab opens with a code: check that it matches the one in PowerShell and click **Connect this computer**. Done — no key to copy.
39
39
 
40
40
  Update later with the same line (the key and folder settings are kept). Prefer to read first? Download `install.ps1`, read it, then run it.
41
41
  Servers or PCs without a browser: create a device key in your account (Add a computer → Advanced) and add `-Token <device key>` to the line.
42
42
 
43
- Manual install (PowerShell): `$env:PUPPETEER_SKIP_DOWNLOAD=1; npm.cmd install -g bridgerator`, then `bridgerator.cmd setup` (or `bridgerator.cmd setup --token <key>`). The variable skips a ~700 MB Chrome download that only PDF export needs; PDF export fetches a browser itself on first use.
43
+ Manual install (PowerShell): `$env:PUPPETEER_SKIP_DOWNLOAD=1; npm.cmd install -g bridgerator --ignore-scripts`, then `bridgerator.cmd setup` (or `bridgerator.cmd setup --token <key>`). The variable skips a ~700 MB Chrome download that only PDF export needs; PDF export fetches a browser itself on first use.
44
44
 
45
45
  Other MCP clients: server URL `https://mcp.bridgerator.recondeck.com/mcp`, OAuth sign-in.
46
46
 
47
47
  ## Access rules — what the assistant can and cannot touch
48
48
 
49
- Config: `%APPDATA%\Bridgerator\config.json` (written by `setup`, edit and restart to change).
49
+ Config: `%APPDATA%\Bridgerator\config.json` (written by `setup` and the window; a running bridge picks up a hand edit within seconds — lowering protection waits for Apply in a notification on the PC). Every setting can also be read and changed by the assistant with `bridgerator_settings` (lowering protection / widening access → your OK on the PC).
50
+
51
+ By default nothing is restricted (like the engine on its own), except that **deletions go to the Recycle Bin** and **file changes can be undone**.
50
52
 
51
53
  | Key | Meaning | Default |
52
54
  |---|---|---|
53
- | `allowedDirectories` | File tools work only inside these folders (enforced by the engine). Empty = whole disk. | your user folder |
54
- | `deniedDirectories` | Folders excluded **inside** the allowed ones (enforced by Bridgerator, see below). | `~\.ssh`, `~\AppData` |
55
- | `blockedCommands` | Commands the engine refuses to run. Leave it out to keep the built-in list. | built-in list (`format`, `diskpart`, `reg`, `net`, `sc`, `runas`, `netsh`, `takeown`, …) |
56
- | `disabledTools` | Tools never shown to the assistant, e.g. `["start_process","interact_with_process"]` to turn the terminal off. | none |
55
+ | `allowedDirectories` | File tools work only inside these folders. Empty = all folders except the always-blocked ones. | empty (all folders) |
56
+ | `deniedDirectories` | Folders excluded **inside** the allowed ones (enforced by Bridgerator, see below). Always excluded, can't be removed: Bridgerator itself — `%APPDATA%\Bridgerator`, `%LOCALAPPDATA%\Bridgerator` (snapshots too), the package in `%APPDATA%\npm`. | none |
57
+ | `protectSensitive` | "Protect sensitive folders": also excludes `%APPDATA%\npm`, Startup, `Documents\WindowsPowerShell`/`PowerShell`, `~\.ssh .aws .azure .kube .docker .gnupg .config .npmrc .git-credentials .gitconfig .claude`, `~\AppData`. | `false` |
58
+ | `recycleBin` | A plain delete command (`Remove-Item`, `del`, `erase`, `rd`/`rmdir`, `rm` with literal paths or a wildcard in the last part) moves the items to the Recycle Bin instead; no Recycle Bin on that drive (network, many USB sticks) → asked on the PC first. Scripts, pipelines and other programs that delete are not caught: a safety net, not a guarantee. | `true` |
59
+ | `snapshots` | `{enabled, days, maxMb, maxFileMb}`: a copy of a file before the assistant writes, edits, moves or (through the Recycle Bin path) deletes it, in `%LOCALAPPDATA%\Bridgerator\snapshots`; Undo in the window (Recent → Undo, "Undo AI changes…" per task / batch) and `bridgerator_undo`. A file changed after the assistant's action is never overwritten. Bigger files get no copy ("no undo"). | on, 7 days, 500 MB, 50 MB |
60
+ | `fuse` | `{enabled, limit}`: more than `limit` deletions / moves within a minute → Bridgerator pauses itself and asks on the PC whether to continue (no answer = stays paused). | off, 20 |
61
+ | `keepAwake` | The PC doesn't go to sleep while the assistant works or the task queue has work (mains power only; the screen can still turn off). | `true` |
62
+ | `readOnlyDirectories` | Readable, but `write_file`, `edit_block`, `move_file` (either side), `create_directory` are refused. The terminal is not bound by it. `bridgerator.cmd read-only add\|remove <dir>` | none |
63
+ | `confirm.ini` (next to config.json) | Off by default. When on, a Windows notification on the PC (Allow / Allow 10 min / Deny, "Allow always" in its `...` menu; no answer in 2 min = Deny) before **risky** calls: `delete` and `dangerous_commands` (pattern lists, a safety net — an obfuscated command can slip through), optionally `write_files`, `move`, `any_command`, plus your own `[patterns]`. Re-read on every call. `bridgerator.cmd confirm on\|off [category]`; the assistant can only ask (`request_confirm_off`, approved on the PC). If notifications are off for Bridgerator, a small window in the bottom-right is used instead; with Do Not Disturb the request is denied after 2 minutes. | off |
64
+ | `blockedCommands` | A safety net of the engine: refuses commands by their first word. Not a security boundary. Leave it out to keep the built-in list. | built-in list (`format`, `diskpart`, `reg`, `net`, `sc`, `runas`, `netsh`, `takeown`, …) |
65
+ | `telemetryEnabled` | Anonymous usage counts (see Privacy). `bridgerator.cmd telemetry off\|on` | `true` |
66
+ | `disabledTools` | Tools the assistant can't use. The access presets set the terminal here: Read only (terminal off + every folder read-only), Files (terminal off), Full (default). `start_process`, `interact_with_process`, `kill_process` stay listed and are refused while the terminal is off. | none |
57
67
 
58
68
  Full file, search and terminal toolset, including ChatGPT widgets (file preview,
59
69
  config view). Hidden: `set_config_value` (would let the assistant change its own limits), feedback and
60
- usage-stats tools.
70
+ usage-stats tools, `write_pdf` and `get_recent_tool_calls`; `read_file` with `isUrl` and UNC / device
71
+ paths (`\\server\share`, `\\?\`, `\\.\`) are refused. Path arguments are checked at any depth.
61
72
 
62
73
  How exclusions work (`src/policy.mjs`): every path argument is resolved (symlinks and junctions
63
74
  included) and refused if it lies inside an excluded folder; result lines that mention an excluded
64
- path (search hits, recursive listings) are removed; `set_config_value` is never exposed, so the
65
- assistant cannot change these limits.
75
+ path (search hits, recursive listings) are removed. The file tools can't reach the settings folder; the
76
+ settings tool (`bridgerator_settings`) can only lower protection after your OK on the PC.
66
77
 
67
78
  ⚠ **The terminal is not a folder sandbox.** A shell command runs with your Windows user's rights
68
79
  and can read anything you can. Bridgerator refuses commands that literally name an excluded folder,
@@ -71,15 +82,60 @@ but that is a courtesy, not a boundary. If folder limits must be strict, add the
71
82
 
72
83
  The bridge runs as **your** Windows user (hidden scheduled task at logon), never as SYSTEM.
73
84
 
74
- Bridgerator gives its bundled engine its **own** config folder (`%APPDATA%\Bridgerator\dc`, see `src/dc-isolate.mjs`): if you already run the same open-source MCP server for Claude or another app, its settings and folder limits are not touched. The engine keeps a local log of recent tool calls in that folder; it never leaves your PC.
85
+ Bridgerator gives its bundled engine its **own** config folder (`%APPDATA%\Bridgerator\dc`, see `src/dc-isolate.mjs`): if you already run the same open-source MCP server for Claude or another app, its settings and folder limits are not touched. The engine keeps a local log of recent tool calls in that folder (the per-call argument log is turned off); it never leaves your PC.
86
+
87
+ ## Tray, window and task queue
88
+
89
+ While the bridge runs, a tray icon shows its state (green online, grey offline, yellow paused; a
90
+ yellow / red badge when Pro is ending or the Free limit is near). Right-click: status line, **Open
91
+ Bridgerator**, **Task queue**, **Confirm on this PC** (on / off), **Pause** (15 min, 1 hour, until
92
+ resumed), **Open account**, **Help**, **Quit**. Double-click opens the window: Status, Task queue,
93
+ Recent on this PC, Safety (confirmations, folders, read-only folders), Notifications, Settings
94
+ (theme System / Light / Dark for the window and our pop-ups, English / Russian, computer name,
95
+ start with Windows, usage stats, local history, updates, uninstall), Help.
96
+ The tray helper (`src/tray.ps1`, hidden PowerShell, stdin/stdout JSON lines, no network) also shows
97
+ the confirmation and setup notifications. The window is WebView2 (`ui/`; SDK DLLs in
98
+ `vendor/webview2`, official NuGet package Microsoft.Web.WebView2 1.0.4258.31, SHA256 in
99
+ `vendor/webview2/SHA256SUMS.txt`); without the runtime the account page opens instead.
100
+ Stored only on this PC: the task queue (`%APPDATA%\Bridgerator\queue.json`; tools `queue_list`,
101
+ `queue_next`, `queue_update`, `queue_add`, `queue_edit`, `queue_reorder`) and the recent calls with
102
+ their command / path (memory; `recent.jsonl` for 7 days only with "Keep a local history" on).
103
+
104
+ **Several chats at once.** Several ChatGPT chats can work on the same PC in parallel: calls run
105
+ concurrently (a slow command doesn't hold up other chats), `queue_next` never hands the same task to
106
+ two chats, and at most 8 actions run at a time — extra ones wait up to 30 s, then get a "busy" answer
107
+ that is not counted.
108
+
109
+ ## Talk to ChatGPT
110
+
111
+ Say these in any ChatGPT chat with Bridgerator connected (several chats can work at once):
112
+
113
+ | Say | What happens |
114
+ |---|---|
115
+ | `Set up Bridgerator` | ChatGPT asks a few questions and suggests settings; you confirm them on the PC. |
116
+ | `Add these tasks to my Bridgerator queue: …` | The tasks go into the queue on this PC (up to 100 at a time). |
117
+ | `Work through my Bridgerator queue` | ChatGPT takes the tasks one by one and marks each done / failed with a note. |
118
+ | `Continue my Bridgerator queue` | In a new chat: picks up tasks another chat left unfinished for 30 min. |
119
+ | `Show my Bridgerator settings` | Folders, confirmations, notifications — what is set now (`bridgerator_settings`). |
120
+ | `Turn on confirmations for deletions` | Raising protection applies at once; turning it off needs your OK on the PC. |
121
+
122
+ Folders: with no list (the default) ChatGPT may work in all folders except the always-blocked ones;
123
+ with a list, only in those folders. Narrowing access applies directly; widening it (adding a folder to
124
+ the list, going back to all folders) needs your OK on the PC.
75
125
 
76
126
  ## Commands
77
127
 
78
128
  ```
79
- bridgerator.cmd setup [--token <key> | --pair] [--allow <dir>]... [--deny <dir>]... # pair in the browser (no key yet, key rejected, or --pair) + config + autostart + start
129
+ bridgerator.cmd setup [--token <key> | --pair] [--allow <dir>]... [--deny <dir>]... [--read-only <dir>]... [--no-telemetry]
130
+ # pair in the browser (no key yet, key rejected, or --pair) + config + autostart + start
80
131
  bridgerator.cmd run # foreground (what autostart runs)
81
- bridgerator.cmd status # config (token masked) + log tail
82
- bridgerator.cmd uninstall --all # THE uninstall: stop, remove autostart, settings + key, the package and the Node.js the installer added
132
+ bridgerator.cmd stop # stop it (starts again at the next logon)
133
+ bridgerator.cmd status [--json] # running / online / key rejected (+ config with --json)
134
+ bridgerator.cmd confirm on|off [category] # confirmation on this PC (confirm.ini)
135
+ bridgerator.cmd setup done # skip the guided setup in ChatGPT (bridgerator_setup)
136
+ bridgerator.cmd read-only add|remove <dir> # read-only folders
137
+ bridgerator.cmd telemetry on|off # anonymous usage counts
138
+ bridgerator.cmd uninstall --all # THE uninstall: stop, remove autostart, settings + key, the program files (app folder or npm package) and the Node.js the installer added
83
139
  bridgerator.cmd uninstall [--keep-config] # stop, remove autostart and %APPDATA%\Bridgerator (kept with --keep-config); program files stay
84
140
  ```
85
141
  Log: `%APPDATA%\Bridgerator\bridge.log`. Stopping the bridge cuts access immediately. After uninstalling, also remove the computer on the account page: https://bridgerator.recondeck.com/app
@@ -88,6 +144,12 @@ Log: `%APPDATA%\Bridgerator\bridge.log`. Stopping the bridge cuts access immedia
88
144
 
89
145
  File contents and command output go to ChatGPT (OpenAI) as tool results; the relay forwards them
90
146
  in memory and does not store them. Engine telemetry, remote feature flags and any browser pop-ups are turned off by the bridge.
147
+
148
+ Bridgerator's own usage counts (`src/telemetry.mjs`, HTTPS to `https://bridgerator.recondeck.com/t`):
149
+ events install, update, uninstall and a daily heartbeat with a random install id, bridge version,
150
+ Windows version, OS language, Node.js version, and per-tool call / error counts of the last 24 h.
151
+ Never paths, file names, commands, arguments, outputs or your e-mail. Off: `bridgerator.cmd telemetry off`,
152
+ `"telemetryEnabled": false`, or the installer's `-NoTelemetry`.
91
153
  Policy: https://bridgerator.recondeck.com/privacy
92
154
 
93
155
  ## Development
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" width="64" height="64"><rect width="64" height="64" rx="15" fill="#2251E6"/><path d="M17 42 Q32 12 47 42" fill="none" stroke="#fff" stroke-width="5.5" stroke-linecap="round"/><circle cx="17" cy="44" r="6.5" fill="#fff"/><circle cx="47" cy="44" r="6.5" fill="#7fe0ff"/></svg>