agentlife 2.4.2 → 2.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.
Files changed (2) hide show
  1. package/dist/index.js +22 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1438,7 +1438,26 @@ async function provisionAgents(state, cfg, runtime, log) {
1438
1438
  globalAllowWritten = true;
1439
1439
  }
1440
1440
  }
1441
- if (visibilityWritten || a2aWritten || globalAllowWritten) {
1441
+ const currentAlsoAllow = Array.isArray(rawCfgForVisibility?.tools?.alsoAllow) ? rawCfgForVisibility.tools.alsoAllow : [];
1442
+ let alsoAllowWritten = false;
1443
+ if (!currentAlsoAllow.includes("agentlife_push")) {
1444
+ try {
1445
+ let backup = {};
1446
+ try {
1447
+ backup = JSON.parse(readFileSync(backupPath, "utf-8"));
1448
+ } catch {}
1449
+ if (backup.toolsAlsoAllow === undefined) {
1450
+ backup.toolsAlsoAllow = [...currentAlsoAllow];
1451
+ writeFileSync(backupPath, JSON.stringify(backup, null, 2) + `
1452
+ `, "utf-8");
1453
+ }
1454
+ } catch {}
1455
+ if (!rawCfgForVisibility.tools)
1456
+ rawCfgForVisibility.tools = {};
1457
+ rawCfgForVisibility.tools.alsoAllow = [...currentAlsoAllow, "agentlife_push"];
1458
+ alsoAllowWritten = true;
1459
+ }
1460
+ if (visibilityWritten || a2aWritten || globalAllowWritten || alsoAllowWritten) {
1442
1461
  writeFileSync(configPath, JSON.stringify(rawCfgForVisibility, null, 2) + `
1443
1462
  `, "utf-8");
1444
1463
  configChanged = true;
@@ -1448,6 +1467,8 @@ async function provisionAgents(state, cfg, runtime, log) {
1448
1467
  log("[agentlife] set tools.agentToAgent.enabled=true (cross-agent sends)");
1449
1468
  if (globalAllowWritten)
1450
1469
  log('[agentlife] added "*" to tools.allow (unblock exec/read/write for provisioned agents)');
1470
+ if (alsoAllowWritten)
1471
+ log("[agentlife] added agentlife_push to tools.alsoAllow (tool-policy pipeline intersection pass-through)");
1451
1472
  }
1452
1473
  if (configChanged) {
1453
1474
  const configPath2 = path3.join(os.homedir(), ".openclaw", "openclaw.json");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentlife",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "bun build index.ts --outfile dist/index.js --target node --external openclaw/plugin-sdk",