agentlife 2.6.4 → 2.6.6

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 +12 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1614,6 +1614,10 @@ async function provisionAgents(state, cfg, runtime, log) {
1614
1614
  const stubPath = path4.join(workspaceDir, "SOUL.md");
1615
1615
  await fs3.writeFile(stubPath, "", { encoding: "utf-8", flag: "wx" }).catch(() => {});
1616
1616
  }
1617
+ const UNWANTED_TEMPLATES = ["BOOTSTRAP.md", "IDENTITY.md", "HEARTBEAT.md", "USER.md"];
1618
+ for (const fileName of UNWANTED_TEMPLATES) {
1619
+ await fs3.unlink(path4.join(workspaceDir, fileName)).catch(() => {});
1620
+ }
1617
1621
  if (agent.existingAgent)
1618
1622
  continue;
1619
1623
  const exists = currentList.some((a) => a.id === agent.id);
@@ -6034,12 +6038,7 @@ Setup code: ${setupCode}
6034
6038
  var SKIP_GUIDANCE_AGENTS = new Set(["agentlife"]);
6035
6039
  var SKIP_AGENTS_MD_INJECTION = new Set(["agentlife", "agentlife-builder", "quick", "supervisor"]);
6036
6040
  function registerBootstrapHook(api, state2) {
6037
- api.registerService({
6038
- id: "agentlife-bootstrap-hook",
6039
- start: () => {
6040
- registerBootstrapHookImpl(api, state2);
6041
- }
6042
- });
6041
+ registerBootstrapHookImpl(api, state2);
6043
6042
  }
6044
6043
  function registerBootstrapHookImpl(api, state2) {
6045
6044
  api.registerHook("agent:bootstrap", (event) => {
@@ -6055,6 +6054,13 @@ function registerBootstrapHookImpl(api, state2) {
6055
6054
  }
6056
6055
  console.log("[agentlife:bootstrap] agentId=%s sessionKey=%s files=%s", ctx.agentId ?? "NONE", ctx.sessionKey ?? "NONE", ctx.bootstrapFiles.map((f) => `${f.name}(${f.content?.length ?? 0})`).join(", "));
6057
6056
  if (ctx.agentId && SKIP_GUIDANCE_AGENTS.has(ctx.agentId)) {
6057
+ const ORCH_STRIP = new Set(["SOUL.md", "TOOLS.md", "IDENTITY.md", "USER.md", "HEARTBEAT.md", "BOOTSTRAP.md"]);
6058
+ for (let i = 0;i < ctx.bootstrapFiles.length; i++) {
6059
+ const f = ctx.bootstrapFiles[i];
6060
+ if (ORCH_STRIP.has(f.name) && !f.missing) {
6061
+ ctx.bootstrapFiles[i] = { name: f.name, path: f.path, content: "", missing: true };
6062
+ }
6063
+ }
6058
6064
  const registryContext = buildAgentRegistryContext(state2);
6059
6065
  if (registryContext) {
6060
6066
  const regIdx = ctx.bootstrapFiles.findIndex((f) => f.name === "AGENT_REGISTRY.md");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentlife",
3
- "version": "2.6.4",
3
+ "version": "2.6.6",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "bun build index.ts --outfile dist/index.js --target node --external openclaw/plugin-sdk",