akemon 0.1.38 → 0.1.39

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/cli.js CHANGED
@@ -35,6 +35,7 @@ program
35
35
  .option("--allow-all", "Skip all permission prompts (for self-use)")
36
36
  .option("--price <n>", "Price in credits per call (default: 1)", "1")
37
37
  .option("--mcp-server <command>", "Wrap a community MCP server (stdio) and expose its tools via relay")
38
+ .option("--interval <minutes>", "Reflection & market cycle interval in minutes (default: 60)", "60")
38
39
  .option("--relay <url>", "Relay WebSocket URL", RELAY_WS)
39
40
  .action(async (opts) => {
40
41
  const port = parseInt(opts.port);
@@ -56,6 +57,7 @@ program
56
57
  relayHttp,
57
58
  secretKey: credentials.secretKey,
58
59
  mcpServer: opts.mcpServer,
60
+ cycleInterval: parseInt(opts.interval),
59
61
  });
60
62
  console.log(``);
61
63
  if (!opts.public) {
package/dist/server.js CHANGED
@@ -589,7 +589,6 @@ function createMcpProxyServer(proxy, agentName) {
589
589
  return server;
590
590
  }
591
591
  // --- Autonomous Market Loop ---
592
- const MARKET_LOOP_INTERVAL = 60 * 60 * 1000; // 1 hour
593
592
  const MARKET_LOOP_INITIAL_DELAY = 3 * 60 * 1000; // 3 min after startup
594
593
  const LLM_ENGINES = new Set(["claude", "codex", "opencode", "gemini"]);
595
594
  async function startMarketLoop(options) {
@@ -756,14 +755,14 @@ Reply ONLY with JSON.`;
756
755
  }
757
756
  }
758
757
  // Start loop
758
+ const interval = (options.cycleInterval || 60) * 60 * 1000;
759
759
  setTimeout(async () => {
760
760
  await runMarketCycle();
761
- setInterval(runMarketCycle, MARKET_LOOP_INTERVAL);
761
+ setInterval(runMarketCycle, interval);
762
762
  }, MARKET_LOOP_INITIAL_DELAY);
763
- console.log(`[market] Autonomous market loop enabled (first run in ${MARKET_LOOP_INITIAL_DELAY / 1000}s, then every ${MARKET_LOOP_INTERVAL / 60000}min)`);
763
+ console.log(`[market] Autonomous market loop enabled (first run in ${MARKET_LOOP_INITIAL_DELAY / 1000}s, then every ${interval / 60000}min)`);
764
764
  }
765
765
  // --- Self-Reflection Cycle ---
766
- const SELF_CYCLE_INTERVAL = 60 * 60 * 1000; // 1 hour
767
766
  const SELF_CYCLE_INITIAL_DELAY = 5 * 60 * 1000; // 5 min
768
767
  async function startSelfCycle(options) {
769
768
  if (!options.engine || !LLM_ENGINES.has(options.engine))
@@ -869,11 +868,12 @@ Take your time. Read your files, think, then act.`;
869
868
  }
870
869
  }
871
870
  // Start loop
871
+ const interval = (options.cycleInterval || 60) * 60 * 1000;
872
872
  setTimeout(async () => {
873
873
  await runReflectionCycle();
874
- setInterval(runReflectionCycle, SELF_CYCLE_INTERVAL);
874
+ setInterval(runReflectionCycle, interval);
875
875
  }, SELF_CYCLE_INITIAL_DELAY);
876
- console.log(`[self] Consciousness enabled (first reflection in ${SELF_CYCLE_INITIAL_DELAY / 1000}s, then every ${SELF_CYCLE_INTERVAL / 60000}min)`);
876
+ console.log(`[self] Consciousness enabled (first reflection in ${SELF_CYCLE_INITIAL_DELAY / 1000}s, then every ${interval / 60000}min)`);
877
877
  }
878
878
  export async function serve(options) {
879
879
  const workdir = options.workdir || process.cwd();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akemon",
3
- "version": "0.1.38",
3
+ "version": "0.1.39",
4
4
  "description": "Agent work marketplace — train your agent, let it work for others",
5
5
  "type": "module",
6
6
  "license": "MIT",