@agenshield/daemon 0.4.1 → 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 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 execSync7 } from "node:child_process";
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");
@@ -5288,6 +5289,14 @@ function writeConfig(config) {
5288
5289
  const configPath = getOpenClawConfigPath();
5289
5290
  fs11.mkdirSync(path10.dirname(configPath), { recursive: true });
5290
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
+ }
5291
5300
  }
5292
5301
  function addSkillEntry(slug, env) {
5293
5302
  const config = readConfig();
@@ -5917,8 +5926,8 @@ async function skillsRoutes(app) {
5917
5926
  fs13.writeFileSync(filePath, file.content, "utf-8");
5918
5927
  }
5919
5928
  try {
5920
- execSync7(`chown -R root:${socketGroup} "${skillDir}"`, { stdio: "pipe" });
5921
- execSync7(`chmod -R a+rX,go-w "${skillDir}"`, { stdio: "pipe" });
5929
+ execSync8(`chown -R root:${socketGroup} "${skillDir}"`, { stdio: "pipe" });
5930
+ execSync8(`chmod -R a+rX,go-w "${skillDir}"`, { stdio: "pipe" });
5922
5931
  } catch {
5923
5932
  }
5924
5933
  createSkillWrapper(name, binDir);
@@ -5979,8 +5988,8 @@ async function skillsRoutes(app) {
5979
5988
  fs13.writeFileSync(filePath, file.content, "utf-8");
5980
5989
  }
5981
5990
  try {
5982
- execSync7(`chown -R root:${socketGroup} "${skillDir}"`, { stdio: "pipe" });
5983
- execSync7(`chmod -R a+rX,go-w "${skillDir}"`, { stdio: "pipe" });
5991
+ execSync8(`chown -R root:${socketGroup} "${skillDir}"`, { stdio: "pipe" });
5992
+ execSync8(`chmod -R a+rX,go-w "${skillDir}"`, { stdio: "pipe" });
5984
5993
  } catch {
5985
5994
  }
5986
5995
  createSkillWrapper(name, binDir);
@@ -7016,8 +7025,6 @@ async function marketplaceRoutes(app) {
7016
7025
  if (brokerResult.wrapperPath) {
7017
7026
  logs.push(`Wrapper created: ${brokerResult.wrapperPath}`);
7018
7027
  }
7019
- addSkillEntry(slug);
7020
- logs.push("Config entry added");
7021
7028
  addSkillPolicy(slug);
7022
7029
  logs.push("Policy rule added");
7023
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 execSync7 } from "node:child_process";
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");
@@ -5252,6 +5253,14 @@ function writeConfig(config) {
5252
5253
  const configPath = getOpenClawConfigPath();
5253
5254
  fs11.mkdirSync(path10.dirname(configPath), { recursive: true });
5254
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
+ }
5255
5264
  }
5256
5265
  function addSkillEntry(slug, env) {
5257
5266
  const config = readConfig();
@@ -5881,8 +5890,8 @@ async function skillsRoutes(app) {
5881
5890
  fs13.writeFileSync(filePath, file.content, "utf-8");
5882
5891
  }
5883
5892
  try {
5884
- execSync7(`chown -R root:${socketGroup} "${skillDir}"`, { stdio: "pipe" });
5885
- execSync7(`chmod -R a+rX,go-w "${skillDir}"`, { stdio: "pipe" });
5893
+ execSync8(`chown -R root:${socketGroup} "${skillDir}"`, { stdio: "pipe" });
5894
+ execSync8(`chmod -R a+rX,go-w "${skillDir}"`, { stdio: "pipe" });
5886
5895
  } catch {
5887
5896
  }
5888
5897
  createSkillWrapper(name, binDir);
@@ -5943,8 +5952,8 @@ async function skillsRoutes(app) {
5943
5952
  fs13.writeFileSync(filePath, file.content, "utf-8");
5944
5953
  }
5945
5954
  try {
5946
- execSync7(`chown -R root:${socketGroup} "${skillDir}"`, { stdio: "pipe" });
5947
- execSync7(`chmod -R a+rX,go-w "${skillDir}"`, { stdio: "pipe" });
5955
+ execSync8(`chown -R root:${socketGroup} "${skillDir}"`, { stdio: "pipe" });
5956
+ execSync8(`chmod -R a+rX,go-w "${skillDir}"`, { stdio: "pipe" });
5948
5957
  } catch {
5949
5958
  }
5950
5959
  createSkillWrapper(name, binDir);
@@ -6980,8 +6989,6 @@ async function marketplaceRoutes(app) {
6980
6989
  if (brokerResult.wrapperPath) {
6981
6990
  logs.push(`Wrapper created: ${brokerResult.wrapperPath}`);
6982
6991
  }
6983
- addSkillEntry(slug);
6984
- logs.push("Config entry added");
6985
6992
  addSkillPolicy(slug);
6986
6993
  logs.push("Policy rule added");
6987
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.1",
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.1",
28
- "@agenshield/broker": "0.4.1",
29
- "@agenshield/sandbox": "0.4.1",
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;AAmC7E,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAsX3E"}
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;AAoCH;;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"}
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"}