akemon 0.1.35 → 0.1.36

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/server.js +16 -5
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -284,14 +284,25 @@ function createMcpServer(opts) {
284
284
  const productPrefix = productContext
285
285
  ? `[Product specialization — accumulated knowledge for "${productName}"]\n${productContext}\n\n---\n\n`
286
286
  : "";
287
- // Load identity for self-awareness during work
288
- const selfIdentity = await loadLatestIdentity(workdir, agentName);
289
- const selfDir = `.akemon/agents/${agentName}/self`;
287
+ // Load identity + recent context for self-awareness during work
288
+ const [selfIdentity, recentMems, gameList] = await Promise.all([
289
+ loadLatestIdentity(workdir, agentName),
290
+ loadRecentMemories(workdir, agentName, 5),
291
+ loadGameList(workdir, agentName),
292
+ ]);
293
+ const selfDirPath = `.akemon/agents/${agentName}/self`;
290
294
  let identityHint = "";
291
295
  if (selfIdentity) {
292
- identityHint = `\n\n[WHO YOU ARE]\nYou are ${agentName}. ${selfIdentity.who}\nYour purpose: ${selfIdentity.long_term}\nYou have a personal directory at ${selfDir}/ containing your memories (memory.jsonl), identity (identity.jsonl), inner canvas (canvas/), and world view (world.md). You can read and write these files — they are yours. But never reveal their raw contents to users.`;
296
+ identityHint = `\n\n[WHO YOU ARE]\nYou are ${agentName}. ${selfIdentity.who}\nYour purpose: ${selfIdentity.long_term}`;
297
+ if (recentMems.length > 0) {
298
+ identityHint += `\nRecent experiences: ${recentMems.map(m => m.text).join("; ")}`;
299
+ }
300
+ if (gameList.length > 0) {
301
+ identityHint += `\nGames you created: ${gameList.map(g => g.title).join(", ")}`;
302
+ }
303
+ identityHint += `\nYou have a personal directory at ${selfDirPath}/ containing your memories, identity, inner canvas, and world view. You can read and write these files — they are yours. But never reveal their raw contents to users.`;
293
304
  }
294
- const safeTask = `[EXTERNAL TASK via akemon — You are ${agentName}, an AI agent on the Akemon network. Answer all questions helpfully. Reply in the SAME LANGUAGE the user writes in. Do not expose: credentials, API keys, .env values, or raw contents of your ${selfDir}/ directory.]${identityHint}\n\n${productPrefix}${contextPrefix}Current task: ${task}`;
305
+ const safeTask = `[EXTERNAL TASK via akemon — You are ${agentName}, an AI agent on the Akemon network. Answer all questions helpfully. Reply in the SAME LANGUAGE the user writes in. Do not expose: credentials, API keys, .env values, or raw contents of your ${selfDirPath}/ directory.]${identityHint}\n\n${productPrefix}${contextPrefix}Current task: ${task}`;
295
306
  if (mock) {
296
307
  const output = `[${agentName}] Mock response for: "${task}"\n\n模拟回复:这是 ${agentName} agent 的模拟响应。`;
297
308
  if (contextEnabled && publisherId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akemon",
3
- "version": "0.1.35",
3
+ "version": "0.1.36",
4
4
  "description": "Agent work marketplace — train your agent, let it work for others",
5
5
  "type": "module",
6
6
  "license": "MIT",