arena-bridge 0.7.5 → 0.7.7
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/CHANGELOG.md +22 -0
- package/README.md +53 -9
- package/package.json +1 -1
- package/src/direct.mjs +1 -1
- package/src/hub.mjs +1 -1
- package/src/mac.mjs +12 -0
- package/src/mcp.mjs +1 -1
- package/src/policy.mjs +11 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,27 @@ All notable changes to this project are documented here.
|
|
|
4
4
|
The format follows [Keep a Changelog](https://keepachangelog.com/) and the project uses
|
|
5
5
|
[Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## 0.7.7
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- The path policy compares the authorized roots the same way as the target, so a root that goes
|
|
11
|
+
through a symlink (for example the temporary folder on macOS) no longer looks "outside".
|
|
12
|
+
- The release workflow installs twine and always attaches the macOS app to the release.
|
|
13
|
+
|
|
14
|
+
## 0.7.6
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- Release artifacts: every tag publishes the npm archive, the python sdist and wheel, and the
|
|
18
|
+
macOS app for arm64 and x86_64 as a GitHub Release.
|
|
19
|
+
- `install.sh`: one command installs the command line tool and the macOS app.
|
|
20
|
+
- `feature-tree.md`: the complete feature tree of the product.
|
|
21
|
+
- The ax-tree artifact opens in the app as a readable list of elements, with a switch to the raw
|
|
22
|
+
answer of the tool.
|
|
23
|
+
- `mac_see` asks for the accessibility tree on its own when the first answer has no elements.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- The README says in one line how to get past Gatekeeper.
|
|
27
|
+
|
|
7
28
|
## 0.7.5
|
|
8
29
|
|
|
9
30
|
### Added
|
|
@@ -13,6 +34,7 @@ The format follows [Keep a Changelog](https://keepachangelog.com/) and the proje
|
|
|
13
34
|
- The native macOS app: a trust window status with the time left, an "Approve for 3 h" button,
|
|
14
35
|
local notifications when a request needs a decision, the command arguments in the work log,
|
|
15
36
|
a click-through to screenshots and accessibility trees, and a button that copies the agent prompt.
|
|
37
|
+
- The app icon: `macos/ArenaBridge/Resources/AppIcon.png`, turned into an `.icns` by `build.sh`.
|
|
16
38
|
|
|
17
39
|
## 0.7.4
|
|
18
40
|
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<img src="https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square" alt="license">
|
|
13
13
|
<img src="https://img.shields.io/badge/node-%3E%3D18-green.svg?style=flat-square" alt="node">
|
|
14
14
|
<img src="https://img.shields.io/badge/dependencies-0-brightgreen.svg?style=flat-square" alt="dependencies">
|
|
15
|
-
<img src="https://img.shields.io/badge/tests-
|
|
15
|
+
<img src="https://img.shields.io/badge/tests-156%20passed-brightgreen.svg?style=flat-square" alt="tests">
|
|
16
16
|
</p>
|
|
17
17
|
|
|
18
18
|
<p align="center">
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
|
|
24
24
|
## Что это
|
|
25
25
|
|
|
26
|
+
Полное дерево функциональности — в [feature-tree.md](feature-tree.md).
|
|
27
|
+
|
|
26
28
|
Облачный агент (Arena.ai Agent Mode, Claude, Cursor, любой MCP-клиент) работает в песочнице
|
|
27
29
|
с выходом в интернет, но не имеет доступа к вашему компьютеру. `arena-bridge` — это маленький
|
|
28
30
|
HTTP-сервис на вашей машине: он слушает только localhost, выставляется наружу туннелем
|
|
@@ -41,16 +43,31 @@ HTTP-сервис на вашей машине: он слушает только
|
|
|
41
43
|
|
|
42
44
|
## Быстрый старт
|
|
43
45
|
|
|
46
|
+
Одна команда ставит и командную строку, и нативное приложение для macOS:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
curl -fsSL https://raw.githubusercontent.com/vernikr/arena-bridge/main/install.sh | sh
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Или по отдельности:
|
|
53
|
+
|
|
44
54
|
```bash
|
|
45
|
-
#
|
|
46
|
-
|
|
55
|
+
npm i -g arena-bridge # только командная строка
|
|
56
|
+
pip install arena-bridge # то же самое на Python
|
|
57
|
+
```
|
|
47
58
|
|
|
48
|
-
|
|
59
|
+
```bash
|
|
60
|
+
# 1. один раз: создать конфиг, проверить машину, поднять API + туннель
|
|
49
61
|
arena-bridge setup --root ~/projects --root ~/Documents
|
|
50
62
|
|
|
51
|
-
#
|
|
63
|
+
# 2. скопировать блок «Paste this into the agent chat» и вставить его в чат с агентом
|
|
52
64
|
```
|
|
53
65
|
|
|
66
|
+
> **macOS и Gatekeeper.** Приложение подписано локально, поэтому при первом запуске система может
|
|
67
|
+
> сказать «нельзя открыть, так как разработчик не проверен». Обойти это можно без терминала:
|
|
68
|
+
> правый клик по **Arena Bridge** в «Программах» → **Открыть** → **Открыть**. Через терминал:
|
|
69
|
+
> `xattr -dr com.apple.quarantine "/Applications/Arena Bridge.app"`.
|
|
70
|
+
|
|
54
71
|
`setup` печатает готовый промпт и публичный URL. Дальше — просто говорите агенту задачу.
|
|
55
72
|
|
|
56
73
|
Туннель под присмотром: если `cloudflared`/`ngrok` упадёт, мост поднимет его заново и сам
|
|
@@ -275,14 +292,40 @@ Apple Silicon.
|
|
|
275
292
|
|
|
276
293
|
| Блок в окне | Что делает |
|
|
277
294
|
| --- | --- |
|
|
278
|
-
| Статус | запущен/остановлен, версия, режим, число инструментов, публичный адрес, Telegram |
|
|
279
|
-
| Управление | «Запустить» / «Остановить» (служба `ai.arena.bridge`)
|
|
280
|
-
|
|
|
281
|
-
|
|
|
295
|
+
| Статус | запущен/остановлен, версия, режим, число инструментов, публичный адрес, уведомления, Telegram |
|
|
296
|
+
| Управление | «Запустить» / «Остановить» (служба `ai.arena.bridge`), «Настроить…», «Скопировать промпт агенту» |
|
|
297
|
+
| Доверенное окно | «Открыть на 3 ч» / «Закрыть» и статус «действует ещё 2:59» |
|
|
298
|
+
| Подтверждения | ожидающие запросы агента с кнопками «Разрешить» / «Разрешить на 3 ч» / «Отклонить» |
|
|
299
|
+
| Журнал | команды с аргументами, клик по скриншоту или ax-tree открывает его целиком, «Сохранить…» в файл (с ax-tree) |
|
|
300
|
+
|
|
301
|
+
Когда агенту нужно решение, приложение показывает системное уведомление macOS
|
|
302
|
+
«Approval needed» — в строке меню и в центре уведомлений. Внутри окна запрос тоже виден
|
|
303
|
+
сразу, в карточке «Подтверждения».
|
|
282
304
|
|
|
283
305
|
«Настроить…» собирает конфиг, службу и запуск одной кнопкой: туннель (ngrok/cloudflared),
|
|
284
306
|
зарезервированный домен, authtoken, папки для агента, Telegram (токен бота и chat id).
|
|
285
307
|
|
|
308
|
+
Иконка приложения лежит в `macos/ArenaBridge/Resources/AppIcon.png`; `build.sh` сам собирает
|
|
309
|
+
из неё `.icns` и кладёт в бандл.
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## Подтверждения в Telegram: кнопки
|
|
314
|
+
|
|
315
|
+
Под сообщением «Approval needed» появляются нативные кнопки:
|
|
316
|
+
|
|
317
|
+
```
|
|
318
|
+
Approve once Approve for 3h Deny
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
* **Approve once** — разрешить этот запрос и всё;
|
|
322
|
+
* **Approve for 3h** — разрешить и открыть доверенное окно на 3 часа для этого же инструмента
|
|
323
|
+
(команды больше не спрашивают);
|
|
324
|
+
* **Deny** — отклонить.
|
|
325
|
+
|
|
326
|
+
Кнопки работают и в приложении на Mac, и в Telegram; сообщение в Telegram после нажатия
|
|
327
|
+
переписывается на итог. Прежние команды `/approve <id>` и `/deny <id>` тоже работают.
|
|
328
|
+
|
|
286
329
|
---
|
|
287
330
|
|
|
288
331
|
## Доверенное окно: работать без подтверждений
|
|
@@ -292,6 +335,7 @@ arena-bridge trust --for 2h # всё, на 2
|
|
|
292
335
|
arena-bridge trust --for 30m --tools bash # только команды
|
|
293
336
|
arena-bridge trust --for 1h --paths ~/projects/my-app # только эта папка
|
|
294
337
|
arena-bridge trust --status
|
|
338
|
+
arena-bridge trust --status --json # для приложений и скриптов
|
|
295
339
|
arena-bridge trust --off
|
|
296
340
|
```
|
|
297
341
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arena-bridge",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.7",
|
|
4
4
|
"description": "Give a cloud AI agent (Arena.ai Agent Mode, Claude, Cursor, ...) controlled access to your own machine over HTTP/MCP: files, shell, Chrome and the macOS desktop, with an approval gate, trust windows and an audit log.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/direct.mjs
CHANGED
package/src/hub.mjs
CHANGED
package/src/mac.mjs
CHANGED
|
@@ -218,6 +218,18 @@ export function macTools(cfg = {}) {
|
|
|
218
218
|
const denied = isPermissionError(json, res);
|
|
219
219
|
if (res.exit_code !== 0 && !denied && !UNKNOWN.test(res.stderr || '')) break;
|
|
220
220
|
}
|
|
221
|
+
// no elements yet: ask for the accessibility tree on its own
|
|
222
|
+
if (!best || !best.elements.length) {
|
|
223
|
+
for (const variant of [
|
|
224
|
+
['see', '--tree', '--no-screenshot', '--json', ...targetFlags(args)],
|
|
225
|
+
['see', '--tree', '--no-screenshot', '--no-remote', '--json', ...targetFlags(args)],
|
|
226
|
+
]) {
|
|
227
|
+
const res = await run(peek(), variant, { timeout: 60 });
|
|
228
|
+
const json = parseJson(res.stdout);
|
|
229
|
+
const elements = collectElements(json);
|
|
230
|
+
if (elements.length) return { res, json, elements, variant };
|
|
231
|
+
}
|
|
232
|
+
}
|
|
221
233
|
return best;
|
|
222
234
|
};
|
|
223
235
|
|
package/src/mcp.mjs
CHANGED
|
@@ -48,7 +48,7 @@ export async function handleMcp(req, res, ctx) {
|
|
|
48
48
|
mcpResponse(id, {
|
|
49
49
|
protocolVersion: PROTOCOL_VERSION,
|
|
50
50
|
capabilities: { tools: { listChanged: false } },
|
|
51
|
-
serverInfo: { name: 'arena-bridge', version: '0.7.
|
|
51
|
+
serverInfo: { name: 'arena-bridge', version: '0.7.7' },
|
|
52
52
|
instructions:
|
|
53
53
|
'Tools operate the user\'s own machine. Dangerous operations may return ' +
|
|
54
54
|
'PROTECTED and require a local human approval.',
|
package/src/policy.mjs
CHANGED
|
@@ -26,6 +26,15 @@ export function resolveTarget(p, base = process.cwd()) {
|
|
|
26
26
|
return path.join(real, ...tail);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
/** Resolve a configured path the same way as a target, so symlinks never break the comparison. */
|
|
30
|
+
function resolveConfigured(p, base) {
|
|
31
|
+
try {
|
|
32
|
+
return resolveTarget(p, base);
|
|
33
|
+
} catch {
|
|
34
|
+
return path.resolve(String(p ?? ''));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
29
38
|
export function isInside(child, parent) {
|
|
30
39
|
const rel = path.relative(parent, child);
|
|
31
40
|
return rel === '' || (!rel.startsWith('..') && !path.isAbsolute(rel));
|
|
@@ -42,7 +51,7 @@ export function checkPath(p, cfg, base = process.cwd(), _opts = {}) {
|
|
|
42
51
|
} catch (e) {
|
|
43
52
|
return { ok: false, error: 'INVALID_PATH', reason: e.message };
|
|
44
53
|
}
|
|
45
|
-
for (const prot of cfg.protected || []) {
|
|
54
|
+
for (const prot of (cfg.protected || []).map((r) => resolveConfigured(r, base))) {
|
|
46
55
|
if (isInside(abs, prot)) {
|
|
47
56
|
return {
|
|
48
57
|
ok: false,
|
|
@@ -52,7 +61,7 @@ export function checkPath(p, cfg, base = process.cwd(), _opts = {}) {
|
|
|
52
61
|
};
|
|
53
62
|
}
|
|
54
63
|
}
|
|
55
|
-
const roots = cfg.roots || [];
|
|
64
|
+
const roots = (cfg.roots || []).map((r) => resolveConfigured(r, base));
|
|
56
65
|
if (!roots.some((r) => isInside(abs, r))) {
|
|
57
66
|
return {
|
|
58
67
|
ok: false,
|