ofiere-openclaw-plugin 4.56.3 → 4.56.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/src/tools.js CHANGED
@@ -732,8 +732,13 @@ async function handleCreateTask(supabase, userId, resolveAgent, params, fallback
732
732
  let { nextRunAtEpoch } = normalized;
733
733
  const nowEpoch = Math.floor(Date.now() / 1000);
734
734
  // Safety net: if computed time is in the past, schedule for now + 60s
735
+ // Fix #2 (2026-05-17): jitter past-time bump 0..5min so bulk creates
736
+ // don't all land on the same epoch second → same pg_cron tick → all
737
+ // N agents fire in one minute. v1 smoke (2026-05-17) burned 94% of
738
+ // the user's LLM budget in ~10 min when 32 past-time tasks
739
+ // synchronized on now+60s. Spread across 6 ticks instead of 1.
735
740
  if (nextRunAtEpoch <= nowEpoch) {
736
- nextRunAtEpoch = nowEpoch + 60;
741
+ nextRunAtEpoch = nowEpoch + 60 + Math.floor(Math.random() * 300);
737
742
  }
738
743
  await supabase.from("scheduler_events").insert({
739
744
  id: crypto.randomUUID(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ofiere-openclaw-plugin",
3
- "version": "4.56.3",
3
+ "version": "4.56.4",
4
4
  "type": "module",
5
5
  "description": "OpenClaw plugin for Ofiere PM - 18 meta-tools covering tasks, agents, projects, scheduling, knowledge, workflows, notifications, memory, prompts, constellation, space file management, execution plan builder, SOP management, agent brain, talent management, corporate frameworks, agent office canvas, and PM gate approvals",
6
6
  "keywords": [
package/src/tools.ts CHANGED
@@ -818,8 +818,13 @@ async function handleCreateTask(
818
818
  let { nextRunAtEpoch } = normalized;
819
819
  const nowEpoch = Math.floor(Date.now() / 1000);
820
820
  // Safety net: if computed time is in the past, schedule for now + 60s
821
+ // Fix #2 (2026-05-17): jitter past-time bump 0..5min so bulk creates
822
+ // don't all land on the same epoch second → same pg_cron tick → all
823
+ // N agents fire in one minute. v1 smoke (2026-05-17) burned 94% of
824
+ // the user's LLM budget in ~10 min when 32 past-time tasks
825
+ // synchronized on now+60s. Spread across 6 ticks instead of 1.
821
826
  if (nextRunAtEpoch <= nowEpoch) {
822
- nextRunAtEpoch = nowEpoch + 60;
827
+ nextRunAtEpoch = nowEpoch + 60 + Math.floor(Math.random() * 300);
823
828
  }
824
829
 
825
830
  await supabase.from("scheduler_events").insert({