@agenshield/daemon 0.4.2 → 0.4.3
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/index.js +15 -7
- package/main.js +15 -7
- package/package.json +4 -4
- package/routes/marketplace.d.ts.map +1 -1
- package/services/openclaw-config.d.ts.map +1 -1
package/index.js
CHANGED
|
@@ -4986,7 +4986,7 @@ async function agencoRoutes(app) {
|
|
|
4986
4986
|
// libs/shield-daemon/src/routes/skills.ts
|
|
4987
4987
|
import * as fs13 from "node:fs";
|
|
4988
4988
|
import * as path12 from "node:path";
|
|
4989
|
-
import { execSync as
|
|
4989
|
+
import { execSync as execSync8 } from "node:child_process";
|
|
4990
4990
|
import { parseSkillMd } from "@agenshield/sandbox";
|
|
4991
4991
|
|
|
4992
4992
|
// libs/shield-daemon/src/services/skill-analyzer.ts
|
|
@@ -5269,6 +5269,7 @@ function removeSkillPolicy(name) {
|
|
|
5269
5269
|
// libs/shield-daemon/src/services/openclaw-config.ts
|
|
5270
5270
|
import * as fs11 from "node:fs";
|
|
5271
5271
|
import * as path10 from "node:path";
|
|
5272
|
+
import { execSync as execSync7 } from "node:child_process";
|
|
5272
5273
|
function getOpenClawConfigPath() {
|
|
5273
5274
|
const agentHome = process.env["AGENSHIELD_AGENT_HOME"] || "/Users/ash_default_agent";
|
|
5274
5275
|
return path10.join(agentHome, ".openclaw", "openclaw.json");
|
|
@@ -5286,7 +5287,16 @@ function readConfig() {
|
|
|
5286
5287
|
}
|
|
5287
5288
|
function writeConfig(config) {
|
|
5288
5289
|
const configPath = getOpenClawConfigPath();
|
|
5290
|
+
fs11.mkdirSync(path10.dirname(configPath), { recursive: true });
|
|
5289
5291
|
fs11.writeFileSync(configPath, JSON.stringify(config, null, 2), "utf-8");
|
|
5292
|
+
const agentHome = process.env["AGENSHIELD_AGENT_HOME"] || "/Users/ash_default_agent";
|
|
5293
|
+
const brokerUser = path10.basename(agentHome) + "_broker";
|
|
5294
|
+
const socketGroup = process.env["AGENSHIELD_SOCKET_GROUP"] || "clawshield";
|
|
5295
|
+
try {
|
|
5296
|
+
execSync7(`chown ${brokerUser}:${socketGroup} "${configPath}"`, { stdio: "pipe" });
|
|
5297
|
+
execSync7(`chmod 664 "${configPath}"`, { stdio: "pipe" });
|
|
5298
|
+
} catch {
|
|
5299
|
+
}
|
|
5290
5300
|
}
|
|
5291
5301
|
function addSkillEntry(slug, env) {
|
|
5292
5302
|
const config = readConfig();
|
|
@@ -5916,8 +5926,8 @@ async function skillsRoutes(app) {
|
|
|
5916
5926
|
fs13.writeFileSync(filePath, file.content, "utf-8");
|
|
5917
5927
|
}
|
|
5918
5928
|
try {
|
|
5919
|
-
|
|
5920
|
-
|
|
5929
|
+
execSync8(`chown -R root:${socketGroup} "${skillDir}"`, { stdio: "pipe" });
|
|
5930
|
+
execSync8(`chmod -R a+rX,go-w "${skillDir}"`, { stdio: "pipe" });
|
|
5921
5931
|
} catch {
|
|
5922
5932
|
}
|
|
5923
5933
|
createSkillWrapper(name, binDir);
|
|
@@ -5978,8 +5988,8 @@ async function skillsRoutes(app) {
|
|
|
5978
5988
|
fs13.writeFileSync(filePath, file.content, "utf-8");
|
|
5979
5989
|
}
|
|
5980
5990
|
try {
|
|
5981
|
-
|
|
5982
|
-
|
|
5991
|
+
execSync8(`chown -R root:${socketGroup} "${skillDir}"`, { stdio: "pipe" });
|
|
5992
|
+
execSync8(`chmod -R a+rX,go-w "${skillDir}"`, { stdio: "pipe" });
|
|
5983
5993
|
} catch {
|
|
5984
5994
|
}
|
|
5985
5995
|
createSkillWrapper(name, binDir);
|
|
@@ -7015,8 +7025,6 @@ async function marketplaceRoutes(app) {
|
|
|
7015
7025
|
if (brokerResult.wrapperPath) {
|
|
7016
7026
|
logs.push(`Wrapper created: ${brokerResult.wrapperPath}`);
|
|
7017
7027
|
}
|
|
7018
|
-
addSkillEntry(slug);
|
|
7019
|
-
logs.push("Config entry added");
|
|
7020
7028
|
addSkillPolicy(slug);
|
|
7021
7029
|
logs.push("Policy rule added");
|
|
7022
7030
|
emitSkillInstallProgress(slug, "local_analysis", "Running local analysis");
|
package/main.js
CHANGED
|
@@ -4950,7 +4950,7 @@ async function agencoRoutes(app) {
|
|
|
4950
4950
|
// libs/shield-daemon/src/routes/skills.ts
|
|
4951
4951
|
import * as fs13 from "node:fs";
|
|
4952
4952
|
import * as path12 from "node:path";
|
|
4953
|
-
import { execSync as
|
|
4953
|
+
import { execSync as execSync8 } from "node:child_process";
|
|
4954
4954
|
import { parseSkillMd } from "@agenshield/sandbox";
|
|
4955
4955
|
|
|
4956
4956
|
// libs/shield-daemon/src/services/skill-analyzer.ts
|
|
@@ -5233,6 +5233,7 @@ function removeSkillPolicy(name) {
|
|
|
5233
5233
|
// libs/shield-daemon/src/services/openclaw-config.ts
|
|
5234
5234
|
import * as fs11 from "node:fs";
|
|
5235
5235
|
import * as path10 from "node:path";
|
|
5236
|
+
import { execSync as execSync7 } from "node:child_process";
|
|
5236
5237
|
function getOpenClawConfigPath() {
|
|
5237
5238
|
const agentHome = process.env["AGENSHIELD_AGENT_HOME"] || "/Users/ash_default_agent";
|
|
5238
5239
|
return path10.join(agentHome, ".openclaw", "openclaw.json");
|
|
@@ -5250,7 +5251,16 @@ function readConfig() {
|
|
|
5250
5251
|
}
|
|
5251
5252
|
function writeConfig(config) {
|
|
5252
5253
|
const configPath = getOpenClawConfigPath();
|
|
5254
|
+
fs11.mkdirSync(path10.dirname(configPath), { recursive: true });
|
|
5253
5255
|
fs11.writeFileSync(configPath, JSON.stringify(config, null, 2), "utf-8");
|
|
5256
|
+
const agentHome = process.env["AGENSHIELD_AGENT_HOME"] || "/Users/ash_default_agent";
|
|
5257
|
+
const brokerUser = path10.basename(agentHome) + "_broker";
|
|
5258
|
+
const socketGroup = process.env["AGENSHIELD_SOCKET_GROUP"] || "clawshield";
|
|
5259
|
+
try {
|
|
5260
|
+
execSync7(`chown ${brokerUser}:${socketGroup} "${configPath}"`, { stdio: "pipe" });
|
|
5261
|
+
execSync7(`chmod 664 "${configPath}"`, { stdio: "pipe" });
|
|
5262
|
+
} catch {
|
|
5263
|
+
}
|
|
5254
5264
|
}
|
|
5255
5265
|
function addSkillEntry(slug, env) {
|
|
5256
5266
|
const config = readConfig();
|
|
@@ -5880,8 +5890,8 @@ async function skillsRoutes(app) {
|
|
|
5880
5890
|
fs13.writeFileSync(filePath, file.content, "utf-8");
|
|
5881
5891
|
}
|
|
5882
5892
|
try {
|
|
5883
|
-
|
|
5884
|
-
|
|
5893
|
+
execSync8(`chown -R root:${socketGroup} "${skillDir}"`, { stdio: "pipe" });
|
|
5894
|
+
execSync8(`chmod -R a+rX,go-w "${skillDir}"`, { stdio: "pipe" });
|
|
5885
5895
|
} catch {
|
|
5886
5896
|
}
|
|
5887
5897
|
createSkillWrapper(name, binDir);
|
|
@@ -5942,8 +5952,8 @@ async function skillsRoutes(app) {
|
|
|
5942
5952
|
fs13.writeFileSync(filePath, file.content, "utf-8");
|
|
5943
5953
|
}
|
|
5944
5954
|
try {
|
|
5945
|
-
|
|
5946
|
-
|
|
5955
|
+
execSync8(`chown -R root:${socketGroup} "${skillDir}"`, { stdio: "pipe" });
|
|
5956
|
+
execSync8(`chmod -R a+rX,go-w "${skillDir}"`, { stdio: "pipe" });
|
|
5947
5957
|
} catch {
|
|
5948
5958
|
}
|
|
5949
5959
|
createSkillWrapper(name, binDir);
|
|
@@ -6979,8 +6989,6 @@ async function marketplaceRoutes(app) {
|
|
|
6979
6989
|
if (brokerResult.wrapperPath) {
|
|
6980
6990
|
logs.push(`Wrapper created: ${brokerResult.wrapperPath}`);
|
|
6981
6991
|
}
|
|
6982
|
-
addSkillEntry(slug);
|
|
6983
|
-
logs.push("Config entry added");
|
|
6984
6992
|
addSkillPolicy(slug);
|
|
6985
6993
|
logs.push("Policy rule added");
|
|
6986
6994
|
emitSkillInstallProgress(slug, "local_analysis", "Running local analysis");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agenshield/daemon",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AgenShield HTTP daemon server with embedded UI",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
],
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@agenshield/ipc": "0.4.
|
|
28
|
-
"@agenshield/broker": "0.4.
|
|
29
|
-
"@agenshield/sandbox": "0.4.
|
|
27
|
+
"@agenshield/ipc": "0.4.3",
|
|
28
|
+
"@agenshield/broker": "0.4.3",
|
|
29
|
+
"@agenshield/sandbox": "0.4.3",
|
|
30
30
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
31
31
|
"fastify": "^5.7.0",
|
|
32
32
|
"zod": "^4.3.6",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../src/routes/marketplace.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAgC,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"marketplace.d.ts","sourceRoot":"","sources":["../../src/routes/marketplace.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAgC,MAAM,SAAS,CAAC;AAkC7E,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAoX3E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openclaw-config.d.ts","sourceRoot":"","sources":["../../src/services/openclaw-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"openclaw-config.d.ts","sourceRoot":"","sources":["../../src/services/openclaw-config.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAiDH;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAiB9E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAQnD"}
|