@agenshield/broker 0.4.3 → 0.4.4
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/main.js +18 -3
- package/package.json +2 -2
package/main.js
CHANGED
|
@@ -2110,14 +2110,29 @@ function ensureDirectories(config) {
|
|
|
2110
2110
|
}
|
|
2111
2111
|
}
|
|
2112
2112
|
async function main() {
|
|
2113
|
-
console.log(
|
|
2113
|
+
console.log(`AgenShield Broker starting at ${(/* @__PURE__ */ new Date()).toISOString()}`);
|
|
2114
|
+
console.log(`PID: ${process.pid}, UID: ${process.getuid?.()}, GID: ${process.getgid?.()}`);
|
|
2115
|
+
console.log(`Node: ${process.version}, Platform: ${process.platform}`);
|
|
2114
2116
|
console.log("========================");
|
|
2115
|
-
|
|
2117
|
+
let config;
|
|
2118
|
+
try {
|
|
2119
|
+
config = loadConfig();
|
|
2120
|
+
} catch (err) {
|
|
2121
|
+
console.error("FATAL: Failed to load configuration:", err);
|
|
2122
|
+
process.exit(1);
|
|
2123
|
+
}
|
|
2124
|
+
console.log(`Config: ${config.configPath}`);
|
|
2116
2125
|
console.log(`Socket: ${config.socketPath}`);
|
|
2126
|
+
console.log(`Socket owner: ${config.socketOwner}, group: ${config.socketGroup}`);
|
|
2117
2127
|
console.log(`HTTP Fallback: ${config.httpEnabled ? `${config.httpHost}:${config.httpPort}` : "disabled"}`);
|
|
2118
2128
|
console.log(`Policies: ${config.policiesPath}`);
|
|
2119
2129
|
console.log(`Log Level: ${config.logLevel}`);
|
|
2120
|
-
|
|
2130
|
+
try {
|
|
2131
|
+
ensureDirectories(config);
|
|
2132
|
+
} catch (err) {
|
|
2133
|
+
console.error("FATAL: Failed to ensure directories:", err);
|
|
2134
|
+
process.exit(1);
|
|
2135
|
+
}
|
|
2121
2136
|
const auditLogger = new AuditLogger({
|
|
2122
2137
|
logPath: config.auditLogPath,
|
|
2123
2138
|
logLevel: config.logLevel
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agenshield/broker",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AgenShield broker daemon with Unix socket and HTTP fallback",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@agenshield/ipc": "0.4.
|
|
27
|
+
"@agenshield/ipc": "0.4.4"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "^24.0.0",
|