agentlife 1.2.4 → 1.2.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 +13 -2
  2. 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: { profile: "full", allow: ["agentlife_push"] }
1489
+ tools: { allow: ["agentlife_push"] }
1490
1490
  },
1491
1491
  {
1492
1492
  id: "supervisor",
@@ -1605,6 +1605,9 @@ ${capped}`);
1605
1605
  `) };
1606
1606
  }
1607
1607
  var VISION_MIN_MEMORY_CHARS = 200;
1608
+ var BOOTSTRAP_COOLDOWN_MS = 10 * 60 * 1000;
1609
+ var lastBootstrapSentAt = 0;
1610
+ var lastWarmupSentAt = 0;
1608
1611
  async function ensureVisionPosters(state, runtime, log, options = {}) {
1609
1612
  if (!state.surfaceDb) {
1610
1613
  log("[agentlife] ensureVisionPosters: skipped — surfaceDb not initialized");
@@ -1632,9 +1635,11 @@ async function ensureVisionPosters(state, runtime, log, options = {}) {
1632
1635
  }
1633
1636
  const { totalChars, sections } = await gatherAllAgentMemory(state, finalList, SKIP_IDS);
1634
1637
  if (totalChars < VISION_MIN_MEMORY_CHARS) {
1635
- if (state.runCommand) {
1638
+ const warmupNow = Date.now();
1639
+ if (state.runCommand && warmupNow - lastWarmupSentAt >= BOOTSTRAP_COOLDOWN_MS) {
1636
1640
  const specialistId = [...state.agentRegistry.keys()].find((id) => !SKIP_IDS.has(id));
1637
1641
  if (specialistId) {
1642
+ lastWarmupSentAt = warmupNow;
1638
1643
  const warmupKey = buildAgentSessionKey(specialistId);
1639
1644
  const warmupMsg = [
1640
1645
  `[system:warmup] You were just created and have no user data yet.`,
@@ -1671,6 +1676,11 @@ async function ensureVisionPosters(state, runtime, log, options = {}) {
1671
1676
  if (content.trim())
1672
1677
  rejectedDreams = content.trim().slice(0, 4000);
1673
1678
  } catch {}
1679
+ const now = Date.now();
1680
+ if (now - lastBootstrapSentAt < BOOTSTRAP_COOLDOWN_MS) {
1681
+ log(`[agentlife] ensureVisionPosters: skipped — bootstrap cooldown (${Math.round((BOOTSTRAP_COOLDOWN_MS - (now - lastBootstrapSentAt)) / 1000)}s remaining)`);
1682
+ return { status: "skipped", reason: "thin_memory", details: `cooldown` };
1683
+ }
1674
1684
  const builderKey = buildAgentSessionKey("agentlife-builder");
1675
1685
  const bootstrapMsg = [
1676
1686
  `[system:dashboard-bootstrap] The dashboard is empty. Push 3-4 vision posters with agentlife_push.`,
@@ -1782,6 +1792,7 @@ async function ensureVisionPosters(state, runtime, log, options = {}) {
1782
1792
  message: bootstrapMsg,
1783
1793
  idempotencyKey: `dashboard-bootstrap-${Date.now()}`
1784
1794
  });
1795
+ lastBootstrapSentAt = Date.now();
1785
1796
  const delayMs = options.delayMs ?? 0;
1786
1797
  const feedbackChars = rejectedDreams.length;
1787
1798
  const runBootstrap = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentlife",
3
- "version": "1.2.4",
3
+ "version": "1.2.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",