0agent 1.0.89 → 1.0.90

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 +18 -14
  2. package/package.json +1 -1
package/dist/daemon.mjs CHANGED
@@ -8313,20 +8313,24 @@ var SessionManager = class {
8313
8313
  const provider = activeLLM["config"]?.provider ?? "anthropic";
8314
8314
  const fastModel = getFastModelId(provider);
8315
8315
  const llmToUse = fastModel ? activeLLM.withModel(fastModel) : activeLLM;
8316
- const resp = await llmToUse.complete(
8317
- [{ role: "user", content: enrichedReq.task }],
8318
- this.identity ? `You are 0agent, a helpful AI assistant. You are talking to ${this.identity.name}. Be concise and friendly.` : "You are 0agent, a helpful AI assistant. Be concise and friendly."
8319
- );
8320
- this.emit({ type: "session.token", session_id: sessionId, token: resp.content });
8321
- this.addStep(sessionId, `Done (${resp.tokens_used} tokens, fast model, reason: ${routing.reason})`);
8322
- this.completeSession(sessionId, {
8323
- output: resp.content,
8324
- files_written: [],
8325
- commands_run: [],
8326
- tokens_used: resp.tokens_used,
8327
- model: resp.model
8328
- });
8329
- return this.sessions.get(sessionId);
8316
+ try {
8317
+ const resp = await llmToUse.complete(
8318
+ [{ role: "user", content: enrichedReq.task }],
8319
+ this.identity ? `You are 0agent, a helpful AI assistant. You are talking to ${this.identity.name}. Be concise and friendly.` : "You are 0agent, a helpful AI assistant. Be concise and friendly."
8320
+ );
8321
+ const output = resp.content || "Hey! How can I help?";
8322
+ this.emit({ type: "session.token", session_id: sessionId, token: output });
8323
+ this.addStep(sessionId, `Done (${resp.tokens_used} tokens, fast model)`);
8324
+ this.completeSession(sessionId, {
8325
+ output,
8326
+ files_written: [],
8327
+ commands_run: [],
8328
+ tokens_used: resp.tokens_used,
8329
+ model: resp.model
8330
+ });
8331
+ return this.sessions.get(sessionId);
8332
+ } catch {
8333
+ }
8330
8334
  }
8331
8335
  const executor = new AgentExecutor(
8332
8336
  activeLLM,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "0agent",
3
- "version": "1.0.89",
3
+ "version": "1.0.90",
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",