agentlife 1.2.7 → 1.3.0
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/dist/index.js +5 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1486,7 +1486,7 @@ var PROVISIONED_AGENTS = [
|
|
|
1486
1486
|
id: "agentlife-builder",
|
|
1487
1487
|
name: "AgentLife Builder",
|
|
1488
1488
|
agentsMd: BUILDER_AGENTS_MD,
|
|
1489
|
-
tools: {
|
|
1489
|
+
tools: { profile: "full", alsoAllow: ["agentlife_push"] }
|
|
1490
1490
|
},
|
|
1491
1491
|
{
|
|
1492
1492
|
id: "supervisor",
|
|
@@ -1850,13 +1850,12 @@ async function provisionAgents(state, cfg, runtime, log) {
|
|
|
1850
1850
|
const existing = currentList.find((a) => a.id === agent.id);
|
|
1851
1851
|
if (existing) {
|
|
1852
1852
|
if (agent.tools) {
|
|
1853
|
-
const
|
|
1854
|
-
const
|
|
1855
|
-
|
|
1856
|
-
if (needsUpdate) {
|
|
1853
|
+
const cur = JSON.stringify(existing.tools ?? {});
|
|
1854
|
+
const want = JSON.stringify(agent.tools);
|
|
1855
|
+
if (cur !== want) {
|
|
1857
1856
|
existing.tools = agent.tools;
|
|
1858
1857
|
configChanged = true;
|
|
1859
|
-
log(`[agentlife] updated tool
|
|
1858
|
+
log(`[agentlife] updated tool config for ${agent.id}`);
|
|
1860
1859
|
}
|
|
1861
1860
|
}
|
|
1862
1861
|
if (agent.subagents && !existing.subagents) {
|
|
@@ -1877,17 +1876,6 @@ async function provisionAgents(state, cfg, runtime, log) {
|
|
|
1877
1876
|
log(`[agentlife] backfilled subagents for ${agent.id}`);
|
|
1878
1877
|
}
|
|
1879
1878
|
}
|
|
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
|
-
}
|
|
1891
1879
|
const rawCfgForVisibility = JSON.parse(readFileSync(path3.join(os.homedir(), ".openclaw", "openclaw.json"), "utf-8"));
|
|
1892
1880
|
const currentVisibility = rawCfgForVisibility?.tools?.sessions?.visibility;
|
|
1893
1881
|
if (currentVisibility !== "all") {
|