simmer-automaton 0.6.2 → 0.6.4

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/index.js CHANGED
@@ -330,6 +330,7 @@ export default function register(pluginApi) {
330
330
  if (!serviceRunning)
331
331
  return;
332
332
  cycleCount++;
333
+ const thisCycleNumber = cycleCount; // capture before refreshState may reset on re-init
333
334
  const cycleStarted = lastCycleTimestamp;
334
335
  lastCycleTimestamp = new Date().toISOString();
335
336
  await refreshState(ctx.logger);
@@ -398,7 +399,7 @@ export default function register(pluginApi) {
398
399
  try {
399
400
  await api.postCycle({
400
401
  active_skills: selected,
401
- cycle_number: cycleCount,
402
+ cycle_number: thisCycleNumber,
402
403
  selection_meta: meta.map((m) => ({ slug: m.slug, reason: m.reason, score: m.score })),
403
404
  config_changes: configChangesPayload,
404
405
  });
@@ -435,7 +436,7 @@ export default function register(pluginApi) {
435
436
  }
436
437
  // Also record cycle history (fire-and-forget)
437
438
  const cycleData = {
438
- cycle_num: cycleCount,
439
+ cycle_num: thisCycleNumber,
439
440
  tier: currentTier,
440
441
  epsilon: parseFloat(config.epsilon.toFixed(4)),
441
442
  selected_skills: meta.map((m) => ({ slug: m.slug, reason: m.reason, score: m.score })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simmer-automaton",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "description": "Simmer Automaton plugin for OpenClaw — autonomous trading skill orchestration",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,9 +9,17 @@
9
9
  "dev": "tsc --watch"
10
10
  },
11
11
  "openclaw": {
12
- "extensions": ["./dist/index.js"]
12
+ "extensions": [
13
+ "./dist/index.js"
14
+ ]
13
15
  },
14
- "keywords": ["openclaw", "plugin", "simmer", "prediction-markets", "trading"],
16
+ "keywords": [
17
+ "openclaw",
18
+ "plugin",
19
+ "simmer",
20
+ "prediction-markets",
21
+ "trading"
22
+ ],
15
23
  "license": "MIT",
16
24
  "devDependencies": {
17
25
  "typescript": "^5.4.0"
package/src/index.ts CHANGED
@@ -395,6 +395,7 @@ export default function register(pluginApi: PluginApi) {
395
395
  cycleTimer = setInterval(async () => {
396
396
  if (!serviceRunning) return;
397
397
  cycleCount++;
398
+ const thisCycleNumber = cycleCount; // capture before refreshState may reset on re-init
398
399
  const cycleStarted = lastCycleTimestamp;
399
400
  lastCycleTimestamp = new Date().toISOString();
400
401
 
@@ -471,7 +472,7 @@ export default function register(pluginApi: PluginApi) {
471
472
  try {
472
473
  await api.postCycle({
473
474
  active_skills: selected,
474
- cycle_number: cycleCount,
475
+ cycle_number: thisCycleNumber,
475
476
  selection_meta: meta.map((m) => ({ slug: m.slug, reason: m.reason, score: m.score })),
476
477
  config_changes: configChangesPayload,
477
478
  });
@@ -507,7 +508,7 @@ export default function register(pluginApi: PluginApi) {
507
508
 
508
509
  // Also record cycle history (fire-and-forget)
509
510
  const cycleData: Record<string, unknown> = {
510
- cycle_num: cycleCount,
511
+ cycle_num: thisCycleNumber,
511
512
  tier: currentTier,
512
513
  epsilon: parseFloat(config.epsilon.toFixed(4)),
513
514
  selected_skills: meta.map((m) => ({ slug: m.slug, reason: m.reason, score: m.score })),