arena-bridge 0.9.0 → 0.10.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.
- package/CHANGELOG.md +14 -0
- package/package.json +1 -1
- package/src/cli.mjs +6 -1
- package/src/telemetry.mjs +8 -0
- package/src/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ 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.10.0
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- `src/telemetry.mjs` — cold-start, RSS/heap and uptime exported to `doctor --json` (`telemetry` field) and as new `cold_start`/`memory`/`uptime` checks; `GET /health` still exposes `uptime_sec`/`trust_active`/`audit_count`/`log_size`.
|
|
11
|
+
- `docs/reference/errors.md` — single source error code table generated from `src/errors.mjs` (`PROTECTED`, `APPROVAL_*`, `TIMEOUT`, `UNKNOWN_TOOL` → retryable/hint mapping).
|
|
12
|
+
- `macos/ArenaBridge/Sources/MenuBar.swift` — optional `MenuBarExtra` popover (pending count + trust remaining), ready for Developer ID flow without replacing `WindowGroup`.
|
|
13
|
+
- `.github/workflows/release.yml` now publishes `SHA256SUMS` (+ `SHA256SUMS-apps` for zips) and `install.sh` verifies them (`shasum -a 256 -c`).
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- `AppIcon.png` recompressed 982 KB → 82 KB (quantized 1024px PNG, `iconutil` still generates 5 scales + @2x).
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- `release.yml` `if: success()` already — kept; macOS job now `needs: [release]` and uploads both arch zips with checksums.
|
|
20
|
+
|
|
7
21
|
## 0.9.0
|
|
8
22
|
|
|
9
23
|
### Added
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arena-bridge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
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/cli.mjs
CHANGED
|
@@ -16,7 +16,9 @@ import { startTunnel, isPortOpen } from './tunnel.mjs';
|
|
|
16
16
|
import { spawn, execSync, spawnSync } from 'node:child_process';
|
|
17
17
|
import { parseDuration, trustState, saveTrust, clearTrust } from './trust.mjs';
|
|
18
18
|
import { findPeekaboo } from './mac.mjs';
|
|
19
|
+
import { coldStartMs, mem, uptimeSec } from './telemetry.mjs';
|
|
19
20
|
import { tailLog, logPathForCli } from './log.mjs';
|
|
21
|
+
import { VERSION } from './version.mjs';
|
|
20
22
|
import { cmdBrowser as _cmdBrowserImpl } from './cli/browser.mjs';
|
|
21
23
|
import { findChrome, listProfiles, resolveProfile, sanitizeProfile } from './browser.mjs';
|
|
22
24
|
import { COMPLETION_BASH, COMPLETION_ZSH, COMPLETION_FISH } from './completion.mjs';
|
|
@@ -1046,6 +1048,9 @@ function cmdDoctor(args) {
|
|
|
1046
1048
|
} catch {}
|
|
1047
1049
|
const peek = findPeekaboo(cfg);
|
|
1048
1050
|
checks.push({ name: 'peekaboo (desktop control)', code: 'peekaboo', passed: !!peek, detail: peek || 'not installed - screen and mouse control are off', hint: 'brew install peekaboo or set peekabooPath' });
|
|
1051
|
+
try { const c = coldStartMs(); checks.push({ name: 'cold start', code: 'cold_start', passed: c < 2000, detail: `${c} ms`, hint: c > 2000 ? 'check bridge.log for slow imports' : '' }); } catch {}
|
|
1052
|
+
try { const m = mem(); if (m) checks.push({ name: 'memory rss', code: 'memory', passed: m.rss < 300*1024, detail: `${Math.round(m.rss/1024)} MB rss / ${Math.round(m.heapUsed/1024)} MB heap`, hint: m.rss > 300*1024 ? 'restart bridge if growing' : '' }); } catch {}
|
|
1053
|
+
try { const u = uptimeSec(); checks.push({ name: 'uptime', code: 'uptime', passed: true, detail: `${u}s`, hint: '' }); } catch {}
|
|
1049
1054
|
const chrome = [
|
|
1050
1055
|
'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
|
|
1051
1056
|
'/Applications/Chromium.app/Contents/MacOS/Chromium',
|
|
@@ -1053,7 +1058,7 @@ function cmdDoctor(args) {
|
|
|
1053
1058
|
checks.push({ name: 'chrome', code: 'chrome', passed: !!chrome, detail: chrome || 'not found in /Applications', hint: 'install Chrome to use browser tools' });
|
|
1054
1059
|
const ok = checks.every(c => c.passed);
|
|
1055
1060
|
if (isJson) {
|
|
1056
|
-
console.log(JSON.stringify({ ok, version: VERSION, publicUrl: cfg.publicUrl || null, node: process.version, checks }, null, 2));
|
|
1061
|
+
try { const t = { cold_start_ms: coldStartMs(), memory: mem(), uptime_sec: uptimeSec() }; console.log(JSON.stringify({ ok, version: VERSION, publicUrl: cfg.publicUrl || null, node: process.version, telemetry: t, checks }, null, 2)); } catch { console.log(JSON.stringify({ ok, version: VERSION, publicUrl: cfg.publicUrl || null, node: process.version, checks }, null, 2)); }
|
|
1057
1062
|
} else {
|
|
1058
1063
|
for (const c of checks) {
|
|
1059
1064
|
console.log(`${c.passed ? '✓' : '✗'} ${c.name.padEnd(18)} ${c.detail}`);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// telemetry: cold-start + memory + timing for doctor/status/health
|
|
2
|
+
let t0 = Date.now();
|
|
3
|
+
try { t0 = Number(process.env.ARENA_BRIDGE_T0) || Date.now(); } catch {}
|
|
4
|
+
export function coldStartMs() { try { return Date.now() - t0; } catch { return 0; } }
|
|
5
|
+
export function mem() {
|
|
6
|
+
try { const m=process.memoryUsage(); return { rss: Math.round(m.rss/1024), heapUsed: Math.round(m.heapUsed/1024), heapTotal: Math.round(m.heapTotal/1024) }; } catch { return null; }
|
|
7
|
+
}
|
|
8
|
+
export function uptimeSec() { try { return Math.round(process.uptime()); } catch { return 0; } }
|