arena-bridge 0.7.11 → 0.7.14

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 CHANGED
@@ -4,6 +4,28 @@ 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.14
8
+
9
+ ### Fixed
10
+ - The tests never write to the real configuration of the machine: every test checks that the
11
+ folder it uses is a temporary one.
12
+
13
+ ## 0.7.13
14
+
15
+ ### Fixed
16
+ - The app icon keeps its transparency: the area around the shape is empty, not a white sheet.
17
+
18
+ ### Changed
19
+ - The background service in the system settings is called like the app, not "node" or "python".
20
+ - The name of the app lives in one constant per runtime (`APP_NAME` in `src/app.mjs`,
21
+ `arena_bridge/app.py` and `Sources/AppInfo.swift`), and the build takes it from there.
22
+
23
+ ## 0.7.12
24
+
25
+ ### Fixed
26
+ - The Python package now imports on Python 3.9, matching the declared minimum version.
27
+ - CI checks the Python implementation on Python 3.9 and 3.11.
28
+
7
29
  ## 0.7.11
8
30
 
9
31
  ### Changed
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-156%20passed-brightgreen.svg?style=flat-square" alt="tests">
15
+ <img src="https://img.shields.io/badge/tests-160%20passed-brightgreen.svg?style=flat-square" alt="tests">
16
16
  </p>
17
17
 
18
18
  <p align="center">
@@ -304,6 +304,9 @@ Apple Silicon. Готовые сборки для обеих архитекту
304
304
  | Подтверждения | ожидающие запросы агента с кнопками «Разрешить» / «Разрешить на 3 ч» / «Отклонить» |
305
305
  | Журнал | команды с аргументами, клик по скриншоту или ax-tree открывает его целиком, «Сохранить…» в файл (с ax-tree) |
306
306
 
307
+ Окно следит за машиной само: статус, подтверждения и доверенное окно обновляются каждые
308
+ несколько секунд, журнал — чуть реже. Кнопка обновления (⌘R) есть на всякий случай.
309
+
307
310
  Когда агенту нужно решение, приложение показывает системное уведомление macOS
308
311
  «Approval needed» — в строке меню и в центре уведомлений. Внутри окна запрос тоже виден
309
312
  сразу, в карточке «Подтверждения».
@@ -312,7 +315,20 @@ Apple Silicon. Готовые сборки для обеих архитекту
312
315
  зарезервированный домен, authtoken, папки для агента, Telegram (токен бота и chat id).
313
316
 
314
317
  Иконка приложения лежит в `macos/ArenaBridge/Resources/AppIcon.png`; `build.sh` сам собирает
315
- из неё `.icns` и кладёт в бандл.
318
+ из неё `.icns` и кладёт в бандл. Вокруг знака прозрачно — на светлом фоне иконка не белая.
319
+
320
+ ### Как переименовать
321
+
322
+ Имя приложения лежит в трёх местах, и тесты следят, чтобы они совпадали:
323
+
324
+ | Файл | Что там |
325
+ | --- | --- |
326
+ | `src/app.mjs` | `APP_NAME`, `APP_ID`, `SERVICE_LABEL` — для командной строки |
327
+ | `arena_bridge/app.py` | то же самое для Python |
328
+ | `macos/ArenaBridge/Sources/AppInfo.swift` | то же самое для приложения; `build.sh` берёт имя отсюда |
329
+
330
+ Фоновая служба в «Системных настройках → Вход» называется так же, как приложение, а не
331
+ «node» или «python»: запускает её небольшой скрипт `~/.arena-bridge/Arena Bridge`.
316
332
 
317
333
  ---
318
334
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arena-bridge",
3
- "version": "0.7.11",
3
+ "version": "0.7.14",
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/app.mjs ADDED
@@ -0,0 +1,8 @@
1
+ /** The name the app shows on the machine: the window, the icon, the background service. */
2
+ export const APP_NAME = 'Arena Bridge';
3
+
4
+ /** The bundle identifier of the macOS app. */
5
+ export const APP_ID = 'com.arenabridge.app';
6
+
7
+ /** The label of the launchd service. */
8
+ export const SERVICE_LABEL = 'ai.arena.bridge';
package/src/direct.mjs CHANGED
@@ -73,7 +73,7 @@ export function createDirectServer(cfg, engine) {
73
73
  ok: true,
74
74
  mode: 'direct',
75
75
  device: cfg.device,
76
- version: '0.7.11',
76
+ version: '0.7.14',
77
77
  uptime_sec: Math.round(process.uptime()),
78
78
  });
79
79
  }
package/src/hub.mjs CHANGED
@@ -90,7 +90,7 @@ export function createHubServer(cfg) {
90
90
  return sendJson(res, 200, {
91
91
  ok: true,
92
92
  mode: 'hub',
93
- version: '0.7.11',
93
+ version: '0.7.14',
94
94
  devices: [...devices.keys()],
95
95
  });
96
96
  }
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.11' },
51
+ serverInfo: { name: 'arena-bridge', version: '0.7.14' },
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/service.mjs CHANGED
@@ -4,13 +4,20 @@ import path from 'node:path';
4
4
  import { execFileSync } from 'node:child_process';
5
5
  import { fileURLToPath } from 'node:url';
6
6
  import { CONFIG_DIR, ensureDirs } from './config.mjs';
7
-
8
- const LABEL = 'ai.arena.bridge';
7
+ import { APP_NAME, SERVICE_LABEL as LABEL } from './app.mjs';
9
8
 
10
9
  export function plistPath() {
11
10
  return path.join(os.homedir(), 'Library', 'LaunchAgents', `${LABEL}.plist`);
12
11
  }
13
12
 
13
+ /**
14
+ * The launchd agent starts this script instead of the node binary, so the system settings
15
+ * show the name of the app and not "node".
16
+ */
17
+ export function runnerPath() {
18
+ return path.join(CONFIG_DIR, APP_NAME);
19
+ }
20
+
14
21
  export function logDir() {
15
22
  return path.join(CONFIG_DIR, 'logs');
16
23
  }
@@ -21,8 +28,14 @@ function cliEntry() {
21
28
  return path.join(here, '..', 'bin', 'arena-bridge.mjs');
22
29
  }
23
30
 
24
- function plistXml({ bin, domain, authtoken, port } = {}) {
25
- const cli = cliEntry();
31
+ function runnerScript() {
32
+ return `#!/bin/sh
33
+ # ${APP_NAME}: the background service of the bridge.
34
+ exec "${process.execPath}" "${cliEntry()}" "$@"
35
+ `;
36
+ }
37
+
38
+ export function plistXml({ bin, domain, authtoken, port } = {}) {
26
39
  const logs = logDir();
27
40
  const extra = [];
28
41
  if (bin) extra.push('--bin', String(bin));
@@ -36,8 +49,7 @@ function plistXml({ bin, domain, authtoken, port } = {}) {
36
49
  <key>Label</key><string>${LABEL}</string>
37
50
  <key>ProgramArguments</key>
38
51
  <array>
39
- <string>${process.execPath}</string>
40
- <string>${cli}</string>
52
+ <string>${runnerPath()}</string>
41
53
  <string>tunnel</string>
42
54
  ${extra.map((a) => ` <string>${a}</string>`).join('\n')}
43
55
  </array>
@@ -74,6 +86,8 @@ export function serviceInstall(options = {}) {
74
86
  fs.mkdirSync(logDir(), { recursive: true });
75
87
  const dir = path.dirname(plistPath());
76
88
  fs.mkdirSync(dir, { recursive: true });
89
+ fs.writeFileSync(runnerPath(), runnerScript(), { mode: 0o755 });
90
+ fs.chmodSync(runnerPath(), 0o755);
77
91
  fs.writeFileSync(plistPath(), plistXml(options));
78
92
  launchctl(['bootout', `gui/${process.getuid()}/${LABEL}`], { quiet: true });
79
93
  const out = launchctl(['bootstrap', `gui/${process.getuid()}`, plistPath()], { quiet: true });