0agent 1.0.71 → 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.
Files changed (2) hide show
  1. package/dist/daemon.mjs +12 -9
  2. package/package.json +1 -1
package/dist/daemon.mjs CHANGED
@@ -3348,12 +3348,11 @@ print("Typed successfully")
3348
3348
  const keyStatement = keyCode !== void 0 ? `key code ${keyCode}${usingClause}` : `keystroke "${mainKey}"${usingClause}`;
3349
3349
  return header + `
3350
3350
  import subprocess, time
3351
+ # Activate app to give it OS focus, then send key to frontmost (whatever has focus)
3351
3352
  subprocess.run(['osascript', '-e', 'tell application "${safeApp}" to activate'], capture_output=True)
3352
- time.sleep(0.3)
3353
+ time.sleep(0.5)
3353
3354
  as_script = """tell application "System Events"
3354
- tell process "${safeApp}"
3355
- ${keyStatement}
3356
- end tell
3355
+ ${keyStatement}
3357
3356
  end tell"""
3358
3357
  r = subprocess.run(['osascript', '-e', as_script], capture_output=True, text=True)
3359
3358
  if r.returncode == 0:
@@ -4778,7 +4777,8 @@ content = element.text if element else page.get_all_text()` : `content = page.ge
4778
4777
  ` "my birthday is X" \u2192 memory_write({label:"user_birthday", content:"X", type:"identity"})`,
4779
4778
  ` "we use React" \u2192 memory_write({label:"tech_stack", content:"React", type:"tech"})`,
4780
4779
  `Also write: URLs, ports, paths, project names, preferences, decisions, task outcomes.`,
4781
- `ALWAYS call memory_write before your text response. Never skip it for conversational messages.`
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.`
4782
4782
  );
4783
4783
  }
4784
4784
  if (hasGUI) {
@@ -6436,7 +6436,8 @@ Current task:`;
6436
6436
  this.addStep(sessionId, `Commands run: ${agentResult.commands_run.length}`);
6437
6437
  }
6438
6438
  this.addStep(sessionId, `Done (${agentResult.tokens_used} tokens, ${agentResult.iterations} LLM turns)`);
6439
- if (this.graph) {
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) {
6440
6441
  try {
6441
6442
  const nodeId = `memory:session_${sessionId.slice(0, 8)}`;
6442
6443
  const label = enrichedReq.task.slice(0, 80);
@@ -6468,9 +6469,11 @@ Current task:`;
6468
6469
  console.warn("[0agent] Graph: baseline write failed:", err instanceof Error ? err.message : err);
6469
6470
  }
6470
6471
  }
6471
- this._extractAndPersistFacts(enrichedReq.task, agentResult.output, activeLLM, userEntityId).catch((err) => {
6472
- console.warn("[0agent] Memory extraction outer error:", err instanceof Error ? err.message : err);
6473
- });
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
+ }
6474
6477
  this.completeSession(sessionId, {
6475
6478
  output: agentResult.output,
6476
6479
  files_written: agentResult.files_written,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "0agent",
3
- "version": "1.0.71",
3
+ "version": "1.0.73",
4
4
  "description": "A persistent, learning AI agent that runs on your machine. An agent that learns.",
5
5
  "private": false,
6
6
  "license": "Apache-2.0",