@sibyllinesoft/agentd 0.1.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/bin/agentd +57 -0
- package/package.json +24 -0
package/bin/agentd
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
"use strict";
|
|
4
|
+
|
|
5
|
+
const { spawnSync } = require("child_process");
|
|
6
|
+
const path = require("path");
|
|
7
|
+
const os = require("os");
|
|
8
|
+
|
|
9
|
+
function getBinaryPath() {
|
|
10
|
+
// Allow override via environment variable
|
|
11
|
+
if (process.env.AGENTD_BINARY) {
|
|
12
|
+
return process.env.AGENTD_BINARY;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const platform = os.platform();
|
|
16
|
+
const arch = os.arch();
|
|
17
|
+
|
|
18
|
+
const PLATFORMS = {
|
|
19
|
+
"linux-x64": "@sibyllinesoft/agentd-linux-x64",
|
|
20
|
+
"linux-arm64": "@sibyllinesoft/agentd-linux-arm64",
|
|
21
|
+
"darwin-x64": "@sibyllinesoft/agentd-darwin-x64",
|
|
22
|
+
"darwin-arm64": "@sibyllinesoft/agentd-darwin-arm64",
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const key = `${platform}-${arch}`;
|
|
26
|
+
const pkg = PLATFORMS[key];
|
|
27
|
+
|
|
28
|
+
if (!pkg) {
|
|
29
|
+
console.error(
|
|
30
|
+
`Unsupported platform: ${platform}-${arch}\n` +
|
|
31
|
+
`agentd supports: ${Object.keys(PLATFORMS).join(", ")}`
|
|
32
|
+
);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
try {
|
|
37
|
+
return require.resolve(`${pkg}/agentd`);
|
|
38
|
+
} catch {
|
|
39
|
+
console.error(
|
|
40
|
+
`Could not find the agentd binary for ${platform}-${arch}.\n` +
|
|
41
|
+
`The platform package ${pkg} may not have been installed.\n` +
|
|
42
|
+
`Try reinstalling: npm install -g @sibyllinesoft/agentd`
|
|
43
|
+
);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const result = spawnSync(getBinaryPath(), process.argv.slice(2), {
|
|
49
|
+
stdio: "inherit",
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
if (result.error) {
|
|
53
|
+
console.error("Failed to run agentd:", result.error.message);
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
process.exit(result.status ?? 1);
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sibyllinesoft/agentd",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Agent daemon for secure capability execution with pluggable isolation backends",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/sibyllinesoft/agentd"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://agentd.rs",
|
|
11
|
+
"bin": {
|
|
12
|
+
"agentd": "bin/agentd"
|
|
13
|
+
},
|
|
14
|
+
"optionalDependencies": {
|
|
15
|
+
"@sibyllinesoft/agentd-linux-x64": "0.1.0",
|
|
16
|
+
"@sibyllinesoft/agentd-linux-arm64": "0.1.0",
|
|
17
|
+
"@sibyllinesoft/agentd-darwin-x64": "0.1.0",
|
|
18
|
+
"@sibyllinesoft/agentd-darwin-arm64": "0.1.0"
|
|
19
|
+
},
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public",
|
|
22
|
+
"provenance": true
|
|
23
|
+
}
|
|
24
|
+
}
|