0agent 1.0.72 → 1.0.73
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/daemon.mjs +9 -5
- package/package.json +1 -1
package/dist/daemon.mjs
CHANGED
|
@@ -4777,7 +4777,8 @@ content = element.text if element else page.get_all_text()` : `content = page.ge
|
|
|
4777
4777
|
` "my birthday is X" \u2192 memory_write({label:"user_birthday", content:"X", type:"identity"})`,
|
|
4778
4778
|
` "we use React" \u2192 memory_write({label:"tech_stack", content:"React", type:"tech"})`,
|
|
4779
4779
|
`Also write: URLs, ports, paths, project names, preferences, decisions, task outcomes.`,
|
|
4780
|
-
`
|
|
4780
|
+
`Only call memory_write when the user shares something worth remembering long-term.`,
|
|
4781
|
+
`Do NOT call it for greetings, chitchat, or simple questions with no durable facts.`
|
|
4781
4782
|
);
|
|
4782
4783
|
}
|
|
4783
4784
|
if (hasGUI) {
|
|
@@ -6435,7 +6436,8 @@ Current task:`;
|
|
|
6435
6436
|
this.addStep(sessionId, `Commands run: ${agentResult.commands_run.length}`);
|
|
6436
6437
|
}
|
|
6437
6438
|
this.addStep(sessionId, `Done (${agentResult.tokens_used} tokens, ${agentResult.iterations} LLM turns)`);
|
|
6438
|
-
|
|
6439
|
+
const isConversational = /^(hey|hi|hello|sup|yo|what'?s up|how are you|thanks|ok|cool|bye|good\s+(morning|evening|afternoon)|lol|nice)[!?.\s,]*$/i.test(enrichedReq.task.trim());
|
|
6440
|
+
if (!isConversational && this.graph) {
|
|
6439
6441
|
try {
|
|
6440
6442
|
const nodeId = `memory:session_${sessionId.slice(0, 8)}`;
|
|
6441
6443
|
const label = enrichedReq.task.slice(0, 80);
|
|
@@ -6467,9 +6469,11 @@ Current task:`;
|
|
|
6467
6469
|
console.warn("[0agent] Graph: baseline write failed:", err instanceof Error ? err.message : err);
|
|
6468
6470
|
}
|
|
6469
6471
|
}
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6472
|
+
if (!isConversational) {
|
|
6473
|
+
this._extractAndPersistFacts(enrichedReq.task, agentResult.output, activeLLM, userEntityId).catch((err) => {
|
|
6474
|
+
console.warn("[0agent] Memory extraction outer error:", err instanceof Error ? err.message : err);
|
|
6475
|
+
});
|
|
6476
|
+
}
|
|
6473
6477
|
this.completeSession(sessionId, {
|
|
6474
6478
|
output: agentResult.output,
|
|
6475
6479
|
files_written: agentResult.files_written,
|