agentlife 1.2.6 → 1.2.7

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.
Files changed (2) hide show
  1. package/dist/index.js +11 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1877,6 +1877,17 @@ async function provisionAgents(state, cfg, runtime, log) {
1877
1877
  log(`[agentlife] backfilled subagents for ${agent.id}`);
1878
1878
  }
1879
1879
  }
1880
+ const rawCfgForTools = JSON.parse(readFileSync(path3.join(os.homedir(), ".openclaw", "openclaw.json"), "utf-8"));
1881
+ const globalAllow = rawCfgForTools?.tools?.allow ?? [];
1882
+ if (!globalAllow.includes("agentlife_push")) {
1883
+ if (!rawCfgForTools.tools)
1884
+ rawCfgForTools.tools = {};
1885
+ rawCfgForTools.tools.allow = [...globalAllow, "agentlife_push"];
1886
+ writeFileSync(path3.join(os.homedir(), ".openclaw", "openclaw.json"), JSON.stringify(rawCfgForTools, null, 2) + `
1887
+ `, "utf-8");
1888
+ configChanged = true;
1889
+ log("[agentlife] added agentlife_push to global tools.allow");
1890
+ }
1880
1891
  const rawCfgForVisibility = JSON.parse(readFileSync(path3.join(os.homedir(), ".openclaw", "openclaw.json"), "utf-8"));
1881
1892
  const currentVisibility = rawCfgForVisibility?.tools?.sessions?.visibility;
1882
1893
  if (currentVisibility !== "all") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentlife",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "bun build index.ts --outfile dist/index.js --target node --external openclaw/plugin-sdk",