arena-bridge 0.7.12 → 0.7.13

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,16 @@ 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.13
8
+
9
+ ### Fixed
10
+ - The app icon keeps its transparency: the area around the shape is empty, not a white sheet.
11
+
12
+ ### Changed
13
+ - The background service in the system settings is called like the app, not "node" or "python".
14
+ - The name of the app lives in one constant per runtime (`APP_NAME` in `src/app.mjs`,
15
+ `arena_bridge/app.py` and `Sources/AppInfo.swift`), and the build takes it from there.
16
+
7
17
  ## 0.7.12
8
18
 
9
19
  ### Fixed
package/README.md CHANGED
@@ -315,7 +315,20 @@ Apple Silicon. Готовые сборки для обеих архитекту
315
315
  зарезервированный домен, authtoken, папки для агента, Telegram (токен бота и chat id).
316
316
 
317
317
  Иконка приложения лежит в `macos/ArenaBridge/Resources/AppIcon.png`; `build.sh` сам собирает
318
- из неё `.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`.
319
332
 
320
333
  ---
321
334
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arena-bridge",
3
- "version": "0.7.12",
3
+ "version": "0.7.13",
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.12',
76
+ version: '0.7.13',
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.12',
93
+ version: '0.7.13',
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.12' },
51
+ serverInfo: { name: 'arena-bridge', version: '0.7.13' },
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 });