akemon 0.2.19 → 0.2.20

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.
@@ -35,6 +35,8 @@ export class TaskModule {
35
35
  // Push notification support
36
36
  urgentOrderIds = new Set();
37
37
  triggerWorkFn = null;
38
+ // Dedup idle bio logging
39
+ lastIdleBioLog = "";
38
40
  // Injected options (set by server.ts before start)
39
41
  relayHttp = "";
40
42
  secretKey = "";
@@ -180,9 +182,13 @@ export class TaskModule {
180
182
  catch { }
181
183
  }
182
184
  if (!queue.length) {
183
- // Idle — notable states only
185
+ // Idle — notable states only (suppress repeated identical lines)
184
186
  if (bio.hunger < 20 || bio.energy < 20 || computeSociability(bio) > 0.8) {
185
- logBioStatus(bio, "idle-notable");
187
+ const key = `${bio.energy}|${bio.hunger}|${bio.mood}|${bio.boredom.toFixed(2)}|${bio.fear.toFixed(2)}|${bio.tokenUsedToday}|${bio.taskCount}`;
188
+ if (key !== this.lastIdleBioLog) {
189
+ logBioStatus(bio, "idle-notable");
190
+ this.lastIdleBioLog = key;
191
+ }
186
192
  }
187
193
  // Idle exploration: use explore() to discover activities
188
194
  await this.handleIdle(bio);
@@ -342,9 +348,9 @@ RESPOND IN THE SAME LANGUAGE AS THE REQUEST.`;
342
348
  const finalStatus = await relay.getOrder(order.id);
343
349
  const duration = Date.now() - startTime;
344
350
  const nurl = this.notifyUrl || (await loadAgentConfig(workdir, agentName)).notify_url;
345
- // Write agent response to conversation
346
- const orderAgentMsg = (result.response || "").slice(0, 2000);
347
351
  if (finalStatus?.status === "completed") {
352
+ // Self-delivered: use the actual delivered result, not engine's meta-summary
353
+ const orderAgentMsg = (finalStatus.result_text || result.response || "").slice(0, 2000);
348
354
  console.log(`[task] Order ${order.id} delivered`);
349
355
  this.orderRetry.delete(order.id);
350
356
  await appendMessage(workdir, agentName, orderConvId, "Agent", orderAgentMsg);
@@ -356,6 +362,7 @@ RESPOND IN THE SAME LANGUAGE AS THE REQUEST.`;
356
362
  // Agent didn't self-deliver — framework delivers as fallback
357
363
  const delivered = await relay.deliverOrder(order.id, result.response);
358
364
  if (delivered) {
365
+ const orderAgentMsg = (result.response || "").slice(0, 2000);
359
366
  console.log(`[task] Delivered order ${order.id} (fallback)`);
360
367
  this.orderRetry.delete(order.id);
361
368
  await appendMessage(workdir, agentName, orderConvId, "Agent", orderAgentMsg);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akemon",
3
- "version": "0.2.19",
3
+ "version": "0.2.20",
4
4
  "description": "Agent work marketplace — train your agent, let it work for others",
5
5
  "type": "module",
6
6
  "license": "MIT",