@bytespell/amux 0.0.4 → 0.0.5
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/package.json +4 -2
- package/scripts/fix-pty.cjs +21 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bytespell/amux",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Agent Multiplexer - headless server for agents",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"amux": "dist/bin/cli.js"
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
|
-
"dist/"
|
|
14
|
+
"dist/",
|
|
15
|
+
"scripts/"
|
|
15
16
|
],
|
|
16
17
|
"exports": {
|
|
17
18
|
".": "./dist/src/server.js",
|
|
@@ -24,6 +25,7 @@
|
|
|
24
25
|
"./lib/logger": "./dist/src/lib/logger.js"
|
|
25
26
|
},
|
|
26
27
|
"scripts": {
|
|
28
|
+
"postinstall": "node scripts/fix-pty.cjs 2>/dev/null || true",
|
|
27
29
|
"build": "tsup",
|
|
28
30
|
"dev": "tsup --watch",
|
|
29
31
|
"start": "node dist/index.js",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Fix node-pty spawn-helper permissions on macOS
|
|
2
|
+
// https://github.com/microsoft/node-pty/issues/858
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
const candidates = [
|
|
7
|
+
path.join(__dirname, '..', 'node_modules', 'node-pty', 'prebuilds'),
|
|
8
|
+
path.join(__dirname, '..', '..', '..', 'node_modules', 'node-pty', 'prebuilds'),
|
|
9
|
+
path.join(__dirname, '..', '..', 'node-pty', 'prebuilds'),
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
for (const dir of candidates) {
|
|
13
|
+
if (!fs.existsSync(dir)) continue;
|
|
14
|
+
for (const folder of fs.readdirSync(dir)) {
|
|
15
|
+
if (!folder.startsWith('darwin')) continue;
|
|
16
|
+
const helper = path.join(dir, folder, 'spawn-helper');
|
|
17
|
+
if (fs.existsSync(helper)) {
|
|
18
|
+
fs.chmodSync(helper, 0o755);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|