0agent 1.0.93 → 1.0.94

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 +7 -1
  2. package/package.json +1 -1
package/dist/daemon.mjs CHANGED
@@ -8422,7 +8422,7 @@ var SessionManager = class {
8422
8422
  }
8423
8423
  const activeLLM = this.getFreshLLM();
8424
8424
  if (activeLLM?.isConfigured) {
8425
- const userEntityId = enrichedReq.entity_id ?? this.identity?.entity_node_id;
8425
+ const userEntityId = enrichedReq.entity_id ?? this.identity?.entity_node_id ?? "default_user";
8426
8426
  const routing = routeMessage(enrichedReq.task);
8427
8427
  if (routing.decision === "skip") {
8428
8428
  this.completeSession(sessionId, { output: "", files_written: [], commands_run: [], tokens_used: 0, model: "skip" });
@@ -8447,6 +8447,12 @@ var SessionManager = class {
8447
8447
  tokens_used: resp.tokens_used,
8448
8448
  model: resp.model
8449
8449
  });
8450
+ if (this.conversationStore && userEntityId) {
8451
+ const now = Date.now();
8452
+ this.conversationStore.append({ id: crypto.randomUUID(), session_id: sessionId, user_entity_id: userEntityId, role: "user", content: enrichedReq.task, created_at: now });
8453
+ this.conversationStore.append({ id: crypto.randomUUID(), session_id: sessionId, user_entity_id: userEntityId, role: "assistant", content: output.slice(0, 1e3), created_at: now + 1 });
8454
+ }
8455
+ this.heartbeat.afterSession(enrichedReq.task, output, resp.model);
8450
8456
  return this.sessions.get(sessionId);
8451
8457
  } catch {
8452
8458
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "0agent",
3
- "version": "1.0.93",
3
+ "version": "1.0.94",
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",