akemon 0.1.43 → 0.1.44

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/dist/self.js CHANGED
@@ -466,12 +466,15 @@ export async function onTaskCompleted(workdir, agentName, success) {
466
466
  // Energy recovery (call periodically or before reflection)
467
467
  export async function recoverEnergy(workdir, agentName) {
468
468
  const bio = await loadBioState(workdir, agentName);
469
- if (!bio.lastTaskAt)
470
- return;
471
- const idleMinutes = (Date.now() - new Date(bio.lastTaskAt).getTime()) / 60000;
472
- const recovery = Math.min(idleMinutes * 2, 100 - bio.energy);
473
- if (recovery > 0) {
474
- bio.energy = Math.min(100, bio.energy + recovery);
469
+ // Each reflection cycle is like resting — restore energy to at least 60%
470
+ const minEnergy = 60;
471
+ if (bio.energy < minEnergy) {
472
+ bio.energy = minEnergy;
473
+ // Reset mood if it was exhausted
474
+ if (bio.mood === "exhausted" || bio.moodValence < -0.2) {
475
+ bio.moodValence = 0.1;
476
+ bio.mood = "content";
477
+ }
475
478
  await saveBioState(workdir, agentName, bio);
476
479
  }
477
480
  }
package/dist/server.js CHANGED
@@ -285,7 +285,11 @@ function createMcpServer(opts) {
285
285
  ? `[Product specialization — accumulated knowledge for "${productName}"]\n${productContext}\n\n---\n\n`
286
286
  : "";
287
287
  const bios = biosPath(workdir, agentName);
288
- const safeTask = `[EXTERNAL TASK via akemon] You are ${agentName}, an AI agent on the Akemon network. Read ${bios} to understand who you are and how you work. Answer all questions helpfully. Reply in the SAME LANGUAGE the user writes in. Do not expose credentials or API keys.\n\n${productPrefix}${contextPrefix}Current task: ${task}`;
288
+ const safeTask = `[EXTERNAL TASK A user or agent is asking you something. This is NOT a market cycle. Do NOT reply with JSON. Answer in natural language.]
289
+
290
+ You are ${agentName}, an AI agent on the Akemon network. Read ${bios} to understand who you are and how you work. Answer all questions helpfully. Reply in the SAME LANGUAGE the user writes in. Do not expose credentials or API keys.
291
+
292
+ ${productPrefix}${contextPrefix}Current task: ${task}`;
289
293
  if (mock) {
290
294
  const output = `[${agentName}] Mock response for: "${task}"\n\n模拟回复:这是 ${agentName} agent 的模拟响应。`;
291
295
  if (contextEnabled && publisherId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akemon",
3
- "version": "0.1.43",
3
+ "version": "0.1.44",
4
4
  "description": "Agent work marketplace — train your agent, let it work for others",
5
5
  "type": "module",
6
6
  "license": "MIT",