@overlordai/worker 1.0.56 → 1.0.58
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-detector.d.ts","sourceRoot":"","sources":["../src/capability-detector.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"capability-detector.d.ts","sourceRoot":"","sources":["../src/capability-detector.ts"],"names":[],"mappings":"AAeA,qBAAa,kBAAkB;IAC7B,MAAM,CAAC,MAAM,IAAI,MAAM,EAAE;IAiBzB,OAAO,CAAC,MAAM,CAAC,WAAW;CA0B3B"}
|
|
@@ -1,10 +1,45 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
37
|
};
|
|
5
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
39
|
exports.CapabilityDetector = void 0;
|
|
7
40
|
const node_child_process_1 = require("node:child_process");
|
|
41
|
+
const os = __importStar(require("node:os"));
|
|
42
|
+
const path = __importStar(require("node:path"));
|
|
8
43
|
const pino_1 = __importDefault(require("pino"));
|
|
9
44
|
const safe_env_js_1 = require("./safe-env.js");
|
|
10
45
|
const log = (0, pino_1.default)({ name: 'capability-detector' });
|
|
@@ -29,9 +64,25 @@ class CapabilityDetector {
|
|
|
29
64
|
return capabilities;
|
|
30
65
|
}
|
|
31
66
|
static isAvailable(binary) {
|
|
67
|
+
const env = (0, safe_env_js_1.buildSafeEnv)();
|
|
68
|
+
// Ensure common user bin directories are in PATH (systemd may not include them)
|
|
69
|
+
const home = os.homedir();
|
|
70
|
+
const extraDirs = [
|
|
71
|
+
path.join(home, '.local', 'bin'),
|
|
72
|
+
path.join(home, 'bin'),
|
|
73
|
+
path.join(home, '.cargo', 'bin'),
|
|
74
|
+
];
|
|
75
|
+
const currentPath = env['PATH'] || '';
|
|
76
|
+
const pathDirs = currentPath.split(':');
|
|
77
|
+
for (const dir of extraDirs) {
|
|
78
|
+
if (!pathDirs.includes(dir)) {
|
|
79
|
+
pathDirs.push(dir);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
env['PATH'] = pathDirs.join(':');
|
|
32
83
|
try {
|
|
33
84
|
const cmd = process.platform === 'win32' ? 'where' : 'which';
|
|
34
|
-
(0, node_child_process_1.execFileSync)(cmd, [binary], { stdio: 'pipe', timeout: 5000, env
|
|
85
|
+
(0, node_child_process_1.execFileSync)(cmd, [binary], { stdio: 'pipe', timeout: 5000, env });
|
|
35
86
|
return true;
|
|
36
87
|
}
|
|
37
88
|
catch {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-detector.js","sourceRoot":"","sources":["../src/capability-detector.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"capability-detector.js","sourceRoot":"","sources":["../src/capability-detector.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAAkD;AAClD,4CAA8B;AAC9B,gDAAkC;AAClC,gDAAwB;AACxB,+CAA6C;AAE7C,MAAM,GAAG,GAAG,IAAA,cAAI,EAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,CAAC,CAAC;AAElD,MAAM,YAAY,GAA4C;IAC5D,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE;IACpC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE;IACpC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE;IAClC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE;CACnC,CAAC;AAEF,MAAa,kBAAkB;IAC7B,MAAM,CAAC,MAAM;QACX,MAAM,YAAY,GAAa,EAAE,CAAC;QAElC,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE,CAAC;YACjC,IAAI,kBAAkB,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;gBACjD,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAC9B,GAAG,CAAC,IAAI,CAAC,EAAE,UA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M,CAAC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;YACnE,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF;AA5CD,gDA4CC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@overlordai/worker",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.58",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"lint": "tsc --noEmit"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@overlordai/protocol": "1.0.
|
|
19
|
+
"@overlordai/protocol": "1.0.58",
|
|
20
20
|
"async-mutex": "^0.5.0",
|
|
21
21
|
"node-pty": "^1.0.0",
|
|
22
22
|
"pino": "^9.0.0",
|