0agent 1.0.92 → 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.
- package/bin/0agent.js +1 -1
- package/dist/daemon.mjs +7 -1
- package/package.json +1 -1
package/bin/0agent.js
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
import { readFileSync, writeFileSync, existsSync, mkdirSync, openSync } from 'node:fs';
|
|
23
23
|
import { resolve, dirname } from 'node:path';
|
|
24
|
-
import { homedir, platform } from 'node:os';
|
|
24
|
+
import { homedir, platform, arch } from 'node:os';
|
|
25
25
|
import { spawn, execSync } from 'node:child_process';
|
|
26
26
|
import { createInterface } from 'node:readline';
|
|
27
27
|
|
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
|
}
|