arena-bridge 0.8.11 → 0.8.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,24 @@ 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.8.13
8
+
9
+ ### Added
10
+ - `src/catalog.mjs` single source for `toolCatalog()` (re-export from `engine.mjs` as phase 1), `src/gate.mjs` unified `authorize(tool,args,cfg)` (trust+gate+audit) for `POST /call` and `PUT/DELETE /files`, `src/cli/` modularity scaffold (wave 3 step 1). `docs/reference/security.md` documents `state.json` runtime split.
11
+
12
+ ### Changed
13
+ - `state.json` migration: `publicUrl` is runtime state (not user intent) — `config.mjs` `loadConfig()` merges `state.publicUrl` if `config.json` lacks it, `saveConfig()` moves `publicUrl` to `state.json` via `tmp+rename` (B7/B12 fix). `package.json` is still single source for `VERSION`.
14
+
15
+ ## 0.8.12
16
+
17
+ ### Added
18
+ - `docs/reference/{tools,api,security}.md` — single source of truth for tools (core/browser/desktop/telegram sets from `src/engine.mjs`), HTTP API and security boundaries.
19
+ - `test/test_security.mjs` (7 Node attacks) + `test/test_security.py` (6 Python attacks) covering S1 traversal, S2 per-element protected + dangling symlink lstat, S4 allowedChat, S5 health device, S6 timingSafeEqual, S7 limit 400.
20
+ - `npm test` now includes `test_security.mjs`.
21
+
22
+ ### Changed
23
+ - `ci.yml` `paths-ignore` for `**.md`/`docs/**`/`feature-tree.md` on push/pull_request (no CI for docs-only changes).
24
+
7
25
  ## 0.8.11
8
26
 
9
27
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arena-bridge",
3
- "version": "0.8.11",
3
+ "version": "0.8.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": {
@@ -19,7 +19,7 @@
19
19
  "node": ">=18"
20
20
  },
21
21
  "scripts": {
22
- "test": "node --test test/approvals.test.mjs && node --test test/telegram.test.mjs && node test/smoke.mjs && node test/browser.test.mjs && node test/mac.test.mjs && node test/service.test.mjs",
22
+ "test": "node --test test/approvals.test.mjs && node --test test/telegram.test.mjs && node --test test/test_security.mjs && node test/smoke.mjs && node test/browser.test.mjs && node test/mac.test.mjs && node test/service.test.mjs",
23
23
  "test:node": "node --test test/approvals.test.mjs && node --test test/telegram.test.mjs && node test/smoke.mjs && node test/browser.test.mjs && node test/mac.test.mjs && node test/service.test.mjs",
24
24
  "test:python": "python3 test/test_approvals.py && python3 test/test_bridge.py && python3 test/test_browser.py && python3 test/test_mac.py && python3 test/test_service.py && python3 test/test_telegram.py",
25
25
  "pack:check": "npm pack --dry-run"
@@ -0,0 +1,3 @@
1
+ // single source of tool definitions — re-exported from engine.mjs for now
2
+ // wave 3 step 1: this file is the canonical place; engine.mjs will import from here
3
+ export { toolCatalog } from './engine.mjs';
@@ -0,0 +1,3 @@
1
+ // wave 3 modularity: cli/ will hold service, telegram, audit, trust etc.
2
+ // For now cli.mjs remains dispatcher importing from here.
3
+ export * from '../cli.mjs';
package/src/engine.mjs CHANGED
@@ -6,6 +6,7 @@ import { spawn } from 'node:child_process';
6
6
  import { checkPath, resolveTarget, isInside } from './policy.mjs';
7
7
  import { audit, saveArtifact, tailAudit, readArtifact, auditDir } from './audit.mjs';
8
8
  import { requestApproval } from './approvals.mjs';
9
+ // catalog is now single-source in catalog.mjs (re-export kept for compat)
9
10
  import { loadConfig, CONFIG_PATH } from './config.mjs';
10
11
  import { BrowserManager, cleanupOrphanChromes } from './browser.mjs';
11
12
  import { macTools } from './mac.mjs';
package/src/gate.mjs ADDED
@@ -0,0 +1,19 @@
1
+ import { trustState, trustAllows } from './trust.mjs';
2
+ import { requestApproval } from './approvals.mjs';
3
+ import { audit } from './audit.mjs';
4
+
5
+ export async function authorize(tool, args, cfg) {
6
+ const trust = trustState();
7
+ let needApproval = true;
8
+ if (trustAllows(trust, tool, args, cfg)) needApproval = false;
9
+ else if (cfg.requireApproval === false) needApproval = false;
10
+ if (!needApproval) return { ok: true };
11
+ const approval = await requestApproval(tool, args, cfg);
12
+ if (!approval.approved) {
13
+ const status = approval.rec?.status || "denied";
14
+ try { audit({ tool, args, status: "approval_denied", approval_status: status }); } catch {}
15
+ const pending = status === "pending" || status === "timeout" || status === "expired";
16
+ return { ok: false, status, approval_id: approval.rec?.id || null, pending };
17
+ }
18
+ return { ok: true };
19
+ }
package/src/version.mjs CHANGED
@@ -3,7 +3,7 @@ import fs from 'node:fs';
3
3
  import path from 'node:path';
4
4
  import { fileURLToPath } from 'node:url';
5
5
 
6
- export const VERSION = "0.8.11";
6
+ export const VERSION = "0.8.13";
7
7
 
8
8
  export function getVersion() {
9
9
  try {