agentlife 1.1.8 → 1.1.9

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 +2 -30
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1512,20 +1512,6 @@ async function readAgentMemory(workspace) {
1512
1512
  if (!workspace)
1513
1513
  return "";
1514
1514
  const parts = [];
1515
- const rootFiles = [
1516
- ["SOUL.md", 600],
1517
- ["AGENTS.md", 1200],
1518
- ["USER.md", 1200]
1519
- ];
1520
- for (const [name, cap] of rootFiles) {
1521
- try {
1522
- const content = await fs2.readFile(path3.join(workspace, name), "utf-8");
1523
- const trimmed = content.trim();
1524
- if (trimmed)
1525
- parts.push(`### ${name}
1526
- ${trimmed.slice(0, cap)}`);
1527
- } catch {}
1528
- }
1529
1515
  const memoryDir = path3.join(workspace, "memory");
1530
1516
  try {
1531
1517
  const index = await fs2.readFile(path3.join(memoryDir, "MEMORY.md"), "utf-8");
@@ -1535,7 +1521,7 @@ ${index.trim()}`);
1535
1521
  } catch {}
1536
1522
  try {
1537
1523
  const files = await fs2.readdir(memoryDir);
1538
- const mdFiles = files.filter((f) => f.endsWith(".md") && f !== "MEMORY.md").sort().reverse().slice(0, 8);
1524
+ const mdFiles = files.filter((f) => f.endsWith(".md") && f !== "MEMORY.md").sort().reverse().slice(0, 20);
1539
1525
  for (const file of mdFiles) {
1540
1526
  try {
1541
1527
  const content = await fs2.readFile(path3.join(memoryDir, file), "utf-8");
@@ -6397,21 +6383,7 @@ function registerSurfacesGateway(api, state2) {
6397
6383
  const db = getOrCreateHistoryDb(state2);
6398
6384
  automations = db.prepare("SELECT id, type, name, path FROM automations WHERE surfaceId = ? AND status != 'removed'").all(surfaceId);
6399
6385
  } catch {}
6400
- const alreadyNotified = guidedDismissSent.delete(surfaceId);
6401
- if (agentId && state2.runCommand && !alreadyNotified) {
6402
- const goalSnippet = meta.goal ? ` goal="${meta.goal}"` : "";
6403
- const reasonSnippet = reason ? ` reason="${reason}"` : "";
6404
- const sessionKey = buildInternalSessionKey(agentId);
6405
- const message = `[system:dismiss-requested] surfaceId=${surfaceId}${goalSnippet}${reasonSnippet}`;
6406
- state2.runCommand([
6407
- "openclaw",
6408
- "gateway",
6409
- "call",
6410
- "chat.send",
6411
- "--params",
6412
- JSON.stringify({ sessionKey, message, idempotencyKey: `dismiss-req-${surfaceId}-${Date.now()}` })
6413
- ], { timeoutMs: 30000 }).catch((e) => console.warn("[agentlife] dismiss-requested notify failed for %s: %s", surfaceId, e?.message));
6414
- }
6386
+ guidedDismissSent.delete(surfaceId);
6415
6387
  state2.surfaceDb.delete(surfaceId);
6416
6388
  broadcastDelete(surfaceId);
6417
6389
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentlife",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "bun build index.ts --outfile dist/index.js --target node --external openclaw/plugin-sdk",