arena-bridge 0.18.14 → 0.18.15
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 +7 -0
- package/package.json +1 -1
- package/src/catalog.mjs +2 -2
- package/src/direct.mjs +2 -2
- package/src/http.mjs +9 -3
- package/src/version.mjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ 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.18.15
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- Restored the Node handlers for background processes and path deletion after the catalog split.
|
|
11
|
+
- `/health` reports the configured bridge log size again.
|
|
12
|
+
- Oversized HTTP request bodies return a normal `413 PAYLOAD_TOO_LARGE` response instead of resetting the connection.
|
|
13
|
+
|
|
7
14
|
## 0.18.14
|
|
8
15
|
|
|
9
16
|
### Fixed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arena-bridge",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.15",
|
|
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/catalog.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import fsp from 'node:fs/promises';
|
|
2
|
+
import { spawn } from 'node:child_process';
|
|
2
3
|
import os from 'node:os';
|
|
3
4
|
import fs from 'node:fs';
|
|
4
5
|
import path from 'node:path';
|
|
5
|
-
import { checkPath, resolveTarget } from './policy.mjs';
|
|
6
|
+
import { checkPath, resolveTarget, isInside } from './policy.mjs';
|
|
6
7
|
import { audit, saveArtifact, tailAudit, readArtifact, auditDir } from './audit.mjs';
|
|
7
8
|
import { clip, runShell } from './engine_helpers.mjs';
|
|
8
9
|
import { errorResponse } from './errors.mjs';
|
|
@@ -597,4 +598,3 @@ export function toolCatalog() {
|
|
|
597
598
|
},
|
|
598
599
|
];
|
|
599
600
|
}
|
|
600
|
-
|
package/src/direct.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { handleMcp } from './mcp.mjs';
|
|
|
7
7
|
import { buildPrompt } from './prompt.mjs';
|
|
8
8
|
import { listApprovals, decide, settle } from './approvals.mjs';
|
|
9
9
|
import { checkPath } from './policy.mjs';
|
|
10
|
-
import { loadConfig } from './config.mjs';
|
|
10
|
+
import { loadConfig, CONFIG_DIR } from './config.mjs';
|
|
11
11
|
import { tailAudit, readArtifact, auditDir, audit, auditPage, findEntry, lean, headCursor, LEVELS, pruneAudit, pruneArtifacts } from './audit.mjs';
|
|
12
12
|
import { reconcileTrust } from './trust.mjs';
|
|
13
13
|
import { describeSource, sourceOf, admitUnauthorized } from './source.mjs';
|
|
@@ -384,4 +384,4 @@ export function createDirectServer(cfg, engine, runtime = null) {
|
|
|
384
384
|
server.on('close', () => { poller?.stop(); clearInterval(maint); clearInterval(sweep); });
|
|
385
385
|
|
|
386
386
|
return server;
|
|
387
|
-
}
|
|
387
|
+
}
|
package/src/http.mjs
CHANGED
|
@@ -39,17 +39,23 @@ export function readBody(req, limit = 16 * 1024 * 1024) {
|
|
|
39
39
|
return new Promise((resolve, reject) => {
|
|
40
40
|
const chunks = [];
|
|
41
41
|
let len = 0;
|
|
42
|
+
let rejected = false;
|
|
42
43
|
req.on('data', (c) => {
|
|
44
|
+
if (rejected) return;
|
|
43
45
|
len += c.length;
|
|
44
46
|
if (len > limit) {
|
|
47
|
+
rejected = true;
|
|
45
48
|
reject(new Error('request body too large'));
|
|
46
|
-
req.destroy();
|
|
47
49
|
return;
|
|
48
50
|
}
|
|
49
51
|
chunks.push(c);
|
|
50
52
|
});
|
|
51
|
-
req.on('end', () =>
|
|
52
|
-
|
|
53
|
+
req.on('end', () => {
|
|
54
|
+
if (!rejected) resolve(Buffer.concat(chunks));
|
|
55
|
+
});
|
|
56
|
+
req.on('error', (error) => {
|
|
57
|
+
if (!rejected) reject(error);
|
|
58
|
+
});
|
|
53
59
|
});
|
|
54
60
|
}
|
|
55
61
|
|