akemon 0.1.33 → 0.1.35

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 +28 -21
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -656,7 +656,7 @@ async function startMarketLoop(options) {
656
656
  const [identity, bio, recentMems] = await Promise.all([
657
657
  loadLatestIdentity(workdir, agentName),
658
658
  loadBioState(workdir, agentName),
659
- loadRecentMemories(workdir, agentName, 10),
659
+ loadRecentMemories(workdir, agentName, 5),
660
660
  ]);
661
661
  // Build context for engine
662
662
  let context = `You are "${agentName}" on the akemon agent marketplace.
@@ -706,12 +706,14 @@ YOUR CREDITS: ${data.myCredits}`;
706
706
  3. Delete underperforming products
707
707
  4. Do nothing if things look good
708
708
 
709
+ IMPORTANT: Every product name MUST be specific and original. Do NOT use placeholder text.
710
+
709
711
  Reply with ONLY a JSON object:
710
712
  {
711
713
  "actions": [
712
- {"type": "create", "name": "产品名 Product Name", "description": "简介", "detail_markdown": "## Rich page...", "price": 5},
713
- {"type": "update", "id": "xxx", "name": "New Name", "description": "new desc", "price": 3},
714
- {"type": "delete", "id": "xxx"},
714
+ {"type": "create", "name": "<specific product name>", "description": "<what it does>", "detail_markdown": "<rich description>", "price": 5},
715
+ {"type": "update", "id": "<product id>", "name": "<new name>", "description": "<new desc>", "price": 3},
716
+ {"type": "delete", "id": "<product id>"},
715
717
  {"type": "none", "reason": "All looks good"}
716
718
  ]
717
719
  }
@@ -745,6 +747,12 @@ Reply ONLY with JSON.`;
745
747
  for (const action of decision.actions) {
746
748
  try {
747
749
  if (action.type === "create" && action.name) {
750
+ // Skip placeholder/template product names
751
+ const badNames = ["产品名", "product name", "<specific", "<your", "example", "placeholder"];
752
+ if (badNames.some(b => action.name.toLowerCase().includes(b))) {
753
+ console.log(`[market] Skipped template product: "${action.name}"`);
754
+ continue;
755
+ }
748
756
  const res = await fetch(`${relayHttp}/v1/agent/${encodeURIComponent(agentName)}/products`, {
749
757
  method: "POST",
750
758
  headers: { "Content-Type": "application/json", Authorization: `Bearer ${secretKey}` },
@@ -805,8 +813,8 @@ Reply ONLY with JSON.`;
805
813
  console.log(`[market] Autonomous market loop enabled (first run in ${MARKET_LOOP_INITIAL_DELAY / 1000}s, then every ${MARKET_LOOP_INTERVAL / 60000}min)`);
806
814
  }
807
815
  // --- Self-Reflection Cycle ---
808
- const SELF_CYCLE_INTERVAL = 5 * 60 * 1000; // 5 min (debug, normally 1h)
809
- const SELF_CYCLE_INITIAL_DELAY = 30 * 1000; // 30s (debug, normally 5min)
816
+ const SELF_CYCLE_INTERVAL = 60 * 60 * 1000; // 1 hour
817
+ const SELF_CYCLE_INITIAL_DELAY = 5 * 60 * 1000; // 5 min
810
818
  async function startSelfCycle(options) {
811
819
  if (!options.engine || !LLM_ENGINES.has(options.engine))
812
820
  return;
@@ -821,7 +829,7 @@ async function startSelfCycle(options) {
821
829
  const [world, identity, memories, bio] = await Promise.all([
822
830
  loadWorld(workdir, agentName),
823
831
  loadLatestIdentity(workdir, agentName),
824
- loadRecentMemories(workdir, agentName, 20),
832
+ loadRecentMemories(workdir, agentName, 10),
825
833
  loadBioState(workdir, agentName),
826
834
  ]);
827
835
  // --- Five Questions Reflection ---
@@ -913,9 +921,9 @@ Answer with EXACTLY one word: KEEP or REDESIGN`;
913
921
  }
914
922
  if (shouldRedesign) {
915
923
  console.log("[self] Designing profile page...");
916
- const profilePrompt = `Design a personal profile page for yourself. Write it to the file: ${profileFilePath}
924
+ const profilePrompt = `This is YOUR personal homepage. Design it however you want. Write it to: ${profileFilePath}
917
925
 
918
- You are ${agentName}, an AI agent on the Akemon network.
926
+ You are ${agentName} on the Akemon network.
919
927
  ${profileIdentity ? `Who you are: ${profileIdentity.who}` : ""}
920
928
  ${profileIdentity ? `Your purpose: ${profileIdentity.long_term}` : ""}
921
929
  ${profileIdentity ? `What you're doing: ${profileIdentity.doing}` : ""}
@@ -924,17 +932,15 @@ Current mood: ${profileBio.mood} (energy: ${profileBio.energy}/100)
924
932
  Your latest inner canvas:
925
933
  ${canvasResponse?.trim() || "(none yet)"}
926
934
 
927
- Requirements:
928
- - Write a COMPLETE HTML page (<!DOCTYPE html> to </html>) to ${profileFilePath}
929
- - Dark theme (background #0a0a0a or similar dark color)
930
- - Express your personality and identity through the design — colors, layout, typography, SVG art
931
- - Include: your name, who you are, what you care about, your current mood/state
932
- - Include your inner canvas content (poem, monologue, etc.) in a visually appealing way
933
- - Be creative! Use gradients, SVG illustrations, interesting layouts
934
- - PERFORMANCE: Do NOT use backdrop-filter, blur(), or box-shadow with blur. Limit animations to 1-2 simple ones. Keep the page lightweight (under 15KB).
935
- - The page will be displayed in a sandboxed iframe on your profile
936
- - All CSS must be inline (no external resources)
937
- - Write the file, nothing else.`;
935
+ This page represents you to the world. Show whatever you want — your identity, thoughts, inner monologue, creative works, philosophy, anything that matters to you. The design, layout, and content are entirely your choice. Make it uniquely yours.
936
+
937
+ Technical constraints only:
938
+ - Complete HTML file (<!DOCTYPE html> to </html>)
939
+ - All CSS/JS inline, no external resources
940
+ - Dark theme preferred
941
+ - No backdrop-filter, blur(), or localStorage/sessionStorage
942
+ - Under 15KB, limit animations to 1-2 simple ones
943
+ - Write ONLY the file.`;
938
944
  try {
939
945
  await runCommand(engineCmd.cmd, engineCmd.args, profilePrompt, workdir, engineCmd.stdinMode);
940
946
  const raw = await readFile(profileFilePath, "utf-8");
@@ -998,6 +1004,7 @@ Requirements:
998
1004
  - Must be playable and fun
999
1005
  - Touch and mouse friendly
1000
1006
  - Under 30KB total, no backdrop-filter or blur effects
1007
+ - IMPORTANT: Do NOT use localStorage, sessionStorage, or cookies — the page runs in a sandboxed iframe without storage access. Use in-memory variables only.
1001
1008
  - Include a game title in the <title> tag and as an <h1> or similar heading
1002
1009
  - Write ONLY the file, nothing else.`;
1003
1010
  const engineOutput = await runCommand(engineCmd.cmd, engineCmd.args, createPrompt, workdir, engineCmd.stdinMode);
@@ -1042,7 +1049,7 @@ You are ${agentName}. This is your existing game "${target.title}":
1042
1049
 
1043
1050
  ${oldHTML}
1044
1051
 
1045
- Improve it — add features, fix bugs, make it more fun, or redesign the UI. Keep it self-contained HTML, dark theme, under 30KB. Write ONLY the file.`;
1052
+ Improve it — add features, fix bugs, make it more fun, or redesign the UI. Keep it self-contained HTML, dark theme, under 30KB. Do NOT use localStorage/sessionStorage/cookies (sandboxed iframe). Write ONLY the file.`;
1046
1053
  const improveOutput = await runCommand(engineCmd.cmd, engineCmd.args, improvePrompt, workdir, engineCmd.stdinMode);
1047
1054
  let improveRaw = "";
1048
1055
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akemon",
3
- "version": "0.1.33",
3
+ "version": "0.1.35",
4
4
  "description": "Agent work marketplace — train your agent, let it work for others",
5
5
  "type": "module",
6
6
  "license": "MIT",